Skip to content
This repository was archived by the owner on Nov 29, 2024. It is now read-only.

Latest commit

 

History

History
60 lines (51 loc) · 3.2 KB

ReleaseProcess.md

File metadata and controls

60 lines (51 loc) · 3.2 KB

Release process

(Work in progress)

If this is first time release then clone this repo on your local machine and run git submodule update --init --recursive to initialise the submodules.

  1. From your local machine update the versions of the subprojects you are using to the latest versions of master using ./src/update_versions_to_latest_master.py (or manually update versions.py to specific versions).
  2. Stage changes with git add . and commit and push these changes. At this point, git status may show some submodules as having modified content, not staged for commit. (This will happen if submodules of submodules, e.g. models, have changed.) Fix this by running git submodule update --recursive.
  3. Build the release log by running ./scripts/release/make-release.py You will be prompted to set env variable YOUTRACK_TOKEN if not set. See youtrack docs for how to set this up. This script will prompt you for a tag, use the next verison number as the tag. It will also warn you if any tickets are merged in that are not "Ready to Deploy".
  4. The script will prompt you to review changes and push tags via
     git push --follow-tags
     ./scripts/release/tag-images.py latest
    
  5. Check build has passed in Buildkite
  6. Connect to the UAT machine and deploy there (see below)
  7. You may go through multiple rounds of steps 1-3 until you have a release you are happy to deploy to production.
  8. Deploy to science
  9. Deploy to live:
    1. ssh -p 10022 [email protected]
    2. cd montagu
    3. ./deploy.py --docker-hub
  10. Use RELEASE_LOG.md to know which tickets to update to the 'Deployed' status

Deploying to UAT & science

Note if you are deploying to science warn science team first that it will be going down for a period as they may be actively using it

  1. Connect as the vagrant user: ssh [email protected] (or ssh support.montagu and then sudo su vagrant && cd)

  2. Run ./uat.sh or ./science.sh which will give you a shell inside the virtual machine.

  3. cd montagu

  4. Update the submodules git submodule init git submodule update --recursive

  5. 2 options here:

    i) To deploy the latest tagged release, run ./deploy.py

    ii) To run a specific branch:

    git fetch && git checkout <branchname> && git merge && git submodule update --recursive
    ./src/deploy.py
    

    Note the different deploy scripts in i) and i) : ./src/deploy.py deploys the contents of the current directory, whereas the top level ./deploy.py first updates things to the latest tag.

    Note also when deploying science it updates the database from production which takes a long time. You can skip this by changing the configuration. Edit src/montagu-deploy.json and change update_on_deploy field to false. Deploy and then make sure to reset to true when deploy has completed.

  6. If deploying science we want to make the data vis tool publicly accessible so run ./scripts/copy-vis-tool.sh after the deploy has complete. This is temporary and we will run automatically once the public data vis tool is deployed on production.