Difference between revisions of "Developer's Guide/ResourceManagerClient"

From Gcube Wiki
Jump to: navigation, search
(Known Limitations)
(Known Limitations)
Line 148: Line 148:
  
 
Due to some issue under investigation on Resource Manager Service side, some of the functionalities exposed by the library are not fully functional at the moment, in particular:
 
Due to some issue under investigation on Resource Manager Service side, some of the functionalities exposed by the library are not fully functional at the moment, in particular:
* the DEPLOY operation cannot deploy N instance of the same service ( see https://issue.d4science-ii.research-infrastructures.eu/ticket/361 for details)
+
* the DEPLOY operation cannot deploy N instances of the same service ( see https://issue.d4science-ii.research-infrastructures.eu/ticket/361 for details)
 
* the UPGRADE_SA and UPGRADE_RI operations fail when the SAs or RIs to upgrade ( in a single request) belong to the same ServiceClass and Service Name ( see https://issue.d4science-ii.research-infrastructures.eu/ticket/361 for details)
 
* the UPGRADE_SA and UPGRADE_RI operations fail when the SAs or RIs to upgrade ( in a single request) belong to the same ServiceClass and Service Name ( see https://issue.d4science-ii.research-infrastructures.eu/ticket/361 for details)
 
* the UPGRADE_SA, UPGRADE_RI, UNDEPLOY_RI, UNDEPLOY_SA operation reports are not correctly filled by the Resource Manager service during the undeployment phase in case the same SAs are undeployed from different GHNs. Even if the operation is completed successfully, the library cannot understand from the report nor the operation completion neither report possible errors.
 
* the UPGRADE_SA, UPGRADE_RI, UNDEPLOY_RI, UNDEPLOY_SA operation reports are not correctly filled by the Resource Manager service during the undeployment phase in case the same SAs are undeployed from different GHNs. Even if the operation is completed successfully, the library cannot understand from the report nor the operation completion neither report possible errors.

Revision as of 11:51, 31 January 2011

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.


Known Limitations

Due to some issue under investigation on Resource Manager Service side, some of the functionalities exposed by the library are not fully functional at the moment, in particular:

  • the DEPLOY operation cannot deploy N instances of the same service ( see https://issue.d4science-ii.research-infrastructures.eu/ticket/361 for details)
  • the UPGRADE_SA and UPGRADE_RI operations fail when the SAs or RIs to upgrade ( in a single request) belong to the same ServiceClass and Service Name ( see https://issue.d4science-ii.research-infrastructures.eu/ticket/361 for details)
  • the UPGRADE_SA, UPGRADE_RI, UNDEPLOY_RI, UNDEPLOY_SA operation reports are not correctly filled by the Resource Manager service during the undeployment phase in case the same SAs are undeployed from different GHNs. Even if the operation is completed successfully, the library cannot understand from the report nor the operation completion neither report possible errors.