Migrating from Bitbucket to GitLab: Our Journey to a Faster, More Reliable CI/CD Pipeline
vinamra gupta
"DevOps Expert | 9 Years of Experience in Automation, CI/CD, Security, Kubernetes and Cloud Infrastructure
Introduction
In the fast-paced world of software development, having a reliable and efficient CI/CD platform is crucial for maintaining productivity and ensuring smooth deployments. After experiencing persistent issues with Bitbucket, including sluggish performance and frequent downtime, we decided it was time for a change. Our solution? Migrating to GitLab, a more robust and scalable platform that could meet our growing needs.
This blog will walk you through our migration journey, highlighting the challenges we faced with Bitbucket and how we successfully set up GitLab on EC2 instances, with all our runners and Sidekiq processes running on Amazon EKS. Additionally, we’ll discuss how we optimized our GitLab setup by storing artifacts on Amazon S3 and mounting EFS for repository data.
Why We Chose to Migrate from Bitbucket
Bitbucket served us well for a time, but as our team and project demands grew, we started noticing some critical drawbacks:
These challenges prompted us to seek a more reliable and scalable solution, and after careful consideration, we chose GitLab.
Setting Up GitLab on EC2 Instances with ALB Access
Our GitLab instance is hosted on multiple EC2 instances to ensure high availability and scalability. To manage traffic effectively, we utilized an Application Load Balancer (ALB) that directs incoming requests to the appropriate EC2 instance. This setup not only improves our system's fault tolerance but also ensures that our GitLab instance is always accessible, even during peak usage times.
Key steps in our setup:
Running GitLab Runners on EKS
To leverage the power of Kubernetes, we decided to run all our GitLab runners on Amazon EKS. This decision allowed us to:
领英推荐
Separating GitLab Sidekiq on EKS
We further optimized our GitLab setup by running Sidekiq, the background job processor for GitLab, separately on EKS. This separation allows us to:
Storing Artifacts on Amazon S3
To ensure that our artifacts are stored securely and can be accessed quickly, we decided to use Amazon S3 for artifact storage. The benefits include:
Mounting EFS for Repository Data
All of our repository data is stored on Amazon EFS, which is mounted across all our EC2 instances. This setup provides several advantages:
Conclusion
Migrating from Bitbucket to GitLab has been a game-changer for our team. The improved performance, reliability, and scalability of GitLab have enabled us to optimize our CI/CD pipeline and ensure that our development processes run smoothly. With GitLab running on EC2, supported by EKS for runners and Sidekiq, and backed by S3 and EFS for storage, we have built a robust infrastructure that can scale with our needs and support our team in delivering high-quality software efficiently.
Thanks to my teammates Milan Sharma and vibhor malhotra for helping me achieve this migration.
DevOps Engineer @Credflow | AWS | Azure | DevOps ?? | Jenkins | Docker | Kubernetes ??|
3 个月Nice blog, vinamra gupta
Kubernetes | Docker | Jenkins | Python | GitlabCI | AWS | Terraform | Grafana | Prometheus | InfluxDB
3 个月Impressive