Setup Openstack Python Clients on CentOS
To set up and install the clients follow the below steps:
Create a file in /etc/yum.repos.d called rdo-release.repo
And place the following inside it:
[openstack-liberty] name=OpenStack Liberty Repository baseurl=http://mirror.centos.org/centos/7/cloud/$basearch/openstack-liberty/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
Then create another file in /etc/yum.repos.d called rdo-testing.repo
And place the following in it:
[openstack-liberty-testing] name=OpenStack Liberty Testing baseurl=http://buildlogs.centos.org/centos/7/cloud/$basearch/openstack-liberty/ gpgcheck=0 enabled=0
Then to install the correct packages use the following command:
for i in nova keystone neutron heat cinder glance ; do sudo yum 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.ecloud.co.uk:5000/v2.0 export OS_USERNAME="User.Name" export OS_PASSWORD="myreallysecurepassword"
To get your details visit https://api.openstack.ecloud.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