Jenkins configuration using command line

4/17/2019

I am trying to move the complete eco-system of our SAAS product to Kubernetes (and use Docker containers).

I am supposed to give a bash script which will set up everything. Only manual intervention should be setting up the Kubernetes cluster and mounting Persistent Volumes.

We were using Jenkins for code deployment and cron jobs. I am able to create the Jenkins service but I can not find ways to configure it using the command line. Tried finding ways online but can not find any good documentation.

-- Aayush Anand
jenkins
kubernetes

3 Answers

4/19/2019

I can add that you can store Jenkins home folder as well as plugins and artifacts folder on persistent volume and mount that volume to Jenkins pod as a part of Helm installation. You can also make daily snapshots/backups of Jenkins disk. In this way Jenkins deployment becomes very smooth, quick and reliable.

-- Vasily Angapov
Source: StackOverflow

4/17/2019

You can use helm package manager and simply install the Jenkin stable version.

Before using helm you have to setup tiller on kubernetes cluster.

$ helm install --name my-release stable/jenkins

here stable version of jenkin using helm.

https://github.com/helm/charts/tree/master/stable/jenkins

-- Harsh Manvar
Source: StackOverflow

4/17/2019

First welcome to kubernetes, second, there are a lot of tools, templates over there, I would recommend you to check what is Helm

This is the Jenkins chart if you want to check: https://github.com/helm/charts/tree/master/stable/jenkins

There is also a "fork" of jenkins for containerized environments, that I like, you can check more about Jenkins-X here

-- gonzalesraul
Source: StackOverflow