On various pages and documentation I’ve seen that cloud-init via cloud-config passed in user_data is supported by Ubuntu and CentOS but the docs are all 5 years old or more. For example,
Additionally, the version of cloud-init needed to consume the user-data field is currently only available in Ubuntu 14.04 and CentOS 7
Is there a list anywhere of specific distros that support cloud-init via user_data? And for distros that do not support cloud-config via user_data, will a supplied bash script be run instead if passed? The documentation does not appear to list any limitations:
A string containing ‘user data’ which may be used to configure the Droplet on first boot, often a ‘cloud-config’ file or Bash script. It must be plain text and may not exceed 64 KiB in size.
I’m wondering if I can rely on passing a bash script regardless of what distro I launch.
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!
Heya,
Yes, cloud-init and user_data are supported by various distributions. While some of the documentation might be a bit older, support for cloud-init in different distributions is generally maintained and updated. However, there are different versions and stages of implementation depending on the distribution.
Most common distributions like Ubuntu, CentOS, Debian, and Fedora support cloud-init. To use user_data with these distributions, you can generally pass a bash script or a cloud-config file.
It’s important to ensure that the distribution you’re using supports the version of cloud-init needed and that cloud-init is installed or included in the image you plan to use.
For a detailed guide on using cloud-init and user_data with DigitalOcean, please refer to the official documentation.
Hope that this helps!
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.