Skip to content

Deploying Azimuth

Python dependencies

The Python requirements for an Azimuth deployment host, including Ansible itself, are contained in requirements.txt and must be installed before you can proceed with a deployment. It is recommended to use a virtual environment in order to keep the dependencies isolated from other Python applications on the host.

azimuth-config includes a utility script that will create a Python virtual environment in the configuration directory and install the required dependencies:

./bin/ensure-venv

If it exists, this virtual environment will be activated as part of the environment activation (see below).

If you prefer to manage your own virtual environments then you must ensure that the correct environment is activated and has the required dependencies installed before continuing. For example, if you use pyenv you can set the PYENV_VERSION environment variable in your azimuth-config environment:

env
PYENV_VERSION=azimuth-config

Activating an environment

Before you can deploy Azimuth, you must first activate an environment:

source ./bin/activate my-site

Warning

This script must be sourced rather than just executed as it exports environment variables into the current shell that are used to configure the deployment.

Deploying an environment

Once you are happy with any configuration changes and the environment that you want to deploy to has been activated, run the following command to deploy Azimuth:

# Install or update Ansible dependencies
ansible-galaxy install -f -r ./requirements.yml

# Run the provision playbook from the azimuth-ops collection
# The inventory is picked up from the ansible.cfg file in the environment
ansible-playbook stackhpc.azimuth_ops.provision

Tearing down an environment

azimuth-ops is also able to tear down an Azimuth environment, including the K3S and HA Kubernetes clusters as required.

After activating the environment that you want to tear down, run the following:

ansible-playbook stackhpc.azimuth_ops.destroy

Last update: April 9, 2024
Created: April 9, 2024