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
- Go to Releases in the relevant repo, for example from here: https://github.com/UKSpaceAgency/sst-beta-python-backend/releases
- Select Draft a new release
- Create a new tag using the Choose a tag dropdown
- Choose Branch or Commit under the Target dropdown
- You need to follow the naming convention when creating the tag:
Tags started with
DEMO-x.y.z
will deploy code to the demo environmentTags started with
PROD-x.y.z
will deploy code to the production environment
- 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
- After Publish release is clicked the build will start which can be seen in github actions
- 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
- 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.
If the release fails, logs need to be read and the reason for failure fixed. It may be time to contact the Service Team.