Basic cloud-config for Debian - NOT WORKING!

  • Posted on January 14, 2015
  • vigourAsked by vigour

I’ striving to get a working template of a #cloud-config file for Debian (Wheezy) - I have the following ATM:

# - add wheezy-backports  
echo "deb wheezy-backports main" > /etc/apt/sources.list.d/wheezy-full.list
apt-get -y update && apt-get -y upgrade
apt-get install -y apache2 haproxy php5 php5-memcached php5-mysqlnd php5-adodb php5-gd php-apc php5-pgsql rubygems ruby-full rkhunter lynis htop mc tmux rcconf tree nload screen nmap 
 #DigitalOcean Specific GET HOST details
export HOSTNAME=$(curl -s
export PUBLIC_IPV4=$(curl -s
echo "created @ $(date) local machine time <br> $HOSTNAME, IP Address: $PUBLIC_IPV4 <br> THANK YOU! cloud-config." > /var/www/index.html

However it seems to be having no effect when entering it within “User Data” upon Droplet creation. Using the API’s I’m able to see that the “User-Data” is indeed registered.

I’ve also tried the above with other cloud-config yaml blocks eg:

disable_root: false
manage_etc_hosts: true
 - echo "deb wheezy-backports main" > /etc/apt/sources.list.d/wheezy-full.list
 - apt-get -y update

But no luck.

Any suggestions / help would be well appreciated.

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Thanks for your clear response. I suspect this is mainly due to systemd not being shipped by default? - or are there other factors?

Unfortunately, Debian 7 does not have a recent enough release of cloud-init for us to support it. So our Debian 7 images do not have it installed. While the meta-data service is still available, cloud-init will not automatically process and run cloud-config scripts.

We plan on bringing support to for cloud-init when Debian 8 is release. Fingers crossed, but it the release seems to be making good progress and should be out in the next few months.