#!/bin/bash
# DEMO - fictional company, synthetic data (Quarrytide dispatch hosts)
set -eux

yum update -y
amazon-linux-extras install nginx1 -y
yum install -y python3 jq

systemctl enable ntpd
systemctl start ntpd

cat > /usr/local/bin/qt-healthcheck <<'PY'
#!/usr/bin/python
import urllib2
print urllib2.urlopen("http://127.0.0.1:8080/health").read()
PY
chmod +x /usr/local/bin/qt-healthcheck

systemctl enable nginx
systemctl start nginx
