Using the BigAnimal CLI
Use the command line interface (CLI) for BigAnimal management activities such as cluster provisioning and getting cluster status from your terminal. The CLI is an efficient way to integrate with BigAnimal and enables system administrators and developers to script and automate the BigAnimal administrative operations.
Installing the CLI
The CLI is available for Linux, MacOS, and Windows operating systems.
Download the binary executable
For Linux operating systems, use the following command to get the latest version of the binary executable:
For all other operating systems, download the executable binary here. After downloading, move the binary executable under a directory on your executable search path.
(Optional) Validate the download
For Linux users:
- Copy the SHA256 checksum code for Linux distribution from the BigAnimal CLI page and store it as a local file, such as
biganimal_linux_amd64.sha256
. Alternatively, click the SHA256 code to download it as a file directly and verify the content of the downloaded file is identical to the checksum code showed on the page. - From your local shell, validate the binary executable file against the checksum file:
- Copy the SHA256 checksum code for Linux distribution from the BigAnimal CLI page and store it as a local file, such as
For Windows users:
- Download the SHA256 checksum code for Windows distribution from the BigAnimal CLI page and store it as a local file, such as
biganimal_windows_amd64.sha256
. Alternatively, click the SHA256 code to download it as a file directly and verify the content of the downloaded file is identical to the checksum code showed on the page. - Validate the binary executable file against the checksum file using
CertUtil
:
- Download the SHA256 checksum code for Windows distribution from the BigAnimal CLI page and store it as a local file, such as
For MacOS users:
- Download the SHA256 checksum code for MacOS distribution from the BigAnimal CLI page and store it as a local file, such as
biganimal_darwin_amd64.sha256
. Alternatively, click the SHA256 code to download it as a file directly and verify the content of the downloaded file is identical to the checksum code showed on the page. - From MacOS terminal, validate the binary executable file against the checksum file:
- Download the SHA256 checksum code for MacOS distribution from the BigAnimal CLI page and store it as a local file, such as
Make the CLI command executable within Cloud Shell
Change the permissions of the CLI to make it executable in Cloud Shell:
Authenticate as a valid user
Before using the CLI to manage BigAnimal, you need to authenticate as a valid BigAnimal user. Use the credential create
command to authenticate through the BigAnimal website and assign a refresh token and an access token to a local credential. For example:
Refresh tokens expire after 30 days. To continue using the credential to access the CLI, use the credential reset
command to authenticate through the BigAnimal website and receive a new refresh token:
You can create multiple credentials for different BigAnimal accounts and then set one as context of your current management session. Use credential show
to list all available credentials, and use config set context_credential
to set a default credential for the current context. For example:
Configuring
The initial running of the CLI creates a hidden configuration folder in your user root directory. For example, for Linux it’s ${HOME}/.edb-cli
. The CLI persists the configuration file in this directory as well as the credentials.
Don’t edit files in this directory directly. Instead, use the config
subcommand to list and update the configuration settings of the CLI. Use the following command to get detailed usage and available configurations information:
Available configuration settings
Setting | Description |
---|---|
context_credential | The default credential used in the following commands. |
context_project | The default project used to run the following commands. |
output_mode | The command line output format: table, json, xml, or yaml. |
confirm_mode | If enabled, create/update/delete commands require user confirmation. |
interactive_mode | If enabled, CLI prompts for missing flags and available options. See Interactive mode for more information. |
check_update_mode | If enabled, CLI detects new updates and prompts for download. |
warning_mode | If enabled, CLI displays warning messages. |
Usability features
Online command reference and help
Use the -h
or --help
flags for more information on the CLI commands. You can use these flags on the biganimal
command to get a listing of all the available subcommands (biganimal -h
) or on a subcommand to get information on that particular command (for example, biganimal create cluster -h
).
Interactive mode
In interactive mode, the CLI prompts you for any missing mandatory flags and lists any available options for your current context. To enable interactive mode:
Sample use cases
See: