Deployment

The INSPIRE ops team is using Fabric (http://fabfile.org) for code deployment and operations on the development, staging and production servers of INSPIRE. Here is a short guide on how to use it.

TODO (Under contruction) <insert-90s-gif-here>

NOTE: an up-to-date version of the Inspire specific fabfile.py can be found in the inspire-scripts repo -- if you don't know where that is you probably shouldn't be deploying

Installing Fabric

Explained here: http://docs.fabfile.org/en/1.6/#installation

Usually operators install and run fabric on their own computers, but for deployment off-site, the DEV server has now fabric installed.

Using Fabric

Usually our commands look like this:

$ fab <node/group> <repo> <command(s)>

Ex:

$ fab test ops deploy:my-new-fix

First you usually put which nodes to connect to. You can target individual nodes ("test" or "prod1") or groups of nodes ("prod").

Deploy a branch on a node

If you are deploying, then you select the repo to deploy from before the command "deploy". For deploying code from inspire repository you write "inspire", for ops you write "ops", simply smile

The "deploy" command takes optional parameters: branch,commitid,recipe-args,repodir

Usually, though, we use only the branch name or the commitid for a range of commits. Ex:

$ fab test ops deploy:my-big-branch,HEAD~5..

will deploy 5 commits from the branch "my-big-branch". If you do not specify the commitid, the script will only deploy the latest commit.

Re-install a node

To re-install a node there is a new fabric task called "makeinstall" or "mi" for short.

$ fab test makeinstall:my-ops-branch,my-inspire-branch

This function will also ask if you want to install the typical Invenio plugins (jQuery, ckeditor etc.).

Other commands

Other useful commands are:

Note the command graceful which we currently should add on all PROD deploys. It performs a safe deployment WRT apache reloading.

Agile Infrastructure

From AIADM
$ source GS\ Inspire-openrc.sh
$ ai-bs-vm --nova-flavor hep2.8 --foreman-environment inspire_devel --landb-responsible inspire-admin -g inspire/wn/test -i "SLC6 Server - x86_64 [130920]" inspirevm12
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2013-12-17 - KaplunSamuele
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Inspire All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback