Page tree

On this page

Overview

Cloud users can also make direct use of API endpoints using appropriate tools. This page documents the process for configuring API endpoint access for the most common set of OpenStack tools - the Unified OpenStack Client.

Pre-requisites

Before being able to make use of the API endpoints, you must already have access to the NCI Nirin Cloud - please see Access to the Nirin Cloud for details about how to organise access.

In addition, this document assumes that you have already logged on to the Nirin Dashboard and are familiar with the contents of the Nirin - Quick Start Guide.

Obtain an OpenStack RC file

The OpenStack RC file details the credentials needed to access the Nirin API. These credentials provide complete access to create and delete cloud resources, and should be protected appropriately. 

Log in to the dashboard and select the appropriate project. From the "Project" tab, select the "API Access" tab, and finally click on the "Download OpenStack RC File" button.


A file called foo-openrc.sh will be made available for download - save this to your local disk, and then copy the file to whichever machine you wish to use to access to the API endpoints.

To obtain an OpenStack RC file for another project, simply select the project from the project list and repeat the download process.

Install the OpenStack Client

The OpenStack client libraries and tools are all written in Python, and require a functioning Python installation to run - almost any Linux distribution will provide this by default. The best means to install the OpenStack Client will depend on the system you are running it on, but a reasonably safe way to experiment with it is to use a Python virtual environment and install the client using the standard Python package management tool pip (see related virtualenv documentation):

