-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinit.sh
executable file
·140 lines (122 loc) · 5.21 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/bin/sh
DEMO="Baggage Delivery Demo"
AUTHORS="Jason Milliron, Andrew Block, Eric D. Schabell"
PROJECT="[email protected]:eschabell/bpms-baggage-delivery-demo.git"
PRODUCT="JBoss BPM Suite"
JBOSS_HOME=./target/jboss-eap-7.0
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-bpmsuite-6.4.0.GA-deployable-eap7.x.zip
EAP=jboss-eap-7.0.0-installer.jar
VERSION=6.4
# 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/$EAP ] || [ -L $SRC_DIR/$EAP ]; then
echo Product EAP sources are present...
echo
else
echo Need to download $EAP package from the Customer Portal
echo and place it in the $SRC_DIR directory to proceed...
echo
exit
fi
if [ -r $SRC_DIR/$BPMS ] || [ -L $SRC_DIR/$BPMS ]; then
echo Product BPM Suite 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
# remove the old JBoss instance, if it exists.
if [ -x $JBOSS_HOME ]; then
echo " - existing JBoss product install removed..."
echo
rm -rf target
fi
# Run installers.
echo "JBoss EAP installer running now..."
echo
java -jar $SRC_DIR/$EAP $SUPPORT_DIR/installation-eap -variablefile $SUPPORT_DIR/installation-eap.variables
if [ $? -ne 0 ]; then
echo
echo Error occurred during JBoss EAP installation!
exit
fi
echo
echo "JBoss BPM Suite installer running now..."
echo
unzip -qo $SRC_DIR/$BPMS -d ./target
if [ $? -ne 0 ]; then
echo Error occurred during $PRODUCT installation!
exit
fi
echo
echo " - enabling demo account setup..."
echo
$JBOSS_HOME/bin/add-user.sh -a -r ApplicationRealm -u erics -p bpmsuite1! -ro analyst,admin,manager,user,kie-server,kiemgmt,rest-all --silent
echo " - setting up demo projects..."
echo
cp -r $SUPPORT_DIR/bpm-suite-demo-niogit $SERVER_BIN/.niogit
echo " - setting up zip code services..."
echo
mvn clean install -f $PRJ_DIR/ZipCodeServices/pom.xml
cp $PRJ_DIR/ZipCodeServices/target/ZipCodeServices-1.0.war $SERVER_DIR
echo
echo " - setup email task notification users..."
echo
cp $SUPPORT_DIR/userinfo.properties $SERVER_DIR/business-central.war/WEB-INF/classes/
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 "========================================================================"