Ivan Berezovskiy | 9f4ef9e | 2019-06-10 13:57:16 +0400 | [diff] [blame] | 1 | classes: |
| 2 | - system.docker.swarm.stack.jenkins.ssh_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_SLAVE_SSH_PUBKEY: ${_param:jenkins_admin_public_key} |
| 15 | https_proxy: ${_param:docker_https_proxy} |
| 16 | http_proxy: ${_param:docker_http_proxy} |
| 17 | no_proxy: "jenkins_master,${_param:docker_no_proxy}" |
Ivan Berezovskiy | df8392a | 2019-07-18 18:20:55 +0400 | [diff] [blame] | 18 | GIT_SSL_CAINFO: /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem |
Ivan Berezovskiy | 9f4ef9e | 2019-06-10 13:57:16 +0400 | [diff] [blame] | 19 | deploy: |
| 20 | restart_policy: |
| 21 | condition: any |
| 22 | placement: |
| 23 | constraints: |
| 24 | - "node.hostname == ${_param:jenkins_slave02_node_name}" |
| 25 | image: ${_param:docker_image_jenkins_ssh_slave} |
| 26 | volumes: |
| 27 | - /etc/ssl/certs/:/etc/ssl/certs/:ro |
Ivan Berezovskiy | df8392a | 2019-07-18 18:20:55 +0400 | [diff] [blame] | 28 | - /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem:/etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem:ro |
Ivan Berezovskiy | 9f4ef9e | 2019-06-10 13:57:16 +0400 | [diff] [blame] | 29 | - /dev/urandom:/dev/random:ro |
| 30 | - /var/run/docker.sock:/var/run/docker.sock |
| 31 | - /usr/bin/docker:/usr/bin/docker:ro |
| 32 | - /var/lib/jenkins:/var/lib/jenkins |
| 33 | slave03: |
| 34 | environment: |
| 35 | JENKINS_SLAVE_SSH_PUBKEY: ${_param:jenkins_admin_public_key} |
| 36 | https_proxy: ${_param:docker_https_proxy} |
| 37 | http_proxy: ${_param:docker_http_proxy} |
| 38 | no_proxy: "jenkins_master,${_param:docker_no_proxy}" |
Ivan Berezovskiy | df8392a | 2019-07-18 18:20:55 +0400 | [diff] [blame] | 39 | GIT_SSL_CAINFO: /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem |
Ivan Berezovskiy | 9f4ef9e | 2019-06-10 13:57:16 +0400 | [diff] [blame] | 40 | deploy: |
| 41 | restart_policy: |
| 42 | condition: any |
| 43 | placement: |
| 44 | constraints: |
| 45 | - "node.hostname == ${_param:jenkins_slave03_node_name}" |
| 46 | image: ${_param:docker_image_jenkins_ssh_slave} |
| 47 | volumes: |
| 48 | - /etc/ssl/certs/:/etc/ssl/certs/:ro |
Ivan Berezovskiy | df8392a | 2019-07-18 18:20:55 +0400 | [diff] [blame] | 49 | - /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem:/etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem:ro |
Ivan Berezovskiy | 9f4ef9e | 2019-06-10 13:57:16 +0400 | [diff] [blame] | 50 | - /dev/urandom:/dev/random:ro |
| 51 | - /var/run/docker.sock:/var/run/docker.sock |
| 52 | - /usr/bin/docker:/usr/bin/docker:ro |
| 53 | - /var/lib/jenkins:/var/lib/jenkins |
| 54 | jenkins: |
| 55 | client: |
| 56 | node: |
| 57 | slave02: |
| 58 | launcher: |
| 59 | type: ssh |
| 60 | host: jenkins_slave02 |
| 61 | port: 22 |
| 62 | username: jenkins |
| 63 | credentials: ssh_slave |
| 64 | slave03: |
| 65 | launcher: |
| 66 | type: ssh |
| 67 | host: jenkins_slave03 |
| 68 | port: 22 |
| 69 | username: jenkins |
| 70 | credentials: ssh_slave |