blob: 6455c17e58aac4217d2460e6c6523830b36f55d0 [file] [log] [blame]
Grinberg Moticd6eeaa2017-02-23 14:26:04 +02001#!/bin/bash
Michael Lando451a3402017-02-19 10:28:42 +02002
Yuli Shlosbergf59a2252018-03-21 11:14:08 +02003/dockerstartup/vnc_startup.sh &
4
Petr Ospalý968cd1f2019-09-20 05:51:37 +02005# prepare env for HTTPS if used
6
7is_https=$(cat /root/chef-solo/environments/${ENVNAME}.json | \
8 jq -cr '.default_attributes.disableHttp' | \
9 tr '[:upper:]' '[:lower:]')
10
11if [ "$is_https" = true ] ; then
12 # setup /etc/hosts
13 SDC_FE_IP=$(cat /root/chef-solo/environments/${ENVNAME}.json | \
14 jq -cr '.default_attributes.Nodes.FE')
15 SDC_FE_HOSTNAME=$(cat /root/chef-solo/environments/${ENVNAME}.json | \
16 jq -cr '.override_attributes.FE.domain_name')
17 if ! grep -q "^[[:space:]]*${SDC_FE_IP}[[:space:]]" ; then
18 echo "${SDC_FE_IP}" "${SDC_FE_HOSTNAME}" >> /etc/hosts
19 fi
20fi
21
22# run tests
23
Michael Lando451a3402017-02-19 10:28:42 +020024cd /root/chef-solo
Yuli Shlosberg0875ce02018-01-25 13:53:36 +020025chef-solo -c solo.rb -E ${ENVNAME}
26
27rc=$?
28
29if [[ $rc != 0 ]]; then
kaihlavi02f48802019-07-30 19:23:52 +030030 echo "Startup failed !!!"
Yuli Shlosberg0875ce02018-01-25 13:53:36 +020031 exit $rc
32else
kaihlavi02f48802019-07-30 19:23:52 +030033# Note that the output below is monitored in CSIT by
34# sdc/sdc-os-chef/scripts/docker_run.sh
35# If this text is changed, docker_run.sh check for sdc-ui-tests docker
36# startup must be adjusted accordingly!
37 echo "Startup completed successfully"
Yuli Shlosbergf59a2252018-03-21 11:14:08 +020038fi