Overview

Control Plane offers a Command Line Interface for all major operating systems. The CLI is an abstraction layer over the Control Plane API and gives you access to all the features of the platform.

It is recommended to install the CLI in order to perform a handful of operations that are not available from the console (e.g., containerizing a microservice).

This quick start will demonstrate how to:

  • Install the CLI.
  • Log in to the CLI.
  • Display the Control Plane resources created in the previous Quick Start.
  • Set a default Org and GVC in your profile.

Prerequisites

Step One - Install the CLI

The preferred method to install the CLI is using npm with Node.js version 12+. Alternate methods to install the CLI are available here.

After installing npm, open a new shell window and execute the following command to install the CLI:

npm install -g @controlplane/cli

After a successful installation, run the following command to view the installed version:

cpln --version

The latest version can be viewed here and cross referenced with the output from the —version flag.

Step Two - Log in to the CLI

The CLI requires you to log in before executing any commands.

Open a new shell and execute this command to log in:

cpln login

The default browser will launch displaying the login page. Select the single sign-on (SSO) provider that is connected to your email address. After a successful log in, the brower can be closed. The shell will display the profile named default that was created and mapped to your email address.

Step Three - Display Control Plane Resources

You can use the CLI to view the resources that were created in the previous Quick Start.

Execute the commands below to view their respective output (substitute ORG_NAME and GVC_NAME for your Org and GVC name):

To view all the commands that the CLI offers, run:

cpln --help

Each command displayed in the --help output also has its own --help output. To view it, run:

cpln COMMAND --help

Step Four - Set a default Org and GVC

Notice that in step 3 the GVC and Workload commands required additional flags for the Org and GVC.

By setting a default Org and/or GVC on your profile, those flags will not be needed in future CLI command calls.

To set a default Org or GVC on your profile, run the following command (substitute ORG_NAME and GVC_NAME for your Org and GVC name):

cpln profile update default --org ORG_NAME --gvc GVC_NAME

Summary

By installing the CLI, you have the ability to easily interact with the platform and execute commands quickly.

Visit the CLI reference page for details and examples of each command.

Click the 4. Deploy an Application button below to learn how to use the CLI to deploy an application from code to a running Workload.