File tree Expand file tree Collapse file tree 6 files changed +138
-7
lines changed Expand file tree Collapse file tree 6 files changed +138
-7
lines changed Original file line number Diff line number Diff line change 1
1
# Jenkins
2
2
3
- ## Install Jenkins
3
+ ## Install
4
+
5
+ ### Chocolatey
4
6
5
7
``` ps1
6
- # powershell
7
8
choco install -y jenkins
8
-
9
- # choco uninstall -y jenkins
10
9
```
11
10
12
- ## Install Jenkins X
11
+ ### On Kubernetes
12
+
13
+ - Installing Jenkins - Kubernets: < https://www.jenkins.io/doc/book/installing/kubernetes/ >
14
+ - Jenkins Helm Charts: < https://github.com/jenkinsci/helm-charts >
15
+ - Jenkins Operator: < https://www.jenkins.io/projects/jenkins-operator/ >
16
+
17
+ ## Jenkins X
13
18
14
19
``` ps1
15
20
# powershell
16
21
choco install -y jenkins-x
17
-
18
- # choco uninstall -y jenkins-x
19
22
```
20
23
21
24
## Jenkins CLI
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ trap ' echo "${BASH_SOURCE[0]}: line ${LINENO}: status ${?}: user ${USER}: func ${FUNCNAME[0]}"' ERR
3
+ set -o errexit
4
+ set -o errtrace
5
+
6
+ kubectl --namespace jenkins get secret jenkins-operator-credentials-jenkins -o ' jsonpath={.data.user}' | base64 -d
7
+ kubectl --namespace jenkins get secret jenkins-operator-credentials-jenkins -o ' jsonpath={.data.password}' | base64 -d
Original file line number Diff line number Diff line change
1
+ apiVersion : jenkins.io/v1alpha2
2
+ kind : Jenkins
3
+ metadata :
4
+ name : jenkins
5
+ namespace : jenkins
6
+ spec :
7
+ configurationAsCode :
8
+ configurations : []
9
+ secret :
10
+ name : " "
11
+ groovyScripts :
12
+ configurations : []
13
+ secret :
14
+ name : " "
15
+ jenkinsAPISettings :
16
+ authorizationStrategy : createUser
17
+ master :
18
+ disableCSRFProtection : false
19
+ containers :
20
+ - name : jenkins-master
21
+ image : jenkins/jenkins:2.414.1
22
+ imagePullPolicy : Always
23
+ livenessProbe :
24
+ failureThreshold : 12
25
+ httpGet :
26
+ path : /login
27
+ port : http
28
+ scheme : HTTP
29
+ initialDelaySeconds : 100
30
+ periodSeconds : 10
31
+ successThreshold : 1
32
+ timeoutSeconds : 5
33
+ readinessProbe :
34
+ failureThreshold : 10
35
+ httpGet :
36
+ path : /login
37
+ port : http
38
+ scheme : HTTP
39
+ initialDelaySeconds : 80
40
+ periodSeconds : 10
41
+ successThreshold : 1
42
+ timeoutSeconds : 1
43
+ resources :
44
+ limits :
45
+ cpu : " 1"
46
+ memory : 1Gi
47
+ requests :
48
+ cpu : " 0.5"
49
+ memory : 500Mi
50
+ seedJobs :
51
+ - id : jenkins-operator
52
+ targets : " cicd/jobs/*.jenkins"
53
+ description : " Jenkins Operator repository"
54
+ repositoryBranch : master
55
+ repositoryUrl : https://github.com/jenkinsci/kubernetes-operator.git
Original file line number Diff line number Diff line change
1
+ ---
2
+ apiVersion : networking.istio.io/v1
3
+ kind : Gateway
4
+ metadata :
5
+ name : jenkins-gw
6
+ namespace : jenkins
7
+ spec :
8
+ selector :
9
+ istio : ingressgateway
10
+ servers :
11
+ - port :
12
+ number : 80
13
+ name : http
14
+ protocol : HTTP
15
+ hosts :
16
+ - jenkins.example.com
17
+ ---
18
+ apiVersion : networking.istio.io/v1
19
+ kind : VirtualService
20
+ metadata :
21
+ name : jenkins-vs
22
+ namespace : jenkins
23
+ spec :
24
+ hosts :
25
+ - jenkins.example.com
26
+ gateways :
27
+ - jenkins-gw
28
+ http :
29
+ - match :
30
+ - uri :
31
+ prefix : /
32
+ route :
33
+ - destination :
34
+ host : jenkins-operator-http-jenkins.jenkins.svc.cluster.local
35
+ port :
36
+ number : 8080
37
+ ---
38
+ apiVersion : networking.istio.io/v1
39
+ kind : DestinationRule
40
+ metadata :
41
+ name : jenkins-dr
42
+ namespace : jenkins
43
+ spec :
44
+ host : jenkins-operator-http-jenkins.jenkins.svc.cluster.local
45
+ trafficPolicy :
46
+ loadBalancer :
47
+ simple : ROUND_ROBIN
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ trap ' echo "${BASH_SOURCE[0]}: line ${LINENO}: status ${?}: user ${USER}: func ${FUNCNAME[0]}"' ERR
3
+ set -o errexit
4
+ set -o errtrace
5
+
6
+ # helm repo add jenkins https://raw.githubusercontent.com/jenkinsci/kubernetes-operator/master/chart
7
+ # helm repo update
8
+
9
+ NAMESPACE=" jenkins-operator"
10
+
11
+ # helm install jenkins-operator \
12
+ helm upgrade --install jenkins-operator \
13
+ --create-namespace \
14
+ --namespace ${NAMESPACE} \
15
+ --values values.yaml \
16
+ --version 0.8.0 \
17
+ jenkins/jenkins-operator
Original file line number Diff line number Diff line change
1
+ jenkins :
2
+ namespace : jenkins
You can’t perform that action at this time.
0 commit comments