简体   繁体   中英

Jenkins configuration using command line

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.

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

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM