rancher / os

Tiny Linux distro that runs the entire OS as Docker containers
https://rancher.com/docs/os/v1.x/en/
Apache License 2.0
6.44k stars 656 forks source link

logging for cloud-config operations? #1424

Open leftcoastgeek opened 7 years ago

leftcoastgeek commented 7 years ago

RancherOS Version: (ros os version) v0.7.1 Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.) baremetal @ packet.net

I'm having trouble getting rancheros to write files from my cloud config when booting a server on packet.net.

when I run the following cloud config, no files are written and running sudo ros config config export does not show any of the rancher configs set. if I drop the write_files section in the cloud config the rancher config works.

I'd like to get some logging to find out whats going on but I don't see anything in /var/log where would I find the output of running the cloud-config?

#cloud-config
rancher:
  registry_auths:
    http://my.registry.com:
      auth: some_auth
  docker:
    tls: true
    extra_args: ['--insecure-registry', 'my.registry.com']
write_files:
  - container: console
    path: /home/rancher/.docker/config.json
    permissions: "0755"
    owner: rancher:rancher
    content: | 
      { "auths": { "http://my.registry.com": { "auth": "some_auth", "email": "email@email.com" } } }
  - path: /etc/rc.local
    permissions: "0755"
    owner: root
    content: |
      #!/bin/bash
      wait-for-docker
      docker pull my.registry.com/some/image
      docker run my.registry.com/some/image
SvenDowideit commented 7 years ago

I'll try to check that #1415 will help with this

leftcoastgeek commented 7 years ago

thanks!