Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

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!
The config sample under “Run Arbitrary Commands for More Control” uses “run_cmd” while stating that the command is “runcmd” and is used as “runcmd” in other sections of the tutorial.
I believe it should read as “runcmd” in the example as well.
#cloud-config ssh_keys: rsa_private: | -----BEGIN RSA PRIVATE KEY----- your_rsa_private_key -----END RSA PRIVATE KEY-----
rsa_public: your_rsa_public_key
wouldn’t this leave the private key exposed?
As a note, it appears that at least for yum-based distributions, any failed dependency for any package in the ‘packages’ section will result in failure to install any of the packages.
It would be nice if it would just fail to install those with unmet dependencies and log those to the cloud-init.log file.
By looking at runcmd code (/usr/lib/python2.6/site-packages/cloudinit/config/cc_runcmd.py) I noticed there’s no ‘frequency’ specified in comparison to other. Beside the only thing that scripts does is to save the scripts given as shells script under /var/lib/cloud/instance/scripts/runcmd .
So if I verbosely specify the modules, I MUST set the frequency.
cloud_config_modules:
- mounts
- locale
- set-passwords
- timezone
- [ runcmd, always ]
cloud_final_modules:
- scripts-per-once
- scripts-per-boot
- scripts-per-instance
- [ scripts-user, always ]
- ssh-authkey-fingerprints
and the scripts created by this particular can be run by ‘scripts-user’, so I need to specify i.e.
- [ scripts-user, always ]
to make runcmd scripts working
Is it proper way to do so ? The documentation (at least current 0.7.7) lacks proper explanation of runcmd and user-scripts and how they can be utilized
I also don’t understand difference between all the mode, once (first time the instance boot), instance(???), always ( that I understand), ???boot(that one exist? it doesn’t seem to work…
This comment has been deleted
Great stuff!
Before anything, one must know i am fully aware of api calls and “#!/bin/bash” script capabilities of the ‘User Data’ box on the droplet creation page.
Wondering still… any of you folks tried this method and get something to work? Am i missing something here? Steps taken just to test…
#cloud-config
packages:
- mc
I have done piles of tests, that one being the most basic in my opinion. I believe i have followed what seems to me like pretty basic guidelines but darnit, can’t get any to work (writefile, sshkeys, users…).
Works fine using something like;
#!/bin/bash
apt-get install -y mc
Basic droplet created for tests;
ubuntu-512mb-tor1-01 (14.04 x32 mainly but tried others)
512 MB Memory / 20 GB Disk / TOR1
I have not tried creating a drop in/on another region/server (darn french-canadian me!). Agreed it would have saved me some writing time if it was only that but still, looking for your input on the subject.
Thanks for helping
Is there a way to get user input when the server starts. Lets say I am testing several cloud images and I don’t want to have to edit the cloud-config every time. can I prompt for user input when the server comes up?
I noticed in the section about packages that it says “The “packages” directive will set apt_update to true” and not package_update.
Thought I’d give cloud-init a whirl and after two failed attempts I realized my editor was using TAB instead of SPACES. Would be nice to just add this tidbit spelled out in the tutorial to minimize undo frustration.