Preparing an environment for using the OpenStack API
Install the OpenStack environment to manage your instances via the API
Install the OpenStack environment to manage your instances via the API
Last updated 30th March 2022
You can manage Public Cloud services using commands sent from the system console, once you have downloaded and installed OpenStack tools.
With the OpenStack API, you can automate your management by generating scripts. The OpenStack Nova client can be used to manage instances and disk space. With the OpenStack Glance client, you can manage images and backups, while the Swift client can be used to manage object storage space.
Find out how to install these OpenStack tools.
Open the terminal and connect to the environment you want to prepare via SSH.
Update the packet cache using the apt update
command:
apt update
Use the command below to install the OpenStack client, as well as Nova client (compute application) and Swift using python3-pip:
apt install python3-pip -y
pip3 install --upgrade pip
pip3 install python-openstackclient python-novaclient python-swiftclient
After you have completed this step, we recommend creating a special user without root access.
To access the help tools, run the following command:
openstack --help
nova help
The documentation for the OpenStack API is available here.
Open the terminal and connect to the environment you want to prepare via SSH.
Update the packet cache using the following command:
yum update -y
Use the command below to install the OpenStack client, as well as Nova client (compute application) and Swift using python3-pip:
yum install python3-pip -y
pip3 install --upgrade pip
pip3 install python-openstackclient python-novaclient python-swiftclient
After you have completed this step, we recommend creating a special user without root access.
To access the help tools, run the following command:
openstack --help
nova help
The documentation for the OpenStack API is available here.
Download and install Python version 2.7.14. You can choose to add the Python programming language automatically to Path, by ticking this option in the installation configuration:
You can also install it yourself. To do this, follow the actions described below:
Search for the system’s environment variable settings, and go to “Edit the system environment variables”:
Go to the Advanced
tab, and click Environment Variables
to edit the settings.
In the ‘System variables’ section, select ‘New’, attribute the name “PYTHON_HOME”, and add the access path to Python. By default, it will be: ‘C:\Python27’.
Once you have added Python, edit the ‘Path’ field in the system variables, and add the following to the end of the path:
...;%PYTHON_HOME%\;%PYTHON_HOME%\Script
The changes you have made will become effective after the system has been rebooted.
As an administrator, open the program in the command line (CMD), and install the OpenStack client using the following command:
pip install python-openstackclient
If the operation is completed properly, you will see a summary:
You can check the installation version in the CMD (command line) window that has just opened, by entering ‘python-V’ from any system location.
You can use HomeBrew, a package manager for MacOS.
Open the terminal and execute the following command:
brew install openstackclient
Use the command below to install the Nova client (compute application) and Swift:
For Python2:
pip install python-novaclient
pip install python-swiftclient
For Python3:
pip3 install python-novaclient
pip3 install python-swiftclient
To access the help tools, run the following command:
openstack --help
nova help
Setting OpenStack environment variables.
Join our community of users on https://community.ovh.com/en/.
Please feel free to give any suggestions in order to improve this documentation.
Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.
Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.
Thank you. Your feedback has been received.
Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.
Discuss with the OVHcloud community