Skip to main content

Posts

Showing posts with the label Jenkins

Install Jenkins on AWS EKS using Helm

Prerequisites Create namespace for jenkins kubectl create ns jenkins We'll store jenkins data on AWS EBS as persistent storage hence for that Create storage class apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: jenkins-sc provisioner: kubernetes.io/aws-ebs parameters: type: gp2 fsType: ext4 Create persistent volume claim apiVersion: v1 kind: PersistentVolumeClaim metadata: name: jenkins-pvc namespace: devops-tools spec: storageClassName: jenkins-sc resources: requests: storage: 50Gi accessModes: - ReadWriteOnce ...

Send Jenkins Parameters to Spinnaker

Prerequisite Jenkins Installation - Refer my blog for Jenkins installation on AWS EKS using Helm Spinnaker Installation - Refer their official website for installation document https://www.spinnaker.io/setup/ Jenkins-Spinnaker Integration - Refer my blog for integration setup between Jenkins and Spinnaker Use-case example Using Spinnaker we're deploying application to kubernetes cluster. For this, we've written kubernetes manifests file in spinnaker pipeline stages with namespace and version of the application as variables. These values we might want from Jenkins for, namespace will be replaced by branch name of jenkins running the build and version will be replaced by version populated while running the build. Example of such kubernetes manifest file apiVersion: apps/v1beta1 kind: Deployment metadata: name: petclinic n...

Jenkins-Spinnaker Integrations

How to trigger spinnaker CD pipeline from Jenkins CI pipeline For this setup all configurations we would do using spinnaker halyard CLI Enable Jenkins Master hal config ci jenkins enable Add Jenkins Master with any required name to Jenkins master list. Here I've used name "my-jenkins-master" While running this command keep jenkins admin user token handy which is required to authentication echo $APIKEY | hal config ci jenkins master add my-jenkins-master \ --address $BASEURL \ --username $USERNAME \ --password # api key will be read from STDIN to avoid appearing # in your .bash_history To app...

Show Jenkins Build Metrics on Grafana Using InfluxDB

Install InfluxDB - Here's the link for how to install influxdb on AWS EKS - https://devopsautomationblogs.blogspot.com/2020/04/install-influxdb-on-aws-eks-using-helm.html Configure InfluxDB for jenkins build metrics collection Go inside the influxdb pod and Run below 2 commands kubectl exec -it -n influxdb influxdbPodName /bin/bash influx # open influx database CREATE DATABASE jenkins_db # create jenkins database CREATE USER jenkins WITH PASSWORD 'admin' WITH ALL PRIVILEGES # create jenkins username Install Grafana - Here's the link for how to install influxdb on AWS EKS - https://devopsautomati...