Appliance Repository

The StratusLab project maintains a prototype appliance repository via which machine images can be shared. The images are available via the http(s) protocol. The service is connected to the project's LDAP server with write access controlled via username/password.

The repository can be browsed with a standard web server at the address: http://appliances.stratuslab.eu/images.

The appliance repository structure is designed to mirror that of a Maven repository. Images are organised by type and operating system, for example:

    grid
      |
      - ce
         |
          - sl-5.5-x86_64-grid.ce
                     |
                      - 1.0
                        |
                         - sl-5.5-x86_64-grid.ce-1.0.img

In order to maintain compatibility with Maven, image filenames must follow the following pattern:

  • <os>-<osversion>-<arch>-<type>-<imageversion>.<ext>

Current types are: grid.ce,grid.se,grid.ui, for specialised grid images; and base, for standard OS images.

Uploading/Downloading to/from the repository can be performed using standard tools such as Curl. When uploading use your LDAP username and password.

To upload the following command would be used:

  • curl -T <image> -u <username> https://appliances.stratuslab.eu/images/<imagedirectory>/

When uploading it may be necessary to create directories if the required directory structure does not exist. This can also be done with Curl:

  • curl -X MKCOL -u <username> https://appliances.stratuslab.eu/images/a/direc/tory/

However, as the above command is not recursive, it may be more convenient to use a WebDAV client, such as Cadaver, or a browser with WebDav functionality to create directory structures. When creating directories the following structure must be followed:

   <type>
      |
       - <os>-<osversion>-<arch>-<type>
                      |
                       - <imageversion>

Here, the top level directory, <type>, should be split into a hierarchy if necessary, e.g., grid.ce becomes grid/ce.

To download:

  • curl http://appliances.stratuslab.eu/images/.../<image> -o <image_filename>

Appliance Repository Installation

The Appliance Repository is a WebDAV-enabled Apache webserver. Access control is managed by the central StratusLab LDAP server.

The first step is to install the Apache webserver. If you are using yum this is straightforward:

  • yum install httpd

The WebDAV module must then be enabled in the httpd.conf. The exact details will vary depending on your OS and version of Apache, but the basic steps are to add:

   LoadModule dav_module modules/mod_dav.so

and to specify the location of the DAVLock file:

   DAVLockDB /var/lib/dav/lockdb
   

The following configuration (/etc/httpd/conf.d/webdav-ldap,conf) can then be used to setup WebDAV on a particular directory (in this example /images), using LDAP authentication:

   Alias /images "/images"
   LDAPVerifyServerCert on
   LDAPTrustedGlobalCert CA_BASE64 /etc/httpd/sslcert/stratuslab-ldap.pem
   LDAPTrustedMode SSL
   <Directory /images>
      Dav On
      Options +Indexes
      IndexOptions FancyIndexing
      AddDefaultCharset UTF-8
      AuthType Basic
      AuthName "Image Repository Access"
      AuthLDAPURL "ldaps://ldap.stratuslab.eu:10636/ou=people,o=stratuslab?uid"
      AuthBasicProvider ldap
      AuthzLDAPAuthoritative off
      AuthLDAPBindDN "cn=repo,ou=daemons,o=stratuslab"
      AuthLDAPBindPassword xxxxxxxx
      <Limit PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
              Require valid-user
      </Limit>
      Order allow,deny
      Allow from all
  </Directory>
  

LDAPTrustedGlobalCert, AuthLDAPURL, AuthLDAPBindDN, AuthLDAPBindPassword should be modified to contain the correct values for your LDAP server.

The final step is to create the following file, stratuslab.repo.cfg, in a .stratuslab directory, located in the base directory of the repository (i.e. /images in the example configuration above):

  [stratuslab_repo]
  repo_structure = #type_#/#os#-#osversion#-#arch#-#type#/#version#
  repo_filename = #os#-#osversion#-#arch#-#type#-#version#.img.#compression#
  • Bookmark at
  • Bookmark "Appliance Repository" at del.icio.us
  • Bookmark "Appliance Repository" at Digg
  • Bookmark "Appliance Repository" at Reddit
  • Bookmark "Appliance Repository" at Google
  • Bookmark "Appliance Repository" at StumbleUpon
  • Bookmark "Appliance Repository" at Facebook
  • Bookmark "Appliance Repository" at Twitter