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: |
Oleksii Molchanov | df2c9df | 2020-07-28 23:34:03 +0300 | [diff] [blame] | 15 | version: '3.7' |
Pavel Cizinsky | d8d8a5a | 2018-11-06 14:07:40 +0100 | [diff] [blame] | 16 | service: |
| 17 | slave01: |
| 18 | environment: |
| 19 | JENKINS_URL: ${_param:jenkins_master_url} |
| 20 | JENKINS_AGENT_NAME: slave01 |
| 21 | JENKINS_UPDATE_SLAVE: 'true' |
Ivan Berezovskiy | 883d27b | 2019-02-12 14:10:03 +0400 | [diff] [blame] | 22 | JENKINS_LOGIN: ${_param:jenkins_client_user} |
Oleksii Molchanov | df2c9df | 2020-07-28 23:34:03 +0300 | [diff] [blame] | 23 | JENKINS_PASSWORD_FILE: /run/secrets/jenkins-admin |
Ivan Berezovskiy | 883d27b | 2019-02-12 14:10:03 +0400 | [diff] [blame] | 24 | 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] | 25 | https_proxy: ${_param:docker_https_proxy} |
| 26 | http_proxy: ${_param:docker_http_proxy} |
Ivan Berezovskiy | 883d27b | 2019-02-12 14:10:03 +0400 | [diff] [blame] | 27 | no_proxy: "jenkins_master,${_param:docker_no_proxy}" |
Ivan Berezovskiy | df8392a | 2019-07-18 18:20:55 +0400 | [diff] [blame] | 28 | 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] | 29 | deploy: |
| 30 | restart_policy: |
| 31 | condition: any |
| 32 | placement: |
| 33 | constraints: |
| 34 | - "node.hostname == ${_param:jenkins_slave01_node_name}" |
Ivan Berezovskiy | 9f4ef9e | 2019-06-10 13:57:16 +0400 | [diff] [blame] | 35 | image: ${_param:docker_image_jenkins_jnlp_slave} |
Pavel Cizinsky | d8d8a5a | 2018-11-06 14:07:40 +0100 | [diff] [blame] | 36 | volumes: |
root | b8ea1c8 | 2019-05-30 08:59:27 +0000 | [diff] [blame] | 37 | - /etc/ssl/certs/:/etc/ssl/certs/:ro |
Ivan Berezovskiy | df8392a | 2019-07-18 18:20:55 +0400 | [diff] [blame] | 38 | - /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] | 39 | - /dev/urandom:/dev/random:ro |
Pavel Cizinsky | d8d8a5a | 2018-11-06 14:07:40 +0100 | [diff] [blame] | 40 | - /var/run/docker.sock:/var/run/docker.sock |
| 41 | - /usr/bin/docker:/usr/bin/docker:ro |
| 42 | - /var/lib/jenkins:/var/lib/jenkins |
Oleksii Molchanov | df2c9df | 2020-07-28 23:34:03 +0300 | [diff] [blame] | 43 | secrets: |
| 44 | - jenkins-admin |
| 45 | secrets: |
| 46 | jenkins-admin: |
| 47 | external: true |
| 48 | value: ${_param:jenkins_client_password} |