In this article, you will learn why Git is used as a DevOps Engineer.
You might be familiar with using Git for local development, executing Git commands and managing Git Repository
When and why do you need Git as a DevOps Engineer?
1. Working with Infrastructure as Code concept
You may be working with the Developer team to deploy the application in Kubernetes, in which case you will be responsible for a lot of Kubernetes Configuration files, which must be managed somewhere.
Furthermore, you may be deploying your Kubernetes Cluster in a cloud platform such as AWS, and in order to communicate or manage services in AWS, you do not do so manually, but rather through the use of automation tools such as Terraform and Ansible.
Configuration files are also used by Terraform and Ansible Configuration.
You may also have some scripts, such as Bash or Python scripts, for various tasks.
All of these are files should be:
- tracked as files will change over time
- securely storing all of these files in one location
- making them accessible to the rest of your DevOps team.
This is where Git repository comes into play and solve all the problems above.
2. Working with CI/CD Pipeline and Build Automation tool
Basis for CI/CD Pipeline and Build Automation tool is:
- you checkout the application code
- you test the application code
- build the application based on that code etc
So this means you need integration for Build automation tool with the application Git repository and you also may need some Git commands specific for build automation tool.
As a DevOps Engineer, you may be responsible for setup integration between a Build Automation tool and a Git repository. Because the integration may differ depending on the build automation tool and the git repository, having some experience and understanding of how this integration works is essential.
Some examples of Git command specific for building pipelines:
- getting commit hash of specific commit
- check if changes happen in frontend or backend code
So I hope you got the idea where you'll be using Git as a DevOps Engineer.
Top comments (0)