Background: Preply is a global online language learning solution that enables over 100,000 students worldwide to interact with instructors while learning new languages directly from their computers. To support this global online platform, Preply was determined to create an 'Everything as a Code' paradigm. That meant ensuring Jenkins code was fully reproducible across its infrastructure, configuration, monitoring, jobs, and plugins.
Goals: Our goal was to create a fully automated CI/CD process for all projects inside our company. No manual intervention, only configuration as a code.
Solution & Results: We use AWS and manage all our infrastructure using Terraform and tools from HashiStack, like Packer and Vault. For that, we rely on AWS resources, like EC2 instances, SSL certificates, Load Balancers, CloudFront distributions, etc. AMI is built by Packer, which integrates perfectly with Terraform and Vault. We've had issues with upgrading Jenkins' plugins before, so the main point here was to pin versions for them.
This is where Docker helps us. We use the pre-built Jenkins image as a base image for our setup. Then we employ the Jenkins Configuration as Code (JCasC) plugin for storing configuration in a human-readable text format. This plugin allows us to describe security configurations, credentials, plugin settings, nodes, views and more. Jenkins Job Builder (JJB) allows us to configure jobs in a human-readable text format (YAML or JSON). It's quite comfortable to manage jobs with SCM.
Jenkins made our development easier. Every engineer could make any changes in any pipeline through the Pull Request. No manual changes, only code!
Now we can set up a CI/CD process using JJB. That's made our development easier. Every engineer can make any changes in any pipeline through the Pull Request. No manual changes, only code! With this implementation, we have: