-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdeploy_spot.bash
More file actions
executable file
·137 lines (107 loc) · 3.46 KB
/
deploy_spot.bash
File metadata and controls
executable file
·137 lines (107 loc) · 3.46 KB
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
#!/bin/bash
if [ $# -ne 1 ]; then
echo -e ""
echo -e "USAGE
$0 <test-status>
DESCRIPTION
Deploys Spot from dev to live, if and only if the checks on the Jupyter
notebooks pass for a user that is a member of spotdev (and has
permissions to deploy Spot). One of the prerequisites of running this
script is to run the Jupyter notebook checks with a user that does not
belong to spotdev. This needs to be done outside of this deployment
script.
REQUIREMENT
Have you tested Spot with a user that is not a member of spotdev? If not,
please start a new shell with this user, and execute the following script
to test the dev Jupyter notebooks before trying to deploy Spot:
$ ./deployment-scripts/non-spotdev-dev.sh
If this succeeds, then issue the following to proceed with the deployment:
$ $0 passed"
echo -e ""
exit 1
fi
OTHER_USER_TEST_SUCCESS=$1
echo -e "Dev template notebooks passed with user not in spotdev group"
echo -e "Continuing with deployment..."
DIR=/usr/gapps/spot/
DEV=$DIR"dev/"
LIVE=$DIR"live/"
HATCHET=$LIVE"hatchet/"
CALIPER=$LIVE"caliper/"
##############################################################################
# Test spot dev single and multi jupyter notebooks with known cali data.
# Terminate deploy_spot.bash script if one of the notebooks fails. Fix bugs and
# re-test before trying to deploy. Otherwise continue through deployment
# process.
echo -e "Test dev template notebooks with known data and current user..."
CALI_DIR=/usr/gapps/spot/datasets/lulesh_new
CALI_FILE=${CALI_DIR}/190716-140428166192.cali
# Test dev single jupyter notebook.
./deployment-scripts/test-hatchet-template-notebook.sh \
dev \
${CALI_FILE}
ERR=$?
if [ ${ERR} -eq 1 ]; then
exit 1
fi
# Test dev multi jupyter notebook.
./deployment-scripts/test-multi-hatchet-template-notebook.sh \
dev \
${CALI_DIR}
ERR=$?
if [ ${ERR} -eq 1 ]; then
exit 1
fi
##############################################################################
echo 'DEV = '$DEV
echo 'LIVE = '$LIVE
echo 'HATCHET = '$HATCHET
echo 'CALIPER = '$CALIPER
echo '-----------------------------------'
cd $LIVE
ls $HATCHET
ls $CALIPER
echo "Ending early for now so we do not deploy."
exit
#sleep 10000
echo 'Now deploying...'
#git fetch;
#git reset --hard origin/develop;
#chmod -R 755 web;
cp -r $DEV"*" $LIVE
cat web/js/Environment.js
# now copy hatchet to live
cp -r $DEV"hatchet/*" $HATCHET
# now copy caliper to live
cp -r $DEV"caliper/*" $CALIPER
cd $DIR
./setperm.sh
##############################################################################
# Now that spot dev has been pushed to live, test spot live single and multi
# jupyter notebooks with known cali data.
# Terminate deploy_spot.bash script if one of the notebooks fails. Fix bugs if
# necessary.
echo -e "Test live template notebooks with known data and current user..."
# Test live jupyter notebook.
./deployment-scripts/test-hatchet-template-notebook.sh \
live \
${CALI_FILE}
ERR=$?
if [ ${ERR} -eq 1 ]; then
exit 1
fi
# Test live multi jupyter notebook.
./deployment-scripts/test-multi-hatchet-template-notebook.sh \
live \
${CALI_DIR}
ERR=$?
if [ ${ERR} -eq 1 ]; then
exit 1
fi
##############################################################################
echo -e ""
echo -e "Now please test live template notebooks with a user that is not a
member of spotdev to verify Spot's deployment:
$ ./deployment-scripts/non-spotdev-live.sh"
echo -e ""
#