Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (15 sloc) 849 Bytes
#cloud-config
write_files:
- path: /opt/start-rancher.sh
permissions: "0755"
owner: root
content: |
#!/bin/bash
while ! docker version >/dev/null 2>&1; do echo 'waiting for docker...'; sleep 2; done
while ! ping -c 1 8.8.8.8 >/dev/null 2>&1; do echo 'waiting for net...'; sleep 2; done
docker run -d -p 8080:8080 -p 9345:9345 -e CATTLE_LOGBACK_OUTPUT_CONSOLE="false" -e CATTLE_LOGBACK_OUTPUT_LOGSTASH_CONSOLE="true" ${rancher_version} --advertise-address $(wget -qO - http://169.254.169.254/2016-06-30/meta-data/${ip-addr}) --db-host ${database_endpoint} --db-pass ${database_password} --db-name ${database_name} --db-user ${database_username}
- path: /var/lib/rancher/etc/ssl/readme.txt
permissions: "0644"
content: "ca.crt will be pulled into this dir."
runcmd:
- [ sh, /opt/start-rancher.sh ]
You can’t perform that action at this time.