Installing Rackspace command line tools on CentOS

A set of command line tools is available for the Rackspace cloud computing platform which allows you to e.g. list images and create virtual machines. The installation of this set can be achieved with the following commands:

yum install python-setuptools
easy_install pip
pip install rackspace-novaclient

The information that the nova client needs is obtained from either command line parameters or environment variables. We will use the latter and add the following to our ~/.bash_profile file:

OS_USERNAME=username
OS_TENANT_NAME=username
OS_AUTH_SYSTEM=rackspace
OS_PASSWORD=apikey
OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/
OS_REGION_NAME=DFW
OS_NO_CACHE=1
export OS_USERNAME OS_TENANT_NAME OS_AUTH_SYSTEM OS_PASSWORD OS_AUTH_URL OS_REGION_NAME OS_NO_CACHE

Make sure you change the username and apikey variables to your own values. Now we can use the nova client:

# nova image-list
+--------------------------------------+----------------------------------------------------------------------------------------------+--------+--------+
| ID                                   | Name                                                                                         | Status | Server |
+--------------------------------------+----------------------------------------------------------------------------------------------+--------+--------+
| c94f5e59-0760-467a-ae70-9a37cfa6b94e | Arch 2012.08                                                                                 | ACTIVE |        |
| 03318d19-b6e6-4092-9b5c-4758ee0ada60 | CentOS 5.6                                                                                   | ACTIVE |        |
| acf05b3c-5403-4cf0-900c-9b12b0db0644 | CentOS 5.8                                                                                   | ACTIVE |        |
| a3a2c42f-575f-4381-9c6d-fcd3b7d07d17 | CentOS 6.0                                                                                   | ACTIVE |        |
| 0cab6212-f231-4abd-9c70-608d0d0e04ba | CentOS 6.2                                                                                   | ACTIVE |        |
| c195ef3b-9195-4474-b6f7-16e5bd86acd0 | CentOS 6.3                                                                                   | ACTIVE |        |
| a10eacf7-ac15-4225-b533-5744f1fe47c1 | Debian 6 (Squeeze)                                                                           | ACTIVE |        |
| bca91446-e60e-42e7-9e39-0582e7e20fb9 | Fedora 16 (Verne)                                                                            | ACTIVE |        |
| d42f821e-c2d1-4796-9f07-af5ed7912d0e | Fedora 17 (Beefy Miracle)                                                                    | ACTIVE |        |
| c79fecf7-2c37-4c51-a240-e9fa913c90a3 | FreeBSD 9                                                                                    | ACTIVE |        |
| 110d5bd8-a0dc-4cf5-8e75-149a58c17bbf | Gentoo 12.3                                                                                  | ACTIVE |        |
| 644be485-411d-4bac-aba5-5f60641d92b5 | Red Hat Enterprise Linux 5.5                                                                 | ACTIVE |        |
| d6dd6c70-a122-4391-91a8-decb1a356549 | Red Hat Enterprise Linux 6.1                                                                 | ACTIVE |        |
| d531a2dd-7ae9-4407-bb5a-e5ea03303d98 | Ubuntu 10.04 LTS (Lucid Lynx)                                                                | ACTIVE |        |
| 8bf22129-8483-462b-a020-1754ec822770 | Ubuntu 11.04 (Natty Narwhal)                                                                 | ACTIVE |        |
| 3afe97b2-26dc-49c5-a2cc-a2fc8d80c001 | Ubuntu 11.10 (Oneiric Oncelot)                                                               | ACTIVE |        |
| 5cebb13a-f783-4f8c-8058-c4182c724ccd | Ubuntu 12.04 LTS (Precise Pangolin)                                                          | ACTIVE |        |
| 8a3a9f96-b997-46fd-b7a8-a9e740796ffd | Ubuntu 12.10 (Quantal Quetzal)                                                               | ACTIVE |        |
| b9ea8426-8f43-4224-a182-7cdb2bb897c8 | Windows Server 2008 R2 SP1                                                                   | ACTIVE |        |
| 7957e53d-b3b9-41fe-8e0d-5252bf20a5bf | Windows Server 2008 R2 SP1 (with updates)                                                    | ACTIVE |        |
| 535d5453-79dd-4635-bbd6-d87b1f1cd717 | Windows Server 2008 R2 SP1 (with updates) + SQL Server 2008 R2 SP1 Standard                  | ACTIVE |        |
| 80599479-b5a2-49f2-bb46-2bc75a8be98b | Windows Server 2008 R2 SP1 (with updates) + SQL Server 2008 R2 SP1 Web                       | ACTIVE |        |
| e4589dc6-b972-482f-91ef-67feb891b559 | Windows Server 2008 R2 SP1 (with updates) + SQL Server 2012 Standard                         | ACTIVE |        |
| 6f8ab5a1-42ff-433b-be40-e17374f2fff4 | Windows Server 2008 R2 SP1 (with updates) + SQL Server 2012 Web                              | ACTIVE |        |
| 2a4a02aa-523a-4649-9802-3a09de8e5f1b | Windows Server 2008 R2 SP1 + SQL Server 2008 R2 Standard                                     | ACTIVE |        |
| d6153e86-f4e0-4053-a711-d35632e512cd | Windows Server 2008 R2 SP1 + SQL Server 2008 R2 Web                                          | ACTIVE |        |
| f7d06722-2b30-4c02-b74d-da5a7337f357 | Windows Server 2008 R2 SP1 + SQL Server 2012 Standard                                        | ACTIVE |        |
| e7a11eed-d348-44da-8210-f136d4256e81 | Windows Server 2008 R2 SP1 + SQL Server 2012 Web                                             | ACTIVE |        |
| 7f7183b0-856c-4894-afae-9e52839ce197 | Windows Server 2008 R2 SP1 + SharePoint Foundation 2010 SP1 & SQL Server 2008 R2 SP1 Express | ACTIVE |        |
| 9eb71a23-2c7e-479c-a6b1-b38aa64f172e | Windows Server 2008 R2 SP1 + SharePoint Foundation 2010 SP1 & SQL Server 2008 R2 SP1 Std     | ACTIVE |        |
| ae49b64d-9d68-4b36-98ed-b1ce84944680 | Windows Server 2012                                                                          | ACTIVE |        |
| 2748ee06-ff35-4518-9759-4acb57bad4c3 | Windows Server 2012 (with updates)                                                           | ACTIVE |        |
| f86eae6d-09ea-42e6-a5b2-422649edcfa1 | Windows Server 2012 (with updates) + SQL Server 2012 Standard                                | ACTIVE |        |
| b762ee1d-11b5-4ae7-aa68-dcc1b6f6e24a | Windows Server 2012 (with updates) + SQL Server 2012 Web                                     | ACTIVE |        |
| d226f189-f83f-4569-95b8-622133d71f02 | Windows Server 2012 + SQL Server 2012 Standard                                               | ACTIVE |        |
| 057d2670-68bc-4e28-b7b1-b9bc72245683 | Windows Server 2012 + SQL Server 2012 Web                                                    | ACTIVE |        |
| 992ba82c-083b-4eed-9c26-c54473686466 | Windows Server 2012 + SharePoint Foundation 2013 with SQL Server 2012 Standard               | ACTIVE |        |
| 096c55e5-39f3-48cf-a413-68d9377a3ab6 | openSUSE 12.1                                                                                | ACTIVE |        |
+--------------------------------------+----------------------------------------------------------------------------------------------+--------+--------+

Leave a Reply

Your email will not be published. Name and Email fields are required.