Skip to content

Deploying on Production

softcat477 edited this page Nov 20, 2023 · 4 revisions

Steps to deploy Rodan on Production with Healthy Git Workflow

  1. Create a new branch from develop, move to the branch, and rename it to release-<version>. e.g. release-v7.7.7. This is to not block the development process. So during the process of preparing a new release, pull requests that are not in the release plan can still be merged into the development branch.
  2. Update text related to version everywhere. On the release branch, update the PROD_TAG to the new version in Makefile and run
old_tag=<the version prior to the new release> make update_prod_version_tag

This will update the version in production.yml and rodan-main/code/rodan/__init__.py. e.g. to move from v7.7.6 to v7.7.7, do old_tag=v7.7.6 make update_prod_version_tag

  1. Make a new commit on changes made in step 2. Put the commit message in this way:
Release v7.7.7

- <new feature one>
- <new feature two>
- ...
- <bug fix one>
- <bug fix two>

Be sure to include ALL changes in this release.

  1. Add a git tag. Use
git tag -fa v7.7.7

to add a git tag to the new commit. You'll be requested to put messages on the tag you just added. Just copy-paste the commit messages you wrote in step 2.

  1. Push the commit AND THE TAG to github.

  2. Setup a build rule on Docker Hub. Go to the docker hub, and set up a build rule to build on the release branch. Put the release branch name (release-v7.7.7) in Source and placeholder in Docker Tag and click Save and Build. If you've tagged and named the release branch correctly, images are built and tagged as v7.7.7. Screen Shot 2023-06-02 at 1 05 16 PM

  3. Make pull requests to merge the release branch into master and develop. After docker finishes building and pushing images, make pull requests to merge the release branch into the master and develop branches.

  4. Pull the updated master branch on production server. Once the pull request is approved and the release branch is in the master branch, go to production and do git pull on the master branch to keep updated with github.

  5. Deploy rodan on production server. Do a series of makefile operations to deploy the new rodan on production server.

make stop
make clean
make pull_prod
make deploy_production
  1. Remove the release branch. After the release branch is merged into BOTH master and develop branches, delete the release branch. The release branch only exists when we're in the process of making a release. When a release is already on air, we remove the release branch.
Clone this wiki locally