Skip to main content

How to deploy Monitor Space Hazards

Monitor Space Hazards (MSH) manages most of its resources through Terraform, this is the repo UKSpaceAgency/sst-beta-infra.

The release and deployment process for MSH on AWS is driven by TAG creation for the relevant git repository (Frontend or Backend). The repos are available at the following: Monitor Space Hazards beta Frontend repo Monitor Space Hazards beta Backend repo

Once a specific tag is created, then configured GitHub actions will build the code and invoke an infrastructure/terraform rollout.

The release process is the same for Frontend and Backend. Here’s an example for the Backend

  1. Go to Releases in the relevant repo, for example from here: https://github.com/UKSpaceAgency/sst-beta-python-backend/releases
  2. Select Draft a new release GitHub Action Image
  3. Create a new tag using the Choose a tag dropdown
  4. Choose Branch or Commit under the Target dropdown
  5. You need to follow the naming convention when creating the tag:

Tags started with DEMO-x.y.z will deploy code to the demo environment

Tags started with PROD-x.y.z will deploy code to the production environment

  1. Once you click Publish release, the tag will be created in the git repository and automated release process will start. It will first build the Docker image, then invoke an infrastructure project to rollout automatically GitHub Action Image
  2. After Publish release is clicked the build will start which can be seen in github actions GitHub Action Image
  3. If the build has successfully completed, it means the Docker image is ready and it’s pushed to AWS ECR (Container Registry), then an automated rollout happens inside the sst-beta-infra github actions.

    You can monitor progress of the rollout at https://github.com/UKSpaceAgency/sst-beta-infra/actions GitHub Action Image

  4. Once a deploy workflow completes successfully in sst-beta-infra actions, then the code is deployed to the relevant environment. Automated Slack messages will also notify you on the #uksa-sst-beta-backend-notifier channel. GitHub Action Image
Please note Warning. Be extra careful when binding new tag with a Commit or Branch. It’s recommended to use the Draft option for a Production deployment in order to make sure all the steps have been accurately followed.

If the release fails, logs need to be read and the reason for failure fixed. It may be time to contact the Service Team.

This page was last reviewed on 3 November 2023. It needs to be reviewed again on 3 November 2024 .
This page was set to be reviewed before 3 November 2024. This might mean the content is out of date.