User Tools

Site Tools


main:guides:guide_for_managing_virtual_appliance_versions_using_the_vmcaster

Guide for managing Virtual Appliance Versions using the VMCaster CLI


This guide presents, how you can manage VA versions by using the VMCaster command line tool, in order to add/remove/update/publish Virtual Machine Images.

Prerequisites


Configure the egiappdb protocol

  • Set the VMCASTER_EGIAPPDB_AUTHN env appropriately (the default value is x509)
   $ export VMCASTER_EGIAPPDB_AUTHN=x509 

   ## for using x509 as AuthN mechanism (default)

OR

   $ export VMCASTER_EGIAPPDB_AUTHN=sso 
   
   ## for using EGI SSO as AuthN mechanism
  • Edit or create the .vmcaster.cfg file in your home directory and append the following content.
[user@quido-x:~]$ cat ~/.vmcaster.cfg 

[appdb] 
server = "vmcaster.appdb.egi.eu" 
protocol = "egiappdb" 
uriMatch = ".*" 
uriReplace = "egiappdb://_YOUR_EGI_SSO_USERNAME_@vmcaster.appdb.egi.eu/vmlist/submit/" 

## _YOUR_EGI_SSO_USERNAME_ is needed only if you are planning to use the EGI SSO as authentication mechanism. 
## In case that you will use a valid X509 certificate, then there is no need for providing the _YOUR_EGI_SSO_USERNAME_ value

Create a new VA version

1. Use the dedicated VMCaster image list identifier produced automatically by the AppDB service (see How to get the VMCaster image list identifier using the AppDB portal).

  • Lets assume that the image list identifier is: 6b470d15-835a-42ec-b568-002393f4dc58

2. Create a new image list as described in the VMCaster documentation, using the aforementioned image list identifier.

Alternatively (and suggested), you may create the first version of your Virtual Appliance by using the portal and then import the produced image list to the vmcaster database by issuing the following commands:

$ wget _IMAGE_LIST_URI_ -O image.list
$ vmcaster --import-imagelist-smime image.list

3. Add/remove/modify images as described in the VMCaster documentation.

  • Lets assume that the identifier of one of the included images is: 05535860-71b1-48cf-94e3-af05f169be7b

4. Optionally, perform some sort of grouping with the included images.

$ vmcaster --select-image _IMAGE_IDENTIFIER_ --key-set-image  "ad:group" --key-value-image "_IMAGE_GROUP_"

full example:

$ vmcaster --select-image 05535860-71b1-48cf-94e3-af05f169be7b --key-set-image "ad:group" --key-value-image "My Scientific Linux Images"

5. Visually inspect the image list, as a cross-check.

$ vmcaster --select-imagelist _IMAGE_LIST_IDENTIFIER_ --show-imagelist

full example:

$ vmcaster --select-imagelist 6b470d15-835a-42ec-b568-002393f4dc58 --show-imagelist

6. Upload/Submit the image list to the vmcaster@appdb end point.

NOTE: VMCaster will prompt you for a passphrase. The passphrase depends on the AuthN mechanism (EGI SSO OR X509) you have choose.

$ vmcaster --select-imagelist _IMAGE_LIST_IDENTIFIER_ --upload-imagelist
Enter passphrase:[_YOUR_x509_CERT_PASSPHRASE_]
Appdb password for 'user':[_YOUR_EGI_SSO_PASSWORD_]

full example:

$ vmcaster --select-imagelist 6b470d15-835a-42ec-b568-002393f4dc58 ---upload-imagelist

7. Upon completion, the vmcaster tool will prompt with an error message & code in case of a failure or no message in case of success. In any case, a URL will be provided, directing the user to the vmcaster@appdb Dashboard, where he/she can see more details about the status of the submission.

$ vmcaster --select-imagelist 6b470d15-835a-42ec-b568-002393f4dc58 --upload-imagelist
Enter passphrase:[_YOUR_x509_CERT_PASSPHRASE_]
Appdb password for 'user':[_YOUR_EGI_SSO_PASSWORD_]
details:https://vmcaster.appdb.egi.eu/vmlist/status/item/87
submission_id:87

Publish a VA version

In case you would like to upload and publish you image list in one move, use the flag –flag “egiappdb:publish=true” while uploading.

$ vmcaster --select-imagelist _IMAGE_LIST_IDENTIFIER_ --upload-imagelist --flag "egiappdb:publish=true"

full example:

$ vmcaster --select-imagelist 6b470d15-835a-42ec-b568-002393f4dc58 --upload-imagelist --flag "egiappdb:publish=true"
main/guides/guide_for_managing_virtual_appliance_versions_using_the_vmcaster.txt · Last modified: 2014/05/26 19:21 by /C=GR/O=HellasGrid/OU=iasa.gr/CN=Marios Chatziangelou