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

From Gcube Wiki
Jump to: navigation, search
(Usage)
 
(13 intermediate revisions by the same user not shown)
Line 8: Line 8:
 
* Add Scope to a Resource  
 
* Add Scope to a Resource  
 
* Remove Scope from 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 ===
 
=== Usage ===
Line 24: Line 26:
 
** '''DEPLOY''' : to deploy one or more SAs
 
** '''DEPLOY''' : to deploy one or more SAs
 
**'''UNDEPLOY_RI''' : to undeploy one or more RunningInstance knowing the Ids.
 
**'''UNDEPLOY_RI''' : to undeploy one or more RunningInstance knowing the Ids.
**'''UNDEPLOY_SA''' : to undeploy one or more SAs from the given scope  
+
**'''UNDEPLOY_SA''' : to undeploy one or more SAs from the given scope (every RIs corresponding to the given SAs will be undeployed).
 
**'''UPGRADE_RI''' : to upgrade one or more RIs in 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.
+
**'''UPGRADE_SA''' : to upgrade one or more SAs in the given scope (every RIs corresponding to the given SAs will be upgraded).
 
**'''ADD_SCOPE''' : to add one or more Resources to 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
 
**'''REMOVE_SCOPE''' : to remove one or more Resources from the given scope
 
**'''REPORT''' : to get the deployment/undeplopyment report
 
**'''REPORT''' : to get the deployment/undeplopyment report
*''parameters'':
+
 
** DEPLOY : [<ServiceName> <ServiceClass> <version> <GHNId>]*
+
=== Parameters ===
A property file containinig the deployment information can  be provided instead:
+
 
DEPLOY : <Property File>
+
For each option different parameters can be specified.
** UNDEPLOY_RI : [<RunningIstanceID>]*
+
 
**UNDEPLOY_SA : [<ServiceName> <ServiceClass> <version> ]* <GHNId>
+
==== DEPLOY ====
A property file containinig the undeployment information can  be provided instead:
+
The information about one or more SA to deploy need to be specified in the following order:
UNDEPLOY_SA : <Property File>
+
* ''ServiceName''  
**UPGRADE_RI :[<RunningIstanceID>]*
+
* ''ServiceClass''
**UPGRADE_SA : [<ServiceName> <ServiceClass> <version> ]* <GHNId>
+
* ''Service version''
A property file containinig the upgrade information can  be provided instead:
+
* ''GHNId'' ( where to deploy the service)
UPGRADE_SA : <Property File>
+
 
**ADD_SCOPE : <ResourceType> [<ResourceID>]*  
+
A property file containing the deployment information can  be provided instead having the following content:
<ResourceType> must be one of: GHN, RunningInstance, Collection, MetadataCollection, GenericResource
+
 
** REMOVE_SCOPE : <ResourceType> [<ResourceID>]*  
+
<pre>
<ResourceType> must be one of: GHN, RunningInstance, Collection, MetadataCollection, GenericResource
+
numOfServicesToAdd=2
** REPORT : <deployment/undeployment ID>
+
# 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
 +
</pre>
 +
==== 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:
 +
 
 +
<pre>
 +
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
 +
</pre>
 +
 
 +
====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:
 +
 
 +
<pre>
 +
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
 +
</pre>
 +
====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.
 +
* In the case of DEPLOY operation, if specifying more than one service to deploy in more than one GHN  by mistake one of the GHN id is misspelled or not correct, the Resource Manager blocks the whole deployment process, even the services to deploy on the correct GHN.

Latest revision as of 15:11, 8 April 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 (every RIs corresponding to the given SAs will be undeployed).
    • UPGRADE_RI : to upgrade one or more RIs in the given scope
    • UPGRADE_SA : to upgrade one or more SAs in the given scope (every RIs corresponding to the given SAs will be upgraded).
    • 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 option 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.
  • In the case of DEPLOY operation, if specifying more than one service to deploy in more than one GHN by mistake one of the GHN id is misspelled or not correct, the Resource Manager blocks the whole deployment process, even the services to deploy on the correct GHN.