CI/CD for Microservices Using Jenkins and Kubernetes

Run a Kubernetes Cluster

For simplicity we ll run a singlenode cluster named minikube on windows platform using virtualbox

Install Virtualbox

Download Virtualbox from the following URL or the latest from virtualbox.org

https://download.virtualbox.org/virtualbox/5.2.12/VirtualBox-5.2.12-122591-Win.exe

Install on your windows machine. i.e laptop or desktop.

Download Minikube from here

https://storage.googleapis.com/minikube/releases/v0.27.0/minikube-windows-amd64.exe

Save it to the following directory

D:\blog-microservices\bin

Rename the executable as minikube.exe

Download the kubernates CLI “kubectl” from the following URL

https://storage.googleapis.com/kubernetes-release/release/v1.10.3/bin/windows/amd64/kubectl.exe

Save the file kubectl.exe to D:\blog-microservices\bin

Download “Helm” for windows,helm is the package manager for Kubernetes and managed by CNCF (https://www.cncf.io/projects/) and save it to D:\blog-microservices\bin directory.

https://storage.googleapis.com/kubernetes-helm/helm-v2.9.1-windows-amd64.zip

Add the directory D:\blog-microservices\bin to the system path as follows

Start Minikube

Open command prompt and enter the following command

D:\blog-microservices>minikube start (if you have 8 GB of total memory in your laptop or dektop)

D:\blog-microservices>minikube start –memeoy 8192 –cpus 2 (if you have 16GB of main memory in your laptop or desktop)

Test Minikube by executing the following commands

D:\blog-microservices>minikube status

or D:\blog-microservices>kubectl get cs (cluster status)

D:\blog-microservices>minikube dashboard (to see default kubernates dashboard)

Now you can execute the kubernetes CLI kubectl,go ahead and test the CLI

D:\blog-microservices>kubectl get nodes

Install Jenkins on Kubernetes

Create persistent volume for the Jenkins master

Install Sping IDE for java Springboot App

download the IDE from here https://spring.io/tools/sts

http://download.springsource.com/release/STS/3.9.4.RELEASE/dist/e4.7/spring-tool-suite-3.9.4.RELEASE-e4.7.3a-win32.zip

For installing Jenkins on your laptop or Desktop please visit my YouTube channel for CI/CD.

I ll post next part of this Blog tomorrow.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s