blob: 956f918b7b9ba938414990a0208b900cd6925746 [file] [log] [blame]
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +01001classes:
Ivan Berezovskiy9f4ef9e2019-06-10 13:57:16 +04002- system.docker
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +01003parameters:
4 _param:
Ivan Berezovskiy9f4ef9e2019-06-10 13:57:16 +04005 jenkins_master_url: http://jenkins_master:8080
6 jenkins_slave_extra_opts: ""
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +01007 jenkins_slave01_node_name: ${_param:cluster_node01_name}
8 docker:
9 client:
Ivan Berezovskiy9f4ef9e2019-06-10 13:57:16 +040010 enabled: true
11 images:
12 - ${_param:docker_image_jenkins_jnlp_slave}
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +010013 stack:
14 jenkins:
15 service:
16 slave01:
17 environment:
18 JENKINS_URL: ${_param:jenkins_master_url}
19 JENKINS_AGENT_NAME: slave01
20 JENKINS_UPDATE_SLAVE: 'true'
Ivan Berezovskiy883d27b2019-02-12 14:10:03 +040021 JENKINS_LOGIN: ${_param:jenkins_client_user}
22 JENKINS_PASSWORD: ${_param:jenkins_client_password}
23 JAVA_OPTS: "-Dhttp.proxyHost=${_param:docker_http_proxy} -Dhttp.nonProxyHosts=|jenkins_master ${_param:jenkins_slave_extra_opts}"
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +010024 https_proxy: ${_param:docker_https_proxy}
25 http_proxy: ${_param:docker_http_proxy}
Ivan Berezovskiy883d27b2019-02-12 14:10:03 +040026 no_proxy: "jenkins_master,${_param:docker_no_proxy}"
Ivan Berezovskiydf8392a2019-07-18 18:20:55 +040027 GIT_SSL_CAINFO: /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +010028 deploy:
29 restart_policy:
30 condition: any
31 placement:
32 constraints:
33 - "node.hostname == ${_param:jenkins_slave01_node_name}"
Ivan Berezovskiy9f4ef9e2019-06-10 13:57:16 +040034 image: ${_param:docker_image_jenkins_jnlp_slave}
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +010035 volumes:
rootb8ea1c82019-05-30 08:59:27 +000036 - /etc/ssl/certs/:/etc/ssl/certs/:ro
Ivan Berezovskiydf8392a2019-07-18 18:20:55 +040037 - /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem:/etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem:ro
Denis Egorenko4d184292019-05-16 17:14:27 +040038 - /dev/urandom:/dev/random:ro
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +010039 - /var/run/docker.sock:/var/run/docker.sock
40 - /usr/bin/docker:/usr/bin/docker:ro
41 - /var/lib/jenkins:/var/lib/jenkins