Using instance templates
We discussed earlier that a managed instance group is a collection of identical virtual machines. This collection can be autoscaled, meaning that instances can be added and removed from the collection automatically based on the workload. How then do we ensure the instances are all identical, have all the software installed, and have the configuration applied?
This is where an instance template comes into the picture. An instance template is a definition of a machine type, boot disk image, start up scripts, and the other properties that can be set on a virtual machine. It is used to create virtual machine instances with identical configurations.
We can create an instance template in many ways, but for our purposes, we will create the instance template from our existing Tomcat virtual machine. This means we don't have to concern ourselves with the installation and configuration of software on the first boot, but are taking all the configuration we...