Skip to main content

Configuration

The plugin makes use of a token, which will authenticate with the api when we introduce it as a parameter in the command. To create this token, we will go to our Dashboard and click on "api access":

image-1626779019342.png

Inside here, we are going to download the file "admin-openrc.sh", inside this file we will be able to see all the credentials that we have to put in a curl to generate the token (if you know all these credentials, it is not necessary to download the file, in the section "see credentials" there are some but not all, between this section and the file you will be able to check all the data).

image-1626779056701.png

We open the file and see the credentials:

image-1626779091263.png

This file is also used to authenticate on the machine where openstack is installed and to use the CLI, but we are not going to use it in this manual (the following image would be a sample of how it would be executed, after that it would ask for the password, which is the same as the one you use to enter the dashboard).

image-1626779124667.png

After doing this, we run the following command, entering our credentials in each section:

curl -v -s -X POST $OS_AUTH_URL/auth/tokens?nocatalog   -H "Content-Type: application/json"   -d '{ "auth": { "identity": { "methods": ["password"],"password": {"user": {"domain": {"name": "'"$OS_USER_DOMAIN_NAME"'"},"name": "'"$OS_USERNAME"'", "password": "'"$OS_PASSWORD"'"} } }, "scope": { "project": { "domain": { "name": "'"$OS_PROJECT_DOMAIN_NAME"'" }, "name":  "'"$OS_PROJECT_NAME"'" } } }}' \
| python -m json.tool

We will need to enter the following data :

Parámetro Tipo Descripción
User Domain (requerido) string Dominio del user.
username (requerido) string Nombre del user.
password (requerido) string Password del user.
Project Domain (opcional) string Dominio del proyecto.
Project Name (opcional) string Nombre del proyecto.
Project ID (opcional) string Id del proyecto

Example of the use of curl:

5-2.jpg

In X-Subject-Token we can see the generated token. This will be the token that will have to be introduced when executing the plugin.

At the same time, to use the plugin we will need to have python 3 and the requests module installed, for python 3 we will use the following command in centOS7:

yum install python3

To install the requests module we will use :

pip3 install requests