Setup Openstack Python Clients on Ubuntu
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:
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