Skip to content

Latest commit

 

History

History
69 lines (45 loc) · 2.73 KB

File metadata and controls

69 lines (45 loc) · 2.73 KB

BAS Assets Tracking Service - Deployment

Python package

This application is distributed as a Python (Pip) package.

Continuous Deployment will build the package and publish it to the project Package Registry 🛡️ automatically.

Tip

The package can be built manually by running the build Development Task.

Environment module

This application is deployed as a custom Environment Module on the BAS central workstations for running the application CLI.

The module:

Separate modules (and corresponding virtual environments) are created for each project Release automatically by the Ansible Playbook.

Ansible playbook

This application is deployed using an Ansible Playbook 🛡️ as part of the BAS IT Ansible 🛡️ project.

The playbook:

The playbook is run automatically via Continuous Deployment.

The playbook can be run manually with these General Instructions and context:

  • environment: staging or production
  • app: magic/assets-tracking-service
  • additional variables: app_version=1.2.3

Continuous Deployment

Tagged commits created for Releases will trigger a continuous deployment workflow for the release to the production environment using GitLab's CI/CD configured in .gitlab-ci.yml.

Pre-releases can optionally be deployed to the staging environment by triggering the relevant CI job manually.

Clean prerelease virtual environments

Deploy:

$ scp resources/scripts/clean-venvs.py geoweb@bslws01.nerc-bas.ac.uk:/users/geoweb/bin/clean-ats-venvs.py

Run:

% ssh geoweb@bslws01.nerc-bas.ac.uk
$ /data/magic/.conda/envs/python311/bin/python bin/clean-ats-venvs.py