Skip to content

Connect to the project

To manage resources from your cloud infrastructure, you can use the command line interface or navigate to the OpenStack Dashboard (Horizon).

New users are recommended to use Horizon as it is a more accessible solution to manage the cloud infrastructure.

Warning

All resources provisioned on the Public Cloud are assigned to a region.

  • dc3-a
  • dc4-a

To see the resources deployed in a region, you need to switch to that region.
There is no global view of all resources. Please check that you are connected to the right region.

The unified OpenStack client (openstack) is the recommended command line interface. Most of the examples in this guide will use this client.
We recommend to always run the most recent OpenStack client.

The client is available for MacOS, Windows and Linux based machines.

To install the OpenStack tools, you can follow one of these methods:

Installation

The recommended way to install OpenStackClient is using the PyPi package:

python -m pip install -U pip
pip install python-openstackclient

Specific

Some systems has built the package for their package manager. You may find some example below:

Debian
sudo apt update
sudo apt install openstack-clients
Older Debian

Older version of Debian may still have packages on corresponding unofficial backport repositories. As example, here is the backport for Debian 10 (buster).

echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee /etc/apt/sources.list.d/buster-backports
sudo apt update

Add the Victoria backports repository for Buster and install all OpenStack clients:

sudo apt install extrepo
sudo extrepo enable openstack_victoria
sudo apt update
sudo apt install openstack-clients
RHEL / CentOS / Fedora
sudo dnf update
sudo dnf install python3-openstackclient
sudo yum update
sudo yum install python3-openstackclient
Ubuntu
sudo snap refresh
sudo snap install openstackclients
sudo apt update
sudo apt install python3-openstackclient
Older Ubuntu
sudo add-apt-repository cloud-archive:victoria
sudo apt update
sudo apt install python3-aodhclient python3-barbicanclient python3-cinderclient python3-cloudkittyclient python3-glanceclient python3-gnocchiclient python3-heatclient python3-keystoneclient python3-magnumclient python3-neutronclient python3-novaclient python3-octaviaclient python3-openstackclient python3-osc-placement python3-swiftclient
Nix / NixOS

The OpenstackClient is available on Nix with the package openstackclient. The variant openstackclient-full provider the client with all of its extensions.

Add the following to your configuration :

environment.systemPackages = [
  pkgs.openstackclient-full
];

MacOS

brew

Info

If brew is not already installed yet you can fetch the one-liner installation from https://brew.sh/

Once you have brew installed you can install Openstack client just like any other package

brew install openstackclient

Retrieve credentials

In the Infomaniak Manager, select your Openstack project and navigate to the user management section.

Select the configuration file according to your need: Download image from the manager

Select your region and click Download Download image from the manager

The cloud.yaml is an easy way to connect the client to multiple clouds.
Download the file and place it in ~/.config/openstack/clouds.yaml.

The file should look like this:

clouds:
  PCP-XXXXXXX:
    auth:
      auth_url: https://api.pub1.infomaniak.cloud/identity/v3
      project_name: PCP-XXXXXXX
      username: PCU-XXXXXXX
      password: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
      user_domain_name: Default
      project_domain_name: Default
    region_name: dc3-a
    identity_api_version: 3
You can now issue command to your infrastructure:
openstack --os-cloud PCP-XXXXXXX project list
+----------------------------------+-------------+
| ID                               | Name        |
+----------------------------------+-------------+
| xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | PCP-XXXXXXX |
+----------------------------------+-------------+

Your file will look like this:

export OS_AUTH_URL=https://api.pub1.infomaniak.cloud/identity/v3
export OS_PROJECT_NAME=PCP-XXXXXXX
export OS_USERNAME=PCU-XXXXXXX
export OS_PROJECT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_IDENTITY_API_VERSION=3
export OS_INTERFACE=public
export OS_REGION_NAME=dc3-a
# To avoid being prompted for your password each time,
# write your password below and uncomment the line
#OS_PASSWORD='your password goes here'# (1)
[ -z "$OS_PASSWORD" ] && read -e -p "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: " OS_PASSWORD
export OS_PASSWORD

  1. You may uncomment this line and set the password to avoid being prompted each time.

Source the openRC file and enter the user password:

source <your_file>

You can now issue command to your infrastructure:

openstack project list
+----------------------------------+-------------+
| ID                               | Name        |
+----------------------------------+-------------+
| xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | PCP-XXXXXXX |
+----------------------------------+-------------+

Success

You are ready to manage your infrastructure.

Horizon is a web interface allowing you to create and manage your instances, images etc... Click on the name of your project or on Open the OpenStack dashboard. infomaniak-publiccloud_07.png

Log in with the previously created credentials infomaniak-publiccloud_08.png

When you are connected to your project, you can select and switch between regions with the dropdown menu on the top. infomaniak-publiccloud_9.png