Installing NGINX on Linux using Cloud Init

Lab Details

  1. In this lab we will walk through the steps to install NGINX server on Linux VM using Cloud Init.

  2. Duration: 45 minutes


What is Azure Virtual Machine?

  • Azure Virtual Machines (VM) is a on-demand, scalable computing resource that Azure offers. Typically, you choose a VM when you need more control over the computing environment. 

  • Azure VM gives you the flexibility of virtualization without having to buy and maintain the physical hardware that runs it. However, you still need to maintain the VM by performing tasks, such as configuring, patching, and installing the software that runs on it.

Cloud-init overview

  • Cloud-init is widely used to customize a Linux VM as it boots for the first time. You can use cloud-init to install packages, or to configure users and security. Cloud-init runs during the initial boot process, there are no additional steps or required agents to apply your configuration.

  • Cloud-init works across distributions. For example, you don't use apt-get install or yum install to install a package. Instead you can define a list of packages to install. Cloud-init automatically uses the native package management tool for the distro you select.

Task Details

  1. Launching Lab Environment

  2. Create a Linux Virtual Machine with NGINX deployed on it

  3. Get the VM username and public IP address

  4. Verify the Installation of NGINX