Difference between revisions of "Deployer"
Manuele.simi (Talk | contribs) (→Usage) |
Manuele.simi (Talk | contribs) (→The Deployer test suite) |
||
Line 11: | Line 11: | ||
|---update.ghnmanager.properties | |---update.ghnmanager.properties | ||
| | | | ||
− | |-deploy.sh | + | |--deploy.sh |
− | |-update.sh | + | |--update.sh |
</pre> | </pre> |
Revision as of 04:48, 15 July 2008
The Deployer test suite
The Deployer test suite includes all is needed to perform deployment and update operations on a GHN. The suite structure is the following:
|-test-suite |--lib |---org.gcube.common.vremanagement.deployer.testsuite.jar | |--samples |---deploy.ghnmanager.properties |---deploy.registry.properties |---update.ghnmanager.properties | |--deploy.sh |--update.sh
The only dependency is against gCore 0.3.0+ that must be on the same machine from which the suite is executed.
Usage
To deploy a new package, you need to compile a simple property file with all the co-dependencies of the package and to provide it as input of the deploy.sh script. This is a sample property file that asks for the deployment of two packages:
#global propterties numOfPackagesToDeploy=2 targetScope=/gcube/devsec callerScope=/gcube/devsec # package list package.1.name=IS-Registry-service package.1.version=1.0 package.1.servicename=IS-Registry package.1.serviceclass=InformationSystem package.1.serviceversion=0.0.0 package.2.name=IS-Registry-stubs package.2.version=1.0 package.2.servicename=IS-Registry package.2.serviceclass=InformationSystem package.2.serviceversion=0.0.0
Where:
- the numOfPackagesToDeploy property must report the cardinality of the list below
- the caller scope is the scope of the invocation
- the target scope is the scope where the packages are deployed (it makes sense only for service packages)
- the package.X.Y properties identify the package to deploy
After having compiled such a file, you need to run the deploy.sh script by providing:
- the target GHN's hostname
- the port on which the target GHN is running
- the property file above
Example:
./deploy.sh localhost 8080 samples/deploy.registry.properties
Monitoring the suite activity
By looking at the container.fulllog file on the target GHN, if the property file above is used as input, a successful deployment reports as follows. Firstly, the first package is deployed:
2008-07-14 21:45:37,703 INFO impl.Deployer [ServiceThread-17,info:88] Deployer: starting the deployment for N.2 packages... 2008-07-14 21:45:37,703 INFO operators.DeployerOperator [ServiceThread-17,info:88] DeployerOperator: deploying the package IS-Registry-service... 2008-07-14 21:45:37,704 DEBUG operators.DeployerOperator [ServiceThread-17,debug:64] DeployerOperator: initialising the downloader for package IS-Registry-service... 2008-07-14 21:45:37,705 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: downloading the package IS-Registry-service... 2008-07-14 21:45:37,706 DEBUG deployment.AntRunner [ServiceThread-17,init:75] DILIGENT: initializing the Ant project... 2008-07-14 21:45:37,707 DEBUG deployment.AntRunner [ServiceThread-17,init:76] DILIGENT: base dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment 2008-07-14 21:45:37,707 DEBUG deployment.AntRunner [ServiceThread-17,init:86] DILIGENT: build file = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/deploy.xml 2008-07-14 21:45:37,725 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: the Deployer is trying to download the package from Scope /gcube/devsec... 2008-07-14 21:45:37,730 DEBUG scope.GCUBEScopeManagerImpl [ServiceThread-17,debug:64] GCUBEScopeManagerImpl: Setting scope /gcube/devsec in thread ServiceThread-17(45) 2008-07-14 21:45:37,742 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: downloading ServiceClass=InformationSystem, ServiceName=IS-Registry, ServiceVersion=0.0.0, PackageName=IS-Registry-service, PackageVersion=1.0 from Address: http://dlib05.isti.cnr.it:8080/wsrf/services/gcube/vremanagement/softwarerepository/SoftwareRepository 2008-07-14 21:45:37,742 DEBUG scope.GCUBEScopeManagerImpl [ServiceThread-17,debug:64] GCUBEScopeManagerImpl: Preparing call to service VREManagement,SoftwareRepository in scope /gcube/devsec 2008-07-14 21:45:38,191 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: returned URL = http://dlib05.isti.cnr.it:80/maven/InformationSystem/IS-Registry/0/0/0/IS-Registry-service/1.0/IS-Registry-service-1.0.tar.gz 2008-07-14 21:45:38,193 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: getting data from returned URL... 2008-07-14 21:45:38,456 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: connection return code: 200 2008-07-14 21:45:38,459 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: bytes available out: 4054 2008-07-14 21:45:38,460 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: open URL connection and saving to local cache... 2008-07-14 21:45:38,462 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: Saving package to = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/tmp/IS-Registry-service.tar.gz 2008-07-14 21:45:38,941 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: package successfully downloaded 2008-07-14 21:45:38,942 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: uncompressing the package... 2008-07-14 21:45:38,942 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property base.deploy.dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/local-packages 2008-07-14 21:45:38,942 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property service.id = InformationSystem-IS-Registry-0.0.0 2008-07-14 21:45:38,942 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property package.source.dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/tmp 2008-07-14 21:45:38,943 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property package.name = IS-Registry-service 2008-07-14 21:45:38,943 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property package.file = IS-Registry-service.tar.gz 2008-07-14 21:45:38,987 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: looking for service profile in /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/local-packages/InformationSystem-IS-Registry-0.0.0 2008-07-14 21:45:38,993 DEBUG deployment.AntRunner [ServiceThread-17,init:75] DILIGENT: initializing the Ant project... 2008-07-14 21:45:38,994 DEBUG deployment.AntRunner [ServiceThread-17,init:76] DILIGENT: base dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment 2008-07-14 21:45:38,994 DEBUG deployment.AntRunner [ServiceThread-17,init:86] DILIGENT: build file = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/deploy.xml 2008-07-14 21:45:39,013 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property base.deploy.dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/local-packages 2008-07-14 21:45:39,014 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property gar.name = org.gcube.informationsystem.registry.gar 2008-07-14 21:45:39,014 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property service.id = InformationSystem-IS-Registry-0.0.0 2008-07-14 21:45:39,014 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property gar.id = org.gcube.informationsystem.registry 2008-07-14 21:45:39,015 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property package.source.dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/tmp 2008-07-14 21:45:39,015 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property package.name = IS-Registry-service 2008-07-14 21:45:39,015 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property package.file = IS-Registry-service.tar.gz 2008-07-14 21:45:40,546 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property base.deploy.dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/local-packages 2008-07-14 21:45:40,546 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property package.source.dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/tmp 2008-07-14 21:45:40,588 INFO operators.DeployerOperator [ServiceThread-17,info:88] DeployerOperator: the package IS-Registry-service has been successfully deployed
... then, the second package is deployed:
2008-07-14 21:45:40,588 INFO operators.DeployerOperator [ServiceThread-17,info:88] DeployerOperator: deploying the package IS-Registry-stubs... 2008-07-14 21:45:40,588 DEBUG operators.DeployerOperator [ServiceThread-17,debug:64] DeployerOperator: initialising the downloader for package IS-Registry-stubs... 2008-07-14 21:45:40,589 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: downloading the package IS-Registry-stubs... 2008-07-14 21:45:40,591 DEBUG deployment.AntRunner [ServiceThread-17,init:75] DILIGENT: initializing the Ant project... 2008-07-14 21:45:40,591 DEBUG deployment.AntRunner [ServiceThread-17,init:76] DILIGENT: base dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment 2008-07-14 21:45:40,591 DEBUG deployment.AntRunner [ServiceThread-17,init:86] DILIGENT: build file = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/deploy.xml 2008-07-14 21:45:40,605 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: the Deployer is trying to download the package from Scope /gcube/devsec... 2008-07-14 21:45:40,610 DEBUG scope.GCUBEScopeManagerImpl [ServiceThread-17,debug:64] GCUBEScopeManagerImpl: Setting scope /gcube/devsec in thread ServiceThread-17(45) 2008-07-14 21:45:40,612 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: downloading ServiceClass=InformationSystem, ServiceName=IS-Registry, ServiceVersion=0.0.0, PackageName=IS-Registry-stubs, PackageVersion=1.0 from Address: http://dlib05.isti.cnr.it:8080/wsrf/services/gcube/vremanagement/softwarerepository/SoftwareRepository 2008-07-14 21:45:40,612 DEBUG scope.GCUBEScopeManagerImpl [ServiceThread-17,debug:64] GCUBEScopeManagerImpl: Preparing call to service VREManagement,SoftwareRepository in scope /gcube/devsec 2008-07-14 21:45:41,088 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: returned URL = http://dlib05.isti.cnr.it:80/maven/InformationSystem/IS-Registry/0/0/0/IS-Registry-stubs/1.0/IS-Registry-stubs-1.0.tar.gz 2008-07-14 21:45:41,090 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: getting data from returned URL... 2008-07-14 21:45:41,380 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: connection return code: 200 2008-07-14 21:45:41,382 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: bytes available out: 1157 2008-07-14 21:45:41,382 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: open URL connection and saving to local cache... 2008-07-14 21:45:41,384 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: Saving package to = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/tmp/IS-Registry-stubs.tar.gz 2008-07-14 21:45:41,889 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: package successfully downloaded 2008-07-14 21:45:41,889 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: uncompressing the package... 2008-07-14 21:45:41,889 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property base.deploy.dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/local-packages 2008-07-14 21:45:41,890 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property service.id = InformationSystem-IS-Registry-0.0.0 2008-07-14 21:45:41,890 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property package.source.dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/tmp 2008-07-14 21:45:41,890 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property package.name = IS-Registry-stubs 2008-07-14 21:45:41,891 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property package.file = IS-Registry-stubs.tar.gz 2008-07-14 21:45:41,940 DEBUG deployment.DownloadManager [ServiceThread-17,debug:64] DownloadManager: looking for service profile in /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/local-packages/InformationSystem-IS-Registry-0.0.0 2008-07-14 21:45:41,948 DEBUG deployment.AntRunner [ServiceThread-17,init:75] DILIGENT: initializing the Ant project... 2008-07-14 21:45:41,951 DEBUG deployment.AntRunner [ServiceThread-17,init:76] DILIGENT: base dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment 2008-07-14 21:45:41,951 DEBUG deployment.AntRunner [ServiceThread-17,init:86] DILIGENT: build file = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/deploy.xml 2008-07-14 21:45:41,970 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property base.deploy.dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/local-packages 2008-07-14 21:45:41,971 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property jar.name = org.gcube.informationsystem.registry.stubs.jar 2008-07-14 21:45:41,971 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property service.id = InformationSystem-IS-Registry-0.0.0 2008-07-14 21:45:41,987 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property package.source.dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/tmp 2008-07-14 21:45:41,987 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property package.name = IS-Registry-stubs 2008-07-14 21:45:41,987 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property package.file = IS-Registry-stubs.tar.gz 2008-07-14 21:45:42,012 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property base.deploy.dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/local-packages 2008-07-14 21:45:42,012 DEBUG deployment.AntRunner [ServiceThread-17,setProperties:132] DILIGENT: property package.source.dir = /home/manuele/ISTI-projects/D4Science/Test/gCore031/etc/org.gcube.common.vremanagement.deployer/deployment/tmp 2008-07-14 21:45:42,054 INFO operators.DeployerOperator [ServiceThread-17,info:88] DeployerOperator: the package IS-Registry-stubs has been successfully deployed
and finally the GHN is restarted (if needed):
2008-07-14 21:45:42,054 DEBUG deployment.Report [ServiceThread-17,send:135] Trying to send report to: 2008-07-14 21:45:42,055 INFO common.ContainerManager [ServiceThread-17,restart:35] DILIGENT: the container is going to be restarted... 2008-07-14 21:45:42,055 INFO common.ContainerManager [ServiceThread-17,shutdown:56] DILIGENT: the container is shutting down...