cloudinit
-
Hi,
Not sure if this is the right place to ask, so sorry if not and please redirect me wherever it is the right one.
I am new to xcp-ng and I am migrating some kubernetes clusters from aws to onpremises using Rancher.
In order to do so I want to script the spin up of master and worker nodes using cloudinit to let them automaticaly register on the k8s cluster during the first boot.All should be done via command line, so I have found how to create a new vm, attach it to the right network and storage, but I can't find how to make it execute a cloud-init script.
I mean; I already know how to use and troubleshoot cloud-init but I do not know how to make the vm run it at boot time.I am very interested to use cloud-init, but I can't afford the $550/month for the xen-orchestra premium cloud-init support.
I know it is possible using xen-orchestra via its web interface, but I guess that is possible via command line also in xcp-ng. Can someone throw some light on this?
Thanks in advance.
-
You can use XO with all features for free with the version from the sources: https://xen-orchestra.com/docs/installation.html#from-the-sources
Regarding the use with Rancher, we'd love to have a community node driver for XO UI
-
That's great, didn't know about that posibility, so thanks for the head up
Although I have been looking the doc and I only seen mentioned cloud-init at https://xen-orchestra.com/docs/advanced.html#cloud-init
In that piece of doc there is no mention on how to use it from the command line, which is how I would like to be able to use it (to launch a vm with a cloud-init script)
Also it mentions to use a cloudinit ready template and "Then, activate the config drive or use a a custom cloudinit". Do you know where that cloudinit configs are expected to be created? and via command line?
Thanks your for reply!
-
Via XO, during VM creation when selecting a template. There's field to enter your cloud init config. It will create a small special disk where the config will be sent.
-
Do you mean there is no way to create that cloud-init scripts and specify them somehow during the vm creation from the command line?
I'm looking around but can't find the cli documentation
Thank you very much for your dedication
-
Let me ping @julien-f so it will give you the right command to create a VM with Cloudinit config
-
@olivierlambert you're amazing. Thank you a lot!!