Skip to content

Getting Started with CLI

To interact with Tier5 Cloud programmatically or via the command line, you need the OpenStack Client and your project credentials.

1. Install OpenStack Client

We recommend using a Python virtual environment to install the unified OpenStack client. This ensures the client dependencies do not conflict with your system packages.

# Create a virtual environment
python3 -m venv openstack-cli

# Activate the environment
source openstack-cli/bin/activate

# Install the client
pip install python-openstackclient

2. Obtain Credentials

You can authenticate using either an openrc file (Environment variables) or a clouds.yaml file (Configuration profile).

Option A: OpenRC (Environment Variables)

This is the standard method for single-session use.

  1. Log in to the Horizon Dashboard (https://horizon.<your-domain>.tier5.cloud).
  2. Navigate to ProjectAPI Access.
  3. Click Download OpenStack RC File (top right).
  4. Source the file in your terminal:
source project-openrc.sh
# Enter your password when prompted

The clouds.yaml method allows you to manage multiple cloud environments and switch between them easily without sourcing files repeatedly.

  1. Create the configuration directory:
mkdir -p ~/.config/openstack/
  1. Create the file ~/.config/openstack/clouds.yaml with the following content:

Note: Replace <your-domain>, YOUR_USERNAME, and YOUR_PROJECT_NAME with your actual details.

clouds:
  tier5:
    auth:
      auth_url: https://api.<your-domain>.tier5.cloud:5000/v3
      username: "YOUR_USERNAME"
      project_name: "YOUR_PROJECT_NAME"
      user_domain_name: "Default"
      project_domain_name: "Default"
    region_name: "RegionOne"
    interface: "public"
    identity_api_version: 3
  1. How to use it: Once the file is saved, you can reference the cloud name tier5 in your commands:
# Method 1: Using the --os-cloud flag
openstack --os-cloud tier5 server list

# Method 2: Exporting the variable (persistent for session)
export OS_CLOUD=tier5
openstack server list

3. Verifying Access

To verify your installation and credentials are correct, run a simple command to list the available services:

openstack catalog list

If successful, you will see a table listing services like nova, neutron, cinder, etc.

Official Documentation

For detailed CLI configuration and advanced usage, visit the OpenStack User Guide.