OpenStack administration is documented in detail in the OpenStack Compute Administration Manual. In this section, we discuss key tasks you should perform that will allow you to launch instances. Refer to the official OpenStack documentation for more information.
For these tasks, you must be logged in to the Dashboard as the admin user. These tasks can also be performed on the command line; some tasks require you to be logged into the controller via SSH, and some can be performed via python-novaclient on the controller or on a workstation.
NOTE: Nova volumes are not supported in Rackspace Private Cloud Software. For block storage, refer to the instructions for configuring OpenStack Block Storage.
The ISO includes a CIRROS image and an Ubuntu 12.04 (Precise) image. For more information about downloading and creating additional images, refer to the following OpenStack documentation.
Images can only be added on the command line with the glance image-create command; the Dashboard does not have any image functionality. You can use glance image-create when logged into the controller node, or if you have Glance client installed on your local workstation and have configured your environment with administrative user access to the controller.
The following command is an example in which the user has a virtual disk image in qcow2 format stored on the local file system at /tmp/images/test-image.img. When the image is imported, it will be named "Test Image" and will be public to any Glance user with access to the controller.
$ glance image-create --name "Test Image" --is-public true \
--container-format bare --disk-format qcow2 < /tmp/images/test-image/img
If the image is successfully added, Glance will return a confirmation similar to the following:
Added new image with ID: 85a0a926-d3e5-4a22-a062-f9c78ed7a2c0
More information is available via the command glance help add.
You must create a project before you can launch an instance. A demo project is available by default, but if you want to create your own project, follow this procedure.
Projects.admin user and the demo user that you created during the installation process (not to be confused with the operating system user). When prompted for a role for the user, you may wish to assign the admin role to the admin user and the member role to the demo user. Refer to the OpenStack documentation for information about customizing roles.Your project is now ready for additional configuration. Switch to the Project tab in the navigation panel and select the new project from the Project drop-down menu before proceeding.
Adding a project with the command line
On the command line, projects are managed when logged in as root with nova-manage. For example, to create a project named Marketing that would be administered by user jdoe, you would you would use sudo -i to switch to root and execute the following command:
$ nova-manage project add Marketing jdoe
Keypairs provide secure authentication to an instance, and will enable you to create instances securely and to log into the instance afterward. Keypairs are generated separately for each project and assigned to instances at time of creation. You can create as many keypairs in a project as you like.
.pem file.Generating a keypair with the command line
On the command line, keypairs are managed with nova keypair-* commands in python-novaclient. When generating a keypair, you must have your OS_USERNAME and OS_TENANT_NAME configured in your environment to ensure that you have access to the correct project. Our user jdoe, after configuring their environment, would then issue the following command to generate a keypair:
$ nova keypair-add jdoe-keypair
The client will generate a block of RSA Private Key text, which the user copies and saves to a file called jdoe-keypair.pem.
A Security Group is a named set of rules that get applied to the incoming packets for the instances. Packets that match the parameters of the rules are given access to the instance; all other packets are blocked. At minimum, you should ensure that the default security group permits ping and SSH access. You may edit the default security group or add additional security groups as your security settings require.
0.0.0.0/0 if you want to enable access from all networks, or you may enter a specific network, such as 192.0.2.0/24.You will receive a confirmation message at the top of the Dashboard window that the new rule was added to the default security group. To enable ping, repeat the procedure with a protocol of ICMP, type of -1, and code of -1.
Managing security groups with the command line
On the command line, security groups are managed with nova secgroup-* commands in python-novaclient. To add the ping and SSH rules to the default security group, issue the following commands:
$ nova secgroup-add-rule default tcp 22 22 0.0.0.0/0 $ nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
Use nova secgroup-list-rules to view the updated default security group rules:
$ nova secgroup-list-rules default +-------------+-----------+---------+-----------+--------------+ | IP Protocol | From Port | To Port | IP Range | Source Group | +-------------+-----------+---------+-----------+--------------+ | icmp | -1 | -1 | 0.0.0.0/0 | | | tcp | 22 | 22 | 0.0.0.0/0 | | +-------------+-----------+---------+-----------+--------------+
Before you can create an instance, you must have already generated a keypair and updated the default security group. The project in which you want to create the instance should be in focus on the dashboard.
precise image.my-instance.m1.small.The Instances and Volumes page will open, with the new instance creation in process. The process should take less than a minute to complete, after which the instance status will be listed as Active. You may need to refresh the page.
Launching an instance with the command line
On the command line, image creation is managed with the nova boot command. Before you can launch an image, you need to determine what images and flavors are available on the instance.
$ nova image-list
+--------------------------+----------------------------+--------+--------+
| ID | Name | Status | Server |
+--------------------------+----------------------------+--------+--------+
| 033c0027-[ID truncated] | cirros-image | ACTIVE | |
| 0ccfc8c4-[ID truncated] | My Image 2 | ACTIVE | |
| 85a0a926-[ID truncated] | precise-image | ACTIVE | |
+--------------------------+----------------------------+--------+--------+
$ nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor |
+----+-----------+-----------+------+-----------+------+-------+-------------+
| 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 |
| 2 | m1.small | 2048 | 10 | 20 | | 1 | 1.0 |
| 3 | m1.medium | 4096 | 10 | 40 | | 2 | 1.0 |
| 4 | m1.large | 8192 | 10 | 80 | | 4 | 1.0 |
| 5 | m1.xlarge | 16384 | 10 | 160 | | 8 | 1.0 |
+----+-----------+-----------+------+-----------+------+-------+-------------+In the following example, an instance is launched with an image called precise-image. It uses the m1.small flavor with an ID of 2, and is named markets-test.
$ nova boot --image "precise-image" --flavor="2" markets-test
+-------------------------------------+--------------------------------------+
| Property | Value |
+-------------------------------------+--------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-SRV-ATTR:host | None |
| OS-EXT-SRV-ATTR:hypervisor_hostname | None |
| OS-EXT-SRV-ATTR:instance_name | instance-0000000d |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | ATSEfRY9fZPx |
| config_drive | |
| created | 2012-08-02T15:43:46Z |
| flavor | m1.small |
| hostId | |
| id | 5bf46a3b-084c-4ce1-b06f-e460e875075b |
| image | precise-image |
| key_name | |
| metadata | {} |
| name | markets-test |
| progress | 0 |
| status | BUILD |
| tenant_id | b4769145977045e2a9279c842b09be6a |
| updated | 2012-08-02T15:43:46Z |
| user_id | 5f2f2c28bdc844f9845251290b524e80 |
+-------------------------------------+--------------------------------------+You can also view the newly-created instance at the command line with nova list.
$ nova list +------------------+--------------+--------+-------------------+
| ID | Name | Status | Networks |
+------------------+--------------+--------+-------------------+
| [ID truncated] | markets-test | ACTIVE | public=192.0.2.0 |
+------------------+--------------+--------+-------------------+
All instances exist on a nova network that is not accessible by other hosts by default. There are multiple ways to access an instance. In all cases, be sure that you have updated the default security group.
The login for each instance is determined by the configuration of the image from which it was created. Rackspace Private Cloud Software comes with a CIRROS image and an Ubuntu 12.04 (Precise) image.
cirros and the password cubswin:).Ubuntu 12.04 Precise: Log in with the user ubuntu and the SSH key that you specified for the instance during the instance creation process. The key must be present on the host from which you are connecting to the instance, and you must log in with the key name and the -i flag. In the following example, the keypair file is named jdoe-keypair.pem.
$ ssh -i jdoe-keypair.pem 172.33.0.12
Before you begin, you should know the IP addresses of your compute node or nodes.
$ sudo nova-manage vm list | grep instance_name
The output generated will include the following information, where N is the number of the compute node. Compute nodes will be numbered in the order in which you added them.
instance_name computeN m1.small active 2012-08-13 00:42:53
jdoe. You will be prompted for the password.$ ssh 192.0.2.0 -l jdoe
$ ping 198.51.100.0 PING 198.51.100.0 (198.51.100.0) 56(84) bytes of data. 64 bytes from 198.51.100.0: icmp_req=1 ttl=64 time=0.394 ms 64 bytes from 198.51.100.0: icmp_req=2 ttl=64 time=0.266 ms 64 bytes from 198.51.100.0: icmp_req=3 ttl=64 time=0.285 ms
*.pem keypair file associated with the instance to the compute node.$ ssh 198.51.100.0
-i flag. In this example, the keypair file is named jdoe-keypair.pem.$ ssh -i jdoe-keypair.pem 198.51.100.0
Before you assign a floating IP address to an instance, you must have a pool of addresses to choose from. Your network security team must provision an address range and assign it to your environment. These addresses need to be publicly accessible.
NOTE: If your cloud is hosted in a Rackspace data center and you require more floating IP addresses, contact your Rackspace support representative for assistance.
Follow this procedure to create a pool of floating IP addresses, allocate an address to a project, and assign it to an instance.
--ip_range that was provisioned by your network security team:
$ sudo nova-manage floating create --ip_range=xxx.xxx.xxx.xxx/xx
This creates the pool of floating IP addresses, which will be available to all projects on the host. You can now allocate a floating IP address and assign it to an instance in the dashboard.
You will receive a confirmation message that a floating IP address has been allocated to the project and the IP address will appear in the Floating IPs table. This reserves the addresses for the project, but does not immediately associate that address with an instance.
You will receive a confirmation message that the IP has been associated with the instance. The instance ID will now appear in the Floating IPs table, associated with the IP address. It may be a few minutes before the IP address is included on the Instances table on the Instances & Volumes page.
Once the IP address assignment is completed, you can access the instance from any Internet-enabled host by using SSH to access the newly-assigned floating IP. See Logging In to the Instance for more information.
Managing floating IP addresses with the command line
Allocation and assignment of floating IP addresses is managed with the nova floating-ip* commands.
In this example, the IP address is first allocated to the Marketing project with nova floating-ip-create command.
$ nova floating-ip-create marketing
The floating IP address has been reserved for the Marketing project, and can now be associated with an instance with the nova add-floating-ip command. For this example, we'll associate this IP address with the image markets-test.
$ nova add-floating-ip markets-test 203.0.113.0
After the command is complete, you can confirm that the IP address has been associated with the nova floating-ip-list and nova-list commands.
$ nova floating-ip-list +-------------+--------------------------------------+-----------+------+
| Ip | Instance Id | Fixed Ip | Pool |
+-------------+--------------------------------------+-----------+------+
| 203.0.113.0 | 542235df-8ba4-4d08-90c9-b79f5a77c04f | 192.0.2.0 | nova |
+-------------+--------------------------------------+-----------+------+
$ nova list
+------------------+--------------+--------+---------------------------------+
| ID | Name | Status | Networks |
+------------------+--------------+--------+---------------------------------+
| [ID truncated] | markets-test | ACTIVE | public=[network IP addresses] |
+------------------+--------------+--------+---------------------------------+
The first table shows that the 203.0.113.0 is now associated with the markets-test instance ID, and the second table shows the IP address included under markets-test's public IP addresses.
Congratulations! You have created a project and launched your first instance in Rackspace Private Cloud. You can now use your OpenStack environment for any purpose you like.
If you're a more advanced user and are comfortable with APIs, OpenStack API documentation is available in the OpenStack API Documentation library. The following documents are a good place to start:
You may want to purchase Escalation Support or Core Software Support for your cloud or take advantage of our training offerings. Contact us at opencloudinfo@rackspace.com for more information. And please come join your fellow Rackspace Private Cloud users on our customer forums.
https://privatecloudforums.rackspace.com/
Welcome aboard!
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

