Skip to content

Install and Configure the OpenStack CLI

This guide walks you through installing the OpenStack command-line client (openstackclient) and configuring it to access Stud I/O Cloud. It covers macOS, Linux, and Windows and shows two configuration methods: Horizon OpenRC and clouds.yaml.

Prerequisites

  • An active Stud I/O Cloud account and project (tenant) with API access.
  • The Horizon dashboard URL and your login credentials.
  • Python 3.8+ recommended (for pipx/pip installs).
  • Terminal access on your workstation.

Tip: If you are unsure about endpoint URLs, regions, or domain names, you can always use the OpenRC method from Horizon, which auto-configures most settings.

macOS

  • Homebrew (recommended):
bash
brew update && brew install openstackclient
  • Or with pipx (keeps Python tools isolated):
bash
brew install pipx
pipx install python-openstackclient

Linux

  • Debian/Ubuntu (OS packages):
bash
sudo apt update && sudo apt install -y python3-openstackclient
  • Or via pipx (latest from PyPI):
bash
sudo apt update && sudo apt install -y python3-pip pipx
pipx ensurepath
pipx install python-openstackclient
  • RHEL/Rocky/CentOS (EPEL recommended):
bash
sudo dnf install -y python3-pip pipx  # or: sudo dnf install -y python3-openstackclient
pipx ensurepath
pipx install python-openstackclient

Windows

  • Recommended: Use Windows Subsystem for Linux (WSL) and follow Linux steps inside WSL.
  • Native Windows (PowerShell) with Python + pipx:
powershell
py -m pip install --user pipx
py -m pipx ensurepath
py -m pipx install python-openstackclient

After installation, restart your shell so the openstack command is on your PATH.

Verify installation

bash
openstack --version

Expected: outputs the client version (for example, openstack 6.x.x).

Option B - Install with pip (global/user)

If you prefer pip without pipx isolation:

bash
python3 -m pip install --user python-openstackclient
# ensure ~/.local/bin (Linux/macOS) is on PATH

Configure access to Stud I/O Cloud

There are two primary ways to configure credentials and endpoints.

Method 1 - Use Horizon OpenRC (simple and reliable)

This method loads environment variables for your session.

  1. Log in to the Stud I/O Cloud Compute Control Panel (Horizon) or use the button below to open it:
🌐Open Horizon
  • In the left navigation, go to Project > API Access.
  • Click Download OpenStack RC File (v3).
  1. Source the RC file in your shell and enter your password when prompted:
bash
source ~/Downloads/project-openrc.sh  # or the exact filename you downloaded
# You will be prompted for your password
  1. Test your access:
bash
openstack token issue
openstack project show $OS_PROJECT_NAME
openstack server list --long

Notes:

  • You will need to source the RC file in each new shell session (or add to your shell profile if appropriate).
  • If you have multiple projects, each RC file targets a specific project.

Method 2 - Use clouds.yaml (persistent config)

This method stores configuration in YAML files and lets you select a named cloud and project.

  1. Create the config directory if it does not exist:
bash
mkdir -p ~/.config/openstack
  1. Create or edit ~/.config/openstack/clouds.yaml and define a studio cloud. This configuration uses our platform's API endpoint:
clouds-yaml
clouds:
  studio:
    auth:
      auth_url: https://keystone.api.compute.eu-c1-tst.int.stud-io.cloud/v3
      username: YOUR_USERNAME
      password: YOUR_PASSWORD
      project_name: YOUR_PROJECT
      user_domain_name: Default
      project_domain_name: Default
    region_name: RegionOne
    interface: public
    identity_api_version: 3
  1. Store secrets securely. You have a few options:
  • Set OS_PASSWORD in your environment when you use the CLI:
bash
export OS_PASSWORD='your-password'
openstack --os-cloud studio token issue
  • Or add a companion secure.yaml (git-ignored) with credentials, and reference it via clouds.yaml. For example:
yaml
# ~/.config/openstack/secure.yaml
clouds:
  studio:
    auth:
      password: YOUR_PASSWORD

Make sure file permissions are restrictive:

bash
chmod 600 ~/.config/openstack/secure.yaml
  1. Use the configured cloud:
bash
openstack --os-cloud studio token issue
openstack --os-cloud studio server list
openstack --os-cloud studio network list

Troubleshooting

  • SSL certificate verify failed:
    • Ensure your system trusts the CA used by Stud I/O Cloud endpoints.
    • Temporarily you can pass --insecure (not recommended for production) or set verify: false under the cloud entry for testing only.
  • 401 Unauthorized:
    • Check username/password, domain names, and that your account has access to the selected project.
    • If using clouds.yaml, try the OpenRC method to validate baseline connectivity.
  • Endpoint not found / 404:
    • Confirm the region name and service catalog; try openstack endpoint list.
  • Multiple projects/regions:
    • With OpenRC, download/source the RC for the specific project.
    • With clouds.yaml, use --os-cloud studio --os-region-name REGION_NAME and optionally --os-project-name PROJECT_NAME or define a named entry per project.

Update and uninstall

  • Homebrew:
bash
brew upgrade openstackclient
brew uninstall openstackclient
  • pipx:
bash
pipx upgrade python-openstackclient
pipx uninstall python-openstackclient
  • APT (Ubuntu/Debian):
bash
sudo apt remove python3-openstackclient

That is it! You can now use the OpenStack CLI to manage your Stud I/O Cloud resources.