Overview

The AusNimbus CLI exposes commands for managing your applications, as well as lower level tools to interact with each component of your system. This topic guides you through getting started with the CLI, including installation and logging in to create your first project.

Installing the CLI

The easiest way to download the CLI is by visiting the Command Line page in the AusNimbus Console.

Installation options for the CLI vary depending on your operating system.

For Windows

Then, unzip the archive with a ZIP program and move the oc binary to a directory on your PATH. To check your PATH, open the Command Prompt and run:

C:\> path

For Mac OS X

Then, and move the oc binary to a directory on your PATH. To check your PATH, open a Terminal window and run:

$ echo $PATH

For Linux

Then, unpack the archive and move the oc binary to a directory on your PATH. To check your path, run:

$ echo $PATH

To unpack the archive:

$ tar -xf <file>

Basic Setup and Login

The oc login command is the best way to initially set up the CLI, and it serves as the entry point for most users. The interactive flow helps you establish a session to an AusNimbus server with the provided credentials. The information is automatically saved in a CLI configuration file that is then used for subsequent commands.

The following example shows the interactive setup and login using the oc login command:

$ oc login
AusNimbus server [https://api.ausnimbus.com.au/]: https://api.ausnimbus.com.au/

Username: demo@example.com
Authentication required for https://api.ausnimbus.com.au/ (openshift)
Password: ******
Login successful.

You don't have any projects. You can try to create a new project, by running

    $ oc new-project <projectname>

Welcome to AusNimbus! See 'oc help' to get started.
  • The command prompts for the AusNimbus server URL.

  • The command prompts for login credentials: a user name and password.

  • A session is established with the server, and a session token is received.

  • If you do not have a project, information is given on how to create one.

When you have completed the CLI configuration, subsequent commands use the configuration file for the server, session token, and project information.

You can log out of CLI using the oc logout command:

$ oc logout
User, alice, logged out of https://api.ausnimbus.com.au

If you log in after creating or being granted access to a project, a project you have access to is automatically set as the current default, until switching to another one:

$ oc login
Username: demo@example.com
Authentication required for https://api.ausnimbus.com.au (openshift)
Password:
Login successful.

Using project "demoproject".

Projects

$ oc project

If you have access to multiple projects, use the following syntax to switch to a particular project by specifying the project name:

$ oc project <project_name>

For example:

$ oc project project02
Now using project 'project02'.

$ oc project project03
Now using project 'project03'.

$ oc project
Using project 'project03'.

Deploy applications, not infrastructure

Forget servers and focus on managing what's more important

Sign up for FREE