Installing and Configuring octl

You can manage your resources on the OUTSCALE Cloud using octl, the main command-line interface (CLI) developed by 3DS OUTSCALE.

octl is the first and only CLI that is compatible with all:

  • The OUTSCALE API, for managing IaaS resources

  • The OOS API, for managing object-storage resources

  • The OKS API, for managing Kubernetes resources

For a full description of all advanced features, see the octl GitHub repository.

Installing octl

Installing octl on Linux

  1. Download the latest binary file:

    $ curl -L -o octl https://github.com/outscale/octl/releases/latest/download/octl_Linux_x86_64
  2. Make the file executable:

    $ chmod +x octl
  3. Move the file to your usr/local/bin directory:

    $ sudo mv octl /usr/local/bin

Installing octl on macOS

Before you begin: Install Homebrew on your machine.

  1. Add 3DS OUTSCALE’s tap to your machine:

    $ brew tap outscale/tap
  2. Install octl as follows:

    $ brew install outscale/tap/octl

Installing octl on Windows

  1. Download the latest octl_Windows_x86_64.exe file, which you can run directly as an executable.

  2. (optional) To be able to run octl from any location, you can add the directory containing octl to your system’s Path environment variable. For example, type the following commands in the Windows Command Prompt:

    1. Move the executable to a distinct directory:

      mkdir octl
      move octl_Windows_x86_64.exe octl\octl.exe
    2. Add the directory to your Path for the current session (set command) and future sessions (setx command):

      set Path=%Path%;C:\Users\Administrator\Desktop\octl
      setx Path %Path%;C:\Users\Administrator\Desktop\octl
    3. Verify the installation:

      octl --version

Configuring octl

Setting Up Autocompletion

See docs/installation.md in the GitHub repository.

Authenticating

You can configure your authentication profile either via environment variables:

  • OSC_ACCESS_KEY: The access key ID of your OUTSCALE account. For more information, see Creating an Access Key.

  • OSC_SECRET_KEY: The corresponding secret key of your OUTSCALE account.

  • OSC_REGION: The Region of your OUTSCALE account (for example, eu-west-2).

Or by creating the ~/.osc/config.json file:

{
  "default": {
    "access_key": "XXXX",
    "secret_key": "YYYY",
    "region": "eu-west-2"
  }
}

You can edit this file via a text editor or directly with the octl profile command. For example, the following command will create a profile named default (it will create the file if it does not already exist):

$ octl profile add default --ak XXXX --sk YYYY --region eu-west-2

For more information on authentication and to manage multiple profiles, see docs/configuration.md in the GitHub repository.

Using octl

octl provides two different syntaxes to interact with your resources:

  • An octl-specific syntax for high-level commands, in the form octl <service> <entity> list/describe/create/update/delete …​, with opinionated defaults and shortcuts:

    Request samples
    $ octl iaas volume list
    
    $ octl iaas vol ls

    These high-level commands are currently documented in the docs/reference folder in the GitHub repository.

  • A raw syntax that maps directly to the API operations and API request parameters, in the form octl <service> api <OperationName> …​:

    Request sample
    $ octl iaas api ReadVms --Filters.VmStateNames running

    Code samples in this raw syntax are included in the OUTSCALE API documentation and OKS API documentation, for all possible API operations.

You can also use the --help option to check the help for each command and subcommand. For a full description of all advanced features, see the octl GitHub repository.

Related Page