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.
- Be familiar with the terminology.
- Be familiar with the HEPiX vmcaster and vmcatcher toolset.
- Have access to a machine with the aforementioned tools, correctly installed.
- You should be the one that have register the Virtual Appliance or to you should have write access to it.
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)
$ 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.
$ 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
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
Create a new image list as described in the VMCaster documentation, using the aforementioned image list identifier.
TIP: 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
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
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_"
$ vmcaster --select-image 05535860-71b1-48cf-94e3-af05f169be7b --key-set-image "ad:group" --key-value-image "My Scientific Linux Images"
Visually inspect the image list, as a cross-check.
$ vmcaster --select-imagelist _IMAGE_LIST_IDENTIFIER_ --show-imagelist
$ vmcaster --select-imagelist 6b470d15-835a-42ec-b568-002393f4dc58 --show-imagelist
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_]
$ vmcaster --select-imagelist 6b470d15-835a-42ec-b568-002393f4dc58 ---upload-imagelist
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 vmcaser@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
$ vmcaster --select-imagelist _IMAGE_LIST_IDENTIFIER_ --upload-imagelist --flag "egiappdb:publish=true"
$ vmcaster --select-imagelist 6b470d15-835a-42ec-b568-002393f4dc58 --upload-imagelist --flag "egiappdb:publish=true"