Infrastructure CI/CD using �Open Source Tools
A Simple approach on how world does it
Darshit Suratwala
DevOps @ Scale3
Mumbai
Darshit Suratwala
DevOps @ Scale3
Agenda
Why This Talk?
But most importantly…
Understand!
Why it’s done?
How it’s done?
So you may ask what do we want to understand?
The Process
The Purpose
Scenario
Imagine a simple scenario where your client asks you to create a server on GCP, how would you do it?
Possible solution 1
Login to google cloud platform and follow the documentation to create a Compute Engine VM.
Possible solution 2
Write a Selenium script to automatically login to GCP and create VM.
Possible solution 3
Write a script to consume GCP APIs in your choice of programming language or use gcloud cli to create a desired VM.
Scenario
Imagine a simple scenario where your client asks you to create a server on GCP, how would you do it?
Update:
Add Labels to server
Scenario
Imagine a simple scenario where your client asks you to create a server on GCP, how would you do it?
Update:
Add Labels to server
Update:
Do it for 500 servers.
If you do it programmatic way
Infrastructure as Code (IaC)
Managing infrastructure using configs or code instead of through a manual process.
Examples:
So first we will go through some basics of
Let’s Get Started with Terraform …
Terraform CRUD
It’s an open source IaC tool!
Users define config files for provisioning infrastructure.
> terraform plan
It shows you the blueprint of what’s going to happen.
> terraform apply
Performs the actions which were proposed by the plan.
Actions can be:
Let’s talk state!
> terraform destroy
Similar to apply, but deletes the resources which are present in state file.
Lights
Camera
Github Actions!
GitHub Actions
Let’s see GitHub Actions in Action
Notifications
Slack Notifications: Why? What? How?
Why�Notifies when deploy finishes�Useful for approval mechanism
What�Using Slack APIs send messages on channels or DMs.
How�Consume Slack Bot token in your code to send notifications
Demo Time!
References
Conclusion
That’s All Folks!
/DSdatsme