Skip to content

Commit c7fd615

Browse files
authored
Merge pull request #102179 from danielsollondon/patch-15
cloud-init multiple updates
2 parents 5af869e + d4a987b commit c7fd615

File tree

1 file changed

+65
-31
lines changed

1 file changed

+65
-31
lines changed

articles/virtual-machines/linux/using-cloud-init.md

Lines changed: 65 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,44 +14,77 @@ ms.workload: infrastructure-services
1414
ms.tgt_pltfrm: vm-linux
1515
ms.devlang: azurecli
1616
ms.topic: article
17-
ms.date: 10/11/2019
17+
ms.date: 01/23/2019
1818
ms.author: danis
1919

2020
---
21-
# Cloud-init support for virtual machines in Azure
22-
This article explains the support that exists for [cloud-init](https://cloudinit.readthedocs.io) to configure a virtual machine (VM) or virtual machine scale sets at provisioning time in Azure. These cloud-init scripts run on first boot once the resources have been provisioned by Azure.
23-
24-
## Cloud-init overview
25-
[Cloud-init](https://cloudinit.readthedocs.io) 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. For more information on how to properly format your `#cloud-config` files, see the [cloud-init documentation site](https://cloudinit.readthedocs.io/en/latest/topics/format.html#cloud-config-data). `#cloud-config` files are text files encoded in base64.
26-
27-
Cloud-init also 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.
28-
29-
We are actively working with our endorsed Linux distro partners in order to have cloud-init enabled images available in the Azure marketplace. These images will make your cloud-init deployments and configurations work seamlessly with VMs and virtual machine scale sets. The following table outlines the current cloud-init enabled images availability on the Azure platform:
30-
31-
| Publisher | Offer | SKU | Version | cloud-init ready |
32-
|:--- |:--- |:--- |:--- |:--- |
33-
|Canonical |UbuntuServer |18.04-LTS |latest |yes |
34-
|Canonical |UbuntuServer |16.04-LTS |latest |yes |
35-
|Canonical |UbuntuServer |14.04.5-LTS |latest |yes |
36-
|CoreOS |CoreOS |Stable |latest |yes |
37-
|OpenLogic 7.7 |CentOS |7-CI |7.7.20190920 |preview |
38-
|Oracle 7.7 |Oracle-Linux |77-ci |7.7.01|preview |
39-
|RedHat 7.6 |RHEL |7-RAW-CI |7.6.2019072418 |yes |
40-
|RedHat 7.7 |RHEL |7-RAW-CI |7.7.2019081601 |preview |
41-
42-
Currently Azure Stack does not support the provisioning of RHEL 7.x and CentOS 7.x using cloud-init.
43-
44-
* For RHEL 7.6, cloud-init package, the supported package is: *18.2-1.el7_6.2*
45-
* For RHEL 7.7 (preview), cloud-init package, the preview package is: *18.5-3.el7*
46-
* For CentOS 7.7 (preview), cloud-init package, the preview package is: *18.5-3.el7.centos*
47-
* For Oracle 7.7 (preview), cloud-init package, the preview package is: *18.5-3.0.1.el7*
21+
# cloud-init support for virtual machines in Azure
22+
This article explains the support that exists for [cloud-init](https://cloudinit.readthedocs.io) to configure a virtual machine (VM) or virtual machine scale sets at provisioning time in Azure. These cloud-init configurations are run on first boot once the resources have been provisioned by Azure.
23+
24+
VM Provisioning is the process where the Azure will pass down your VM Create parameter values, such as hostname, username, password etc., and make them available to the VM as it boots up. A 'provisioning agent' will consume those values, configure the VM, and report back when completed.
25+
26+
Azure supports two provisioning agents [cloud-init](https://cloudinit.readthedocs.io), and the [Azure Linux Agent (WALA)](https://docs.microsoft.com/azure/virtual-machines/extensions/agent-linux).
27+
28+
## cloud-init overview
29+
[cloud-init](https://cloudinit.readthedocs.io) 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. For more information on how to properly format your `#cloud-config` files or other inputs, see the [cloud-init documentation site](https://cloudinit.readthedocs.io/en/latest/topics/format.html#cloud-config-data). `#cloud-config` files are text files encoded in base64.
30+
31+
cloud-init also 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.
32+
33+
We are actively working with our endorsed Linux distro partners in order to have cloud-init enabled images available in the Azure marketplace.
34+
These images will make your cloud-init deployments and configurations work seamlessly with VMs and virtual machine scale sets. Initially we collaborate with the endorsed Linux distro partners and upstream to ensure cloud-init functions with the OS on Azure, then the packages are updated and made publically available in the distro package repositories.
35+
36+
There are two stages to making cloud-init available to the endorsed Linux distro OS's on Azure, package support, and then image support:
37+
* 'cloud-init package support on Azure' documents which cloud-init packages onwards are supported or in preview, so you can use these packages with the OS in a custom image.
38+
* 'image cloud-init ready' documents if the image is already configured to use cloud-init.
39+
40+
41+
### Canonical
42+
| Publisher / Version| Offer | SKU | Version | image cloud-init ready | cloud-init package support on Azure|
43+
|:--- |:--- |:--- |:--- |:--- |:--- |
44+
|Canonical 18.04 |UbuntuServer |18.04-LTS |latest |yes | yes |
45+
|Canonical 16.04|UbuntuServer |16.04-LTS |latest |yes | yes |
46+
|Canonical 14.04|UbuntuServer |14.04.5-LTS |latest |yes | yes |
47+
48+
### RHEL
49+
| Publisher / Version | Offer | SKU | Version | image cloud-init ready | cloud-init package support on Azure|
50+
|:--- |:--- |:--- |:--- |:--- |:--- |
51+
|RedHat 7.6 |RHEL |7-RAW-CI |7.6.2019072418 |yes | yes - support from package version: *18.2-1.el7_6.2*|
52+
|RedHat 7.7 |RHEL |7-RAW-CI |7.7.2019081601 | yes (note this is a preview image, and once all RHEL 7.7 images support cloud-init, this will be removed mid 2020, notice will be given) | yes - support from package version: *18.5-3.el7*|
53+
|RedHat 7.7 |RHEL |7-RAW | n/a| no - image updates to start Feb 2020| yes - support from package version: *18.5-3.el7*|
54+
|RedHat 7.7 |RHEL |7-LVM | n/a| no - image updates to start Feb 2020| yes - support from package version: *18.5-3.el7*|
55+
|RedHat 7.7 |RHEL |7.7 | n/a| no - image updates to start Feb 2020 | yes - support from package version: *18.5-3.el7*|
56+
|RedHat 7.7 |rhel-byos | rhel-lvm77 | n/a|no - image updates to start Feb 2020 | yes - support from package version: *18.5-3.el7*|
57+
58+
### CentOS
59+
60+
| Publisher / Version | Offer | SKU | Version | image cloud-init ready | cloud-init package support on Azure|
61+
|:--- |:--- |:--- |:--- |:--- |:--- |
62+
|OpenLogic 7.7 |CentOS |7-CI |7.7.20190920 |yes (note this is a preview image, and once all CentOS 7.7 images support cloud-init, this will be removed mid 2020, notice will be given) | yes - support from package version: *18.5-3.el7.centos*|
63+
64+
* CentOS 7.7 images that will be cloud-init enabled be updated here in Feb 2020
65+
66+
### Oracle
67+
68+
| Publisher / Version | Offer | SKU | Version | image cloud-init ready | cloud-init package support on Azure|
69+
|:--- |:--- |:--- |:--- |:--- |:--- |
70+
|Oracle 7.7 |Oracle-Linux |77-ci |7.7.01| preview image (note this is a preview image, and it once all Oracle 7.7 images support cloud-init, this will be removed mid 2020, notice will be given) | no, in preview, package is: *18.5-3.0.1.el7*
71+
72+
### Debian & SuSE SLES
73+
We are currently working to preview support, expect updates in February and March 2020.
74+
75+
Currently Azure Stack will support the provisioning of cloud-init enabled images.
76+
4877

4978
## What is the difference between cloud-init and the Linux Agent (WALA)?
50-
WALA is an Azure platform-specific agent used to provision and configure VMs, and handle Azure extensions. We are enhancing the task of configuring VMs to use cloud-init instead of the Linux Agent in order to allow existing cloud-init customers to use their current cloud-init scripts. If you have existing investments in cloud-init scripts for configuring Linux systems, there are **no additional settings required** to enable them.
79+
WALA is an Azure platform-specific agent used to provision and configure VMs, and handle [Azure extensions](https://docs.microsoft.com/azure/virtual-machines/extensions/features-linux).
80+
81+
We are enhancing the task of configuring VMs to use cloud-init instead of the Linux Agent in order to allow existing cloud-init customers to use their current cloud-init scripts, or new customers to take advantage of the rich cloud-init configuration functionality. If you have existing investments in cloud-init scripts for configuring Linux systems, there are **no additional settings required** to enable cloud-init process them.
5182

52-
If you do not include the Azure CLI `--custom-data` switch at provisioning time, WALA takes the minimal VM provisioning parameters required to provision the VM and complete the deployment with the defaults. If you reference the cloud-init `--custom-data` switch, whatever is contained in your custom data (individual settings or full script) overrides the WALA defaults.
83+
cloud-init cannot process Azure extensions, so WALA is still required in the image to process extensions, but will need to have its provisioning code disabled, for endorsed Linux distros images that are being converted to provision by cloud-init, they will have WALA installed, and setup correctly.
5384

54-
WALA configurations of VMs are time-constrained to work within the maximum VM provisioning time. Cloud-init configurations applied to VMs do not have time constraints and will not cause a deployment to fail by timing out.
85+
When creating a VM, if you do not include the Azure CLI `--custom-data` switch at provisioning time, cloud-init or WALA takes the minimal VM provisioning parameters required to provision the VM and complete the deployment with the defaults. If you reference the cloud-init configuration with the `--custom-data` switch, whatever is contained in your custom data will be available to cloud-init when the VM boots.
86+
87+
cloud-init configurations applied to VMs do not have time constraints and will not cause a deployment to fail by timing out. This is not true for WALA, if you change the WALA defaults to process custom-data, it cannot exceed the total VM provisioning time allowance of 40mins, if so, the VM Create will fail.
5588

5689
## Deploying a cloud-init enabled Virtual Machine
5790
Deploying a cloud-init enabled virtual machine is as simple as referencing a cloud-init enabled distribution during deployment. Linux distribution maintainers have to choose to enable and integrate cloud-init into their base Azure published images. Once you have confirmed the image you want to deploy is cloud-init enabled, you can use the Azure CLI to deploy the image.
@@ -103,3 +136,4 @@ For cloud-init examples of configuration changes, see the following documents:
103136
- [Run a package manager to update existing packages on first boot](cloudinit-update-vm.md)
104137
- [Change VM local hostname](cloudinit-update-vm-hostname.md)
105138
- [Install an application package, update configuration files and inject keys](tutorial-automate-vm-deployment.md)
139+

0 commit comments

Comments
 (0)