Filip Pytloun | e7d4f86 | 2017-08-04 13:11:51 +0200 | [diff] [blame] | 1 | classes: |
| 2 | - system.docker |
Filip Pytloun | 6964508 | 2017-06-01 17:13:01 +0200 | [diff] [blame] | 3 | parameters: |
| 4 | _param: |
Jakub Josef | 86b0782 | 2018-04-10 14:45:52 +0200 | [diff] [blame] | 5 | docker_image_jenkins_slave: mirantis/jnlp-slave |
Filip Pytloun | 6964508 | 2017-06-01 17:13:01 +0200 | [diff] [blame] | 6 | jenkins_master_host: ${_param:control_vip_address} |
| 7 | jenkins_master_port: 8081 |
| 8 | jenkins_secret: "7c40abc1a7df2d26dd6b2e4421af17218df75a16fcbd5e3aa6017d9f47eaeabe" |
| 9 | jenkins_master_url: http://${_param:jenkins_master_host}:${_param:jenkins_master_port} |
| 10 | jenkins_slave_user: ${_param:jenkins_client_user} |
| 11 | jenkins_slave_password: ${_param:jenkins_client_password} |
Filip Pytloun | e7d4f86 | 2017-08-04 13:11:51 +0200 | [diff] [blame] | 12 | jenkins_slave_extra_opts: "" |
Filip Pytloun | 6964508 | 2017-06-01 17:13:01 +0200 | [diff] [blame] | 13 | docker: |
| 14 | client: |
| 15 | stack: |
| 16 | jenkins: |
| 17 | service: |
| 18 | slave01: |
| 19 | environment: |
| 20 | JENKINS_URL: ${_param:jenkins_master_url} |
| 21 | JENKINS_AGENT_NAME: slave01 |
| 22 | JENKINS_UPDATE_SLAVE: 'true' |
| 23 | JENKINS_LOGIN: ${_param:jenkins_slave_user} |
| 24 | JENKINS_PASSWORD: ${_param:jenkins_slave_password} |
Filip Pytloun | e7d4f86 | 2017-08-04 13:11:51 +0200 | [diff] [blame] | 25 | JAVA_OPTS: ${_param:jenkins_slave_extra_opts} |
| 26 | https_proxy: ${_param:docker_https_proxy} |
| 27 | http_proxy: ${_param:docker_http_proxy} |
| 28 | no_proxy: ${_param:docker_no_proxy} |
Filip Pytloun | 6964508 | 2017-06-01 17:13:01 +0200 | [diff] [blame] | 29 | deploy: |
| 30 | restart_policy: |
| 31 | condition: any |
| 32 | placement: |
| 33 | constraints: |
| 34 | - "node.hostname == ${_param:cluster_node01_name}" |
| 35 | image: ${_param:docker_image_jenkins_slave} |
| 36 | volumes: |
| 37 | - /etc/ssl/certs/java/cacerts:/etc/ssl/certs/java/cacerts:ro |
Alexander Noskov | 14fa00f | 2018-06-05 16:35:35 +0400 | [diff] [blame] | 38 | - /etc/aptly:/etc/aptly:ro |
Filip Pytloun | 6964508 | 2017-06-01 17:13:01 +0200 | [diff] [blame] | 39 | - /var/run/docker.sock:/var/run/docker.sock |
| 40 | - /usr/bin/docker:/usr/bin/docker:ro |
Filip Pytloun | 27718cc | 2017-06-30 12:59:27 +0200 | [diff] [blame] | 41 | - /var/lib/jenkins:/var/lib/jenkins |
Filip Pytloun | 6964508 | 2017-06-01 17:13:01 +0200 | [diff] [blame] | 42 | slave02: |
| 43 | environment: |
| 44 | JENKINS_URL: ${_param:jenkins_master_url} |
| 45 | JENKINS_AGENT_NAME: slave02 |
| 46 | JENKINS_UPDATE_SLAVE: 'true' |
| 47 | JENKINS_LOGIN: ${_param:jenkins_slave_user} |
| 48 | JENKINS_PASSWORD: ${_param:jenkins_slave_password} |
Filip Pytloun | e7d4f86 | 2017-08-04 13:11:51 +0200 | [diff] [blame] | 49 | JAVA_OPTS: ${_param:jenkins_slave_extra_opts} |
| 50 | https_proxy: ${_param:docker_https_proxy} |
| 51 | http_proxy: ${_param:docker_http_proxy} |
| 52 | no_proxy: ${_param:docker_no_proxy} |
Filip Pytloun | 6964508 | 2017-06-01 17:13:01 +0200 | [diff] [blame] | 53 | deploy: |
| 54 | restart_policy: |
| 55 | condition: any |
| 56 | placement: |
| 57 | constraints: |
| 58 | - "node.hostname == ${_param:cluster_node02_name}" |
| 59 | image: ${_param:docker_image_jenkins_slave} |
| 60 | volumes: |
| 61 | - /etc/ssl/certs/java/cacerts:/etc/ssl/certs/java/cacerts:ro |
Alexander Noskov | 14fa00f | 2018-06-05 16:35:35 +0400 | [diff] [blame] | 62 | - /etc/aptly:/etc/aptly:ro |
Filip Pytloun | 6964508 | 2017-06-01 17:13:01 +0200 | [diff] [blame] | 63 | - /var/run/docker.sock:/var/run/docker.sock |
| 64 | - /usr/bin/docker:/usr/bin/docker:ro |
Filip Pytloun | 27718cc | 2017-06-30 12:59:27 +0200 | [diff] [blame] | 65 | - /var/lib/jenkins:/var/lib/jenkins |
Filip Pytloun | 6964508 | 2017-06-01 17:13:01 +0200 | [diff] [blame] | 66 | slave03: |
| 67 | environment: |
| 68 | JENKINS_URL: ${_param:jenkins_master_url} |
| 69 | JENKINS_AGENT_NAME: slave03 |
| 70 | JENKINS_UPDATE_SLAVE: 'true' |
| 71 | JENKINS_LOGIN: ${_param:jenkins_slave_user} |
| 72 | JENKINS_PASSWORD: ${_param:jenkins_slave_password} |
Filip Pytloun | e7d4f86 | 2017-08-04 13:11:51 +0200 | [diff] [blame] | 73 | JAVA_OPTS: ${_param:jenkins_slave_extra_opts} |
| 74 | https_proxy: ${_param:docker_https_proxy} |
| 75 | http_proxy: ${_param:docker_http_proxy} |
| 76 | no_proxy: ${_param:docker_no_proxy} |
Filip Pytloun | 6964508 | 2017-06-01 17:13:01 +0200 | [diff] [blame] | 77 | deploy: |
| 78 | restart_policy: |
| 79 | condition: any |
| 80 | placement: |
| 81 | constraints: |
| 82 | - "node.hostname == ${_param:cluster_node03_name}" |
| 83 | image: ${_param:docker_image_jenkins_slave} |
| 84 | volumes: |
| 85 | - /etc/ssl/certs/java/cacerts:/etc/ssl/certs/java/cacerts:ro |
Alexander Noskov | 14fa00f | 2018-06-05 16:35:35 +0400 | [diff] [blame] | 86 | - /etc/aptly:/etc/aptly:ro |
Filip Pytloun | 6964508 | 2017-06-01 17:13:01 +0200 | [diff] [blame] | 87 | - /var/run/docker.sock:/var/run/docker.sock |
| 88 | - /usr/bin/docker:/usr/bin/docker:ro |
Filip Pytloun | 27718cc | 2017-06-30 12:59:27 +0200 | [diff] [blame] | 89 | - /var/lib/jenkins:/var/lib/jenkins |