2015-03-04 11:56:39 +00:00
|
|
|
#!/bin/bash -eux
|
|
|
|
|
2015-04-29 13:37:39 +00:00
|
|
|
/usr/bin/coreos-cloudinit --from-file=/var/lib/coreos-user_data
|
2015-03-04 11:56:39 +00:00
|
|
|
|
2015-03-29 14:27:47 +00:00
|
|
|
docker pull indiepaas/rsyslog
|
|
|
|
docker pull indiepaas/haproxy
|
|
|
|
docker pull indiepaas/confd
|
|
|
|
docker pull indiepaas/duplicity
|
2015-03-04 11:56:39 +00:00
|
|
|
docker pull ibuildthecloud/systemd-docker
|
|
|
|
|
|
|
|
# Create Directory structure
|
|
|
|
mkdir -p /data/domains
|
|
|
|
mkdir -p /data/runtime/haproxy/approved-certs
|
2015-04-03 08:40:53 +00:00
|
|
|
git clone https://github.com/indiepaas/IndiePaaS.git /data/indiehosters
|
2015-03-04 11:56:39 +00:00
|
|
|
|
|
|
|
# Install unit-files
|
|
|
|
cp /data/indiehosters/unit-files/* /etc/systemd/system && systemctl daemon-reload
|
|
|
|
|
|
|
|
systemctl enable rsyslog
|
|
|
|
systemctl start rsyslog
|
|
|
|
systemctl enable confd
|
|
|
|
systemctl start confd
|
|
|
|
systemctl enable haproxy.path
|
|
|
|
systemctl start haproxy.path
|
|
|
|
|
|
|
|
source /etc/environment
|
|
|
|
# Put the backup server in known_hosts files using RSA algo
|
|
|
|
# https://github.com/paramiko/paramiko/issues/243
|
|
|
|
ssh -o "StrictHostKeyChecking no" -o "BatchMode yes" -o "HostKeyAlgorithms=ssh-rsa" $BACKUP_DESTINATION exit
|
|
|
|
|
|
|
|
# Import backup encryption key
|
|
|
|
gpg --import /root/key.pub
|
|
|
|
TRUSTVAR=`gpg --fingerprint root | grep Key|cut -d= -f2|sed 's/ //g'`
|
|
|
|
TRUST_VALUE=':6:'
|
|
|
|
echo $TRUSTVAR$TRUST_VALUE | gpg --import-ownertrust
|
|
|
|
|
2015-05-08 14:05:11 +00:00
|
|
|
curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose
|
|
|
|
chmod +x /opt/bin/docker-compose
|
|
|
|
update_engine_client -update
|