Pavel Cizinsky | d8d8a5a | 2018-11-06 14:07:40 +0100 | [diff] [blame] | 1 | classes: |
Ivan Berezovskiy | 9f4ef9e | 2019-06-10 13:57:16 +0400 | [diff] [blame] | 2 | - system.docker |
Pavel Cizinsky | d8d8a5a | 2018-11-06 14:07:40 +0100 | [diff] [blame] | 3 | parameters: |
| 4 | _param: |
Ivan Berezovskiy | 9f4ef9e | 2019-06-10 13:57:16 +0400 | [diff] [blame] | 5 | jenkins_master_url: http://jenkins_master:8080 |
| 6 | jenkins_slave_extra_opts: "" |
Pavel Cizinsky | d8d8a5a | 2018-11-06 14:07:40 +0100 | [diff] [blame] | 7 | jenkins_slave01_node_name: ${_param:cluster_node01_name} |
| 8 | docker: |
| 9 | client: |
Ivan Berezovskiy | 9f4ef9e | 2019-06-10 13:57:16 +0400 | [diff] [blame] | 10 | enabled: true |
| 11 | images: |
| 12 | - ${_param:docker_image_jenkins_jnlp_slave} |
Pavel Cizinsky | d8d8a5a | 2018-11-06 14:07:40 +0100 | [diff] [blame] | 13 | stack: |
| 14 | jenkins: |
| 15 | service: |
| 16 | slave01: |
| 17 | environment: |
| 18 | JENKINS_URL: ${_param:jenkins_master_url} |
| 19 | JENKINS_AGENT_NAME: slave01 |
| 20 | JENKINS_UPDATE_SLAVE: 'true' |
Ivan Berezovskiy | 883d27b | 2019-02-12 14:10:03 +0400 | [diff] [blame] | 21 | JENKINS_LOGIN: ${_param:jenkins_client_user} |
| 22 | JENKINS_PASSWORD: ${_param:jenkins_client_password} |
| 23 | JAVA_OPTS: "-Dhttp.proxyHost=${_param:docker_http_proxy} -Dhttp.nonProxyHosts=|jenkins_master ${_param:jenkins_slave_extra_opts}" |
Pavel Cizinsky | d8d8a5a | 2018-11-06 14:07:40 +0100 | [diff] [blame] | 24 | https_proxy: ${_param:docker_https_proxy} |
| 25 | http_proxy: ${_param:docker_http_proxy} |
Ivan Berezovskiy | 883d27b | 2019-02-12 14:10:03 +0400 | [diff] [blame] | 26 | no_proxy: "jenkins_master,${_param:docker_no_proxy}" |
Ivan Berezovskiy | df8392a | 2019-07-18 18:20:55 +0400 | [diff] [blame] | 27 | GIT_SSL_CAINFO: /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem |
Pavel Cizinsky | d8d8a5a | 2018-11-06 14:07:40 +0100 | [diff] [blame] | 28 | deploy: |
| 29 | restart_policy: |
| 30 | condition: any |
| 31 | placement: |
| 32 | constraints: |
| 33 | - "node.hostname == ${_param:jenkins_slave01_node_name}" |
Ivan Berezovskiy | 9f4ef9e | 2019-06-10 13:57:16 +0400 | [diff] [blame] | 34 | image: ${_param:docker_image_jenkins_jnlp_slave} |
Pavel Cizinsky | d8d8a5a | 2018-11-06 14:07:40 +0100 | [diff] [blame] | 35 | volumes: |
root | b8ea1c8 | 2019-05-30 08:59:27 +0000 | [diff] [blame] | 36 | - /etc/ssl/certs/:/etc/ssl/certs/:ro |
Ivan Berezovskiy | df8392a | 2019-07-18 18:20:55 +0400 | [diff] [blame] | 37 | - /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem:/etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem:ro |
Denis Egorenko | 4d18429 | 2019-05-16 17:14:27 +0400 | [diff] [blame] | 38 | - /dev/urandom:/dev/random:ro |
Pavel Cizinsky | d8d8a5a | 2018-11-06 14:07:40 +0100 | [diff] [blame] | 39 | - /var/run/docker.sock:/var/run/docker.sock |
| 40 | - /usr/bin/docker:/usr/bin/docker:ro |
| 41 | - /var/lib/jenkins:/var/lib/jenkins |