Skip to content

Deploying services

Only for services on bare GCP compute instances

These deployment steps currently function only for services running as a systemd service on bare GCP compute instances. A Cloud Run service deploys through neph terraform in every environment. In staging a merge that changes its pin applies it. See Deploying staging.

For deploying a service, you first have to use neph to set the appropriate env vars. You then install the service on your machine, which builds it and moves it to the correct directory. You then copy the newly built binary to the remote machine. Just execute the following steps:

  1. Set env vars:
    . <(uv run neph config dump --output shell --env <env>)
    
  2. Install with Mise. It stages the amd64 binary in infra/build_artifacts/bin/amd64/, the flat layout Ansible resolves against:
    mise run //dir/to/service:install
    
  3. Set up remote machine correctly:
    uv run neph ansible --env <env> --playbook <playbook>
    

Gateway and streamer live on same machine and are deployed together!

The gateway and the streamer live on the same machine. The playbook ubuntu-gateway.yml deploys both services together, and the streamer must not be restarted when jobs are running.

Tip

If you want to run only some steps of the deployment playbook, then open the playbook and comment out the rest.