UCB Deployer is gem to automate Confluence and JIRA deployments to Tomcat.
Deployments done with UCB Deployer will follow the following structure.
The user performing the deployment should manually stop tomcat
sudo service tomcat6-jira stop
and then excecute the ucb_deploy command:
ucb_deploy APP=<jira|confluence> VERSION=<version>
The ucb_deploy command will then do the following:
- Display a user friendly maintenance page that should be picked up by Apache.
- Check out the application from SVN.
- Configure the application in preparation for the build.
- Build the application which results in a war file.
- Deploy the war file to tomcat.
The user doing the deployment will then have to manually start tomcat
sudo service tomcat6-jira start
and confirm tomcat started. Once they have confirmed things are ok, they can then remove the maintenance file via the command:
ucb_deploy enable_web APP=<jira|confluence>
gem install ucb_deployer
It is assumed that JIRA and Confluence each have their own unique Tomcat instance. For more information on this setup, see Tomcat 6 Setup
Application User Account Setup
It is also assumed that a corresponding unix user has been created for both JIRA and Confluence: this is referred to as the application user. The Tomcat instance for JIRA/Confluence will run as this application user.
Release Management User
You should have some sort of release management user setup that can start/stop Tomcat for JIRA and Confluence (we use app_relmgt). This user should have Read/Write access to the Tomcat directories for JIRA and Confluence. Again, for more information on this setup see: Tomcat 6 Setup
The following directories and file need to be setup in the app_relmgt user's home directory:
$HOME/.ucb_deployer/config/ + |-- jira/ + |-- deploy.yml |-- confluence/ + |-- deploy.yml $HOME/.ucb_deployer/build/ + |-- jira/ |-- confluence/
- build_dir : directory where build will be performed
- deploy_dir : directory to deploy the war file to
- war_name : name to use for the war file
- cas_server_url : url of CAS Server
- cas_service_url : url to redirect to after CAS auth succeeds
- data_dir : directory to be used by confluecne or jira for storing local data
- svn_project_url : location of confluence/jira release in svn
- maintenance_file_dir : location where maintenance file should be written to
Sample Configuration For JIRA
Assuming we had the above directories setup in ($HOME=/home/app_relmgt), the deploy.yml file for jira would look like so:
build_dir: /home/app_relmgt/.ucb_deployer/build deploy_dir: /home/app_jira/tomcat6/webapps war_name: ROOT cas_server_url: http://cas-server.berkeley.edu cas_service_url: https://wikihub.berkeley.edu data_dir: /home/app_jira/app_data svn_project_url: svn+ssh://email@example.com/istas/jira_archives/tags maintenance_file_dir: /var/www/html/jira/
Setup Container Jars
Before deploying confluence, you need to make sure the following jar files exist in $CATALINA_BASE/lib for Confluence's Tomcat instance:
Setup Container Jars
Before deploying JIRA, you need to make sure the following jar files exist in $CATALINA_BASE/lib for JIRA's Tomcat instance:
# Either of these will deploy the appication ucb_deploy APP=<confluence|jira> VERSION=x.x.x ucb_deploy deploy APP=<confluence|jira> VERSION=x.x.x
For more options: