By Julian Lam
Hi there,
I seem to be unable to create a server with the proper configuration via CloudInit. As instructed here (https://www.digitalocean.com/community/tutorials/how-to-use-cloud-config-for-your-initial-server-setup) and here (https://www.digitalocean.com/community/tutorials/an-introduction-to-cloud-config-scripting), I created a YAML file that I pass in to the API when creating a droplet under the key “user_data”. It is a utf-8 encoded string.
I am attempting to create a 512mb droplet, on nyc3, using image ‘ubuntu-14-04-x64’.
I trigger the droplet creation via POST. The API returns with normal expected values, no errors.
Unfortunately, when I log in to the newly created droplet, it doesn’t seem as though the script has run. I tried creating it through the panel, pasting the contents of the script into the “user_data” field. This doesn’t seem to work either.
/var/log/cloudinit.log and /var/log/cloudinit-output.log don’t give any indication that my script has run.
You can review my YAML file here, in case there’s a syntax error I’ve missed: http://pastebin.com/ZL14ihjH
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Fixed it myself. I was sending in syntactically incorrect YAML.
For reference: http://pastebin.com/ZL14ihjH
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.