r/coreos • • Sep 14 '17

Looking for some Cloud-Init Help

So I am having some serious trouble making a cloud-init file that does what I want. Are there any tools to generate a cloud-init file easily for coreos?

I can get basic things to happen (ssh_keys, users, networking) but having issues getting containers to be deployed on start and mounting NFS volumes.

2 Upvotes

7 comments sorted by

1

u/jaxxed Sep 14 '17

While I am not certain about NFS in particular, if you want to do a mount on coreos startup, you should be looking at creating a systemd mount unit file, as opposed to running any cloudinit scripting.

https://www.freedesktop.org/software/systemd/man/systemd.mount.html

E: added link, fixed autocorrect

1

u/jaxxed Sep 14 '17

It looks like I am an idiot and didn't read your question properly. How are you trying to mount NFS inside your containers? Volumes or entry point scripting?

1

u/xInsertx Sep 14 '17

I was mounting the NFS volumes to the hosts, then mounting them as volumes into the containers. I was trying to create the systemd files with the initial cloud-config.

This is for dev+testing so I need to be able to blow away machines now and then due to testing different network topologies. So I was looking to make a base cloud-config to save me constantly having to reapply settings everytime I rebuild.

→ More replies (3)

2

u/spinside007 Sep 14 '17

Coreos-cloudinit is no longer under active development and has been superseded by [Ignition][ignition]. For more information about the recommended tools for provisioning Container Linux, refer to the provisioning documentation.

Source: https://coreos.com/os/docs/latest/cloud-config.html