This hands-on lab will demonstrate how to create an automated startup configuration file to pass into VMs using cloud-init.
**Cloud-init** is an open-source tool for Linux cloud VMs, which has native support in Azure. It is important to note that cloud-init configuration is NOT in the form of a shell script, but uses modules in YAML syntax, which can be a learning curve for those used to shell scripting. The lab’s primary focus will concentrate on formatting our configuration file.
Mastering cloud-init enables automation in VM configuration, which is essential for auto-scaling services such as VM Scale Sets.
Successfully complete this lab by achieving the following learning objectives:
- Create First VM via Command Line and Pass in cloud-init Configuration File
- Create and pass in the configuration file as custom data.
- Create the VM.
- Open port 80.
- Change the resource group field to your unique lab resource group.
- Create Second VM via Web Portal and Pass in cloud-init Configuration File
- Be sure to use an Ubuntu distribution.
- Copy/paste the contents of the configuration file in the Custom Data field.