Difference between revisions of "Setup Openstack Python Clients on Ubuntu"

From Tech Wiki
Jump to navigation Jump to search
(Created page with "'''To set up and install the clients follow the below steps:''' Run the following command to install all the clients: <pre> for i in nova keystone neutron heat cinder glance...")
 
 
Line 12: Line 12:
 
export OS_TENANT_NAME="Project-XXX"
 
export OS_TENANT_NAME="Project-XXX"
 
export OS_TENANT_ID=XXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
export OS_TENANT_ID=XXXXXXXXXXXXXXXXXXXXXXXXXXXX
export OS_AUTH_URL=https://api.openstack.ecloud.co.uk:5000/v2.0
+
export OS_AUTH_URL=https://api.openstack.example.co.uk:5000/v2.0
 
export OS_USERNAME="User.Name"
 
export OS_USERNAME="User.Name"
 
export OS_PASSWORD="myreallysecurepassword"
 
export OS_PASSWORD="myreallysecurepassword"
 
</pre>
 
</pre>
  
To get your details visit https://api.openstack.ecloud.co.uk/identity/ and look for the following:
+
To get your details visit https://api.openstack.example.co.uk/identity/ and look for the following:
  
 
[[File:Openstack_Details.PNG]]
 
[[File:Openstack_Details.PNG]]

Latest revision as of 11:09, 28 April 2016

To set up and install the clients follow the below steps:

Run the following command to install all the clients:

for i in nova keystone neutron heat cinder glance ; do sudo apt-get install python-${i}client -y ; done

Then create a file called my.rc in /root containing the following:

export OS_TENANT_NAME="Project-XXX"
export OS_TENANT_ID=XXXXXXXXXXXXXXXXXXXXXXXXXXXX
export OS_AUTH_URL=https://api.openstack.example.co.uk:5000/v2.0
export OS_USERNAME="User.Name"
export OS_PASSWORD="myreallysecurepassword"

To get your details visit https://api.openstack.example.co.uk/identity/ and look for the following:

Openstack Details.PNG

The Tenant ID is the long string of characters.

The Tenant Name is the Project Name

The Username and password are your login details.

Once the file has been set up with the correct details you will need to perform the following command every time you launch a new shell to set the environment variables:

source /root/my.rc

You could also place the contents of my.rc into your .bashrc file so the variables are launched on boot preventing you from having to source the file every time.

Once this has been done you can then perform commands such as the following:

nova list

For the full lists of commands you can use:

nova help
keystone help
neutron help
cinder help
heat help
glance help

You can also get help for a specific command using:

nova help command