Skip to content

Installing the CLI

The MetalSoft CLI is a command-line tool that allows the manipulation of all Metal Cloud elements. While most operations can be done via the UI there are some that can only be done via the CLI, especially during the MetalSoft installation process such as:

  • Create users
  • install operating system templates
  • Install extensions

It is also a very useful for automating common tasks thus familiarization with it is worthwhile even if day-to-day activities are carried out via the UI.

Download the latest release for your operating system.

Terminal window
brew tap metalsoft-io/homebrew-repo
brew install metalcloud-cli

Use the latest release for your platform https://github.com/metalsoft-io/metalcloud-cli/releases/latest

Terminal window
sudo yum install $(curl -s https://api.github.com/repos/metalsoft-io/metalcloud-cli/releases/latest | grep -i browser_download_url | grep "amd64" | grep -i linux | grep rpm | head -n 1 | cut -d'"' -f4)
Terminal window
curl -skL $(curl -s https://api.github.com/repos/metalsoft-io/metalcloud-cli/releases/latest | grep -i browser_download_url | grep "$(dpkg --print-architecture)" | grep deb | head -n 1 | cut -d'"' -f4) -o metalcloud-cli.deb && sudo dpkg -i metalcloud-cli.deb

Binaries are available here. Simply run the exe directly.

You can also use go get, on any platform where golang is installed to retrieve the latest executable:

Terminal window
go get github.com/metalsoft-io/metalcloud-cli

Retrieving the API key and endpoint and configuring the environment variables

Section titled “Retrieving the API key and endpoint and configuring the environment variables”
  1. In the MetalSoft Web UI click on the user icon at the top right corner. Then go to API credentialsAPY key
  • Copy the api key. Its format should be <number>:<letters>.
  • Copy the endpoint. Its format should be https://api.environment.hostname.
  1. Configure credentials as environment variables (for Windows, use SET rather than export).
Terminal window
export METALCLOUD_API_KEY="your key" # example value: "1:e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e"
export METALCLOUD_ENDPOINT="your api endpoint" # example value: "https://api.demo.metalsoft.io"
export METALCLOUD_INSECURE_SKIP_VERIFY=false #defaults to false

Use metalcloud-cli help for a list of supported commands.

A pre-requisites utility script is also provided. This helps verify that all the connectivity and performance requirements are met before starting the deployment.

For more information please visit: