Cloud-config arguments to services?

Hi,

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…?

#cloud-config
rancher:
  services:
    consul:
      image: progrium/consul
      restart: always
      ports:
       - 8300:8300
       - 8301:8301
       - 8301:8301/udp
       - 8302:8302
       - 8302:8302/udp
       - 8400:8400
       - 8500:8500
       - 53:53/udp
       net: host
       volumes:
       - /media:/data:rw
      args: [-server, -bootstrap-expect 3]

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…:cry:

Wouldn’t it be command: ?

#cloud-config
rancher:
  services:
    consul:
      image: progrium/consul
      net: host
      command: -server -log-level debug  -node=consul.local -bootstrap -bind=<IP> -client=<IP> -advertise=<IP>
      labels:
        io.rancher.os.scope: system
        io.rancher.os.after: docker

Thanks!

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/.

It looks like you are trying to create some services within RancherOS.

All services should be in docker-compose format, which would be located

rancher:
  services:
    servicename:

Are there other settings that you are trying to do?

Well I’m trying to figure out where to write a startup script that is executed before the user-docker, but I asked in a separate thread.

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

This is my ipxe/cmdline

$ cat /proc/cmdline
rancher.debug=true rancher.password=xxx rancher.cloud_init.datasources=[url] cloud-config-url=http://url.to/cloud-config.yml