I have followed the tutorial listed in Azure's official documentation. Automate VM Deployment
Here are the steps I followed in Azure's official tutorial.
- Creating a yaml file below
## Install packages on first boot
package_upgrade: true
packages:
- docker
- nodejs
- python3.9
- Pasting the contents of cloud-config in the cloud init when I create a Ubuntu instance.
When I tried checking the Python version, it was still Python3.8 and also I could not invoke docker
. When I checked the /var/log/cloud-init.log
, docker has been successfully installed.
Log of less /var/log/cloud-init.log
2021-12-10 06:03:55,535 - subp.py[DEBUG]: Running command ['eatmydata', 'apt-get', '--option=Dpkg::Options::=--force-confold', '--option=Dpkg::options::=--force-unsafe-
io', '--assume-yes', '--quiet', 'install', 'docker'] with allowed return codes [0] (shell=False, capture=False)
2021-12-10 06:03:57,901 - util.py[DEBUG]: apt-install [eatmydata apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-ye
s --quiet install docker] took 2.365 seconds