Today we’re going to talk about GitOps with GitHub Actions, including an example of this workflow:
A developer team creates a new branch, with a Pull Request (PR), which triggers a GitHub Action, which runs AWS CodeDeploy, which deploys the application code update from GitHub to a web application on an Amazon EC2 instance.
Originally presented at Beezwax’s internal “Developer Show & Share”, this video presentation covers “GitOps with GitHub Actions” by Victor Olivo, Beezwax DevOps Engineer.
What is GitOps?
GitOps is the practice of using Git pull requests to automate infrastructure provisioning and application deployment. If you know DevOps, just think of GitOps as: DevOps, using Git as the source of truth for application deployment from end to end.
GitOps bundles these things together:
- Using infrastructure as code.
- Maintaining an automation path for deploying.
- Maintaining an automation path for application code.
- Tool Familiarity
- Team visibility
- Deploy changes faster
Many dev teams are already using Git and GitHub, and here all of our team can see the workflow automation. Rather than sharing accounts for different services where we deploy infrastructure, and automation, here we centralize that. This gives everyone easy access to that automation output. Get new developers involved faster.
GitHub Actions, Example
GitHub Actions is a CI/CD (Continuous Integration / Continuous Deployment ) platform to test, build and deploy changes.
GitHub Actions use GitHub runners — virtual machines that GitHub manages. Alternately, you can use self-hosted runners for more requests, larger VMs.
An example, based on Beezwax.net and AWS (EC2):
- Create new branch and push to repo
- Create a pull request
- GitHub Action!
GitOps with GitHub Actions helps us move quicker, and visualize changes quicker, giving better team-wide visibility, not just for developers but for project managers.
Need A Tech Partner?
Seeking Tech Talent
View our careers openings to apply or refer a friend.