cloud-init is a widely used approach to customize a Linux VM as it boots for the first time. You can use cloud-init to install packages and write files, or to configure users and security. Because cloud-init is called during the initial boot process, there are no additional steps or required agents to apply your configuration.
You can run a bash script with cloud-init
With cloud-init you do not need to convert your existing scripts into a cloud-config, cloud-init accepts multiple input types, one of which is a bash script.
If you have been using the Linux Custom Script Azure Extension to run your scripts, you can migrate them to use cloud-init. However, Azure Extensions have integrated reporting to alert to script failures, a cloud-init image deployment will NOT fail if the script fails.
I will post this video in next series.
In a nutshell - Use cloud-init to update and install packages in a Linux VM in Azure
#Cloudinit
#LinuxVirtualmachine
#AzureVirtual Machine
#Azure portal.