Generate and Register an OS Image on FutureGrid using the FG Shell

Summary

Below, we summarize the different steps needed to create a new image and register it in a FutureGrid infrastructure. In this case, we will register the image in OpenStack, but it can be registered in any other FutureGrid infrastructure, such as Eucalyptus, Nimbus, or HPC. Detailed information about these tools can be found in http://futuregrid.github.com/rain/.

Request access

Submit a ticket to request access https://portal.futuregrid.org/help

Please use the subject: "Request to access FutureGrid Rain". Include in the body "I would like to obtain access to FutureGrid Rain".

Note: In future we may just create a checkbox for this request in the help form.
 

Once you have access, you can continue the tutorial. Typically, it will take a business day for you to get added (a business day is 9am-5pm EST Mon-Fri). 

Log into India

$ ssh <username>@india.futuregrid.org
$ module load futuregrid

Start the Shell

Execute the FG Shell. Please remember to replace <username> with your portal user name. Then, you will be asked for a password (which is your portal password):

$ fg-shell -u <username>

This command will change your shell and the prompt will be fg-rain>. If your prompt is different, you need to execute "use rain".

Generate the Image

We are going to generate an Ubuntu 12.04 image. The -s parameter allows you to specify the software you want to install in your image. Currently, only the software available in the official repositories can be installed.
fg-rain> generate -o ubuntu -v 12.04 -a x86_64 -s wget, openmpi-bin
After a while, your image will be stored in the repository, and your image ID will be printed.

Image Repository

We can consult the information of the image by executing the following (please replace <imageid> with the ID that you got from the previous command):

fg-rain> list * where imgId=<imageId>

Register Image

Next, we need to register that image in the infrastructure we want to use. In this case, we will register the image in OpenStack (if you followed the FG Openstack tutorial, your novarc will probably be in ~/openstack/novarc). This command will return an <ami-ID>, which is the ID of the image in OpenStack.

fg-rain> register -r <imageId> -s india -v ~/novarc

Once you have registered the image, you need to wait until it becames available. To check the status of the image, you can execute the following command.

fg-rain> cloudlist -s india -v ~/novarc | grep <imageId>
The status is the second field. You may experience that this command takes time to respond when the image is being uploaded (it is an OpenStack issue).

Start Image

Once the image is in "available" status, we can proceed to start a VM using the ami-ID that we got from the register command. In this case, we are going in Interative mode, which means that we are going to get logged into the VM once it is running.
fg-rain> launch -i <ami-ID> -s india -v ~/novarc -I