I’m trying to build a cloud-config for a docker container that needs some arguments.
But I cannot find anything in the RancherOS documentation on passing arguments to “services”.
So I wonder if this is correct in the last line…?
This didn’t work args: [-server, -advertise 10.3.20.72 -bootstrap-expect 3 -join consul.service.consul].
So still no way send arguments to the docker service via cloud-config…
Is there a way to find out all available rancher specific cloud-config settings? Or is it guesswork/reading source code?
This documentation doesn’t say much http://docs.rancher.com/os/cloud-config/.
Now it stopped working, previously I was at least able to install consul at boot.
But now it doesn’t do anything, it just boots the OS.
I can’t seem to find any log where i can see what happens.
#cloud-config
rancher:
network:
interfaces:
eth*:
dhcp: true
state:
fstype: auto
formatzero: true
dev: LABEL=RANCHER_STATE
autoformat:
- /dev/vda
- /dev/sda
services:
consul:
image: progrium/consul
restart: always
ports:
- "8300-8300"
- "8301:8301"
- "8302:8302"
- "8301:8301/udp"
- "8302:8302/udp"
- "8400:8400"
- "8500:8500"
- "53:53/udp"
volumes:
- /media:/data
command: -server -advertise <%= @host.ip %> -bootstrap-expect 3 -join consul.service.consul
write_files:
# /opt/rancher/bin/start.sh is executed on start before User Docker starts
# /etc/rc.local is also executed on start but not guaranteed to be ran before User Docker
- path: /opt/rancher/bin/start.sh
permissions: "0755"
owner: root
content: |
#!/bin/bash
wget --quiet --output-document=/dev/null --no-check-certificate <%= foreman_url %>
touch /.bootstrapped
rm -f /opt/rancher/bin/start.sh