Background: Donald Morton was hired by Graylog in early 2020 and was given charge of their Jenkins installation. Graylog is a log management software company that centrally captures, stores, and enables real-time search and log analysis against machine data from any component in IT infrastructure and applications. The infrastructure was well designed, but it also hadn't been changed in about four years, so it was time for an upgrade.
Goals: More flexibility and power in our snapshot and release builds. Specifically, the goals were:
Solution & Results: We started out writing a Terraform module to spin up infrastructure and an Ansible playbook for installing software on the machines. Jenkins itself runs off of a Docker image. The configuration of Jenkins is handled through the JCasC plugin.
Jenkins' flexibility is its real power. When you have complex needs like we do, you need something that can handle anything you can throw at it.
The freestyle jobs were rewritten in Groovy as declarative pipelines. We set up the Github Branch Source plugin, allowing Jenkins to auto-create jobs. We store the Groovy for the pipelines in git, allowing us to back out changes to jobs if something goes wrong. We did this because Declarative pipelines allow us to split our builds up into multiple stages and we have a shared library so that all our repos could take advantage of the same pipeline logic.
We just rebuild the Docker image, and it automatically updates Jenkins to the latest LTS and updates all plugins to the latest versions. It only takes a few minutes. The configuration of Jenkins itself is done through a single YAML file.
Capabilities we used:
Results so far:
Want the full story, visit Donald Morton'sGraylog Case Study.