Can I get a droplet without all this cloud-config stuff?

April 9, 2015 1.7k views
Configuration Management Getting Started Ubuntu

I haven't had a droplet here in a while, now there is a bunch of "cloud-config" stuff getting in the way. Is there a way to deploy without it, or at least an easy way of getting rid of it?

1 Answer

There are a couple options:

1.) If you use an Ubuntu 12.04 or older image these do not support cloud-config

2.) You could actually use cloud-config to remove cloud-config. By launching your droplet with a bash script in the user-data field that will remove any cloud-config files and do an apt-get purge cloud-init, Cloud-config should then execute your script removing it's files and itself on first boot. I've included an untested example below:

export DEBIAN_FRONTEND=noninteractive;
apt-get -y purge cloud-init;
rm -Rf /var/lib/cloud;
rm -Rf /etc/cloud;

I would recommend testing this on a new droplet and making sure it removes everything you need it to before using it on anything you will use in production.

Have another answer? Share your knowledge.