Atom feed of this document
 

 Interfaces to managing instances

OpenStack provides command line, web based, and API based instance management. Additionally a number of third party management tools are available for use with OpenStack using either the native API or the provided EC2 compatibility API.

 Nova CLI

The nova command provided by the OpenStack python-novaclient package is the basic command line utility for users interacting with OpenStack. This is available as a native package for most modern Linux distributions or the latest version can be installed directly using pip python package installer:

sudo pip install -e git+https://github.com/openstack/python-novaclient.git#egg=python-novaclient

Full details for nova and other CLI tools are provided in the OpenStack CLI Guide. What follows is the minimal introduction required to follow the CLI example in this chapter. In the case of a conflict the OpenStack CLI Guide should be considered authoritative (and a bug filed against this section).

In order to function the nova CLI needs to know four things:

  • Authentication URL. This can be passed as the --os_auth_url flag or using the OS_AUTH_URL environment variable.

  • Tenant(sometimes referred to as project) name. This can be passed as the --os_tenant_name flag or using the OS_TENANT_NAME environment variable.

  • User name. This can be passed as the --os_username flag or using the OS_USERNAME environment variable.

  • Password. This can be passed as the --os_password flag or using the OS_PASSWORD environment variable.

For example if you have your Keytone identity management service running on the default port (5000) on host keystone.example.com and want to use the nova cli as the user "demouser" with the password "demopassword" in the "demoproject" tenant you can export the following values in your shell environment or pass the equivalent command line args (presuming these identities already exist):

   export OS_AUTH_URL="http://keystone.example.com:5000/v2.0/"
   export OS_USERNAME=demouser
   export OS_PASSWORD=demopassword
   export OS_TENANT_NAME=demoproject

If you are using the Horizon web dashboard, users can easily download credential files like this with the correct values for your particular implementation.

 Horizon web dashboard

Horizon is the highly customizable and extensible OpenStack web dashboard. The Horizon Project home page has detailed information on deploying horizon.

 Compute API

OpenStack provides a RESTful API for all functionality. Complete API documentation is available at at http://docs.openstack.org/api. The OpenStack Compute API documentation refers to instances as "servers".

The nova cli can be made to show the API calls it is making by passing it the --debug flag

#nova --debug list
 connect: (10.0.0.15, 5000)
send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: 10.0.0.15:5000\r\nContent-Length: 116\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n{"auth": {"tenantName": "demoproject", "passwordCredentials": {"username": "demouser", "password": "demopassword"}}}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json
header: Vary: X-Auth-Token
header: Date: Thu, 13 Sep 2012 20:27:36 GMT
header: Transfer-Encoding: chunked
connect: (128.52.128.15, 8774)
send: u'GET /v2/fa9dccdeadbeef23ae230969587a14bf/servers/detail HTTP/1.1\r\nHost: 10.0.0.15:8774\r\nx-auth-project-id: demoproject\r\nx-auth-token: deadbeef9998823afecc3d552525c34c\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-novaclient\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Compute-Request-Id: req-bf313e7d-771a-4c0b-ad08-c5da8161b30f
header: Content-Type: application/json
header: Content-Length: 15
header: Date: Thu, 13 Sep 2012 20:27:36 GMT
+----+------+--------+----------+
| ID | Name | Status | Networks |
+----+------+--------+----------+
+----+------+--------+----------+
 
 

 EC2 Compatibility API

In addition to the native compute API OpenStack provides an EC2 compatible API. This allows legacy workflows built for EC2 to work with OpenStack.

Configuring the EC2 API lists configuration options for customizing this compatibility API on your OpenStack cloud.

 Third Party Tools

There are numerous third party tools and language specific SDKs for interacting with OpenStack clouds both through native and compatibility APIs. These are not OpenStack projects so we can only provide links to some of the more popular projects and a brief description. For detailed installation and usage info please see the individual project pages

  • euca2ools is a popular open source CLI for interacting with the EC2 API. This is convenient for multi cloud environments where EC2 is the common API, or for transitioning from EC2 API based clouds to OpenStack.

  • hybridfox is a Firefox browser add-on that provides a graphical interface to many popular public and private cloud technologies.

  • boto is a Python library for interacting with Amazon Web Services. It can be used to access OpenStack through the EC2 compatibility API

  • fog is the Ruby cloud services library and provides methods for interacting with a large number of cloud and virtualization platforms.

  • heat is a high level orchestration system that provides a programmable interface to orchestrate multiple cloud applications implementing well known standards such as CloudFormation and TOSCA. Unlike other projects mentioned in this section heat requires changes to your OpenStack deployment and is working toward official inclusion as an OpenStack project. At this point heat is a development project not a production resource, but it does show what the not too distant future of instance management may be like.

Log a bug against this page


loading table of contents...