Openstack CLI

From the interactive servers

To work with the CLI on our interactive servers you need to run ccenv:

% ccenv openstack

Afterwards, commands like openstack, nova, etc... are immediately accessible:

% openstack catalog list
| Name       | Type         | Endpoints                                                                              |
| nova       | compute      | regionOne                                                                              |
|            |              |   publicURL:          |
|            |              |   internalURL:       |
|            |              |   adminURL:           |

From a third-party machine

  1. install the packages python2-openstackclient, python2-novaclient, python2-glanceclient, python2-cinderclient, python2-neutronclient. They are available for most of the Linux systems.
  2. copy the available credentials in CC-IN2P3 HOME ~/.novacreds/ in a local environment file
  3. source the file

Getting started

Starting through the built-in help can make it easier to get to know the tool:

% openstack help
usage: openstack <subcommand> ...
Optionnal arguments:
Commands :
  address scope create  Create a new Address Scope
  address scope delete  Delete address scope(s)
  address scope list  List address scopes
  address scope set  Set address scope properties
  address scope show  Display address scope details
  aggregate add host  Add host to aggregate
  aggregate create  Create a new aggregate
  aggregate delete  Delete existing aggregate(s)
  aggregate list  List all aggregates
  aggregate remove host  Remove host from aggregate
  aggregate set  Set aggregate properties
  aggregate show  Display aggregate details
  aggregate unset  Unset aggregate properties
  alarm create   Create an alarm
  alarm delete   Delete an alarm
  alarm list     List alarms

Get on-line help on a particular command

% openstack help server create
usage: openstack server create [-h] [-f {json,shell,table,value,yaml}]
                               [-c COLUMN] [--noindent] [--prefix PREFIX]
                               [--max-width <integer>] [--print-empty]
                               (--image <image> | --volume <volume>) --flavor
                               [--security-group <security-group-name>]
                               [--key-name <key-name>]
                               [--property <key=value>]
                               [--file <dest-filename=source-filename>]
                               [--user-data <user-data>]
                               [--availability-zone <zone-name>]
                               [--block-device-mapping <dev-name=mapping>]
                               [--nic <net-id=net-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr,port-id=port-uuid,auto,none>]
                               [--network <network>] [--port <port>]
                               [--hint <key=value>]
                               [--config-drive <config-drive-volume>|True]
                               [--min <count>] [--max <count>] [--wait]

Do more

For more information, please refer to the Openstack CLI documentation.