Software Repository
Contents
Software Repository
Introduction
The Software Repository validates Software Archive, and stores and manages Packages. It checks packages dependencies and giving both access to packages relations and access to the stored packages supports the dynamic packages deployment.
This repository accepts registration requests coming from the Sofware Archive Registration Portlet that is part of the VRE Management
Implentation Overview
This component is responsible for the validation, storage, and maintenance of the Software Archives, each software archive contains all files declared on the Service Profile . It checks packages dependencies and by ensuring access to them, it supports the dynamic packages deployment.
The Software Repository is a WSRF service, implemented as specified by the Singleton Pattern.
The service includes a Validation phase that checks software archives based on service profiles declarations. It control also that service profiles are valid against the service profile schema. Controls performed includes checking that all declared files are in the right place into the service archive structure. After validation phase (if successful) it store in a pending state all packages declared in service profile. When the Software Archive is approved the Software Repository finally store all packages in the repository for dynamic deployment
Functionality
The signatures of the actual implemented methods are presented below. These operations allow uploading, deleting, listing, and getting package. As well as other advanced operations that operate over packages dependencies.
store
store(StoreMessage) -> String
This operation stores a software archive into the Software Repository in pending state. Pending status means that software archive is valid, and receive an unique ID that it was not previously used. The main issue of this method is the validation. You can find more informations about the controls performed on Software Archives Specification
StoreMessage type contains Service Class, Service Name and Version of the service, the URL from where the software archive can be downloaded, and the service description. Further contains a String[] with scopes where the Service should be published.
Return String containing an XML with the information about the validation of Software Archive.
An example of this XML String is:
<Services> <Service> <URL>http://grids16.eng.it/repository_recent_builds/org.gcube.HEAD/BUILD_187/org.gcube.vo-management.credential-renewal-servicearchive.HEAD/org.gcube.vo-management.credential-renewal-servicearchive-0.0.0-0.tar.gz</URL> <ID>082677d0-5cf3-11dd-a000-e94252afcc8c</ID> <ServiceClass>DVOS</ServiceClass> <ServiceName>CredentialsRenewalService</ServiceName> <ServiceVersion>0.0.0</ServiceVersion> <Status>ERROR</Status> <Operation>NEW</Operation> <Timestamp>1217283477453</Timestamp> <ReportURL>http://dlib05.isti.cnr.it:80/report/29-07-2008/082677d0-5cf3-11dd-a000-e94252afcc8c_1217283477453.xml</ReportURL> </Service> <Service> <URL>http://grids16.eng.it/repository_recent_builds/org.gcube.HEAD/BUILD_187/org.gcube.vre-management.deployer-servicearchive.HEAD/org.gcube.vre-management.deployer-servicearchive-0.0.0-0.tar.gz</URL> <ID>d253bca0-5903-11dd-9bc1-c9ec09a1eecb</ID> <ServiceClass>VREManagement</ServiceClass> <ServiceName>Deployer</ServiceName> <ServiceVersion>0.0.0</ServiceVersion> <Status>SUCCESS</Status> <Operation>UPDATE</Operation> <Timestamp>1217283478524</Timestamp> <ReportURL>http://dlib05.isti.cnr.it:80/report/29-07-2008/d253bca0-5903-11dd-9bc1-c9ec09a1eecb_1217283478524.xml</ReportURL> </Service> <Service> <URL>http://grids16.eng.it/repository_recent_builds/org.gcube.HEAD/BUILD_187/org.gcube.vre-management.software-repository-servicearchive.HEAD/org.gcube.vre-management.software-repository-servicearchive-0.0.0-0.tar.gz</URL> <ID>d31c63d0-5903-11dd-9bc1-c9ec09a1eecb</ID> <ServiceClass>VREManagement</ServiceClass> <ServiceName>SoftwareRepository</ServiceName> <ServiceVersion>0.0.0</ServiceVersion> <Status>SUCCESS</Status> <Operation>UPDATE</Operation> <Timestamp>1217283480125</Timestamp> <ReportURL>http://dlib05.isti.cnr.it:80/report/29-07-2008/d31c63d0-5903-11dd-9bc1-c9ec09a1eecb_1217283480125.xml</ReportURL> </Service> </Services>
During this phase a Report about the validation is generated. You can find informations about the Report Generation
listPending
listPending( ) -> String
Return This operation returns an XML containing all stored service archives with status pending. The XML structure is as follow:
<Services> <Service> <Id>d253bca0-5903-11dd-9bc1-c9ec09a1eecb</Id> <Class>VREManagement</Class> <Name>Deployer</Name> <Version>0.0.0</Version> </Service> </Services>
approve
approve (String) -> String
Approve an already stored service archive with the service ID passed as argument if exists.
String Service ID
Return It returns OK if operation success, an error message otherwise.
ATTENTION The Software Repository Running Instance (RI) have to be available in all scopes it have to publish the service profile.
delete
delete (String) -> String
This operation deletes a stored pending Software Archive from the Software Repository with the service ID passed as argument if exists.
String Service ID
Return It returns OK if operation success, an error message otherwise.
get
get(GetMessage) -> String
GetMessage type contains Service Class, Service Name, Service Version, Package Name and Package Version of the requested package
Return The method returns the URI from where the requested package can be downloaded.
isDeployable
isDeployable(String) -> StringArray
With this functionality it is possible to know if a service is deployable. This means all dependences are deployable too.
String Service ID
Return StringArray containing on each element a piece of xml that describes the dependency
<Dependency> <Service> <Class>Class</Class> <Name>Name</Name> <Version>1.0.0</Version> </Service> <Package>MainPackage</Package> <Version>1.0.1</Version> <Scope level="GHN"/> </Dependency>
listScopedPackages
listScopedPackages(ListScopedPackagesMessage) -> StringArray
This operation lists all dependencies with a certain scope level given as argument.
ListScopedPackagesMessage type contains serviceID and scope(GHN, VRE, VO)
Return StringArray containing on each element a piece of xml that describes the dependency
<Dependency> <Service> <Class>Class</Class> <Name>Name</Name> <Version>1.0.0</Version> </Service> <Package>MainPackage</Package> <Version>1.0.1</Version> <Scope level="GHN"/> </Dependency>
listServicePackages
listServicePackages(ListServicePackagesMessage) -> String
This operation lists all packages belonging the Service.
ListServicePackagesMessage type contains Service Class, Service Name, Service Version
Return an XML string containing all packages belonging the service. The XML structure is as follow:
<Packages> <Package> <ServiceClass>Class</ServiceClass> <ServiceName>Name</ServiceName> <ServiceVersion>1.0.0</ServiceVersion> <PackageName>Main</PackageName> <PackageVersion>1.0</PackageVersion> <URL>http://dlib25.isti.cnr.it:80/maven/Class/Name/1/0/0/Main/1.0/Main-1.0.tar.gz</URL> <DocURL>http://dlib25.isti.cnr.it:80/maven/Class/Name/1/0/0/Main/1.0/doc/api/index.html</DocURL> <SVN>http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/class/name</SVN> </Package> <Package> <ServiceClass>Class</ServiceClass> <ServiceName>Name</ServiceName> <ServiceVersion>1.0.0</ServiceVersion> <PackageName>Stubs</PackageName> <PackageVersion>1.0</PackageVersion> <URL>http://dlib25.isti.cnr.it:80/maven/Class/Name/1/0/0/Stubs/1.0/Stubs-1.0.tar.gz</URL> <SVN>http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/class/name</SVN> </Package> </Packages>
Dependencies
The dependencies of the Package Repository Service are:
- GHN: to host service.
- Commons-compress from Jakarta: to File compress functionality.
- hsqldb: to use the DB
- MavenCustom: to use maven repository functionality