Skip to content

Instantly share code, notes, and snippets.

@nacx
Created December 1, 2011 11:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nacx/1415903 to your computer and use it in GitHub Desktop.
Save nacx/1415903 to your computer and use it in GitHub Desktop.
Deploy wars to Mothership development machine
#!/bin/bash
# Remote host configuration
HOST=10.60.21.196
USER=ubuntu
TARGET=/opt/abiquo/tomcat/webapps
# Local path to workspace
CE=/home/ibarrera/workspace/abiquo
EE=/home/ibarrera/workspace/abiquo-enterprise
# Files to deploy
VSM=${CE}/vsm/target/vsm.war
AM=${CE}/am/target/am.war
API=${EE}/api-premium/target/api.war
VF=${EE}/virtualfactory-premium/target/virtualfactory.war
SSM=${EE}/storagesystemmanager/target/ssm.war
CLIENT=${EE}/client-premium/war/target/client-premium.war
BPM=${EE}/bpm-async/target/bpm-async.war
SERVER=${EE}/server-premium/target/server.war
TARANTINO=/home/ibarrera/workspace/tarantino/tarantino/target/tarantino.war
NC=${EE}/nodecollector-premium/target/nodecollector.war
if [[ ! -f ${NC} ]]; then
# Nodecollector does not have the proper name
cp ${EE}/nodecollector-premium/target/nodecollector-premium.war /tmp/nodecollector.war
NC=/tmp/nodecollector.war
fi
# Database
DB=/tmp/kinton.sql
cp ${CE}/database/kinton-schema.sql ${DB}
echo "" >> ${DB} && cat ${EE}/database-premium/kinton-premium-license.sql >> ${DB}
echo "" >> ${DB} && cat ${EE}/database-premium/kinton-premium-accounting.sql >> ${DB}
FILES="${VSM} ${AM} ${API} ${VF} ${SSM} ${CLIENT} ${BPM} ${SERVER} ${NC} ${DB} ${TARANTINO}"
scp ${FILES} ${USER}@${HOST}:${TARGET}
@enricruiz
Copy link

Cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment