All Projects → jfrogtraining → kubernetes_example

jfrogtraining / kubernetes_example

Licence: other
5-Step Kubernetes CI/CD Process using Artifactory & Helm

Programming Languages

groovy
2714 projects
java
68154 projects - #9 most used programming language
HTML
75241 projects
Dockerfile
14818 projects
Smarty
1635 projects
shell
77523 projects

Projects that are alternatives of or similar to kubernetes example

helmwave
🌊 Helmwave is the true release manager
Stars: ✭ 488 (+1294.29%)
Mutual labels:  helm
cog-helm
A Helm chart to deploy Cog on Kubernetes
Stars: ✭ 17 (-51.43%)
Mutual labels:  helm
kube-janitor
Kubernetes Job Cleaner
Stars: ✭ 37 (+5.71%)
Mutual labels:  helm
tacoplay
a set of playbooks to deploy taco, leveraging ironic, kubespray, rook-ceph, decapod (kustomize, argo-wf, argo-cd)
Stars: ✭ 34 (-2.86%)
Mutual labels:  helm
kube-test-container
Kubernetes Test Container
Stars: ✭ 27 (-22.86%)
Mutual labels:  helm
artifactory
Ansible role to install Artifactory, the Maven repository manager by JFrog.
Stars: ✭ 21 (-40%)
Mutual labels:  artifactory
artifact-resolver
Standalone jar executable client Maven 2 artifact resolver based on Eclipse Aether.
Stars: ✭ 13 (-62.86%)
Mutual labels:  artifactory
nifi
Helm nifi chart
Stars: ✭ 29 (-17.14%)
Mutual labels:  helm
NodeWrecker
Simple pod to run in kubernetes to stress test your nodes
Stars: ✭ 27 (-22.86%)
Mutual labels:  helm
helm-charts
Helm charts for Vector.
Stars: ✭ 50 (+42.86%)
Mutual labels:  helm
drone-helm3
Helm3 plugin for Drone CI
Stars: ✭ 20 (-42.86%)
Mutual labels:  helm
kube-tools-aws
A lightweight Docker image with various CLI tooling for working with Kubernetes.
Stars: ✭ 26 (-25.71%)
Mutual labels:  helm
tiller-multiarch
Helm Tiller images for amd64, arm64, and armhf. ⚓️🎉
Stars: ✭ 80 (+128.57%)
Mutual labels:  helm
matrix-chart
Helm chart for deploying a Matrix homeserver stack
Stars: ✭ 83 (+137.14%)
Mutual labels:  helm
ebook-continuous-delivery-with-kubernetes-and-jenkins
Continuous Delivery for Java Apps: Build a CD Pipeline Step by Step Using Kubernetes, Docker, Vagrant, Jenkins, Spring, Maven and Artifactory
Stars: ✭ 39 (+11.43%)
Mutual labels:  artifactory
jpetstore-kubernetes
Modernize and Extend: JPetStore on IBM Cloud Kubernetes Service
Stars: ✭ 21 (-40%)
Mutual labels:  helm
gcloud-kubectl-helm
Docker image for the quaternity of gcloud, helm, kubectl and SOPS
Stars: ✭ 32 (-8.57%)
Mutual labels:  helm
charts
Curated kubernetes helm charts with well-defined structures
Stars: ✭ 24 (-31.43%)
Mutual labels:  helm
gitops-helm-workshop
Progressive Delivery for Kubernetes with Flux, Helm, Linkerd and Flagger
Stars: ✭ 59 (+68.57%)
Mutual labels:  helm
bitops
Automate the provisioning and configuration of cloud infrastructure.
Stars: ✭ 28 (-20%)
Mutual labels:  helm

5 Step CI/CD In Kubernetes using Artifactory, Jenkins & Helm

Contents

Prerequisites

Setup Kubernetes Cluster on EKS

Follow this to setup kubernetes cluster on EKS. https://docs.aws.amazon.com/eks/latest/userguide/create-cluster.html

Setup Kubernetes Cluster on GKE

Follow this to setup kubernetes cluster on GKE. https://cloud.google.com/container-engine/docs/quickstart

Setup Kubernetes Cluster on AKS

Follow this to setup kubernetes cluster on AKS. https://docs.microsoft.com/en-us/azure/aks/tutorial-kubernetes-deploy-cluster

Install Artifactory on kubernetes

Here is documentation to install JFrog Artifactory on kubernetes artifactory-docker-examples
Here is link to official helm chart for Artifactory https://github.com/kubernetes/charts/tree/master/stable/artifactory

Note If you are using Artifactory SaaS you can skip this step.

Configure docker insecure registry in each node of kubernetes cluster if you are using self-signed certificate.

  • Get cluster ip of nginx services by running following command:

    kubectl get services nginx-kubernetes-service
    
  • Ssh into each node of cluster and configure insecure registry using steps provided here

    Note: configure range which include $CLUSTER_IP as insecure registry.

  • Add following entry in /etc/hosts file:

    $CLUSTER_IP     docker.artifactory docker-remote.artifactory docker-local.artifactory
    
  • Pull node docker image from artifactory by running following command:

    docker pull docker.artifactory/node
    

Install Jenkins on kubernetes

Use Helm Chart to install jenkins in kubernetes.
Note: Make sure to increase resources for Jenkins deployment in values.yaml file. Jenkins comes with the Kubernetes plugin..
Cache docker images of jenkins master and agent in Artifactory by changing value of Master.Image to docker.artifactory/jenkinsci/jenkins and Agent.Image to docker.artifactory/jenkinsci/jnlp-slave in values.yaml file.

Configuring Jenkins to build docker images:

  • From Jenkins home click on Manage Jenkins -> Configure System.
  • You will see section Cloud -> Kubernetes -> Images -> Volumes.
  • Click on Add Volume and add Host Path Volume with following mount path: configure_docker
  • ssh into each kubernetes node of your cluster and perform following:
    1. Create jenkins user.
    2. Add jenkins user to docker group.
    3. Make sure jenkins user can access /var/run/docker.sock and /usr/bin/docker in each kubernetes node.
    4. Create test job in Jenkins and run docker version command from test job.

5 Step CI/CD

Step 1. Create an application war file

  • Creates a sample application called ‘webservice-1.1.2.war’
  • Pushes it to a local repository in Artifactory
  • gradle-example

Step 2. Create a template Docker image

  • Creates a base Docker image called ‘docker-framework’ using Ubuntu + Java + Tomcat
  • Pushes it to a local repository in Artifactory
  • docker-framework

Step 3. Create a product Docker image

  • Downloads, from Artifactory, the ‘webservice-1.1.2.war’ file and the ‘docker-framework’ Docker image, that were created in the previous two pipelines
  • Creates a ‘docker-app’ production Docker image
  • Pushes it to Artifactory
  • Promotes it to a production repository in Artifactory
  • docker-app

Step 4. Create Helm chart of product Docker image

  • Create helm chart of docker-app
  • Push helm chart in local helm repository in Artifactory
  • chart

Step 5. Deploy docker-app in Kubernetes cluster using helm chart

  • Pull helm chart from Virtual helm repository of Artifactory
  • Deploy docker-app in Kubernetes using downloaded helm chart
  • deploy
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].