Community

Supply a custom Image with cloud-config data during first startup

Is there a way to supply cloud-config.yaml information to a custom image host?

I'm in the process of building a datacenter which is setup through terraform and I need to get some custom information to each of the hosts.

 
  • **bold**
  • _italics_
  • `code`
  • ```code block```
  • # Heading 1
  • ## Heading 2
  • > Quote
 

The first line of a cloud-config file must contain a special identifier so that the cloud-init program knows that the file is a cloud-config file. This looks like this:

cloud-config

This must be placed alone on the very first line. The cloud-config file must be provided when the server is created. This can be accomplished in two different ways.

Keep in mind that the metadata service is only available in regions where cloud 1.5 is deployed. Additionally, the version of cloud-init needed to consume the user-data field is currently only available in Ubuntu 14.04 and CentOS 7, as well as application images based on these releases.

Through the control panel interface, there is an optional check box to enable user data. When you select this, a text box will show up where you can paste your cloud-config file: I hope this information helps you

Hello Kai,

I haven't tried integrating cloud-config / cloud-init with Terraform yet, but wanted to let you know about a tutorial that may be helpful.

Deploy a CentOS Server Customized with Cloud-Init

Regarding Nazam's comment above, I'm not aware of any currently available way to supply user-data via the ProfitBricks DCD. Maybe they can elaborate and provide additional details?

Eric