Infrastructure as Code on GCP

Recently I was involved in a professional services engagement along side Google Professional Services.  In that engagement I got to see first hand how Google implements solutions on GCP, including the deployment of a high-performance compute platform proof of concept.  One of the most interesting aspects of that engagement was how the Google team implemented the entire solution using the Infrastructure as Code IaC) paradigm.  At no point in the development of the POC did the team configure something directly in the console.  This allowed them to build and tear-down the environment as needed, and once complete, they could turn over a running POC to the customer for further development and implementation. So taking direction from how Google does things, I decided to do the same for the Ansible host configuration in the previous post.

My goal was to automate the implementation of the Ansible host using GCP Deployment manager so that in the future when I want to run Ansible tests, I can deploy the environment within 10 minutes and remove it instantly when I am done.  To keep the entire environment ephemeral, all of the configuration was put into GitHub.  Future Ansible playbooks will also be placed in GitHub so that all I need to do is spin up the environment, clone the latest playbook I am working on and continue where I left off.

You can see the full configuration on GitHub here:

Ansible Core on GCP with Deployment Manager

In building the configuration I relied on the code that the Google PS team used as an example along with other examples from the Google documentation and from StackOverflow.  Some of the python scripting is my own since it is fairly basic and unique to this project. 

Comments are closed.