forked from jbossdemocentral/bpms-baggage-delivery-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sh
executable file
·114 lines (100 loc) · 4.63 KB
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/sh
DEMO="Baggage Delivery Demo"
AUTHORS="Jason Milliron, Andrew Block, Eric D. Schabell"
PROJECT="[email protected]:jbossdemocentral/bpms-baggage-delivery-demo.git"
PRODUCT="JBoss BPM Suite"
JBOSS_HOME=./target/jboss-eap-6.1
SERVER_DIR=$JBOSS_HOME/standalone/deployments/
SERVER_CONF=$JBOSS_HOME/standalone/configuration/
SERVER_BIN=$JBOSS_HOME/bin
SRC_DIR=./installs
SUPPORT_DIR=./support
PRJ_DIR=./projects
BPMS=jboss-bpms-installer-6.0.3.GA-redhat-1.jar
VERSION=6.0.3
# wipe screen.
clear
echo
echo "#####################################################################"
echo "## ##"
echo "## Setting up the ${DEMO} ##"
echo "## ##"
echo "## ##"
echo "## #### #### # # ### # # ##### ##### ##### ##"
echo "## # # # # # # # # # # # # # # ##"
echo "## #### #### # # # ## # # # # ### ##"
echo "## # # # # # # # # # # # ##"
echo "## #### # # # ### ##### ##### # ##### ##"
echo "## ##"
echo "## ##"
echo "## brought to you by, ##"
echo "## ${AUTHORS} ##"
echo "## ##"
echo "## ${PROJECT} ##"
echo "## ##"
echo "#####################################################################"
echo
command -v mvn -q >/dev/null 2>&1 || { echo >&2 "Maven is required but not installed yet... aborting."; exit 1; }
# make some checks first before proceeding.
if [[ -r $SRC_DIR/$BPMS || -L $SRC_DIR/$BPMS ]]; then
echo Product sources are present...
echo
else
echo Need to download $BPMS package from the Customer Portal
echo and place it in the $SRC_DIR directory to proceed...
echo
exit
fi
# Move the old JBoss instance, if it exists, to the OLD position.
if [ -x $JBOSS_HOME ]; then
echo " - existing JBoss product install removed..."
echo
rm -rf target
fi
# Run installer.
echo Product installer running now...
echo
java -jar $SRC_DIR/$BPMS $SUPPORT_DIR/installation-bpms -variablefile $SUPPORT_DIR/installation-bpms.variables
if [ $? -ne 0 ]; then
echo Error occurred during $PRODUCT installation!
exit
fi
echo " - enabling demo accounts role setup in application-roles.properties file..."
echo
cp $SUPPORT_DIR/application-roles.properties $SERVER_CONF
echo " - setting up demo projects..."
echo
cp -r $SUPPORT_DIR/bpm-suite-demo-niogit $SERVER_BIN/.niogit
echo " - setting up zip code services..."
echo
#cp -r $SUPPORT_DIR/ZipCodeServices.war $SERVER_DIR
mvn clean install -f $PRJ_DIR/ZipCodeServices/pom.xml
cp $PRJ_DIR/ZipCodeServices/target/ZipCodeServices-1.0.war $SERVER_DIR
echo
echo " - setting up standalone.xml configuration adjustments..."
echo
cp $SUPPORT_DIR/standalone.xml $SERVER_CONF
echo " - making sure standalone.sh for server is executable..."
echo
chmod u+x $JBOSS_HOME/bin/standalone.sh
# Optional: uncomment this to install mock data for BPM Suite.
#
#echo - setting up mock bpm dashboard data...
#cp $SUPPORT_DIR/1000_jbpm_demo_h2.sql $SERVER_DIR/dashbuilder.war/WEB-INF/etc/sql
#echo
echo
echo "========================================================================"
echo "= ="
echo "= You can now start the $PRODUCT with: ="
echo "= ="
echo "= $SERVER_BIN/standalone.sh ="
echo "= ="
echo "= Login into business central at: ="
echo "= ="
echo "= http://localhost:8080/business-central (u:erics / p:bpmsuite1!) ="
echo "= ="
echo "= See README.md for general details to run the various demo cases. ="
echo "= ="
echo "= $PRODUCT $VERSION $DEMO Setup Complete. ="
echo "= ="
echo "========================================================================"