On this page

The infrastructure is still being setup, and is not final, however the documentation here serves both as a documentation of what we currently have setup and what we strive to setup.

Servers

The main OpenAGPS infrastructure runs on leafcloud, which provides a OpenStack interface. The VMs run Flatcar Linux, and are configured with Butane. The Butane scripts are processed by a python script, which adds the authorized SSH keys and secrets.

A secrets file is needed for the OpenCellID token. This file should be a YAML file, placed in [secrets.yaml]{.title-ref} by default, with the following format:

OPENCELLID_TOKEN: "<pk.token>"

The [--secrets-file]{.title-ref} argument to the generate script can be used to specify a different path to the secrets file. Without it, the corresponding variable will not get templated; Porygon handles network failures gracefully, so it will not cause any issues, but the OpenCellID database will not be fetched.

To create the Butane / Ignition scripts, clone the infra repository and run the following command:

./generate.py --ssh-key "SSH PUBLIC KEY HERE" --run-butane

or:

./generate.py --ssh-key-file /path/to/ssh/public/key --run-butane

The processed Butane and Ignition files are created in the [processed]{.title-ref} directory. This requires podman to be installed; if you do not have podman installed but wish to only template the butane files, omit the [--run-butane]{.title-ref} argument.

Deploying

The generate script supports automatically deploying the required instances onto OpenStack. You will need to have a suitable [clouds.yaml]{.title-ref} file, and will need to make the needed adjustments to the [deployments.yaml]{.title-ref} file. The script will look for the cloud named [openstack]{.title-ref} in the YAML file.

To enable automatic OpenStack deployment, use the following command:

./generate --ssh-key{-file} { } --run-butane --deploy-on-openstack

The [--run-butane]{.title-ref} argument is required for OpenStack deployment.