Azure VM Image from Packer
Manual Creation
- Create Resource Group
- Create a VM with some source image (ubuntu)
- SSH into the machine and execute
sudo apt-get update
sudo apt-get install openjdk-8-jdk -y
sudo apt-get install tomcat8 -y
Using Packer
Variables
- Environment Variables:
- Define environment variable in your system and then to use it
{{env `PATH`}}
- Define environment variable in your system and then to use it
Useful Functions in Packer
- isotime
- clean_resource_name
- Refer Here