Accelerate

Jenkins X uses Capabilities identified by the "Accelerate: The Science Behind Devops"

Jenkins X is a reimagined CI/CD implementation for the Cloud which is heavily influence by the State of DevOps reports and more recently the book "Accelerate: The Science Behind Devops" by Nicole Forsgren, Jez Humble and Gene Kim

Years of gathering data from real world teams and organisations which has been analyzed by inspiring thought leaders and data scientists from the DevOps world, "Accelerate" recommends a number of capabilities that Jenkins X is implementing so users gain the scientifically proven benefits, out of the box. We’ve started documenting the capabilities that are available today and will continue as more become available.

Jenkins X Capabilities

Credit: thanks to tracymiranda for the image

Use version control for all artifacts

The Weaveworks folks coined the term GitOps which we love. Any change to an environment, whether it be a new application, version upgrade, resource limit change or simple application configuration should be raised as a Pull Request to Git, have checks run against it like a form of CI for environments and approved by a team that has control over what goes into the related environment. We can now enable governance and have full traceability for any change to an environment.

Related Accelerate capability: Use version control for all production artifacts

Automate your deployment process

Environments

Jenkins X will automatically create Git backed environments during installation and makes it easy to add new ones using jx create environment. Additionally when creating new applications via a quickstart (jx create quickstart), Java based SpringBoot (jx create spring) or importing existing applications (jx import), Jenkins X will both automatically add CI / CD pipelines and setup the jobs, git repos and webhooks to enable an automated deployment process.

Out of the box Jenkins X creates Staging and Production (this is customisable) permanent environments as well as temporary environments for preview applications from Pull Requests.

Previews Environments

We are trying to move as much testing, security, validation and experimentation for a change before it’s merged to master. With the use of temporary dynamically created Preview Environments any pull request can have a preview version built and deployed, including libraries that feed into a downstream deployable application. This means we can code review, test, collaborate better with all teams that are involved in agreeing that change can go live.

Ultimately Jenkins X wants to provide a way that developers, testers, designers and product managers can be as sure as they can that when a change is merged to master it works as expected. We want to be confident the proposed change does not negatively affect any service or feature as well as deliver the value it is intended to.

Where Preview Environments get really interesting is when we are able to progress a PR through various stages of maturity and confidence where we begin to direct a percentage of real production traffic like beta users to it. We can then analyse the value of the proposed change and possible run multiple automated experiments over time using Hypothesis Driven Development. This helps give us better understanding of how the change will perform when released to all users.

Related Accelerate capability: Foster and enable team experimentation

Using preview environments is a great way to introduce better test automation. While Jenkins X enables this we don’t yet have examples of automated tests being run against a preview environment. A simple test would be to ensure the application starts ok and Kubernetes liveness check pass for an amount of time. This relates to

Related Accelerate capability: Implement Test Automation Related Accelerate capability: Automate your deployment process

Permanent Environments

In software development we’re used to working with multiple environments in the lead up to a change being promoted to a live production environment. Whilst this seems business as usual it can cause significant delays to other changes if for any reason that it is deemed not fit via some process that didn’t happen pre merge to master. Subsequent commits then become blocked and can cause delay of urgent changes being promoted to production.

As above Jenkins X wants any changes and experiments to be validated before it is merged to master. We would like changes in a staging environment to be held there for a short amount of time before being promoted, ideally in an automated fashion.

The default Jenkins X pipelines provide deployment automation via environments. These are customisable to suite your own CI / CD pipeline requirements.

Jenkins X recommends Staging should act as a near as possible reflection on production, ideally with real production data shadowed to it using a service mesh to understand the behaviour. This also helps when developing changes in preview where we can link to non production services in staging.

Related Accelerate capability: Automate your deployment process

Use trunk-based development

The Accelerate book found that teams which use trunk based development with short lived branches performed better. This has always worked for the Jenkins X core team members so this was an easy capability for Jenkins X to implement when setting up Git repositories and CI/CD jobs.

Implement Continuous Integration

Jenkins X sees CI as the effort of validating a proposed change via pull requests before it is merged to controller. Jenkins X will automatically configure source code repositories, Jenkins and Kubernetes to provide Continuous Integration of the box.

Implement Continuous Delivery

Jenkins X sees CD as the effort of taking that change after it’s been merged to controller through to running in a live environment. Jenkins X automates many parts in a release pipeline:

Jenkins X advocates the use of semantic versioning. We use git tags to calculate the next release version which means we don’t need to store the latest release version in the controller branch. Where release systems do store the last or next version in Git repos it means CD becomes hard, as a commit in a release pipeline back to controller triggers a new release. This results in a recursive release trigger. Using a Git tag helps avoid this situation which Jenkins X completely automates.

Jenkins X will automatically create a released version on every merge to master which can then potentially progress through to production.

Use loosely coupled architecture

By targeting Kubernetes users of Jenkins X can take advantage of many of the cloud features that help design and develop loosely coupled solutions. Service discovery, fault tolerance, scalability, health checks, rolling upgrades, container scheduling and orchestration to name just a few examples of where Kubernetes helps.

Architect for empowered teams

Jenkins X aims to help polyglot application developers. Right now Jenkins X has quickstarts and automated CI/CD setup with language detection for Golang, Java, NodeJS, .Net, React, Angular, Rust, Swift and more to come. What this also does is provide a consistent Way of Working so developers can concentrate on developing.

Jenkins X also provides many addons, for example Grafana and Prometheus for automated metrics collection and visualisation. In this example centralised metrics help understand how your applications behave when built and deployed on Kubernetes.

DevPods are another feature which enables developers to edit source code in their local IDE, behind the scenes it is then synced to the cloud and rapidly built and redeployed.

Jenkins X believes providing developers automation that helps them experiment in the cloud, with different technologies and feedback empowers them to make the best decisions - faster.

Fancy a closer look?

Myself, James Strachan and Rob Davies are going to be presenting and running workshops at DevOps World | Jenkins World. We’ll also be hanging out at the Jenkins X demo area so come and say hello and see what’s the latest cool and exiting things to come out of Jenkins X. Use JWFOSS for 30% discount off registration

Want to get involved?

Jenkins X is open source, the community mainly hangs out in the Jenkins X Kubernetes slack channels and for tips on being more involved with Jenkins X take a look at our contributing docs. We’ve been helping lots of folks get into open source, learn new technoligies and languages like golang. Why not get involved?

Demo

If you’ve not already seen it here’s a video showing a spring boot quickstart with automatic CI/CD pipelines and preview environments.

About the Author
James Rawlings

James has a passion for continuous delivery and software automation in general. Continually looking at ways to help improve developers experience for the cloud. James works on the OSS project Jenkins X