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
-
Download the latest binary file:
$ curl -L -o octl https://github.com/outscale/octl/releases/latest/download/octl_Linux_x86_64 -
Make the file executable:
$ chmod +x octl -
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. |
-
Add 3DS OUTSCALE’s tap to your machine:
$ brew tap outscale/tap -
Install octl as follows:
$ brew install outscale/tap/octl
Installing octl on Windows
-
Download the latest octl_Windows_x86_64.exe file, which you can run directly as an executable.
-
(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:
-
Move the executable to a distinct directory:
mkdir octl move octl_Windows_x86_64.exe octl\octl.exe -
Add the directory to your Path for the current session (
setcommand) and future sessions (setxcommand):set Path=%Path%;C:\Users\Administrator\Desktop\octl setx Path %Path%;C:\Users\Administrator\Desktop\octl -
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
|
|
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 lsThese 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 runningCode 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 |
Related Page