Background
When we joined the project, the client was heavily dependent on DigitalOcean for their development and testing environment. They had set up two self-hosted GitHub runners within DigitalOcean's infrastructure, which were integral to their numerous ongoing projects. However, the client was encountering significant challenges with this setup.
Key Challenges:
- Availability Issues: The GitHub runners frequently faced availability problems, leading to considerable delays.
- Queue Delays: Actions in GitHub were often stuck in queues for extended periods, hindering workflow efficiency.
- Performance and Reliability Concerns: The existing setup was plagued with performance inconsistencies and reliability issues.
Objective
Our primary goal was to address these challenges by introducing a more efficient, cost-effective, and reliable DevOps environment. We aimed to improve the performance of GitHub actions, enhance the reliability of the development and testing processes, and optimize costs.
Solution Implemented
On-Demand AWS EC2 Runner for GitHub Actions
- We replaced the existing setup with an On-Demand self-hosted AWS EC2 runner specifically tailored for GitHub Actions.
- This new setup ensured that each GitHub action initiated an EC2 self-hosted runner precisely when needed, executed the job, and then stopped the runner upon completion.
- This approach significantly reduced costs as runners were only active when required.
Rewriting Ansible Scripts Using the DRY Approach
- We overhauled all existing Ansible scripts, adopting the 'Don't Repeat Yourself' (DRY) principle.
- This resulted in unified scripts applicable across development, testing, and production environments, ensuring consistency and reducing maintenance efforts.
Outcomes
Enhanced Productivity and Efficiency
- The new DevOps setup streamlined the development process, markedly improving productivity.
- The client could now rapidly deliver new functionalities, thanks to the efficient and reliable DevOps practices.
Cost-Effectiveness
- The On-Demand AWS EC2 runners significantly cut down operational costs as they were utilized only when necessary.
Knowledge Transfer and Empowerment
- Despite the client's basic understanding of DevOps practices, our intervention helped them fully embrace and implement these practices internally.
- This empowerment in DevOps led to better automation of deployment and scaling processes.
Conclusion
This case study demonstrates the impact of strategic decisions in DevOps practices. By switching to On-Demand AWS EC2 runners and optimizing scripts with the DRY approach, we were able to address performance, reliability, and cost issues effectively. This transformation not only streamlined the client's workflow but also equipped them with the knowledge and tools to maintain an efficient DevOps environment.