-
Notifications
You must be signed in to change notification settings - Fork 0
/
4-setupDemo.sh
executable file
·68 lines (53 loc) · 1.83 KB
/
4-setupDemo.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
#!/bin/bash
# load in the shared library and validate argument
source ./deploymentArgument.lib
DEPLOYMENT=$1
validate_deployment_argument $DEPLOYMENT
# validate that have utlities installed first
./validatePrerequisiteTools.sh $DEPLOYMENT
if [ $? -ne 0 ]
then
exit 1
fi
# validate that have kubectl configured first
./validateKubectl.sh
if [ $? -ne 0 ]
then
exit 1
fi
echo " "
echo "===================================================="
echo About to setup demo app infrastructure with these parameters:
cat creds.json | grep -E "jenkins|github"
read -rsp $'Press ctrl-c to abort. Press any key to continue...\n====================================================' -n1 key
START_TIME=$(date)
GITHUB_ORGANIZATION=$(cat creds.json | jq -r '.githubOrg')
echo "----------------------------------------------------"
echo "Creating K8s namespaces ..."
kubectl create -f ./manifests/namespaces.yml
echo "----------------------------------------------------"
echo "Setting up Jenkins ..."
./installJenkins.sh $DEPLOYMENT
echo "----------------------------------------------------"
echo "Updating Jenkins PerfSig plugins ..."
./upgradeJenkinsPlugins.sh just-perfsig
echo "----------------------------------------------------"
echo "Letting Jenkins restart [150 seconds] ..."
sleep 150
# add credentials
./createJenkinsCredentials.sh
# add Jenkins pipelines
./importJenkinsBuildPipelines.sh $GITHUB_ORGANIZATION build
# add ELK Monitoring
./installELKMon.sh
echo "----------------------------------------------------"
echo "Beats Monitoring to be applied [150 seconds] ..."
#sleep 150
echo "===================================================="
echo "Finished setting up demo app infrastructure "
echo "===================================================="
echo "Script start time : "$START_TIME
echo "Script end time : "$(date)
echo ""
echo ""
./showJenkins.sh