janeczku / docker-machine-vultr

:m: Docker Machine driver for Vultr Cloud
MIT License
192 stars 25 forks source link

iPXE boot script for rancherOS is hardcoded #3

Closed greyarch closed 8 years ago

greyarch commented 8 years ago

First of all, great job, loving it!

It would be really useful if it was possible to specify a boot script ID when doing creating the machine. Another option would be to pass an argument pointing to a boot script file.

janeczku commented 8 years ago

To be clear: You want to supply your own iPXE boot script by ID?

janeczku commented 8 years ago

Since the cloud-config cannot be stored on Vultr but has to be passed on VPS create. What should the cloud-config contain for machines that use a custom pxe boot script?

janeczku commented 8 years ago

implemented in v1.0.0-rc3

When custom boot script is supplied with --vultr-pxe-script the cloud-config will include the hostname and the ssh key. The OS booted via PXE must support cloudinit so that docker-machine's SSH key is authorized.

greyarch commented 8 years ago

My idea was to provide a cloud-config via a url datasource, i.e. ... rancher.cloud_init.datasources=[url:http://example.com/cloud-config]

janeczku commented 8 years ago

Yeah, that should work even with the current implementation which creates a cloud-config whenever the custom operating system ID 159 is used. AFAIK e2 metadata datasource is disabled by default in rancher. So as long as you define your own datasource through kernel options it will just ignore the ec2 cloud-config.