wiki:deployment

Deployment

Short description of the deployment of :

  • Small updates of the website operational branch
  • Major upgrades of the operational website
  • Deployment of the ROPP package

The deployment is handled by a python script executed in the fabric framework. Install the fabric framework using

sudo apt-get install fabric

To list all commands supported by the fabric deployment script use the following command:

root@graswww2:/tmp# fab -f /usr/local/bin/deploy_romsaf_web.py -l
Available commands:

    backup_gbgp                    backup existing gbgp files
    backup_ropp                    backup existing ropp files
    clean_local_changes            Clean local changes on operational webser...
    deploy_gbgp                    Deploy a new gbgp release
    deploy_ropp                    Deploy a new ropp release
    deploy_website                 Deploy new website version from tag
    prepare_gbgp                   Tar GBGP distribution and database tables...
    prepare_ropp                   Tar ROPP distribution and database tables...
    restore_gbgp                   Restore from previous gbgp backup files
    restore_ropp                   Restore from previous ropp backup files
    status                         Show subversion state on operational serv...
    update_preop_website           Update pre-operational website
    update_preop_website_rollback  Rollback update of the pre-operational we...
    update_website                 Update operational website
    update_website_dry_run         Dry-run of update on operational website
    update_website_rollback        Rollback update of the operational websit...

To specify the target host use the -H option. Valid hosts are graswww and graswww2 . E.g. to update website on graswww use:

fab -H graswww -f /usr/local/bin/deploy_romsaf_web.py update_website

As a general rule changes should be deployed and checked on the secondary webserver graswww2 before deployment on the primary webserver graswww.

The source code to the script is available here : browser:/sys_scripts/trunk/deploy_romsaf_web.py

Website Updates, Minor Changes

Use the following procedure to upload small changes to the operational website:

  1. examine current status of the website
  2. make a dry-run to see how the changes will uploaded
  3. if everything looks ok, make the actual upload

The above procedure should be run first on the secondary webserver web2 and second on the primary webserver web1.

To examine the current status run::

fab -H web2 -f /usr/local/bin/deploy_romsaf_web.py status

To make a dry-run use:

fab -H web2 -f /usr/local/bin/deploy_romsaf_web.py update_website_dry_run

To install updates run:

fab -H web2 -f /usr/local/bin/deploy_romsaf_web.py update_website

If necessary revert the changes using:

fab -H web2 -f /usr/local/bin/deploy_romsaf_web.py update_website_rollback

ROPP deployment

ROPP can be deployed using the following command:

fab -H web2 -f /usr/local/bin/deploy_romsaf_web.py deploy_ropp

The command will call prepare_ropp and backup_ropp and install the new ROPP version.

In case of errors use:

fab -H web2 -f /usr/local/bin/deploy_romsaf_web.py restore_ropp

To rollback the changes

GBGP deployment

GBGP can be deployed using the following command:

fab -H web2 -f /usr/local/bin/deploy_romsaf_web.py deploy_gbgp

The command will call prepare_gbgp and backup_gbgp and install the new GBGP version.

In case of errors use:

fab -H web2 -f /usr/local/bin/deploy_romsaf_web.py restore_gbgp

To rollback the changes

Website Deployment, Major Change

For major website releases e.g. version changes from 3.0 to 3.1. First the version needs to be tagged and the file https://svn.grassaf.org/garf/branches/operational/externals.txt needs to be updated with the tagged name and checked in.

Then run:

fab -H web2 -f /usr/local/bin/deploy_romsaf_web.py deploy_website

Update Preop Website from SVN changes

To apply updates to pre-operational page from SVN changes run (in web2):

fab -H web2 -f /usr/local/bin/deploy_romsaf_web.py update_preop_website

If necessary revert the changes using:

fab -H web2 -f /usr/local/bin/deploy_romsaf_web.py update_preop_website_rollback
Last modified 8 years ago Last modified on 2016-06-02T15:29:17Z
Note: See TracWiki for help on using the wiki.