Akamas offers, as an additional container, a toolbox that contains the Akamas CLI executable, along with some other useful command-line tools such as kubectl, Helm, vim, docker cli, jq, yq, git, gzip, zip, OpenSSH, ping, cURL, and wget. It can be executed along akamas services, in the same network, for docker-compose installation, or in the akamas namespace for Kubernetes installations.
This toolbox aims to:
allowing users to interact with Akamas without the need to install Akamas CLI on their systems
providing the Akamas' workflows with an environment where to run scripts and persist artifacts when no other options (e.g. a dedicated host) are available
By setting the following options in the .env file, you can configure your toolbox by enabling SSH password authentication (only key-based authentication will be available otherwise) and by setting a login password:
To start the toolbox container just issue the following command:
If you want to keep the toolbox running also after a complete restart you can also add the following line to your .env file: COMPOSE_PROFILES=toolbox
To access the toolbox on docker you can issue the following command:
You will be provided with a shell inside the toolbox where you can interact with Akamas. Please read the work folder section below for more information on how to persist scripts and data on the toolbox upon restart and upgrades.
Follow the usual guide for installing Akamas on Kubernetes, adding the following variables to your akamas.yaml
file:
Then, you can launch the usual helm upgrade --install ...
command to run the pod, as described in the#start-the-installation (online) or #start-the-installation (offline) sections.
When it's deployed to Kubernetes, you may access this toolbox in two ways:
via kubectl
via SSH command
Accessing is as simple as:
By default, SSH access to the toolbox is limited to a subset of workflow-related internal services. In the Helm values file, you can configure toolbox.ingress
with additional ingress rules.
For this type of access, you need to retrieve the SSH login password (if enabled) or key. To fetch them, run the following commands:
With this info, you can leverage the toolbox to run commands in your workflows, like in the following example:
You can also access the toolbox by port-forwarding from your local machine (on port 2222 in our example). Run the following kubectl
command:
On another terminal, run:
and answer yes
to the question, then insert the akamas
password to successfully SSH access the toolbox (see example below):
If you need to store Akamas artifacts, scripts, or any other file that requires persistence, you can use the /work
directory, which persists across restarts. This is the default working directory at login time.