Ivan Berezovskiy | 7012f6e | 2019-06-10 13:57:16 +0400 | [diff] [blame^] | 1 | classes: |
| 2 | - system.docker.swarm.stack.jenkins.jnlp_slave_single |
| 3 | parameters: |
| 4 | _param: |
| 5 | jenkins_slave02_node_name: ${_param:cluster_node02_name} |
| 6 | jenkins_slave03_node_name: ${_param:cluster_node03_name} |
| 7 | docker: |
| 8 | client: |
| 9 | stack: |
| 10 | jenkins: |
| 11 | service: |
| 12 | slave02: |
| 13 | environment: |
| 14 | JENKINS_URL: ${_param:jenkins_master_url} |
| 15 | JENKINS_AGENT_NAME: slave02 |
| 16 | JENKINS_UPDATE_SLAVE: 'true' |
| 17 | JENKINS_LOGIN: ${_param:jenkins_client_user} |
| 18 | JENKINS_PASSWORD: ${_param:jenkins_client_password} |
| 19 | JAVA_OPTS: "-Dhttp.proxyHost=${_param:docker_http_proxy} -Dhttp.nonProxyHosts=|jenkins_master ${_param:jenkins_slave_extra_opts}" |
| 20 | https_proxy: ${_param:docker_https_proxy} |
| 21 | http_proxy: ${_param:docker_http_proxy} |
| 22 | no_proxy: "jenkins_master,${_param:docker_no_proxy}" |
| 23 | deploy: |
| 24 | restart_policy: |
| 25 | condition: any |
| 26 | placement: |
| 27 | constraints: |
| 28 | - "node.hostname == ${_param:jenkins_slave02_node_name}" |
| 29 | image: ${_param:docker_image_jenkins_jnlp_slave} |
| 30 | volumes: |
| 31 | - /etc/ssl/certs/:/etc/ssl/certs/:ro |
| 32 | - /dev/urandom:/dev/random:ro |
| 33 | - /var/run/docker.sock:/var/run/docker.sock |
| 34 | - /usr/bin/docker:/usr/bin/docker:ro |
| 35 | - /var/lib/jenkins:/var/lib/jenkins |
| 36 | slave03: |
| 37 | environment: |
| 38 | JENKINS_URL: ${_param:jenkins_master_url} |
| 39 | JENKINS_AGENT_NAME: slave03 |
| 40 | JENKINS_UPDATE_SLAVE: 'true' |
| 41 | JENKINS_LOGIN: ${_param:jenkins_client_user} |
| 42 | JENKINS_PASSWORD: ${_param:jenkins_client_password} |
| 43 | JAVA_OPTS: "-Dhttp.proxyHost=${_param:docker_http_proxy} -Dhttp.nonProxyHosts=|jenkins_master ${_param:jenkins_slave_extra_opts}" |
| 44 | https_proxy: ${_param:docker_https_proxy} |
| 45 | http_proxy: ${_param:docker_http_proxy} |
| 46 | no_proxy: "jenkins_master,${_param:docker_no_proxy}" |
| 47 | deploy: |
| 48 | restart_policy: |
| 49 | condition: any |
| 50 | placement: |
| 51 | constraints: |
| 52 | - "node.hostname == ${_param:jenkins_slave03_node_name}" |
| 53 | image: ${_param:docker_image_jenkins_jnlp_slave} |
| 54 | volumes: |
| 55 | - /etc/ssl/certs/:/etc/ssl/certs/:ro |
| 56 | - /dev/urandom:/dev/random:ro |
| 57 | - /var/run/docker.sock:/var/run/docker.sock |
| 58 | - /usr/bin/docker:/usr/bin/docker:ro |
| 59 | - /var/lib/jenkins:/var/lib/jenkins |