Last active
September 9, 2019 20:25
-
-
Save PrplHaz4/730473ffc62e364ba1cb0b8b84093a1b to your computer and use it in GitHub Desktop.
RancherOS cloud-config.yml samples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start container-cron after user Docker is started # | |
# https://github.com/rancher/os/issues/2846 | |
#cloud-config | |
rancher: | |
write_files: | |
- path: /etc/rc.local | |
permissions: "0755" | |
owner: root | |
content: | | |
#!/bin/bash | |
wait-for-docker | |
ros s enable container-cron | |
ros s up container-cron | |
# wait for connectivity then mount nfs # | |
# https://github.com/rancher/os/issues/2606 | |
write_files: | |
- content: |+ | |
#!/bin/bash | |
until ping -c1 172.22.100.101 &>/dev/null; do sleep 1; done | |
mount -t nfs4 172.22.100.101:/ /mnt/nfs | |
owner: root | |
path: /etc/rc.local | |
permissions: "0755" | |
# wait for dns/dhcp before starting custom service | |
# https://github.com/rancher/os/issues/2882 | |
write_files: | |
- path: /etc/rc.local | |
permissions: "0755" | |
owner: root | |
content: | | |
#!/bin/bash | |
... | |
... | |
## wait dns | |
while ! nslookup docker.io >/dev/null 2>/dev/null; do | |
echo "wait for nameserver init" | |
sleep 1 | |
done | |
ros s up <service> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment