Provisioning VMs using cloud-init
When you’re dealing with only one VM, things can be relatively simple. But when we have to create hundreds of VMs, manual creation can be daunting. One useful tool you can use for such a task is cloud-init. Another tool that is suitable for this kind of task is Ansible (there’s more on Ansible in Chapter 17). In this section, we will cover only cloud-init. It was developed by Canonical to be used as a tool for configuring VM instances on cloud platforms, and it is written in Python. Currently, it is considered an industry standard for provisioning cloud images. In the next subsection, we will briefly explain to you how cloud-init works.
Understanding how cloud-init works
According to the official cloud-init documentation, it is based on several configuration sources, specific boot stages, user data formats, vendor data, and instance metadata. The concept of boot stages is specific to cloud-init architecture, as it configures the...