Added Jenkins Chart

This commit is contained in:
jdrios
2016-08-11 17:27:28 +02:00
parent 7ccd064603
commit b7b9199da9
8 changed files with 234 additions and 0 deletions

10
jenkins/Chart.yaml Normal file
View File

@@ -0,0 +1,10 @@
name: jenkins
home: https://jenkins.io/
source:
- https://github.com/bitnami/bitnami-docker-jenkins
version: 0.2.1
description: The leading open source automation server
maintainers:
- Bitnami <containers@bitnami.com>
details: |-
Joomla is the leading open source automation server

66
jenkins/README.md Normal file
View File

@@ -0,0 +1,66 @@
# Jenkins
> Jenkins is widely recognized as the most feature-rich CI available with easy configuration, continuous delivery and continuous integration support, easily test, build and stage your app, and more. It supports multiple SCM tools including CVS, Subversion and Git. It can execute Apache Ant and Apache Maven-based projects as well as arbitrary scripts.
Based on the [Bitnami Jenkins](https://github.com/bitnami/bitnami-docker-jenkins) image for docker, this Chart bootstraps a [Jenkins](https://jenkins.io) deployment on a [Kubernetes](https://kubernetes.io) cluster using [Helm](https://helm.sh).
## Persistence
> *You may skip this section if your only interested in testing the Jenkins Chart and have not yet made the decision to use it for your production workloads.*
For persistence of the Jenkins data and configuration, mount a [storage volume](http://kubernetes.io/v1.0/docs/user-guide/volumes.html) at the `/bitnami/jenkins` path of the Jenkins pod.
By default the Jenkins Chart mounts an [emptyDir](http://kubernetes.io/docs/user-guide/volumes/#emptydir) volume.
## Configuration
To edit the default Jenkins configuration, run
```bash
$ helmc edit jenkins
```
Here you can update the Jenkins admin username and password in `tpl/values.toml`. When not specified, the default values are used.
Refer to the [Environment variables](https://github.com/bitnami/bitnami-docker-jenkins/#environment-variables) section of the [Bitnami Jenkins](https://github.com/bitnami/bitnami-docker-jenkins) image for the default values.
The values of `jenkinsUser` and `jenkinsPassword` are the login credentials when you [access the Jenkins instance](#access-your-jenkins-application).
Finally, generate the chart to apply your changes to the configuration.
```bash
$ helmc generate --force jenkins
```
## Access your Jenkins application
You should now be able to access the application using the external IP configured for the Joomla service.
> Note:
>
> On GKE, the service will automatically configure a firewall rule so that the Joomla instance is accessible from the internet, for which you will be charged additionally.
>
> On other cloud platforms you may have to setup a firewall rule manually. Please refer your cloud providers documentation.
Get the external IP address of your Jenkins instance using:
```bash
$ kubectl get services jenkins
NAME CLUSTER_IP EXTERNAL_IP PORT(S) SELECTOR AGE
jenkins 10.63.246.116 146.148.20.117 80/TCP,443/TCP app=jenkins 15m
```
Access your Jenkins deployment using the IP address listed under the `EXTERNAL_IP` column.
The default credentials are:
- Username: `user`
- Password: `bitnami`
## Cleanup
To delete the Jenkins deployment completely:
```bash
$ helmc uninstall -n default jenkins
```

View File

@@ -0,0 +1,57 @@
#helm:generate helmc tpl -d tpl/values.toml -o manifests/jenkins-rc.yaml $HELM_GENERATE_FILE
apiVersion: v1
kind: ReplicationController
metadata:
name: jenkins
labels:
app: jenkins
provider: jenkins-server
heritage: bitnami
spec:
replicas: 1
selector:
app: jenkins
provider: jenkins-server
version: 2.17-r0
template:
metadata:
labels:
app: jenkins
provider: jenkins-server
version: 2.17-r0
heritage: bitnami
spec:
containers:
- name: jenkins
image: bitnami/jenkins:2.17-r0
env:
- name: JENKINS_USERNAME
value: "user"
- name: JENKINS_PASSWORD
valueFrom:
secretKeyRef:
name: jenkins
key: jenkins-password
ports:
- name: http
containerPort: 8080
- name: https
containerPort: 8443
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 120
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 5
timeoutSeconds: 1
volumeMounts:
- name: jenkins-data
mountPath: /bitnami/jenkins
volumes:
- name: jenkins-data
emptyDir: {}

View File

@@ -0,0 +1,11 @@
#helm:generate helmc tpl -d tpl/values.toml -o manifests/jenkins-secrets.yaml $HELM_GENERATE_FILE
apiVersion: v1
kind: Secret
metadata:
name: jenkins
labels:
provider: jenkins
heritage: bitnami
type: Opaque
data:
jenkins-password: "Yml0bmFtaQ=="

View File

@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
name: jenkins
labels:
app: jenkins
provider: jenkins-server
heritage: bitnami
spec:
type: LoadBalancer
ports:
- name: http
port: 80
targetPort: http
- name: https
port: 443
targetPort: https
selector:
app: jenkins
provider: jenkins-server

View File

@@ -0,0 +1,57 @@
#helm:generate helmc tpl -d tpl/values.toml -o manifests/jenkins-rc.yaml $HELM_GENERATE_FILE
apiVersion: v1
kind: ReplicationController
metadata:
name: jenkins
labels:
app: jenkins
provider: jenkins-server
heritage: bitnami
spec:
replicas: 1
selector:
app: jenkins
provider: jenkins-server
version: 2.17-r0
template:
metadata:
labels:
app: jenkins
provider: jenkins-server
version: 2.17-r0
heritage: bitnami
spec:
containers:
- name: jenkins
image: bitnami/jenkins:2.17-r0
env:
- name: JENKINS_USERNAME
value: {{ .jenkinsUser | quote }}
- name: JENKIS_PASSWORD
valueFrom:
secretKeyRef:
name: jenkins
key: jenkins-password
ports:
- name: http
containerPort: 8080
- name: https
containerPort: 8443
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 120
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 5
timeoutSeconds: 1
volumeMounts:
- name: jenkins-data
mountPath: /bitnami/jenkins
volumes:
- name: jenkins-data
emptyDir: {}

View File

@@ -0,0 +1,11 @@
#helm:generate helmc tpl -d tpl/values.toml -o manifests/jenkins-secrets.yaml $HELM_GENERATE_FILE
apiVersion: v1
kind: Secret
metadata:
name: jenkins
labels:
provider: jenkins
heritage: bitnami
type: Opaque
data:
jenkins-password: {{ .jenkinsPassword | b64enc | quote }}

2
jenkins/tpl/values.toml Normal file
View File

@@ -0,0 +1,2 @@
jenkinsUser = "user"
jenkinsPassword = "bitnami"