Merge pull request #715 from biblesyme/cicd-v0.1.1
Add new version of pipeline v0.1.1
This commit is contained in:
commit
5c2dde2aa8
1
infra-templates/pipeline/0/rancher-compose.yml
Normal file → Executable file
1
infra-templates/pipeline/0/rancher-compose.yml
Normal file → Executable file
@ -3,6 +3,7 @@ catalog:
|
||||
name: Pipeline
|
||||
version: v0.1.0
|
||||
minimum_rancher_version: 1.6.13-rc2
|
||||
maximum_rancher_version: 1.6.13-rc2
|
||||
description: "Rancher Pipeline"
|
||||
questions:
|
||||
- variable: SLAVES
|
||||
|
40
infra-templates/pipeline/1/README.md
Executable file
40
infra-templates/pipeline/1/README.md
Executable file
@ -0,0 +1,40 @@
|
||||
# Rancher Pipeline
|
||||
|
||||
Easier to use, Easier to integrate CI/CD with Rancher.
|
||||
|
||||
## Description
|
||||
|
||||
This template deploys Rancher Pipeline, the continuous integration service powered by Jenkins.
|
||||
|
||||
It will be set up as an infrastructure stack in the Rancher environment.
|
||||
|
||||
## Prerequisite
|
||||
|
||||
Minimum system requirement of 2 core, 4 GB memory.
|
||||
|
||||
## Features
|
||||
|
||||
- Configure and manage your CI jobs in native Rancher UI.
|
||||
- Simple to use, container based continuous integration system.
|
||||
- multiple trigger types supported.
|
||||
- Flexible CI flow control(stop, rerun, timeout, parallel/serial run, approve/deny, etc. ).
|
||||
|
||||
## Parameters
|
||||
|
||||
- `# of slaves`: The number of Jenkins slave to set up. Please set at least one slave. You can also do scaling of slaves after installation.
|
||||
- `# of executors`: The number of executors on each Jenkins slave. The maximum number of concurrent builds that Jenkins may perform on a agent. A good value to start with would be the number of CPU cores on the machine. Setting a higher value would cause each build to take longer, but could increase the overall throughput. For example, one build might be CPU-bound, while a second build running at the same time might be I/O-bound — so the second build could take advantage of the spare I/O capacity at that moment. Agents must have at least one executor.
|
||||
|
||||
|
||||
- `Host with Label to put pipeline components on`: This parameter specify the host labels to use. Pipeline components will be scheduled to dedicated hosts matching these host labels.
|
||||
|
||||
## Usage:
|
||||
|
||||
Select the template from the catalog.
|
||||
|
||||
Configure the parameters according to your workload and resource.
|
||||
|
||||
Click `Launch`.
|
||||
|
||||
After service is up, access Pipeline UI on top navigation bar of Rancher UI.
|
||||
|
||||
See [Pipeline documentation](https://github.com/rancher/pipeline) for detail information.
|
82
infra-templates/pipeline/1/docker-compose.yml.tpl
Executable file
82
infra-templates/pipeline/1/docker-compose.yml.tpl
Executable file
@ -0,0 +1,82 @@
|
||||
{{- $jenkinsMasterImage:="jenkins/jenkins:2.60.2-alpine"}}
|
||||
{{- $jenkinsBootImage:="rancher/pipeline-jenkins-boot:v1.0.0"}}
|
||||
{{- $jenkinsSlaveImage:="rancher/pipeline-jenkins-slave:v1.0.0"}}
|
||||
{{- $pipelineServerImage:="rancher/pipeline:v0.1.1"}}
|
||||
{{- $pipelineUIImage:="rancher/pipeline-ui:v1.0.1"}}
|
||||
|
||||
version: '2'
|
||||
services:
|
||||
jenkins-master:
|
||||
image: {{$jenkinsMasterImage}}
|
||||
restart: always
|
||||
environment:
|
||||
- JENKINS_SLAVE_AGENT_PORT=50000
|
||||
- JENKINS_HOME=/var/jenkins_home
|
||||
volumes_from:
|
||||
- jenkins-boot
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
labels:
|
||||
io.rancher.sidekicks: jenkins-boot
|
||||
io.rancher.container.create_agent: true
|
||||
io.rancher.container.agent.role: environmentAdmin
|
||||
{{- if ne .Values.HOST_LABEL "" }}
|
||||
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
|
||||
{{- end }}
|
||||
jenkins-boot:
|
||||
image: {{$jenkinsBootImage}}
|
||||
volumes:
|
||||
- jenkins_home:/var/jenkins_home
|
||||
labels:
|
||||
io.rancher.container.start_once: true
|
||||
jenkins-slave:
|
||||
image: {{$jenkinsSlaveImage}}
|
||||
restart: always
|
||||
links:
|
||||
- jenkins-master
|
||||
environment:
|
||||
- SLAVE_EXECUTORS=${EXECUTORS}
|
||||
- JENKINS_MASTER=http://jenkins-master:8080
|
||||
- JENKINS_USERNAME=admin
|
||||
- JENKINS_PASSWORD=admin
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /var/jenkins_home
|
||||
labels:
|
||||
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
|
||||
io.rancher.container.create_agent: true
|
||||
io.rancher.container.agent.role: environmentAdmin
|
||||
io.rancher.container.pull_image: always
|
||||
{{- if ne .Values.HOST_LABEL "" }}
|
||||
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
|
||||
{{- end }}
|
||||
pipeline-server:
|
||||
image: {{$pipelineServerImage}}
|
||||
restart: always
|
||||
links:
|
||||
- jenkins-master
|
||||
environment:
|
||||
- JENKINS_ADDRESS=http://jenkins-master:8080
|
||||
- JENKINS_USER=admin
|
||||
- JENKINS_TOKEN=admin
|
||||
labels:
|
||||
io.rancher.container.create_agent: true
|
||||
io.rancher.container.agent.role: environmentAdmin
|
||||
io.rancher.container.pull_image: always
|
||||
{{- if ne .Values.HOST_LABEL "" }}
|
||||
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
|
||||
{{- end }}
|
||||
pipeline-ui:
|
||||
image: {{$pipelineUIImage}}
|
||||
restart: always
|
||||
labels:
|
||||
io.rancher.container.create_agent: true
|
||||
io.rancher.container.agent.role: environment
|
||||
io.rancher.container.pull_image: always
|
||||
io.rancher.service.ui_link.label: "{\"en-us\":\"PIPELINE\",\"zh-hans\":\"流水线\"}"
|
||||
{{- if ne .Values.HOST_LABEL "" }}
|
||||
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL}
|
||||
{{- end }}
|
||||
volumes:
|
||||
jenkins_home:
|
||||
driver: "local"
|
28
infra-templates/pipeline/1/rancher-compose.yml
Executable file
28
infra-templates/pipeline/1/rancher-compose.yml
Executable file
@ -0,0 +1,28 @@
|
||||
version: '2'
|
||||
catalog:
|
||||
name: Pipeline
|
||||
version: v0.1.1
|
||||
minimum_rancher_version: 1.6.13-rc2
|
||||
description: "Rancher Pipeline"
|
||||
questions:
|
||||
- variable: SLAVES
|
||||
type: "int"
|
||||
default: "1"
|
||||
label: "# of slaves"
|
||||
description: "How many jenkins slaves to run ci tasks. At least 1."
|
||||
- variable: EXECUTORS
|
||||
type: "int"
|
||||
default: "2"
|
||||
label: "# of executors"
|
||||
description: "How many executors on a jenkins slave"
|
||||
- variable: HOST_LABEL
|
||||
label: "Host with Label to put pipeline components on"
|
||||
description: |
|
||||
Run pipeline components on Host with specific labels.
|
||||
Example: 'pipeline=true'
|
||||
required: false
|
||||
default: ""
|
||||
type: "string"
|
||||
services:
|
||||
jenkins-slave:
|
||||
scale: ${SLAVES}
|
2
infra-templates/pipeline/config.yml
Normal file → Executable file
2
infra-templates/pipeline/config.yml
Normal file → Executable file
@ -1,6 +1,6 @@
|
||||
name: Rancher Pipeline
|
||||
description: Rancher CI service
|
||||
version: v0.1.0
|
||||
version: v0.1.1
|
||||
category: Continuous Integration
|
||||
labels:
|
||||
io.rancher.certified: Experimental
|
||||
|
Loading…
x
Reference in New Issue
Block a user