Grinberg Moti | cd6eeaa | 2017-02-23 14:26:04 +0200 | [diff] [blame] | 1 | #!/bin/bash |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 2 | |
Yuli Shlosberg | f59a225 | 2018-03-21 11:14:08 +0200 | [diff] [blame] | 3 | /dockerstartup/vnc_startup.sh & |
| 4 | |
Petr OspalĂ˝ | 968cd1f | 2019-09-20 05:51:37 +0200 | [diff] [blame] | 5 | # prepare env for HTTPS if used |
| 6 | |
| 7 | is_https=$(cat /root/chef-solo/environments/${ENVNAME}.json | \ |
| 8 | jq -cr '.default_attributes.disableHttp' | \ |
| 9 | tr '[:upper:]' '[:lower:]') |
| 10 | |
| 11 | if [ "$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 |
| 20 | fi |
| 21 | |
| 22 | # run tests |
| 23 | |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 24 | cd /root/chef-solo |
Yuli Shlosberg | 0875ce0 | 2018-01-25 13:53:36 +0200 | [diff] [blame] | 25 | chef-solo -c solo.rb -E ${ENVNAME} |
| 26 | |
| 27 | rc=$? |
| 28 | |
| 29 | if [[ $rc != 0 ]]; then |
kaihlavi | 02f4880 | 2019-07-30 19:23:52 +0300 | [diff] [blame] | 30 | echo "Startup failed !!!" |
Yuli Shlosberg | 0875ce0 | 2018-01-25 13:53:36 +0200 | [diff] [blame] | 31 | exit $rc |
| 32 | else |
kaihlavi | 02f4880 | 2019-07-30 19:23:52 +0300 | [diff] [blame] | 33 | # 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 Shlosberg | f59a225 | 2018-03-21 11:14:08 +0200 | [diff] [blame] | 38 | fi |