Category: Jenkins X

  • Jenkins X Calls to Simplified Telephony Solutions

    Jenkins X Calls to Simplified Telephony Solutions

    Ask your industry colleagues what Jenkins X might be and you may get different answers. Is it a plane, train or automobile? Is it Jenkins++? Is it the beloved Jenkins Butler on steroids?

    If you’re a developer, you know Jenkins and now Jenkins X is perhaps one of the most important emerging technologies for building cloud native applications on Kubernetes. Developers who’ve tested and deployed Jenkins X find the benefits of using the technology for their continuous integration (CI) and continuous delivery (CD) infrastructure invaluable.

    Matthew LebrasseurMatthew Lebrasseur, vice president, information technology for Simplified Telephony Solutions Inc. in Toronto says his experience using Jenkins to build an agile software delivery pipeline will lead to the full deployment of Jenkins X.

    Like many leaders who’ve burned their fingers trying different tools for CI/CD, Lebrasseur had struggles with the software development process using a variety of tools such as Spinnaker, Drone and Terraform. Although some of these CI/CD tools were easy to implement and use, they lacked many basic features.

    These tools might have worked for a single project, but Lebrasseur said his team had to work on multiple projects, languages and pipelines. The projects weren’t getting anywhere with the barebones functionality these tools offered. All this changed when Lebrasseur decided to bring Jenkins into the picture.

    Jenkins was highly impactful in automating the entire software delivery process and expediting deliveries for his organization. Lebrasseur has never been averse to taking risks and choosing the right CI/CD tools for his business is no exception. In fact, it’s part of the company DNA.

    “In the technology world, you have to be nimble to adapt quickly to the changing realities and make the most of what technology has to offer. Taking risks is a big part of this exercise,” he said. Lebrasseur’s team grew quickly from just three to 16 engineers and with that staff came the expectation to move and innovate faster and take risks that translate into competitive advantage.

    Simplified Telephony Solutions spent just two-days converting all of its pipelines from Jenkins to Jenkins X.

    As an example, Lebrasseur said his team took only two weeks to transition from Nomad to Kubernetes and had used the same for three years when Jenkins X became an attractive option.

    While Jenkins gives tremendous flexibility to developers in configuring their CI/CD environment with plugins of their choice, the abundance of plugins can overwhelm small teams working under strict deadlines. Jenkins X makes it easier for such teams to leverage the power of Jenkins with several powerful single line commands and a higher degree of automation.

    Lebrasseur noted that he’s followed the Jenkins X project from the very beginning, but could only opt for it when it started offering support for BitBucket. As a result, Simplified Telephony Solutions spent just two-days converting all of its pipelines from Jenkins to Jenkins X.

    “We converted clusters…just abandoned ship on everything else and just streamlined our pipelines for every project,” Lebrasseur said. “Everything’s the same.”

    While the most significant advantage with Jenkins X had been the ease of usage and its ability to automatically create CI/CD pipelines for all kinds of languages and projects, one can’t forget GitOps. Labrasseur pointed out GitOps and the “ability to recover an entire cluster” within seconds with full history and traceability using a simple rollback.

    Jenkins X had Lebrasseur at GitOps.

    Additional resources

     

  • Under the Hood of Jenkins X – A CI/CD Solution for Cloud Applications on Kubernetes

    Under the Hood of Jenkins X – A CI/CD Solution for Cloud Applications on Kubernetes

    Motivation

    First, we articulated the business value that Jenkins X in automating Continuous Everything for Kubernetes. We encourage you to read it first.

    If you recall, Jenkins X as an automated CI/CD solution for cloud applications on Kubernetes. Jenkins X automates the installation, configuration, and upgrades of tools, so that users can learn at their own pace. This vastly simplifies the user experience, since users don’t have to stomach all the various pieces on Day One, and can learn at their own pace.

    With the built-in automation, teams can focus on releasing quality and secure software frequently and predictably to customers, without worrying about the shipping logistics. At CloudBees, we think it will be easier for our users if we tease things apart even before you start wondering what’s under the hood. This blog provides a quick overview on some of those “undercover agents,” including Jenkins itself, so that you can seamlessly continue on your journey in the continuous paradigm!

    Jx

    Jenkins X introduces the jx command line – a single command to rule them all.

    You can either:

    • Install the “jx” binary on your local machine, or
    • Use the Google Cloud shell. The shell comes with most of the tools that you will need like Git, gcloud, kubectl, etc.

    Some examples of using jx are:

    • “jx create cluster gke “ creates a new Kubernetes cluster on Google Cloud
    • “jx create quickstart” creates a new app and imports the generated code into Git and Jenkins for CI/CD
    • “jx open jenkins” opens Jenkins in a browser
    • “jx sync” synchronises your local files to a devpod
    • “jx cloudbees” opens the CloudBees CD for Kubernetes app in a browser
    • etc.

    You can type “jx help” to find the various operations you can perform in Jenkins X.

    Helm

    Find details here.

    Helm charts:

    • Manage Kubernetes applications in a predictable and repeatable fashion, which means, they:
      • Define the app
      • Install the app
      • Upgrade the app
    • Are versioned in source control, and hence can be audited
    • Are easy to create and publish, and hence reduce communication overhead
    • Make rollbacks to the last known good version stress-free (and drama-free)

    In our modest example, Jenkins X creates the following Helm chart asset(s) in Git:

    ChartMuseum

    Find details here.

    Let’s understand the basics of a chart repository first.

    A chart repository is:

    • An HTTP server that houses an index.yaml file and optionally some packaged charts
    • A location where packaged charts can be stored and shared

    ChartMuseum:

    Skaffold

    Find details here.

    Skaffold is a command line tool that:

    • Facilitates CD for Kubernetes applications
    • You can iterate on your application source code locally then deploy to local or remote Kubernetes clusters
    • Handles the workflow for building, pushing and deploying your application, and leverages that workflow in an automated pipeline to promote applications from test to staging to production.

    Jenkins X creates the following build and deploy workflow yaml using Skaffold:

    Jenkins

    Find details here.

    Jenkins is an open source automation tool that:

    • Is a self-contained Java-based program that can be used as a simple CI server or turned into a continuous delivery hub
    • Has a plugin ecosystem to support building, testing, and deploying any project
    • Requires Jenkinsfile that supports pipeline-as-code syntax/DSL in two formats:
      • Declarative syntax (recommended)
      • Scripted syntax

    Jenkins X creates the following pipeline to promote through various stages:

    Docker

    Find details here.

    Docker:

    • Standardizes and automates the way we build, manage, and secure applications using containers
    • Creates true independence between applications and infrastructure
    • Creates a model for better collaboration and innovation between developers, QA, release, operations and security professionals

    Jenkins X creates the following image for the containerized application:

    Kubernetes

    Find details here.

    Kubernetes runs production workloads at Google, which translates to running billions of containers per week

    Among many other things, Kubernetes:

    • Automates deployment, scaling, and management of containerized apps
    • Groups containers that make up an application into logical units for easy management and discovery
    • Gives you freedom to take advantage of on-premise, hybrid, or public cloud infrastructure, letting you effortlessly migrate workloads
    • Restarts containers that fail
    • Replaces and reschedules containers when nodes die
    • Kills containers that don’t respond to health checks
    • Scales your application up and down:
      • Automatically based on CPU usage or
      • Manually with a command or a UI

    Ksync

    Find details here.

    Ksync:

    • Syncs files between our local file system and a Kubernetes cluster.
    • Transparently updates containers running on the cluster from your local checkout.
    • Enables developers to use their favorite IDEs to work from inside a cluster instead of from outside it. There is no reason to wait minutes to test code changes when you can see the results in seconds.

    “jx sync” within Jenkins X allows us to sync files between our local lie system to the devpods on the Kubernetes cluster. This prevents typical problems like “works on my machine!” from slowing down business, even when everyone knows there are problems in production.

    Prow

    Find details here.

    Prow is the system that handles GitHub events and commands for Kubernetes. It hails from the Kubernetes ecosystem and was created at Google. It is an event based solution that provides a loosely coupled architecture ideal for the cloud native world. It leverages ChatOps to interact with a build system. Prow manages its job configuration in Git. So, in the event of a wipeout, pipelines can be restored.

    Prow includes a scalable and highly available webhook event handler that writes ProwJob CRDs to Kubernetes based on git events, so that other microservices can perform operations like running CI/CD pipelines. These git events can be triggered by new PRs and issues, comments, merges and pushes.

    Jenkins X includes Prow out of the box when creating clusters on GKE (Google Kubernetes Engine) with Terraform using “jx create terraform” or when using the feature flag on “jx create cluster gke —prow” or “jx install —prow” commands. Prow, along with Knative build, makes serverless Jenkins possible that addresses problems originating from static Jenkins masters.

    Knative Build

    Find details here.

    Knative Build is a cloud native solution that extends Kubernetes with CRDs and provides ways to build applications from source. Teams can chain steps that run sequentially in the same Kubernetes pod using different containers where they can share state between each step.

    Build templates are Kubernetes CRDs and are automatically upgraded with each Jenkins X release. The Prow configuration that is generated by Jenkins X when creating or importing applications refers to a build template. Knative build, along with Prow, makes serverless Jenkins possible that addresses problems originating from static Jenkins masters.

    Teams can leverage build templates to reference the type of Kubernetes pod that is created to run builds. These templates allow teams to specify which docker image to execute your build in, what environment variables exist at build time, what service accounts and secrets are in play and what volumes should be mounted.

    Cloud

    For those of us who have tinkered with Kubernetes, we know it is difficult to setup and manage. Jenkins X alleviates that pain and leverages the managed Kubernetes solutions offered by major cloud providers, like:

    • Google Cloud (GKE)
    • Amazon Web Services (EKS)
    • Microsoft Azure (AKS)
    • Oracle Cloud (OKE)
    • etc.

    Let’s take the example of Google cloud. The Google cloud sdk provides the command-line interface for Google Cloud Platform products and services, like:

    • Gcloud, which manages authentications, local configurations, developer workflow, and interactions
    • Kubectl, which orchestrates the deployment and management of Kubernetes container clusters on gcloud
    • etc.

    Summary

    Jenkins X automates CI/CD for cloud applications on Kubernetes. So that engineers can focus on writing and testing products that wow the world, Jenkins X abstracts away a lot of the shipping logistics that would otherwise consume your time and energy.

    Jenkins X gets you started at the speed of light, however, the onus lies on you to gradually and eventually catch up to these underlying details. While we are sure you are well on your way to design and implement resilient pipelines, we wanted to make sure you have these details at your fingertips.

    Pipeline is no longer a pipe dream – so, happy coding!

    Additional resources