$ mkdir osc-venv
$ virtualenv osc-venv
created virtual environment CPython3.7.7.final.0-64 in 132ms
  creator CPython3Posix(dest=/Volumes/Users/osric/osc-venv, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/Volumes/Kali Home/osric/Library/Application Support/virtualenv/seed-app-data/v1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
$ source osc-venv/bin/activate
$ pip install python-openstackclient
Defaulting to user installation because normal site-packages is not writeable
Collecting python-openstackclient
  Downloading python_openstackclient-5.8.0-py3-none-any.whl (984 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 984.1/984.1 KB 5.6 MB/s eta 0:00:00


$ openstack --version
openstack 5.2.0
$ openstack help
usage: openstack [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug]
                 [--os-cloud <cloud-config-name>]
$ 

Most Linux distributions package the OpenStack tools in various versions, and in many cases that will be the most appropriate way to install them - the detailed process for installing from distribution packages is out of scope for this document.

Source the OpenStack RC file in your shell

For users of the bash shell:

(osc-venv) $ source ./foo-openrc.sh 
Please enter your OpenStack Password: 
(osc-venv) $ 

When prompted enter your NCI ldap password.

It is possible to edit the foo-openrc.sh file to directly include your ldap password, but for security reasons this is not recommended on shared or publicly accessible systems.

Run the OpenStack Client

At this point it should be possible to run the openstack command against the Nirin endpoints:

(osc-venv) $ openstack catalog list
+----------------------------+-------------------------+------------------------------------------------------------------------------------------+
| Name                       | Type                    | Endpoints                                                                                |
+----------------------------+-------------------------+------------------------------------------------------------------------------------------+
| tempest-service-1556162739 | tempest-type-1872333110 |                                                                                          |
| heat                       | orchestration           | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au/heat/v1/532ab34182f74f179a9d51b3b7c964b3              |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au/heat/v1/532ab34182f74f179a9d51b3b7c964b3            |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au/heat/v1/532ab34182f74f179a9d51b3b7c964b3              |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au/heat/v1/532ab34182f74f179a9d51b3b7c964b3               |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au/heat/v1/532ab34182f74f179a9d51b3b7c964b3            |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au/heat/v1/532ab34182f74f179a9d51b3b7c964b3               |
|                            |                         |                                                                                          |
| nova                       | compute                 | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au:8774/v2.1                                           |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au:8774/v2.1                                             |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au:8774/v2.1                                              |
|                            |                         |                                                                                          |
| tempest-service-1421692659 | tempest-type-311416619  |                                                                                          |
| cinder                     | volume                  | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au:8776/v1/532ab34182f74f179a9d51b3b7c964b3            |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au:8776/v1/532ab34182f74f179a9d51b3b7c964b3              |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au:8776/v1/532ab34182f74f179a9d51b3b7c964b3               |
|                            |                         |                                                                                          |
| glance                     | image                   | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au:9292                                                |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au:9292                                                   |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au:9292                                                  |
|                            |                         |                                                                                          |
| ceilometer                 | metering                |                                                                                          |
| heat                       | orchestration           |                                                                                          |
| tempest-service-1977790481 | tempest-type-516609866  |                                                                                          |
| gnocchi                    | metric                  | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au:8041                                                   |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au:8041                                                |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au:8041                                                  |
|                            |                         |                                                                                          |
| tempest-service-32808070   | tempest-type-1527066719 |                                                                                          |
| keystone                   | identity                | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au:5000                                                   |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au:5000                                                |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au:5000                                                  |
|                            |                         |                                                                                          |
| tempest-service-530389404  | tempest-type-1161003091 |                                                                                          |
| murano                     | application-catalog     | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au:8082/                                                 |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au:8082/                                                  |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au:8082/                                               |
|                            |                         |                                                                                          |
| heat-cfn                   | cloudformation          | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au/heat_cfn/v1                                         |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au/heat_cfn/v1                                            |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au/heat_cfn/v1                                           |
|                            |                         |                                                                                          |
| heat-cfn                   | cloudformation          | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au/heat_cfn/v1                                            |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au/heat_cfn/v1                                         |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au/heat_cfn/v1                                           |
|                            |                         |                                                                                          |
| tempest-service-967364108  | tempest-type-1441216459 |                                                                                          |
| cinderv3                   | volumev3                | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au:8776/v3/532ab34182f74f179a9d51b3b7c964b3            |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au:8776/v3/532ab34182f74f179a9d51b3b7c964b3               |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au:8776/v3/532ab34182f74f179a9d51b3b7c964b3              |
|                            |                         |                                                                                          |
| placement                  | placement               | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au:8778                                                   |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au:8778                                                  |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au:8778                                                |
|                            |                         |                                                                                          |
| swift                      | object-store            | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au:8080/swift/v1/AUTH_532ab34182f74f179a9d51b3b7c964b3    |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au:8080/swift/v1/AUTH_532ab34182f74f179a9d51b3b7c964b3   |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au:8080/swift/v1/AUTH_532ab34182f74f179a9d51b3b7c964b3 |
|                            |                         |                                                                                          |
| cinderv2                   | volumev2                | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au:8776/v2/532ab34182f74f179a9d51b3b7c964b3              |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au:8776/v2/532ab34182f74f179a9d51b3b7c964b3            |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au:8776/v2/532ab34182f74f179a9d51b3b7c964b3               |
|                            |                         |                                                                                          |
| neutron                    | network                 | CloudV3                                                                                  |
|                            |                         |   admin: https://cloud.nci.org.au:9696                                                   |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   public: https://cloud.nci.org.au:9696                                                  |
|                            |                         | CloudV3                                                                                  |
|                            |                         |   internal: https://cloud.nci.org.au:9696                                                |
|                            |                         |                                                                                          |
+----------------------------+-------------------------+------------------------------------------------------------------------------------------+
(osc-venv) $ openstack server list
+--------------------------------------+-----------------------+---------+-----------------------------------------------+-------+----------------+
| ID                                   | Name                  | Status  | Networks                                      | Image | Flavor         |
+--------------------------------------+-----------------------+---------+-----------------------------------------------+-------+----------------+
| 01234567-89ab-cdef-0123-456789abcdef |     instance-0        | ACTIVE  | internal=10.0.0.1, 130.56.x.x                 |       | t2.1c4m10d     |
...
| 12345678-9abc-def0-1234-56789abcdef0 |     instance-n        | ACTIVE  | internal=10.0.0.x, 130.56.x.x                 |       | t2.1c4m10d     |
+--------------------------------------+-----------------------+---------+-----------------------------------------------+-------+----------------+

If these commands fail please contact the NCI support team at help@nci.org.au for assistance.

OpenStack Client Documentation

Detailed discussion of the use of these tools is outside the scope of this document, however the OpenStack project has extensive documentation available which can be accessed from their documentation page at https://docs.openstack.org/victoria/user/. In addition a wealth of information is available from other online sources.