blob: 17e3b65fdc42b497b9e0be8615f2b41c12cc173c [file] [log] [blame]
Andy Bavier99c11d32016-09-14 17:21:20 -04001#!/usr/bin/env bash
2
Sapan Bhatia01ddea62017-02-10 11:28:48 -08003set -e -x
Andy Bavier99c11d32016-09-14 17:21:20 -04004
Zack Williams0620c932017-01-25 14:36:31 -07005CORDDIR=~/cord
Andy Bavier99c11d32016-09-14 17:21:20 -04006VMDIR=/cord/build/
7CONFIG=config/cord_in_a_box.yml
Andy Baviera69ee722016-11-17 07:26:01 -08008SSHCONFIG=~/.ssh/config
Andy Bavier99c11d32016-09-14 17:21:20 -04009
Andy Bavierd1165102017-01-13 16:38:57 -050010# For CORD version
11REPO_BRANCH="master"
12VERSION_STRING="CiaB development version"
13
Sapan Bhatiaa94c2db2017-02-27 20:18:24 +010014function finish {
Sapan Bhatia95692092017-03-01 06:48:19 +010015 EXIT=$?
Sapan Bhatiaeb7819c2017-03-01 15:26:17 +010016 python $CORDDIR/build/elk-logger/mixpanel --event FINISH --corddir $CORDDIR --finish --status $EXIT
Sapan Bhatiaa94c2db2017-02-27 20:18:24 +010017}
18
Andy Bavier0f07bb32017-01-17 10:20:26 -050019function add_box() {
20 vagrant box list | grep $1 | grep virtualbox || vagrant box add $1
21 vagrant box list | grep $1 | grep libvirt || vagrant mutate $1 libvirt --input-provider virtualbox
22}
23
Sapan Bhatia01ddea62017-02-10 11:28:48 -080024function run_stage {
Sapan Bhatiaa94c2db2017-02-27 20:18:24 +010025 cd $CORDDIR
Sapan Bhatiaeb7819c2017-03-01 15:26:17 +010026 python build/elk-logger/mixpanel --event $1-start --corddir $CORDDIR
Sapan Bhatiaa94c2db2017-02-27 20:18:24 +010027
Sapan Bhatia01ddea62017-02-10 11:28:48 -080028 echo "==> "$1": Starting"
29 $1
30 echo "==> "$1": Complete"
Sapan Bhatiaa94c2db2017-02-27 20:18:24 +010031
32 cd $CORDDIR
Sapan Bhatiaeb7819c2017-03-01 15:26:17 +010033 python build/elk-logger/mixpanel --event $1-end --corddir $CORDDIR
Sapan Bhatia01ddea62017-02-10 11:28:48 -080034}
35
Andy Bavier99c11d32016-09-14 17:21:20 -040036function cleanup_from_previous_test() {
Andy Bavier99c11d32016-09-14 17:21:20 -040037 echo "## Cleanup ##"
38
Andy Baviera4883ba2016-12-21 15:46:58 -050039 if [ -d $CORDDIR/build ]
40 then
41 echo "Destroying all Vagrant VMs"
42 cd $CORDDIR/build
Andy Baviere65abba2017-03-09 06:01:52 -050043 for i in `seq 12`; do sudo su $USER -c 'vagrant destroy' && break; done
Andy Baviera4883ba2016-12-21 15:46:58 -050044 fi
Andy Bavier99c11d32016-09-14 17:21:20 -040045
Andy Bavier2505f592016-11-11 15:58:55 -050046 echo "Removing $CORDDIR"
47 cd ~
Andy Bavier99c11d32016-09-14 17:21:20 -040048 rm -rf $CORDDIR
Andy Bavier99c11d32016-09-14 17:21:20 -040049}
50
51function bootstrap() {
Sapan Bhatia95692092017-03-01 06:48:19 +010052 echo "Generating build id"
Sapan Bhatia77f26672017-03-13 18:30:25 +010053 rm -f /tmp/cord-build-version
54
Sapan Bhatia95692092017-03-01 06:48:19 +010055 dd bs=18 count=1 if=/dev/urandom | base64 | tr +/ _. > /tmp/cord-build
Andy Bavier99c11d32016-09-14 17:21:20 -040056 cd ~
57 sudo apt-get update
58 [ -e vagrant_1.8.5_x86_64.deb ] || wget https://releases.hashicorp.com/vagrant/1.8.5/vagrant_1.8.5_x86_64.deb
Andy Bavierad3ea842016-12-21 16:19:07 -050059 dpkg -l vagrant || sudo dpkg -i vagrant_1.8.5_x86_64.deb
Sapan Bhatia01ddea62017-02-10 11:28:48 -080060 sudo apt-get -y install qemu-kvm libvirt-bin libvirt-dev curl nfs-kernel-server git build-essential python-pip
Sapan Bhatiaa94c2db2017-02-27 20:18:24 +010061 sudo pip install pyparsing python-logstash mixpanel
Andy Bavier99c11d32016-09-14 17:21:20 -040062
63 [ -e ~/.ssh/id_rsa ] || ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
Andy Bavier99c11d32016-09-14 17:21:20 -040064
Andy Bavier99c11d32016-09-14 17:21:20 -040065 sudo adduser $USER libvirtd
66
67 sudo curl -o /usr/local/bin/repo https://storage.googleapis.com/git-repo-downloads/repo
68 sudo chmod a+x /usr/local/bin/repo
69
70 if [ ! -d "$CORDDIR" ]
71 then
72 mkdir $CORDDIR && cd $CORDDIR
Sapan Bhatia868e0012017-02-15 22:14:11 -080073
Zack Williamsf4e65222017-03-01 14:22:37 -070074
Andy Bavier99c11d32016-09-14 17:21:20 -040075 git config --global user.name 'Test User'
76 git config --global user.email 'test@null.com'
77 git config --global color.ui false
78
Scott Baker0ab86822017-02-01 14:33:40 -080079 repo init -u https://gerrit.opencord.org/manifest -b $REPO_BRANCH -g build,onos,orchestration,voltha
Andy Bavier99c11d32016-09-14 17:21:20 -040080 repo sync
81
Zack Williamsdae7ff62016-11-14 15:20:06 -070082 # check out gerrit branches using repo
83 for gerrit_branch in ${GERRIT_BRANCHES[@]}; do
84 echo "checking out opencord gerrit branch: $gerrit_branch"
85 repo download ${gerrit_branch/:/ }
86 done
Andy Bavier99c11d32016-09-14 17:21:20 -040087 fi
88
Sapan Bhatia868e0012017-02-15 22:14:11 -080089 exec > >(tee -i $CORDDIR/install.out)
90 exec 2>&1
91
Andy Bavier99c11d32016-09-14 17:21:20 -040092 cd $CORDDIR/build
Andy Bavierad3ea842016-12-21 16:19:07 -050093 vagrant plugin list | grep vagrant-libvirt || vagrant plugin install vagrant-libvirt --plugin-version 0.0.35
94 vagrant plugin list | grep vagrant-mutate || vagrant plugin install vagrant-mutate
Andy Bavier0f07bb32017-01-17 10:20:26 -050095 add_box ubuntu/trusty64
Sapan Bhatia95692092017-03-01 06:48:19 +010096
97 # Start tracking failures from this point
98 trap finish EXIT
99
Andy Bavier99c11d32016-09-14 17:21:20 -0400100}
101
102function cloudlab_setup() {
Andy Bavier8b4ed1f2017-02-13 17:06:58 -0800103
Andy Bavier46dfda62017-03-02 05:40:08 -0500104 # Don't do anything if not a CloudLab node
105 [ ! -d /usr/local/etc/emulab ] && return
106
Andy Bavier8b4ed1f2017-02-13 17:06:58 -0800107 # The watchdog will sometimes reset groups, turn it off
108 if [ -e /usr/local/etc/emulab/watchdog ]
109 then
110 sudo /usr/bin/perl -w /usr/local/etc/emulab/watchdog stop
111 sudo mv /usr/local/etc/emulab/watchdog /usr/local/etc/emulab/watchdog-disabled
112 fi
113
Zack Williamsf4e65222017-03-01 14:22:37 -0700114 # Mount extra space, if haven't already
115 if [ ! -d /mnt/extra ]
Andy Bavier99c11d32016-09-14 17:21:20 -0400116 then
Zack Williamsf4e65222017-03-01 14:22:37 -0700117 # for NVME SSD on Utah Cloudlab, not supported by mkextrafs
118 if $(df | grep -q nvme0n1p1) && [ -e /usr/testbed/bin/mkextrafs ]
Andy Bavier2505f592016-11-11 15:58:55 -0500119 then
Zack Williamsf4e65222017-03-01 14:22:37 -0700120 sudo mkdir -p /mnt/extra
121
122 # set partition type of 4th partition to Linux, ignore errors
123 echo -e "t\n4\n82\np\nw\nq" | sudo fdisk /dev/nvme0n1 || true
124
125 sudo mkfs.ext4 /dev/nvme0n1p4
126 echo "/dev/nvme0n1p4 /mnt/extra/ ext4 defaults 0 0" | sudo tee -a /etc/fstab
127 sudo mount /mnt/extra
128 mount | grep nvme0n1p4 || (echo "ERROR: NVME mkfs/mount failed, exiting!" && exit 1)
129
130 elif [ -e /usr/testbed/bin/mkextrafs ] # if on Clemson/Wisconsin Cloudlab
131 then
132 sudo mkdir -p /mnt/extra
133
134 # Sometimes this command fails on the first try
135 sudo /usr/testbed/bin/mkextrafs -r /dev/sdb -qf "/mnt/extra/" || sudo /usr/testbed/bin/mkextrafs -r /dev/sdb -qf "/mnt/extra/"
136
137 # Check that the mount succeeded (sometimes mkextrafs succeeds but device not mounted)
138 mount | grep sdb || (echo "ERROR: mkextrafs failed, exiting!" && exit 1)
Andy Bavier2505f592016-11-11 15:58:55 -0500139 fi
Andy Bavier99c11d32016-09-14 17:21:20 -0400140 fi
Zack Williamsf4e65222017-03-01 14:22:37 -0700141
142 # replace /var/lib/libvirt/images with a symlink
143 [ -d /var/lib/libvirt/images/ ] && [ ! -h /var/lib/libvirt/images ] && sudo rmdir /var/lib/libvirt/images
144 sudo mkdir -p /mnt/extra/libvirt_images
145
146 if [ ! -e /var/lib/libvirt/images ]
147 then
148 sudo ln -s /mnt/extra/libvirt_images /var/lib/libvirt/images
149 fi
Andy Bavier99c11d32016-09-14 17:21:20 -0400150}
151
Sapan Bhatia01ddea62017-02-10 11:28:48 -0800152function elk_up() {
Sapan Bhatia01ddea62017-02-10 11:28:48 -0800153
154 cd $CORDDIR
Sapan Bhatia01ddea62017-02-10 11:28:48 -0800155 sudo chmod +x build/elk-logger/logstash_tail
Zack Williams49af5e62017-03-24 18:02:56 -0700156
157 build/elk-logger/logstash_tail --file install.out --hostport 10.100.198.201:5617 &
Sapan Bhatia01ddea62017-02-10 11:28:48 -0800158}
159
Andy Bavier2505f592016-11-11 15:58:55 -0500160function vagrant_vms_up() {
Andy Bavier99c11d32016-09-14 17:21:20 -0400161 cd $CORDDIR/build
162
Andy Bavier65c8e152016-12-22 16:01:27 -0500163 sudo su $USER -c 'vagrant up corddev prod --provider libvirt'
Andy Baviera69ee722016-11-17 07:26:01 -0800164
165 # This is a workaround for a weird issue with ARP cache timeout breaking 'vagrant ssh'
166 # It allows SSH'ing to the machine via 'ssh corddev'
Andy Bavier2505f592016-11-11 15:58:55 -0500167 sudo su $USER -c "vagrant ssh-config corddev prod > $SSHCONFIG"
168
169 scp ~/.ssh/id_rsa* corddev:.ssh
170 ssh corddev "chmod go-r ~/.ssh/id_rsa"
Andy Bavier99c11d32016-09-14 17:21:20 -0400171}
172
173function install_head_node() {
174 cd $CORDDIR/build
175
Andy Baviera69ee722016-11-17 07:26:01 -0800176 # SSH config saved earlier allows us to connect to VM without running 'vagrant'
Zack Williams0620c932017-01-25 14:36:31 -0700177 ssh corddev "cd /cord/build; ./gradlew -PdeployConfig=$VMDIR/$CONFIG fetch"
178 ssh corddev "cd /cord/build; ./gradlew -PdeployConfig=$VMDIR/$CONFIG buildImages"
Andy Bavier2505f592016-11-11 15:58:55 -0500179 ssh corddev "cd /cord/build; ping -c 3 prod; ./gradlew -PdeployConfig=$VMDIR/$CONFIG -PtargetReg=10.100.198.201:5000 publish"
Andy Baviera69ee722016-11-17 07:26:01 -0800180 ssh corddev "cd /cord/build; ./gradlew -PdeployConfig=$VMDIR/$CONFIG deploy"
Andy Bavier99c11d32016-09-14 17:21:20 -0400181}
182
183function set_up_maas_user() {
Andy Bavier2505f592016-11-11 15:58:55 -0500184 # Set up MAAS user on server to restart nodes via libvirt
185 grep maas /etc/passwd || sudo useradd -m maas
Andy Bavier99c11d32016-09-14 17:21:20 -0400186 sudo adduser maas libvirtd
187
Andy Bavier2505f592016-11-11 15:58:55 -0500188 # Copy generated public key to maas user's authorized_keys
189 sudo su maas -c "mkdir -p ~/.ssh"
190 sudo cp $HOME/.ssh/id_rsa.pub ~maas/.ssh/authorized_keys
191 sudo chown maas:maas ~maas/.ssh/authorized_keys
Andy Bavier99c11d32016-09-14 17:21:20 -0400192
Andy Bavier2505f592016-11-11 15:58:55 -0500193 # Copy generated private key to maas user's home dir in prod VM
194 scp $HOME/.ssh/id_rsa prod:/tmp
195 ssh prod "sudo mkdir -p ~maas/.ssh"
196 ssh prod "sudo cp /tmp/id_rsa ~maas/.ssh/id_rsa"
197 ssh prod "sudo chown -R maas:maas ~maas/.ssh"
198}
Srikanth Vavilapallib1c4da02016-11-17 15:24:28 -0600199
Andy Bavier0f07bb32017-01-17 10:20:26 -0500200function turn_off_learning () {
201 NET=$1
202 BRIDGE=`sudo virsh net-info $NET|grep "Bridge:"|awk '{print $2}'`
203 sudo brctl setageing $BRIDGE 0
204 sudo brctl stp $BRIDGE off
205}
206
207function leaf_spine_up() {
208 cd $CORDDIR/build
209
210 if [[ $FABRIC -ne 0 ]]
211 then
212 sudo su $USER -c "FABRIC=$FABRIC vagrant up leaf-1 leaf-2 spine-1 spine-2 --provider libvirt"
213 else
214 # Linux bridging seems to be having issues with two spine switches
215 sudo su $USER -c "FABRIC=$FABRIC vagrant up leaf-1 leaf-2 spine-1 --provider libvirt"
216 fi
217
218 # Turn off MAC learning on "links" -- i.e., bridges created by libvirt.
219 # Without this, sometimes packets are dropped because the bridges
220 # think they are not local -- this needs further investigation.
221 # A better solution might be to replace the bridges with UDP tunnels, but this
222 # is not supported with the version of libvirt available on Ubuntu 14.04.
223 turn_off_learning head-node-leaf-1
224 turn_off_learning compute-node-1-leaf-1
225 turn_off_learning compute-node-2-leaf-2
226 turn_off_learning compute-node-3-leaf-2
227 turn_off_learning leaf-1-spine-1
228 turn_off_learning leaf-1-spine-2
229 turn_off_learning leaf-2-spine-1
230 turn_off_learning leaf-2-spine-2
231}
232
Andy Bavier99c11d32016-09-14 17:21:20 -0400233function add_compute_node() {
Srikanth Vavilapallib1c4da02016-11-17 15:24:28 -0600234 echo add_compute_node: $1 $2
Andy Bavier2505f592016-11-11 15:58:55 -0500235
Andy Bavier99c11d32016-09-14 17:21:20 -0400236 cd $CORDDIR/build
Srikanth Vavilapallib1c4da02016-11-17 15:24:28 -0600237 sudo su $USER -c "vagrant up $1 --provider libvirt"
Andy Bavier99c11d32016-09-14 17:21:20 -0400238
Andy Bavier2505f592016-11-11 15:58:55 -0500239 # Set up power cycling for the compute node and wait for it to be provisioned
240 ssh prod "cd /cord/build/ansible; ansible-playbook maas-provision.yml --extra-vars \"maas_user=maas vagrant_name=$2\""
Andy Bavier99c11d32016-09-14 17:21:20 -0400241
242 echo ""
Andy Bavier0f07bb32017-01-17 10:20:26 -0500243 echo "$1 is fully provisioned!"
244}
245
246function initialize_fabric() {
247 echo "Initializing fabric"
248 ssh prod "cd /cord/build/platform-install; ansible-playbook -i /etc/maas/ansible/pod-inventory cord-refresh-fabric.yml"
249
250 echo "Fabric ping test"
251 ssh prod "cd /cord/build/platform-install; ansible-playbook -i /etc/maas/ansible/pod-inventory cord-fabric-pingtest.yml"
Andy Bavier99c11d32016-09-14 17:21:20 -0400252}
253
254function run_e2e_test () {
255 cd $CORDDIR/build
256
Andy Bavier2505f592016-11-11 15:58:55 -0500257 # User has been added to the lbvirtd group, but su $USER to be safe
Andy Baviera69ee722016-11-17 07:26:01 -0800258 ssh corddev "cd /cord/build; ./gradlew -PdeployConfig=$VMDIR/$CONFIG postDeployTests"
Andy Bavier99c11d32016-09-14 17:21:20 -0400259}
260
261function run_diagnostics() {
Zack Williams4fd3dcc2017-02-08 20:46:14 -0700262 ssh corddev "cd /cord/build; ./gradlew -PdeployConfig=$VMDIR/$CONFIG PIrunDiag"
Andy Bavier99c11d32016-09-14 17:21:20 -0400263}
264
265# Parse options
Zack Williamsdae7ff62016-11-14 15:20:06 -0700266GERRIT_BRANCHES=
Andy Bavier99c11d32016-09-14 17:21:20 -0400267RUN_TEST=0
Andy Bavier5c2e4fa2016-10-31 13:50:52 -0400268SETUP_ONLY=0
Andy Bavier99c11d32016-09-14 17:21:20 -0400269DIAGNOSTICS=0
270CLEANUP=0
Andy Bavier0f07bb32017-01-17 10:20:26 -0500271FABRIC=0
Srikanth Vavilapallib1c4da02016-11-17 15:24:28 -0600272#By default, cord-in-a-box creates 1 compute node. If more than one compute is
273#needed, use -n option
274NUM_COMPUTE_NODES=1
Andy Bavier99c11d32016-09-14 17:21:20 -0400275
Andy Bavier0f07bb32017-01-17 10:20:26 -0500276while getopts "b:cdfhn:stv" opt; do
Andy Bavier99c11d32016-09-14 17:21:20 -0400277 case ${opt} in
Zack Williamsdae7ff62016-11-14 15:20:06 -0700278 b ) GERRIT_BRANCHES+=("$OPTARG")
Andy Bavier99c11d32016-09-14 17:21:20 -0400279 ;;
280 c ) CLEANUP=1
281 ;;
282 d ) DIAGNOSTICS=1
283 ;;
Andy Bavier0f07bb32017-01-17 10:20:26 -0500284 f ) FABRIC=1
285 ;;
Andy Bavier99c11d32016-09-14 17:21:20 -0400286 h ) echo "Usage:"
287 echo " $0 install OpenStack and prep XOS and ONOS VMs [default]"
Zack Williamsdae7ff62016-11-14 15:20:06 -0700288 echo " $0 -b <project:changeset/revision> checkout a changesets from gerrit. Can"
289 echo " be used multiple times."
Andy Bavier99c11d32016-09-14 17:21:20 -0400290 echo " $0 -c cleanup from previous test"
291 echo " $0 -d run diagnostic collector"
Andy Bavier0f07bb32017-01-17 10:20:26 -0500292 echo " $0 -f use ONOS fabric (EXPERIMENTAL)"
Andy Bavier99c11d32016-09-14 17:21:20 -0400293 echo " $0 -h display this help message"
Zack Williamsa9e76ec2017-01-20 16:17:35 -0700294 echo " $0 -n # number of compute nodes to setup. Currently max 2 nodes can be supported"
Andy Bavier5c2e4fa2016-10-31 13:50:52 -0400295 echo " $0 -s run initial setup phase only (don't start building CORD)"
Andy Bavier99c11d32016-09-14 17:21:20 -0400296 echo " $0 -t do install, bring up cord-pod configuration, run E2E test"
Andy Bavierd1165102017-01-13 16:38:57 -0500297 echo " $0 -v print CiaB version and exit"
Andy Bavier99c11d32016-09-14 17:21:20 -0400298 exit 0
299 ;;
Srikanth Vavilapallib1c4da02016-11-17 15:24:28 -0600300 n ) NUM_COMPUTE_NODES=$OPTARG
301 ;;
Andy Bavier5c2e4fa2016-10-31 13:50:52 -0400302 s ) SETUP_ONLY=1
303 ;;
Andy Bavier99c11d32016-09-14 17:21:20 -0400304 t ) RUN_TEST=1
305 ;;
Andy Bavierd1165102017-01-13 16:38:57 -0500306 v ) echo "$VERSION_STRING ($REPO_BRANCH branch)"
307 exit 0
308 ;;
Andy Bavier99c11d32016-09-14 17:21:20 -0400309 \? ) echo "Invalid option: -$OPTARG"
310 exit 1
311 ;;
312 esac
313done
314
315# What to do
316if [[ $CLEANUP -eq 1 ]]
317then
Sapan Bhatia3f454b32017-03-01 05:24:19 +0100318 cleanup_from_previous_test
Andy Bavier99c11d32016-09-14 17:21:20 -0400319fi
320
Andy Bavierd1165102017-01-13 16:38:57 -0500321echo ""
322echo "Preparing to install $VERSION_STRING ($REPO_BRANCH branch)"
323echo ""
324
Sapan Bhatiaa94c2db2017-02-27 20:18:24 +0100325bootstrap
Sapan Bhatia01ddea62017-02-10 11:28:48 -0800326run_stage cloudlab_setup
Sapan Bhatia01ddea62017-02-10 11:28:48 -0800327run_stage vagrant_vms_up
Zack Williams49af5e62017-03-24 18:02:56 -0700328run_stage elk_up
Andy Bavier5c2e4fa2016-10-31 13:50:52 -0400329
330if [[ $SETUP_ONLY -ne 0 ]]
331then
332 echo "Finished build environment setup, exiting..."
333 exit 0
334fi
335
Sapan Bhatia01ddea62017-02-10 11:28:48 -0800336run_stage install_head_node
337run_stage set_up_maas_user
338run_stage leaf_spine_up
Srikanth Vavilapallib1c4da02016-11-17 15:24:28 -0600339
Andy Bavier0f07bb32017-01-17 10:20:26 -0500340if [[ $NUM_COMPUTE_NODES -gt 3 ]]
Srikanth Vavilapallib1c4da02016-11-17 15:24:28 -0600341then
Andy Bavier0f07bb32017-01-17 10:20:26 -0500342 echo "currently max only three compute nodes can be supported..."
343 NUM_COMPUTE_NODES=3
Srikanth Vavilapallib1c4da02016-11-17 15:24:28 -0600344fi
345
Sapan Bhatia01ddea62017-02-10 11:28:48 -0800346echo "==> Adding compute nodes: Starting"
Srikanth Vavilapallib1c4da02016-11-17 15:24:28 -0600347for i in `seq 1 $NUM_COMPUTE_NODES`;
348do
349 echo adding the compute node: compute-node-$i
Andy Bavier0f07bb32017-01-17 10:20:26 -0500350 add_compute_node compute-node-$i build_compute-node-$i
Srikanth Vavilapallib1c4da02016-11-17 15:24:28 -0600351done
Sapan Bhatia01ddea62017-02-10 11:28:48 -0800352echo "==> Adding compute nodes: Complete"
Andy Bavier99c11d32016-09-14 17:21:20 -0400353
Zack Williams4fd3dcc2017-02-08 20:46:14 -0700354# run diagnostics both before/after the fabric/e2e tests
355if [[ $DIAGNOSTICS -eq 1 ]]
356then
357 run_diagnostics
358fi
359
360
Andy Bavier0f07bb32017-01-17 10:20:26 -0500361if [[ $FABRIC -ne 0 ]]
362then
Sapan Bhatia01ddea62017-02-10 11:28:48 -0800363 run_stage initialize_fabric
Andy Bavier0f07bb32017-01-17 10:20:26 -0500364fi
365
Andy Bavier99c11d32016-09-14 17:21:20 -0400366if [[ $RUN_TEST -eq 1 ]]
367then
Sapan Bhatia01ddea62017-02-10 11:28:48 -0800368 run_stage run_e2e_test
Andy Bavier99c11d32016-09-14 17:21:20 -0400369fi
370
371if [[ $DIAGNOSTICS -eq 1 ]]
372then
Sapan Bhatia01ddea62017-02-10 11:28:48 -0800373 run_stage run_diagnostics
Andy Bavier99c11d32016-09-14 17:21:20 -0400374fi
375
376exit 0