In the past months I started working with cloud.it services from Aruba, an Italian service provider. After my career in AWS I was looking for a good provider where to deploy my development playground. I didn’t want to work with the well-known international companies, like Microsoft and Google, so I started scoping the services and tools offered by the others. Let me say it upfront: in general there is still a gap between the big players and the smaller companies, but Aruba is investing a lot to close it.
Aruba Cloud Client
This tool, smartly developed as an open-source project available on GitHub, is what made me pick Aruba among all the others. I needed something that would let me quickly launch and destroy instances, to make my services resilient and scalable without a lot of manual pain. I had already been an Aruba customer and partner for many years, so I started playing with it.
acloud is a single binary that covers the whole Aruba Cloud API: projects, cloud servers and key pairs, block storage, snapshots and backups, VPCs, security groups, load balancers and VPNs, Kubernetes (KaaS) and the container registry, databases (DBaaS), KMS and scheduled jobs. Every list and get command can answer as a table, JSON or YAML, which is what makes it useful outside an interactive terminal.
How to install Aruba Cloud Client
On Mac
brew update
brew tap Arubacloud/tap
brew trust --formula arubacloud/tap/acloud
brew install acloud
On Linux
On Debian and Ubuntu, Aruba publishes an apt repository, so updates arrive with the rest of the system:
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://arubacloud.github.io/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/arubacloud.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/arubacloud.gpg] https://arubacloud.github.io/apt stable main" | \
sudo tee /etc/apt/sources.list.d/arubacloud.list
sudo apt update && sudo apt install acloud
On RHEL, Fedora or Amazon Linux, install the rpm from the releases page (1.0.0 at the time of writing):
sudo rpm -i https://github.com/Arubacloud/acloud-cli/releases/download/v1.0.0/acloud_1.0.0_linux_amd64.rpm
On any other distribution, the static binary has no dependencies (use arm64 instead of amd64 on ARM machines):
VERSION=1.0.0
curl -LO https://github.com/Arubacloud/acloud-cli/releases/download/v${VERSION}/acloud_${VERSION}_linux_amd64.tar.gz
tar xzf acloud_${VERSION}_linux_amd64.tar.gz acloud
sudo install -m 0755 acloud /usr/local/bin/acloud
On Windows
(Is there really someone using it on Windows?) If you are, Scoop is the easiest way:
scoop bucket add arubacloud https://github.com/Arubacloud/scoop-bucket
scoop install acloud
Otherwise, download acloud_<version>_windows_amd64.zip from the releases page, extract acloud.exe and put it in a folder that is on your PATH.
First run
Create an API key in the Aruba Cloud console, then give the client its ID. The secret is asked for with the echo off: on purpose, it can’t be passed as a flag, so it never ends up in your shell history. A context then binds a name to a project, so you don’t have to repeat --project-id on every command.
acloud --version
acloud config set --client-id YOUR_CLIENT_ID
acloud context set playground --project-id YOUR_PROJECT_ID
acloud context use playground
acloud compute cloudserver list
Usage
When I started managing infrastructure it was hard for me to understand how to manage it properly and which tool to use. For a newbie all the tools look exactly the same from the outside, but it is important to pick the right one for your needs. Let’s see where I used the acloud client and why.
Scripting
Test or emergency scripting. Positive thinking really works in our personal and professional life, but when we move to technology it becomes crucial to plan for failure, because scripts that assume everything will go right tend to break at the worst moment. While playing with my code I prepared some emergency break-glass scripts, following the Design for Failure principle: if a deployment or a pipeline fails, I can quickly roll back, restore the service and investigate the cause later. These scripts are simple, tested in advance, and stored where my team can reach them even when the main pipeline is unavailable.
A typical one takes a picture of the project and a snapshot of a volume before a risky change, so there is always a known state to go back to:
#!/usr/bin/env bash
# Before a risky change: save an inventory, snapshot the data volume.
set -euo pipefail
VOLUME_ID="$1"
REGION="${REGION:-ITBG-Bergamo}"
STAMP="$(date +%Y%m%d-%H%M)"
acloud compute cloudserver list -o json > "inventory-servers-$STAMP.json"
acloud storage blockstorage list -o json > "inventory-volumes-$STAMP.json"
acloud storage snapshot create --name "before-change-$STAMP" \
--region "$REGION" --volume-id "$VOLUME_ID"
Two flags make these scripts safer to write: every delete command accepts --dry-run, which only checks that the resource exists and is reachable, and --yes skips the confirmation prompt once you trust the script.
CI/CD pipelining
In a pipeline nobody is there to type a secret, and that is where the client really shines: it runs non-interactively, reads the secret from the ACLOUD_CLIENT_SECRET environment variable (fed by the CI secret store, never written in the repository), and its table-json output pipes straight into jq. I use it for the small steps around a deployment: checking what is running, taking a snapshot before a release, powering a test server on and off again.
# ACLOUD_CLIENT_ID, ACLOUD_CLIENT_SECRET and ACLOUD_PROJECT_ID come from the CI secrets
acloud config set --client-id "$ACLOUD_CLIENT_ID"
acloud context set ci --project-id "$ACLOUD_PROJECT_ID"
acloud context use ci
acloud compute cloudserver list -o table-json | jq -r '.[].id'
acloud compute cloudserver power-on "$TEST_SERVER_ID"
# ... run the tests ...
acloud compute cloudserver power-off "$TEST_SERVER_ID"
For long-running calls there is a global --timeout (30 seconds by default), and --debug prints every HTTP request and response. Keep that one out of shared pipeline logs, because it can show tokens.
Infrastructure setup
Here it is better to use the Terraform provider. A CLI runs commands in order: it is perfect for actions, but it doesn’t know what your infrastructure should look like. Terraform does: you describe networks, servers and volumes once, it keeps a state, shows you a plan before touching anything and fixes the drift when something was changed by hand. So my split is simple: Terraform builds and evolves the infrastructure, acloud handles the day-to-day operations and the emergencies around it.
Status
Today the client is still under active development. I forked their repository to propose some suggestions, which they reworked and published immediately. They also supported me by providing everything I needed to test the changes. I am not really using it every day right now, but I have scripted my infrastructure deployment using both the Aruba Cloud Client and the Aruba Terraform provider.
Links
Documentation
CLI documentation: arubacloud.github.io/acloud-cli
Terraform: https://registry.terraform.io/providers/Arubacloud/arubacloud/latest/docs