Examples on how to use a cloud-config script with cloud-init
First, you need to download the cloud images and resize them in order to make sure that the disk size after everything is installed is large enough to accommodate all the files you plan to put in the machine you created. In these examples, we are going to use two images, one for CentOS, and another for Ubuntu Server. We can see that the CentOS image we are using is 8 GB in size, and we will enlarge it to 10 GB. Note that the actual size on the disk is not going to be 10 GB; we are just allowing the image to grow to this size.
We are going to do the same with the Ubuntu image, after we get it from the internet. Ubuntu also publishes cloud versions of their distribution daily, for all supported versions. The main difference is that Ubuntu creates images that are designed to be 2.2 GB when full. We downloaded an image from https://cloud.centos.org; let's now get some information about it: