Resource plan modification by CLI feature

Use resource plan modification when you want to modify a resource plan using a script.

About resource plan modification by CLI

This package contains the EGO CLI Resource Plan Modification feature, which allows you to modify your resource plan using the command line interface (CLI). Use this feature when you want to modify a resource plan using a script. Benefits of using this feature include triggering the update of resource plan by means of a script. Without this feature, you must log on to the Platform Management Console (PMC) to modify the resource plan.

Scope


Applicability

Details

Operating system

Windows

Symphony version

Symphony 3.1

Commands

Applies only to the egosh command

Limitations

The feature is only available upon request

Known issues

None


Configuration to enable resource plan modification by CLI

Installation files

This package includes the following files:

File

Description

egosh.exe

EGO CLI

egosh.pdb

EGO program database file


Installation procedure

  1. On all hosts where you run the egosh command, replace the egosh.exe and egosh.pdb files.

Installation verification (Windows)

  1. Start the EGO and WEBGUI services.

  2. Log on to the Platform Management Console as a cluster administrator and export the resource plan as C:\ResourcePlan.xml.

  3. Run egosh user logon and log on as a cluster administrator.

  4. Run egosh consumer applyresplan C:\ResourcePlan.xml to modify the resource plan.

    If you installed correctly, a success message displays.

Installation verification (Unix)

  1. Start the EGO and WEBGUI services.

  2. Log on to the Platform Management Console as a cluster administrator and export the resource plan as /tmp/ResourcePlan.xml.

  3. Run egosh user logon and log on as a cluster administrator.

  4. Run egosh consumer applyresplan /tmp/ResourcePlan.xml to modify the resource plan.

    If you installed correctly, a success message displays.

Behavior of resource plan modification by CLI

After exporting, editing, and saving the resource plan as C:\ResourcePlan.xml, egosh applyresplan C:\ResourcePlan.xml updates the resource plan:
  • Checks user rights.

    Only the Cluster Administrator or the Consumer Administrator of the top-level consumer can update the resource plan using egosh.

  • Validates the applied resource plan against the schema.

    The applied resource plan must be a valid resource plan XML file.

  • Checks for conflicts between the applied resource plan and the backend resource plan.

    The consumer in the applied resource plan must exist in the backend resource plan.

  • Delivers the applied resource plan to the backend and makes it take effect.

    Calls the EGO API to deliver the applied resource plan to the backend.

Usage


Syntax

Description

applyresplan [-c] [-e error_log_directory] resource_plan_file

Applies the specified resource plan

-c

Only checks the resource plan without applying it.

-e

Specifies the directory of the error log. If an error occurs while updating the resource plan, the error messages are appended into the error log in the specified directory.

If the directory of the error log is not specified, the system outputs error messages to

stderr
.

resource_plan_file

Specifies the path of the resource plan that you want to apply. The resource plan must be a valid resource plan XML file.


Example of usage

  1. Prepare the resource plans.

    1. Log on to the Platform Management Console as a cluster administrator.

    2. Export the resource plan and save it as C:\ResourcePlan.xml.

    3. Edit ResourcePlan.xml in order to allocate all the resources available to SOASamples, and save it as C:\ResourcePlan_new.xml.

  2. Switch resource plans using egosh in your script.
    1. Log on as a cluster administrator in egosh.

      The credential are saved in a temp directory. Over the next 8 hours, egosh uses this credential to execute commands and does not need the user's password.

    2. In your script, call egosh applyconsumer -e C:\ C:\ResourcePlan.xml and egosh applyconsumer -e C:\ C:\ResourcePlan_new.xml to switch resource plans when some event occurs.

Behavior of configuration to modify resource plan modification by CLI

None.

Resource plan modification by CLI commands

Commands to monitor


User

Command

Behavior

Cluster Administrator or Consumer Administrator

From the Platform Management Console: Consumers & Plans > Resource Plan

Check the resource plan.


Commands to control


User

Command

Behavior

Cluster Administrator or Consumer Administrator

From the Platform Management Console: Consumers & Plans > Resource Plan

Export the resource plan.

Cluster Administrator or Consumer Administrator

egosh consumer applyresplan

Modify the resource plan.


Commands to display configuration

Not applicable.

Commands for submission


Syntax

Description

applyresplan [-c] [-e error_log_directory] resource_plan_file

Applies the specified resource plan

-c

Only checks the resource plan without applying it.

-e

Specifies the directory of the error log. If an error occurs while updating the resource plan, the error messages are appended into the error log in the specified directory.

If the directory of the error log is not specified, the system outputs error messages to stderr.

resource_plan_file

Specifies the path of the resource plan that you want to apply. The resource plan must be a valid resource plan XML file.