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.
- Log in to the Horizon Dashboard (
https://horizon.<your-domain>.tier5.cloud). - Navigate to Project → API Access.
- Click Download OpenStack RC File (top right).
- Source the file in your terminal:
source project-openrc.sh
# Enter your password when prompted
Option B: clouds.yaml (Recommended)¶
The clouds.yaml method allows you to manage multiple cloud environments and switch between them easily without sourcing files repeatedly.
- Create the configuration directory:
mkdir -p ~/.config/openstack/
- Create the file
~/.config/openstack/clouds.yamlwith the following content:
Note: Replace
<your-domain>,YOUR_USERNAME, andYOUR_PROJECT_NAMEwith 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
- How to use it:
Once the file is saved, you can reference the cloud name
tier5in 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.