(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.
- 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). - 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 runninggit submodule update --recursive
. - 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". - The script will prompt you to review changes and push tags via
git push --follow-tags ./scripts/release/tag-images.py latest
- Check build has passed in Buildkite
- Connect to the UAT machine and deploy there (see below)
- You may go through multiple rounds of steps 1-3 until you have a release you are happy to deploy to production.
- Deploy to science
- Deploy to live:
ssh -p 10022 [email protected]
cd montagu
./deploy.py --docker-hub
- Use
RELEASE_LOG.md
to know which tickets to update to the 'Deployed' status
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
-
Connect as the vagrant user:
ssh [email protected]
(orssh support.montagu
and thensudo su vagrant && cd
) -
Run
./uat.sh
or./science.sh
which will give you a shell inside the virtual machine. -
cd montagu
-
Update the submodules
git submodule init
git submodule update --recursive
-
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 changeupdate_on_deploy
field tofalse
. Deploy and then make sure to reset totrue
when deploy has completed. -
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.