-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbox1_installScenario1.sh
71 lines (54 loc) · 2.24 KB
/
box1_installScenario1.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
#!/bin/bash
# Provision main SCAA box for the multi-box scenario1
# Used for demonstrating IBM Log Analytics Milestone Driver 2
# Main ILA driver and Remote APP+LFA Operations
#
#Doug McClure
#v1.0 4/23/13 Extract the driver2 LFA from main ILA box and place in $SHARED_DIR/lfa
# Provision the SCAA driver 1 with WebSphere Liberty collection, log sources and saved searches
###############################################################################################################
#System Reference:
#box1-driver: 10.10.10.2
#box2-liberty: 10.10.10.3
#
#
###################
#Uncomment this to see verbose install
set -x
#how long does this provisioning script take?
SCRIPT_START=$(date +%s)
echo Started : $(date)
#variables
GROUP_NAME="scla"
USERNAME="scla"
PASSWORD="scla"
BASE_DIR="/opt/scla"
INSTALL_DIR="$BASE_DIR/driver"
SHARED_DIR="/opt/scla/shared"
PREREQ_DIR="/opt/scla/shared/prereq"
######
#
# Build out the multi-box scenario1
#
#####
#
echo "[SCAA] Copy LFA Files to shared directory"
mkdir -p $SHARED_DIR/box2-files/lfa/unity_images
mkdir -p $SHARED_DIR/box2-files/lfa/work_files/Configurations/Data_Collector
cp $INSTALL_DIR/setupScripts/ITM_Log_Agent_Setup.sh $SHARED_DIR/box2-files/lfa
cp $INSTALL_DIR/unity_images/LFA_0630.tar.gz $SHARED_DIR/box2-files/lfa/unity_images
cp $INSTALL_DIR/work_files/Configurations/Data_Collector/* $SHARED_DIR/box2-files/lfa/work_files/Configurations/Data_Collector/
echo "[SCAA] LFA Files Ready for Copying to Remote Systems from shared directory"
echo "Install WebSphere Liberty Demo Configuration"
#copy WebSphere Liberty configration files to sampleScenario directory included with milestone driver
sudo -u $USERNAME cp -R $SHARED_DIR/box1-files/LibertyDemo $INSTALL_DIR/sampleScenarios
#must be in this directory to execute perl script
cd $INSTALL_DIR/sampleScenarios/
#install WebSphere Liberty Demo configurations (collection, log sources, saved searches)
sudo -u $USERNAME perl CreateSampleScenario.pl 9988 unityadmin unityadmin LibertyDemo/LibertyDemo.def
#how long does this provisioning script take?
SCRIPT_STOP=$(date +%s)
SCRIPT_TOTAL_TIME=$(expr $SCRIPT_STOP - $SCRIPT_START)
echo Script Ended : $(date)
echo Script Total Time : $(date -d "1970-01-01 $SCRIPT_TOTAL_TIME sec" +%H:%M:%S)
exit 0