What is Jenkins X and how is it Different from Jenkins?

Vardhan NS
Edureka
Published in
6 min readDec 16, 2019

Jenkins is one of the most famous Continuous Integration tools and an integral part of DevOps that is often used to integrate various DevOps stages. Following the success of Jenkins, a new version of Jenkins has been introduced lately called Jenkins X (JX). It provides continuous integration, automated testing, and continuous delivery to Kubernetes. Through this article, I am going to provide you a complete insight into Jenkins X and the topics that we are going to cover are as follows:

  • What is Jenkins X?
  • Jenkins Vs Jenkins X
  • Features of Jenkins X
  • How Jenkins X works?
  • Installing Jenkins X

So let us begin with our first topic.

What is Jenkins X?

Jenkins X was first introduced by James Strachan (creator of Groovy, Apache Camel) in March 2018. It’s designed from the ground up to be a cloud-native, Kubernetes-only application that not only supports CI/CD but also makes working with Kubernetes as simple as possible. With one command you can create a Kubernetes cluster, install all the tools you’ll need to manage your application. You can also create build and deployment pipelines, and deploy your application to various environments.

Jenkins is described as an extensible automation server that is configured, via plugins, to be a Continuous Integration Server, a Continuous Deployment hub, or a tool to automate just about any software task. JX provides a specific configuration of Jenkins, meaning you don’t need to know which plugins are required to stand up a CI/CD pipeline. It also deploys numerous applications to Kubernetes to support building your docker container, storing the container in a docker registry, and deploying it to Kubernetes.

Jenkins Vs Jenkins X

Features of Jenkins X

Automated CI /CD:

Jenkins X offers a sleek jx command-line tool, which allows Jenkins X to be installed inside an existing or new Kubernetes cluster, import projects, and bootstrap new applications. Additionally, Jenkins X creates pipelines for the project automatically.

Environment Promotion via GitOps:

Jenkins X allows for the creation of different virtual environments for development, staging, and production, etc. using the Kubernetes Namespaces. Every environment gets its specific configuration, list of versioned applications and configurations stored in the Git repository. You can automatically promote new versions of applications between these environments if you follow GitOps practices. Moreover, you can also promote code from one environment to another manually and change or configure new environments as needed.

Extensions:

It is quite possible to create extensions to Jenkins X. An extension is nothing but a code that runs at specific times in the CI/CD process. You can also provide code through an extension that runs when the extension is installed, uninstalled, as well as before and after each pipeline.

Serverless Jenkins:

Instead of running the Jenkins web application, which continually consumes a lot of CPU and memory resources, you can run Jenkins only when you need it. During the past year, the Jenkins community has created a version of Jenkins that can run classic Jenkins pipelines via the command line with the configuration defined by code instead of the usual HTML forms.

Preview Environments:

Though the preview environment can be created manually, Jenkins X automatically creates Preview Environments for each pull request. This provides a chance to see the effect of changes before merging them. Also, Jenkins X adds a comment to the Pull Request with a link for the preview for team members.

How Jenkins X works?

  1. The developer commits and pushes the change to the project’s Git repository.
  2. JX is notified and runs the project’s pipeline in a Docker image. This includes the project’s language and supporting frameworks.
  3. The project pipeline builds, tests, and pushes the project’s Helm chart to Chart Museum and its Docker image to the registry.
  4. The project pipeline creates a PR with changes needed to add the project to the staging environment.
  5. Jenkins X automatically merges the PR to Master.
  6. Jenkins X is notified and runs the staging pipeline.
  7. The staging pipeline runs Helm, which deploys the environment, pulling Helm charts from Chart Museum and Docker images from the Docker registry. Kubernetes creates the project’s resources, typically a pod, service, and ingress.

Now that you about the architecture of Jenkins X, let us see how to install Jenkins X.

Installation of Jenkins X

In this section, I will show you how to install Jenkins X on Linux and Windows operating systems.

1. Linux

To install JX on Linux, download the.tarfile, and unarchive it in a directory where you can run the jx command.

  1. Download thejxbinary archive usingcurland pipe (|) the compressed archive to thetarcommand:
curl -L "https://github.com/jenkins-x/jx/releases/download/$(curl --silent https://api.github.com/repos/jenkins-x/jx/releases/latest | jq -r '.tag_name')/jx-linux-amd64.tar.gz" | tar xzv "jx"

or, if you don’t have jq installed:

curl -L "https://github.com/jenkins-x/jx/releases/download/$(curl --silent "https://github.com/jenkins-x/jx/releases/latest" | sed 's#.*tag/(.*)\".*#1#')/jx-linux-amd64.tar.gz" | tar xzv "jx"

2. Install thejxbinary by moving it to a location in your executable path using themvcommand:

3. Runjx --versionto make sure you're on the latest stable version

2. Windows

You can install it on Windows through Chocolatey. This is a third-party package management system that provides convenient one-step commands for local Jenkins X installations and upgrades.

Install the Chocolatey package management system using an Administrative Shell:

  1. Right-click menu: Start[Command Prompt (Admin)].
  2. At the shell prompt, execute a powershell.exethe command to download and install the choco binary and set the installation path so that the binary can be executed:
@"%SystemRoot%System32WindowsPowerShellv1.0powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object 
System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%chocolateybin"

3. Install JX using Chocolatey:

choco install jenkins-x

You can update to the latest version of Jenkins X using Chocolatey:

choco upgrade jenkins-x

  • If you use scoop, then there is a manifest available.

— To install the jx binary run:

scoop install jx

— To upgrade the jx binary run:

scoop update jx

So that was all about the installation process.

If you wish to check out more articles on the market’s most trending technologies like Artificial Intelligence, Python, Ethical Hacking, then you can refer to Edureka’s official site.

Do look out for other articles in this series which will explain the various other aspects of DevOps.

1. DevOps Tutorial

2. Git Tutorial

3. Jenkins Tutorial

4. Docker Tutorial

5. Ansible Tutorial

6. Puppet Tutorial

7. Chef Tutorial

8. Nagios Tutorial

9. How To Orchestrate DevOps Tools?

10. Continuous Delivery

11. Continuous Integration

12. Continuous Deployment

13. Continuous Delivery vs Continuous Deployment

14. CI CD Pipeline

15. Docker Compose

16. Docker Swarm

17. Docker Networking

18. Ansible Vault

19. Ansible Roles

20. Ansible for AWS

21. Jenkins Pipeline

22. Top Docker Commands

23. Git vs GitHub

24. Top Git Commands

25. DevOps Interview Questions

26. Who Is A DevOps Engineer?

27. DevOps Life cycle

28. Git Reflog

29. Ansible Provisioning

30. Top DevOps Skills That Organizations Are Looking For

30.Waterfall vs Agile

31. Jenkins CheatSheet

32. Ansible Cheat Sheet

33. Ansible Interview Questions And Answers

34. 50 Docker Interview Questions

35. Agile Methodology

36. Jenkins Interview Questions

37. Git Interview Questions

38. Maven For Building Java Applications

39. Linux commands Used In DevOps

40. Jenkins vs Bamboo

41.Nagios Tutorial

42. Nagios Interview Questions

43.DevOps Real-Time Scenarios

44.Difference between Jenkins and Jenkins X

45.Docker for Windows

46.Git vs Github

Originally published at https://www.edureka.co on December 16, 2019.

--

--