Skip to content

Latest commit

 

History

History
 
 

Jenkins-Pipeline

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

K8S, Jenkins and StickerStore app deployment

The purpose of this challenge is to build and deploy a application to a Kubernetes cluster

In this challenge we will:

  1. Install a Jenkins from Helm Chart
  2. Build the images from GitHub repo.
  3. Push the images to Docker Hub.
  4. Execute YAML deployment files in the K8S cluster from the Jenkins pipeline.

Installation

CI Setup

  • fork git repo https://github.com/torosent/stickerstore.git

  • Create a new "Freestyle Project"

image

image

  • Create a build step "Docker Build and Publish"
  • Enter the repo name and tag

image

  • Add your Docker Hub credentials by clicking on "Add" in "Registry Credentials

image

  • Modify the "Build Context" in the "Advanced" section to the relevant service folder.
  • Modify the "Dockerfile path" in the "Advanced" section to the relevant service folder dockerfile. For example: "Dockerfile"

image

  • Add more "Build steps" for each service. You can test is by clicking "Build Now" and checking the Jenkins console for the result.  

Deploy to K8S

  • Add "Build step" - > "Azure Container Service"

image

  • Add "Azure Credentials" (Service Principal)

image

  • Select your K8S container service.
  • Add your K8S SSH private key

image

  • Define the service YAML file. You can include multiple YAML files in the "Config Files" section

image

  • Check the K8S cluster