blob: e7bf0567fa04a4990b178a8b9d5bcff75bd302aa [file] [log] [blame]
Ivan Berezovskiy7012f6e2019-06-10 13:57:16 +04001classes:
2- system.docker.swarm.stack.jenkins.jnlp_slave_single
3parameters:
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}
Oleksii Molchanov2dded632020-07-28 23:34:03 +030018 JENKINS_PASSWORD_FILE: /run/secrets/jenkins-admin
Ivan Berezovskiy7012f6e2019-06-10 13:57:16 +040019 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}"
Ivan Berezovskiy8591ade2019-07-18 18:20:55 +040023 GIT_SSL_CAINFO: /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem
Ivan Berezovskiy7012f6e2019-06-10 13:57:16 +040024 deploy:
25 restart_policy:
26 condition: any
27 placement:
28 constraints:
29 - "node.hostname == ${_param:jenkins_slave02_node_name}"
30 image: ${_param:docker_image_jenkins_jnlp_slave}
31 volumes:
32 - /etc/ssl/certs/:/etc/ssl/certs/:ro
Ivan Berezovskiy8591ade2019-07-18 18:20:55 +040033 - /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem:/etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem:ro
Ivan Berezovskiy7012f6e2019-06-10 13:57:16 +040034 - /dev/urandom:/dev/random:ro
35 - /var/run/docker.sock:/var/run/docker.sock
36 - /usr/bin/docker:/usr/bin/docker:ro
37 - /var/lib/jenkins:/var/lib/jenkins
Oleksii Molchanov2dded632020-07-28 23:34:03 +030038 secrets:
39 - jenkins-admin
Ivan Berezovskiy7012f6e2019-06-10 13:57:16 +040040 slave03:
41 environment:
42 JENKINS_URL: ${_param:jenkins_master_url}
43 JENKINS_AGENT_NAME: slave03
44 JENKINS_UPDATE_SLAVE: 'true'
45 JENKINS_LOGIN: ${_param:jenkins_client_user}
Oleksii Molchanov2dded632020-07-28 23:34:03 +030046 JENKINS_PASSWORD_FILE: /run/secrets/jenkins-admin
Ivan Berezovskiy7012f6e2019-06-10 13:57:16 +040047 JAVA_OPTS: "-Dhttp.proxyHost=${_param:docker_http_proxy} -Dhttp.nonProxyHosts=|jenkins_master ${_param:jenkins_slave_extra_opts}"
48 https_proxy: ${_param:docker_https_proxy}
49 http_proxy: ${_param:docker_http_proxy}
50 no_proxy: "jenkins_master,${_param:docker_no_proxy}"
Ivan Berezovskiy8591ade2019-07-18 18:20:55 +040051 GIT_SSL_CAINFO: /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem
Ivan Berezovskiy7012f6e2019-06-10 13:57:16 +040052 deploy:
53 restart_policy:
54 condition: any
55 placement:
56 constraints:
57 - "node.hostname == ${_param:jenkins_slave03_node_name}"
58 image: ${_param:docker_image_jenkins_jnlp_slave}
59 volumes:
60 - /etc/ssl/certs/:/etc/ssl/certs/:ro
Ivan Berezovskiy8591ade2019-07-18 18:20:55 +040061 - /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem:/etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem:ro
Ivan Berezovskiy7012f6e2019-06-10 13:57:16 +040062 - /dev/urandom:/dev/random:ro
63 - /var/run/docker.sock:/var/run/docker.sock
64 - /usr/bin/docker:/usr/bin/docker:ro
65 - /var/lib/jenkins:/var/lib/jenkins
Oleksii Molchanov2dded632020-07-28 23:34:03 +030066 secrets:
67 - jenkins-admin
68 secrets:
69 jenkins-admin:
70 external: true
71 value: ${_param:jenkins_client_password}