Setting OpenStack environment variables
Find out how to set your environment variables to use the OpenStack API
Find out how to set your environment variables to use the OpenStack API
Last updated 18th August 2021
By setting OpenStack environment variables on your desktop, you can use the OpenStack API to manage your infrastructure.
To retrieve your environment variables, you can download the OpenRC file from the OpenStack user account you have created.
Log in to the OVHcloud Control Panel and switch to the Public Cloud
section. Select your Public Cloud project at the top of the left-hand sidebar.
Click on Users & Roles
, then click on the ...
to the right of your user, then select Download OpenStack's RC file
.
An OpenRC file corresponds to a specific user and zone. You cannot manage multiple zones in the same file.
admin@vpsxxxxxx:~$ source openrc.sh
Please enter your OpenStack Password:
As outlined in this guide, the password is only visible once — when it is created.
If you forget your password, you will need to reset it.
If the CLIs are already installed, check if they are working properly:
admin@vpsxxxxxx:~$ nova list
+--------------------------------------+------+--------+------------+-------------+------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+------------------------+
| 2278e269-a529-40cc-9a08-794fda9302d3 | deb8 | ACTIVE | - | Running | Ext-Net=xx.xxx.xx.xxx |
+--------------------------------------+------+--------+------------+-------------+------------------------+
You can hard-store the Horizon user password. For example, replace:
echo "Please enter your OpenStack Password: "
read -sr OS_PASSWORD_INPUT
export OS_PASSWORD=$OS_PASSWORD_INPUT
With the following:
#echo "Please enter your OpenStack Password: "
#read -sr OS_PASSWORD_INPUT
export OS_PASSWORD="Your Horizon user password"
By default, you will need to set this environment each time you open a session in the current environment. You can make this permanent by adding the openrc.sh source in the bashrc file. You would need to add the password in the file.
The OpenRC file is not designed to be launched on Windows.
There are two ways of setting environment variables:
set OS_PASSWORD="Your Horizon user password"
To learn how to use OpenStack: OpenStack documentation
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