2013-07-29

Deploying an Instance with novaclient in Rackspace

There are a number of limitations with the current GUI when deploying a new instance in Rackspace (such as no option to attach a keypair to the deployed instance) - therefore I suggest you use the API.

One of the easiest methods I have found is using the nova client 

Installing python-novaclient on Windows
Installing python-novaclient on Linux and Mac OS

 

Export the correct variables

Environment Variables

List the available flavors (sizes)

Available Flavors

List the available images (templates)

Available Images
(Output was truncated)

Deploy a new instance

To deploy a new instance with 1 vCPU, 1GB RAM, 40GB disk from the RHEL 6.4 template run the following command (must all be on one line!!)

# nova boot --image 16e6c0ae-f881-4180-95b0-3450fe3f8e96 --key-name mykey --flavor 3 --no-service-net --no-public --nic net-id=0XXXX6b2-af20-4d31-8a1a-41abfa3b52ce mytest1

To break it down..

nova boot --image a524978e-e9b5-4069-927e-1334e982b8d9 - deploy instance from VGH template
--key-name mykey - use my set of keys
--flavor 3 - instance size
--no-service-net - do not connect to Rackspace network
--no-public - do not connect to Public Internet
--nic net-id=0XXXX6b2-af20-4d31-8a1a-41abfa3b52ce - connect to Internal_network 
mytest1 - instance name
More RackSpace articles are planned