How it works...

In step 1, we have supplied credentials, network name, subnet name, IP range and region. Now we have a network named my-network and a subnet within that named public-subnet. GCE instances, by default, start up with an ephemeral external public IP. However, that IP can change between instance reboot which might not be desirable at times. We can request a static external IP and attach it to our instance and we did so in step 2. We booted an instance in step 3. For that we had to specify a name for the instance. We booted an f1-micro instance running CentOS 7 with a 15 GB disk attached to it. We also specified tags which would help us in organizing our instances as well as in managing firewall rules. The metadata helps to specify the SSH public key so that we can SSH into instances or run Ansible playbooks for further configuration. Step 4 creates a user aditya and specifies a SSH key. Now we have the instance ready, we can use SSH to configure it further.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset