You are here: Foswiki>ELabs Web>HowToGuide>Deployment (2016-02-25, jgriffith)Edit Attach

The Web Site Deployment Process

deployment.png

Places

A) You. You know who you are. You have a local development machine that you use to edit website code.

B) The source code is stored in a central SVN repository at Fermilab. You can browse it at cdcvs.fnal.gov/redmine/projects/quarknet.

C) The web site is served from VMs at the Center for Research Computing at Notre Dame. You need a login with sudo rights to these VMs, but you will act as the fictitious user "quarkcat" while deploying.

Procedure

1) Checkout the code from the repository to your local development machine. Alter, add to, or delete from your working copy as needed.

2) Commit the improved code back to the repository.

3) SSH to the VM that you want to deploy code to - either i2u2-dev.crc.nd.edu for testing, or i2u2-prod.crc.nd.edu for the live website www.i2u2.org.

4) From the /home/quarkcat folder of that VM, run

sudo -u quarkcat ./deploy-from-svn (branches|trunk|tag)/<directory name>.

For example,

sudo -u quarkcat ./deploy-from-svn branches/4.0-ND-dev

We typically deploy only branches. I don't know if we even bother with trunk or tags. The branch 4.0-ND-dev is for deployment to i2u2-dev, and the branch 4.0-ND-prod is for deployment to i2u2-prod. Before hitting "Enter" on the command, double-check that you are deploying the right branch to the right VM.

The deploy-from-svn script will do a few checks and then pass things off to the script internal-deploy-from-svn, also found in the /quarkcat directory. internal-deploy-from-svn checks out the code you specified from the central repository at Fermi and writes it as the VM's local copy of the repo.

5) After checkout, internal-deploy-from-svn then passes the work off to ANT's build.xml, which takes files from this new local copy of the repository and places them into the directories from which Apache and Tomcat will serve them to the users.

From the point you activate deploy-from-svn, the process should take 5-10 minutes. The script is pretty good about telling you what's going on and informing you when errors occur. Once it's complete, give it a minute to settle and then bring the VM up in your browser to test both your updates and the standard functions of the site.

-- Main.jgriffith - 2016-02-25
Topic attachments
I Attachment Action Size Date Who Comment
deployment.pngpng deployment.png manage 256 K 2016-02-25 - 01:16 Main.UnknownUser  
Topic revision: r1 - 2016-02-25, jgriffith
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback