Giter VIP home page Giter VIP logo

jenkins-pipeline-kubernetes's Introduction

CI/CD to Kubernetes using Jenkins and Helm

This project is an example of a complete CI/CD pipeline of a simple static web application from sources to deployed Kubernetes pods.

Artifactory as Docker registry

This project uses Artifactory as its Docker registry. You can get a free trial and try it out!

Follow the documentation for setting up your Docker registry.

Artifactory as Helm repository

This project uses Artifactory as its Helm repository. You can get a free trial and try it out!

Follow the documentation for setting up your Helm repository.

Jenkins

Setup a Jenkins running with

  • Docker. Can build and push images
  • Kubectl. Kubernetes CLI that will link Jenkins with the Kubernetes cluster
  • Helm. Kubernetes package manager to simplify deployment of your Docker containers to Kubernetes

There is a GitHub example of such a Docker image, to be used in Kubernetes.

Jenkins in Kubernetes

Jenkins running in Kubernetes can be found in this GitHub example.

  • This project is used to build a Jenkins master that has the required tools (docker, kubectl and helm) already installed
  • You can deploy this Jenkins to Kubernetes using the helm chart in the same repository
  • Notice that this is an example, and should not be used for production

General notes

  • The Jenkins pipeline example (Jenkinsfile) is using calls to external cli tools such as docker, kubectl, curl and other shell commands. Some of these can be replaced with groovy code and functions or built in pipeline steps, but are implemented like this to demonstrate the simple use of these tools.
  • The kubectl and helm clients are not configured in this example. It's assumed the Jenkins instance is pre-configured, or run it in your Kubernetes cluster, where it picks up the local pod credentials to access the Kubernetes API.

Build the web application

You can build the web application directly by running build.sh. You can create the Docker image and run it locally. See the build.sh options.

# See options
$ ./build.sh --help

You can also pack and push the Docker image and Helm chart.

jenkins-pipeline-kubernetes's People

Contributors

eldada avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.