10 Comments
Query on ssh ports, icmp config
1) ssh client port isn't limited to source port 22, it could be any ephemeral port number, unless your ssh client is modified in some way to always use src port 22? Or is this rule covering both inbound and outbound ssh? If that is the case, it is not clear from the example.
2) Allowing all ICMP types will allow a lot more than just ping. To enable pinging the host *from* another host only requires ICMP type 8, code 0 (ping reply). To ping outwards from the box to other systems would require type 0, code 0 (ping request). Some of the other ICMP types *may* be useful, redirects, source quench, PMTU discovery, etc but the article states that it is to enable ping, the inference being that it only allows ping, where it doesn't appear to be the case. Unless I'm missing something really obvious :)
1) These rules only cover
2) In the case of ICMP, the fields are used to specify what types of ICMP you want to allow instead of destination ports. You can specify -1 (from) and -1 (to) to allow all ICMP types. You could use "from" 0 "to" 8 to only allow that range. Again this is somewhat ambiguous with the naming convention.
Hope this helps.
Ryan
Windows Image in Openstack
I successfully installed alamo and created the Ubuntu instance and able to launch & connect as per given instructions above. Thanks for such beautiful package and awesome guide.
Now to play further i want to have windows instance running in openstack. i have genuine license for that. So to create first the image of windows instance i followed following tutorial "http://networkstatic.net/2012/08/building-a-windows-image-for-openstack/#comment-5212" and successfully created the image and added to glance. But when i launched the instance using openstack dashboard then i am getting "Error" in Status column and "Scheduling" under Task column. i Tried this with few other similar tutorial but ends in vain.
It would be really helpful if you cover tutorial how create, add and launch windows image in alamo.
If it is already there in your documentation could you please point me there.
Thanks & Best Regards
Vishal Gupta
Vishal, based on your
Userid for Precise Image
but nowhere does it mention if their is a default userid for the precise image, or if someone there is one created as part of creating the instance.
What userid do I use with an instance created from the precise image?
This thread in the Private
http://privatecloudforums.rackspace.com/viewtopic.php?f=4&t=10
I think this documentation
Thanks for the feedback—we'll
uploading a windows image
re: uploading a windows image
There is a discussion about Windows images on the Rackspace Private Cloud Forums:
http://privatecloudforums.rackspace.com/viewtopic.php?f=4&t=161
The discussion links to this post about Windows images and OpenStack:
http://networkstatic.net/building-a-windows-image-for-openstack/
Hopefully these will answer your questions. If you need further assistance, feel free to post to the Rackspace Private Cloud Forums.
Add new comment