logo logo

Install & Setup Jenkins X Serverless

TestProject - Install & Setup Jenkins X Serverless

In this step by step tutorial we are going to build a CI/CD solution for a modern cloud application based on microservices with Jenkins X. By the end of this tutorial, we will have a working CI/CD solution that will enable us to develop, test and deliver our application in a fast and reliable way.

Tutorial Chapters

  1. Continuous Deployment with Kubernetes and Jenkins X (Overview)
  2. Jenkins X Serveless Architecture (Chapter 1)
  3. You’re here → Install & Setup Jenkins X Serverless (Chapter 2)
  4. Import Existing Project into Jenkins X (Chapter 3)
  5. Create Custom Build Pack for Jenkins X (Chapter 4)
  6. Integration Testing in Jenkins X (Chapter 5)

In this chapter, we will install Jenkins X and use google cloud as our cloud provider, but the installation process is very similar to other clouds.

Prerequisites

  1. Google cloud account (if you don’t already have one, you can create one here).
  2. Github account (if you don’t already have one, you can create one here).

Install Jenkins X on Google Kubernetes Engine (GKE)

  1. Log into your Google cloud account.
  2. Go to your console (console button at the right upper corner).
  3. Go to your cloud shell ([>_] button on the upper blue bar right side).
  4. Run the following commands to install jx:
    mkdir -p ~/.jx/bin
    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 -C ~/.jx/bin
    export PATH=$PATH:~/.jx/bin
    echo 'export PATH=$PATH:~/.jx/bin' >> ~/.bashrc
  5. Run the following command to:
    • Deploy a fresh Kubernetes cluster configured for Jenkins X.
    • Deploy serverless Jenkins X components.
      jx create cluster gke --skip-login --git-public
  6. Now you will be asked a series of questions that will configure the installation:
    1. What project to associate your cluster with. Choose My First Project if you are a new google cloud user, or else choose the one you want.
    2. Where to deploy your cluster, geographical region. Choose the one closest to you.
    3. Machine type, if you’re not experienced just go with the default value.
    4. Number of nodes to deploy, same as above you can go with the default values.
    5. The kind of Jenkins X deployment you want, choose Serverless Jenkins X with Tekton Pipelines.
    6. You will be asked if you want to create a load balancer, agree to that, or else you will not be able to work.
    7. You will be asked if you want to use nip.io as your magic DNS, agree to that.
    8. Don’t forget the installation will create several repositories in your Github account and will ask for admin permissions, we strongly advise to create a fresh account for the purpose of the tutorial. You will be asked all sorts of questions about your Github account, answer accordingly, don’t use your email as the account name, this can make problems in later stages, use the nickname you chose for the account.
    9. The installation will start and when it is done, you will be presented with some useful links and the password for your Jenkins X related services, don’t forget to save it somewhere for future use.

That’s it! You are ready to start 💪

In the next chapter we will learn how to import an existing project into Jenkins X.
Let’s go 👉 Chapter 3!

 

About the author

Alexander Nikitin

Experienced DevOps engineer with vast knowledge in automation and network systems. Working as a DevOps Engineer at TestProject.

Leave a Reply

FacebookLinkedInTwitterEmail