Build Server integration for new apps

When we need to deploy software that does not have a binary or release distribution we need to build a version of that software and upload it to our S3 bucket. We do this by adding build and upload instructions to ansible in our ops repository.

New app build server setup

In order to add build steps for a new application you need to:

  1. Add a new build_<app_name>.yml file to ansible/roles/build/tasks/. In this file you need to include the ansible tasks to build the target software bin/distrib and then upload it to S3. You also need to include a task that prints the checksum of the created distribution or binary. See other files in this folder for good examples of how to do so.
  2. Update the ansible/roles/build/tasks/main.yml to reference the file you created in step 1. It should have a when clause for when the <app_name>_version ansible variable is defined.
  3. Test the setup against the dev build server with a command such as the following:
dev-ansible-playbook -i inventories/development-operations/hosts --limit build-d01.attestant.io build.yml --extra-vars "<app_name>_version=v1.2.3"

Each build_<appname>.yml should be a self-contained set of build instructions, run entirely by the build user. We shouldn’t assume anything is pre-installed - all prerequisites for the application should be explicitly installed as part of the build tasks. The goal is to ensure the build works on a freshly baselined machine. A baseline setup typically includes only volumes, SSH configs, and firewall rules — nothing application-specific is installed at that point.