Skip to content

How CDeep3M release system works

Chris Churas edited this page Oct 18, 2018 · 25 revisions

This page describes how CDeep3M releases work.

Disclaimer

CDeep3M relies on a Makefile with several targets that package and deploy CDeep3M.

Overview

There are several important make targets that relate to the release of software. The following bullet points provide summary descriptions of what these targets do.

  • checkrepo make checkrepo

    Verifies the git repo is the official CDeep3M repo by using the git remote get-url origin (added in git 2.7) command to get the repo url.

  • updateversion make updateversion

    Prompts user for new version which is saved in the VERSION file

  • test make test

    Runs bats (version 0.4.0) tests which are located in the tests/ directory

  • dist make dist

    This target packages CDeep3M into a tarball under the dist/ directory and contains a lot of tasks. First this target copies over CDeep3M code (and README.md) into dist/cdeep3m-<VERSION>/ directory. Then using cat, the aws/motd file is copied into that same directory and the @@VERSION@@ keyword is replaced using the sed command. Also using cat the aws/basic_cloudformation.json file is copied to dist/cdeep3m_<VERSION>_basic_cloudformation.json and using sed @@VERSION@@ tag is replaced in the file. Using sed the version and the CloudFormation link is updated in the README.md file. Finally the dist/cdeep3m-<VERSION>/ is gzipped and tarred into a file named dist/cdeep3m-VERSION.tar.gz

  • release make release

    WARNING: This target will push changes to github and create a new tag

    This target creates the formal release. First this target pushes the cloudformation template file and the CDeep3M tarball to S3 cdeep3m-releases/<VERSION> using the AWS cli which is assumed to be installed and correctly configured. This target then copies back the updated README.md file and commits/pushes its changes to github to the same branch that is currently active. What this means is if you are on say the dev branch the commit/push is sent to that branch which is good for testing. This target also tags the code with tag of format v<VERSION> and pushes that tag up.

  • deploytohost

    This target lets a caller update the CDeep3M code on a running AWS EC2 instance. The caller must first set the environment variable cdeep3m_host to the address of the running EC2 instance. After which this target runs the dist target and uses ssh & scp to copy up the CDeep3M package which is then uncompressed replacing the previous version. This target assumes the VERSION in the VERSION file matches the version on the running EC2 instance. If not, then the /home/ubuntu/cdeep3m symbolic link needs to be adjusted.

Clone this wiki locally