Deploying VMs in GCP
According to our example network design, we will deploy two web servers and two database servers across two different availability zones for high availability. Additionally, we will provision a bastion host in a single availability zone, as it is solely used for management purposes.
To streamline provisioning, you will define all the required machines in the compute_nodes variable. For each machine, some parameters (such as the name, network, zone, and access to the internet) will be used during the deployment process.
- You start by updating the
group_vars/gcp_vpc.ymlfile to include the information to describe the flavor and OS that will define all your VMs:root@cookbook-lab:~/cookbook-lab/chapters/ch10# vi group_vars/gcp_vpc.yml ... omitted output ... compute_node_flavor: f1-micro (1) compute_node_images: projects/ubuntu-os-cloud/global/images/family/ubuntu-2204-lts (2) compute_node_image_size: 10...