Difference between revisions of "Developer's Guide/ResourceManagerClient"
Andrea.manzi (Talk | contribs) (→Resource Manager Client) |
Andrea.manzi (Talk | contribs) (→Resource Manager Client) |
||
Line 9: | Line 9: | ||
* Remove Scope from a Resource | * Remove Scope from a Resource | ||
− | For each operation the Resource Manager | + | For each operation the Resource Manager Service report is automatically parsed reporting the user possible errors and/or successful executions. |
=== Usage === | === Usage === |
Revision as of 12:05, 31 January 2011
Contents
Resource Manager Client
The Resource Manager Client library is a set of utilities which allows the management of a gCube infrastructure. It exploits and combines the functionalities exposed by the Resource Manager Service, giving Site/Infrastructure Administrators a powerful tool to easily perform the following infrastructure management operations:
- Service Deployment
- Service Undeployment
- Service Upgrade
- Add Scope to a Resource
- Remove Scope from a Resource
For each operation the Resource Manager Service report is automatically parsed reporting the user possible errors and/or successful executions.
Usage
The Library can be invoked by CLI using the following syntax:
ResourceManagerClient [options] scope true/false [parameters...]
where :
- scope : identifies the operation scope, thus the Resource Manager Service instance to contact. The Resource Manager service to contact for every type of operation is automatically discovered from the Infrastructure ISs.
- true/false : specifies if the Resource Manager needs to be contacted in a secure way. If yes the user proxy is loaded from the environment ( the X509_USER_PROXY variable need to be set ) and attached to the service request.
- options:
- DEPLOY : to deploy one or more SAs
- UNDEPLOY_RI : to undeploy one or more RunningInstance knowing the Ids.
- UNDEPLOY_SA : to undeploy one or more SAs from the given scope
- UPGRADE_RI : to upgrade one or more RIs in the given scope
- UPGRADE_SA : to upgrade one or more SAs in the given scope.
- ADD_SCOPE : to add one or more Resources to the given scope
- REMOVE_SCOPE : to remove one or more Resources from the given scope
- REPORT : to get the deployment/undeplopyment report
Parameters
For each options different parameters can be specified.
DEPLOY
The information about one or more SA to deploy need to be specified in the following order:
- ServiceName
- ServiceClass
- Service version
- GHNId ( where to deploy the service)
A property file containing the deployment information can be provided instead having the following content:
numOfServicesToAdd=2 # service list service.1.name=MetadataManager service.1.class=MetadataManagement service.1.version=1.00.00 service.1.GHN=6513ed50-2a06-11e0-b935-a78dccda43f7 service.2.name=Master service.2.class=DIR service.2.version=1.00.00 service.2.GHN=6513ed50-2a06-11e0-b935-a78dccda43f7
UNDEPLOY_RI
A list of Running Instance IDs to undeploy can be specified
UNDEPLOY_SA
The information about one or more SA to undeploy need to be specified in the following order:
- ServiceName
- ServiceClass
- Service Version
If the GHNId parameter is used, only the RIs belonging to that GHN will be undeployed, otherwise every RIs of given SAs in the given scope will be undeployed.
A property file containing the undeployment information can be provided instead:
numOfServicesToRemove=2 # service list service.1.name=MetadataManager service.1.class=MetadataManagement service.1.version=1.00.00 service.1.GHN=6513ed50-2a06-11e0-b935-a78dccda43f7 service.2.name=Master service.2.class=DIR service.2.version=1.00.00 service.2.GHN=6513ed50-2a06-11e0-b935-a78dccda43f7
UPGRADE_RI
A list of Running Instance IDs to undeploy can be specified
UPGRADE_SA
The information about one or more SA to upgrade need to be specified in the following order:
- ServiceName
- ServiceClass
- Service Version
If the GHNId parameter is used, only the RIs belonging to that GHN will be upgrade, otherwise every RIs of given SAs in the given scope will be upgrade.
A property file containing the upgrade information can be provided instead:
numOfServicesToUpgrade=2 # service list service.1.name=MetadataManager service.1.class=MetadataManagement service.1.version=1.00.00 service.1.GHN=6513ed50-2a06-11e0-b935-a78dccda43f7 service.2.name=Master service.2.class=DIR service.2.version=1.00.00 service.2.GHN=6513ed50-2a06-11e0-b935-a78dccda43f7
ADD_SCOPE
This operation let the administrator add the given list of resource Ids to the given scope. Thus the parameters are:
- ResourceType
- List of Resource IDs
ResourceType must be one of:
- GHN
- RunningInstance
- Collection
- MetadataCollection
- GenericResource
REMOVE_SCOPE
This operation let the administrator remove the given list of resource Ids from the given scope. Thus the parameters are:
- ResourceType
- List of Resource IDs
ResourceType must be one of:
- GHN
- RunningInstance
- Collection
- MetadataCollection
- GenericResource
REPORT
It returns the Resource Manager report for the given report ID.