Project

General

Profile

Deployment

Back to main page

Introduction

  • Automated deployment is enabled by custom build system based on BuildBot (documentation).
  • Build system is hosted at dedicated virtual server called alchemist.
  • The web interface for build monitoring is accessible at https://alchemist.cesnet.cz/buildbot/. Security is provided by selective shibboleth authentication. Note, that when Shibboleth session expires the whole application is defunct and you have to refresh the page.
  • There is a simple web application running at https://alchemist.cesnet.cz/, which provides access to project artifacts (auto-generated documentation, packages, etc.).

Package deployment

Setup

You have to setup following remote repository to work with automated build system:

git remote add buildbot mentat@alchemist.cesnet.cz:/var/projects/mentat/repo.git

Deploying development packages

Automated build system is monitoring the devel branch on alchemist.cesnet.cz server to build development packages. Anything pushed into that branch will trigger the build. The build is as simple as executing following command:

# For the first time:
git push buildbot devel

# When remote branch tracking is set:
git push buildbot

Deploying release packages

Automated build system is monitoring the release branch on alchemist.cesnet.cz server to build release packages. Anything pushed into that branch will trigger the build. The build is as simple as executing following command:

# For the first time:
git push buildbot release

# When remote branch tracking is set:
git push buildbot

Deploying production packages

Automated build system is monitoring the master branch on alchemist.cesnet.cz server to build production packages. Anything pushed into that branch will trigger the build. The build is as simple as executing following command:

# For the first time:
git push buildbot master

# When remote branch tracking is set:
git push buildbot

Deployment workflow

Prior to the deployment change to the devel branch and update release version in following files to appropriate value (for example 2.2.0):

  • lib/mentat/__init__.py

You are now set to start the deployment.

  1. Deployment process usually starts at devel branch. You should build packages and install it on mentat-alt server for verification. When installing please proceed according to the documentation.
    git checkout devel
    git add lib/mentat/__init__.py
    git commit
    
    #----
    DEPLOY: Version bumped up to '2.2.0' to build new distribution.
    
    (Redmine issue: #3387)
    #----
    
    git push origin devel
    git push buildbot devel
    
  2. When everything seems in order merge devel branch into release branch, build packages and install it on our mentat-hub server for verification. When installing please proceed according to the documentation.
    git checkout release
    git merge devel
    git push origin release
    git push buildbot release
    
  3. When everything seems in order merge release branch into master branch, build packages. This is a final public release.
    git checkout master
    git merge release
    git push origin master
    git push buildbot master
    
  4. Package is now live in repository. You should now create annotated tag with descriptions of all new major features and changes.
    # DO NOT FORGET TO SWITCH BACK TO DEVEL
    git checkout devel
    
    # Take inspiration in previous annotated tags:
    git tag -l -n999
    
    # Create new anotated tag:
    git tag -a v2.2.0
    
    #Second round of improvements in 2.x series
    #    
    #Extensive release description...
    #    
    #Full list of resolved issues can be found in our ticket tracking system:
    #    
    #        https://homeproj.cesnet.cz/versions/82
    #
    
    # In case you made a mistake you can delete the tags with following commands:
    git tag -d v2.2.0
    git push --delete origin v2.2.0
    git push --delete buildbot v2.2.0
    
    # Push tags to servers
    git push origin v2.2.0
    git push buildbot v2.2.0
    
  5. Close the finished version in Homeproj at https://homeproj.cesnet.cz/projects/mentat/settings/versions
  6. Now update banner on https://homeproj.cesnet.cz/projects/mentat/banner to inform users about new release.
  7. Finally write news to https://mentat.cesnet.cz/en/news page about the new release. If you think ahead you may reuse the text from your annotated tag above. Use following commands to attach some release statistics as well.
    # Number of commits between last two versions:
    git rev-list --count v2.1.0..v2.2.0
    
    # Total changes between last two versions:
    git log --numstat --pretty="%H" v2.2.0..v2.3.0 | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'
    

Back to main page