Application Deployment and Description

From VCGR Wiki

Jump to: navigation, search

Contents


This page describes details on the application description and deployment services in Genesis II. Under the covers, services are involved (associated with BES containers) which take descriptions of applications to be deployed and enact the work described therein. The descriptions themselves are really XML documents associated through RNS naming and realized as resources (usually ByteIO). This section MOSTLY describes the XML document schema.


Application Registration and Description Tool

There is one Genesis II tool which is used to both create new applications, and register new descriptions with them. That tool is the app-description-tool tool. The usage for this tool is

app-description-tool --create-application 
    [--description-service=<path-to-description-service>]
    <application-path> [<version>]

       OR

app-description-tool --register <application-path> 
    <registration-name> [<deployment-document>]

       OR

app-description-tool --register-program 
    [--cpu-arch=<arch>] [--os-type=<os-type> [--os-version=<os-version>]]
    <application-path> <binary>

The first usage allows you to create a new application resource. This is a resource that collects together registered application descriptions for a given application type. These registered descriptions should be considered equivalent from a user perspective and only differ in description type (see below) and architecture described.

The second usage is for registering a new application description with a given application resource. For this usage, the user provides an XML document which describes the application registration (see below).

The final usage is for "Legion-like" registrations where your application is a simple binary that just needs to be available on the target machine. This registration type will essentially create the application description for you prior to registering it.


Application Description Document Format

The following pseudo-schema describes the overall structure of an application description document. Note that the genii-app/deployment-descriptor element is an extensible element type. This allows for various application description formats to be used. Below this section we will describe the application description format types that are available.

<gdesc:deployment-descriptor
    xmlns:jsdl="http://schemas.ggf.org/jsdl/2005/11/jsdl"
    xmlns:gdesc="http://vcgr.cs.virginia.edu/genii/application-description"
    xmlns:genii-bin="http://vcgr.cs.virginia.edu/genii/application-description/bin">

   <gdesc:PlatformDescription>
        <jsdl:CPUArchitecture> jsdl:CPUArchitectureType </jsdl:CPUArchitecture> *
        <jsdl:OperatingSystem> jsdl:OperatingSystemType </jsdl:OperatingSystem> *

        xsd:any *

   </gdesc:PlatformDescription>

   xsd:any *

</gdesc:deployment-descriptor>


Some Deployment Description Types

Zip/Jar Deployment

For Zip/Jar Deployment, what you download is a zip or jar file that the expectation is that it gets unzipped into a directory, and that the JSDL document that you run will have a working directory "relative" to that directory where the unzip took place.

Zip/Jar Deployment Type
http://vcgr.cs.virginia.edu/genii/deployment-types/zip-jar
<genii-zj:zip-jar>
    <gdesc:binary-name> xsd:string </gdesc:binary-name>
    <genii-zj:source package-type=" jar | zip ">

One Of:
        <gdesc:local-file> xsd:string </gdesc:local-file>
     OR
        <gdesc:rns-file> xsd:string </gdesc:rns-file>
     OR
        <gdesc:remote-endpoint> xsd:string </gdesc:remote-endpoint>

    </genii-zj:source>
</genii-zj:zip-jar>

Binary Files Deployment

For Binary Files Deployment, what you download is a collection of files labeled as being binaries and/or shared libraries and/or static files. All binaries are assumed to have to be in the path, all shared libraries must be in the LD_LIBRARY_PATH (or equiv) and all static files will include a relative path that must be given relative to CWD, or some other file in the deployment.

Binary Files Deployment Type
http://vcgr.cs.virginia.edu/genii/deployment-types/binary-files


<genii-bin:binary>
    <gdesc:binary-name> xsd:string </gdesc:binary-name>
        <genii-bin:binary name=" xsd:string ">

One Of:
            <gdesc:local-file> xsd:string </gdesc:local-file>
    OR
            <gdesc:rns-file> xsd:string </gdesc:rns-file>
    OR
            <gdesc:remote-endpoint> wsa:EndpointReferenceType </gdesc:remote-endpoint>

        </genii-bin:binary>

        <genii-bin:shared-library name=" xsd:string ">

One Of:
            <gdesc:local-file> xsd:string </gdesc:local-file>
    OR
            <gdesc:rns-file> xsd:string </gdesc:rns-file>
    OR
            <gdesc:remote-endpoint> wsa:EndpointReferenceType </gdesc:remote-endpoint>

        </genii-bin:shared-library> *

        <genii-bin:static-file name=" xsd:string " relative-to-cwd=" xsd:boolean ">

One Of:
            <gdesc:local-file> xsd:string </gdesc:local-file>
    OR
            <gdesc:rns-file> xsd:string </gdesc:rns-file>
    OR
            <gdesc:remote-endpoint> wsa:EndpointReferenceType </gdesc:remote-endpoint>

        </genii-bin:static-file> *
</genii-bin:binary>

Large Example

<gdesc:deployment-descriptor
   xmlns:jsdl="http://schemas.ggf.org/jsdl/2005/11/jsdl"
   xmlns:gdesc="http://vcgr.cs.virginia.edu/genii/application-description"
   xmlns:genii-bin="http://vcgr.cs.virginia.edu/genii/application-description/bin">

   <gdesc:PlatformDescription>
       <jsdl:CPUArchitecture>
           <jsdl:CPUArchitectureName>x86</jsdl:CPUArchitectureName>
       </jsdl:CPUArchitecture>
       <jsdl:OperatingSystem>
           <jsdl:OperatingSystemType>
               <jsdl:OperatingSystemName>LINUX</jsdl:OperatingSystemName>
           </jsdl:OperatingSystemType>
       </jsdl:OperatingSystem>
   </gdesc:PlatformDescription>

   <genii-bin:binary>
       <gdesc:binary-name>FibProgram</gdesc:binary-name>
       <genii-bin:binary name="FibProgram">
           <gdesc:local-file>FibProgram</gdesc:local-file>
       </genii-bin:binary>
       <genii-bin:shared-library name="libFib.so">
           <gdesc:local-file>libFib.so</gdesc:local-file>
       </genii-bin:shared-library>
       <genii-bin:static-file name="zero.dat" relative-to-cwd="true">
           <gdesc:local-file>zero.dat</gdesc:local-file>
       </genii-bin:static-file>
       <genii-bin:static-file name="one.dat" relative-to-cwd="true">
           <gdesc:local-file>one.dat</gdesc:local-file>
       </genii-bin:static-file>
   </genii-bin:binary>
 
</gdesc:deployment-descriptor>