blob: 6f9bff0545004a8dbea6104ba7b02af1680952b5 [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:
Oleksii Molchanovdf2c9df2020-07-28 23:34:03 +030015 version: '3.7'
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +010016 service:
17 slave01:
18 environment:
19 JENKINS_URL: ${_param:jenkins_master_url}
20 JENKINS_AGENT_NAME: slave01
21 JENKINS_UPDATE_SLAVE: 'true'
Ivan Berezovskiy883d27b2019-02-12 14:10:03 +040022 JENKINS_LOGIN: ${_param:jenkins_client_user}
Oleksii Molchanovdf2c9df2020-07-28 23:34:03 +030023 JENKINS_PASSWORD_FILE: /run/secrets/jenkins-admin
Ivan Berezovskiy883d27b2019-02-12 14:10:03 +040024 JAVA_OPTS: "-Dhttp.proxyHost=${_param:docker_http_proxy} -Dhttp.nonProxyHosts=|jenkins_master ${_param:jenkins_slave_extra_opts}"
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +010025 https_proxy: ${_param:docker_https_proxy}
26 http_proxy: ${_param:docker_http_proxy}
Ivan Berezovskiy883d27b2019-02-12 14:10:03 +040027 no_proxy: "jenkins_master,${_param:docker_no_proxy}"
Ivan Berezovskiydf8392a2019-07-18 18:20:55 +040028 GIT_SSL_CAINFO: /etc/ssl/certs/ca-${_param:salt_minion_ca_authority}.pem
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +010029 deploy:
30 restart_policy:
31 condition: any
32 placement:
33 constraints:
34 - "node.hostname == ${_param:jenkins_slave01_node_name}"
Ivan Berezovskiy9f4ef9e2019-06-10 13:57:16 +040035 image: ${_param:docker_image_jenkins_jnlp_slave}
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +010036 volumes:
rootb8ea1c82019-05-30 08:59:27 +000037 - /etc/ssl/certs/:/etc/ssl/certs/:ro
Ivan Berezovskiydf8392a2019-07-18 18:20:55 +040038 - /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 +040039 - /dev/urandom:/dev/random:ro
Pavel Cizinskyd8d8a5a2018-11-06 14:07:40 +010040 - /var/run/docker.sock:/var/run/docker.sock
41 - /usr/bin/docker:/usr/bin/docker:ro
42 - /var/lib/jenkins:/var/lib/jenkins
Oleksii Molchanovdf2c9df2020-07-28 23:34:03 +030043 secrets:
44 - jenkins-admin
45 secrets:
46 jenkins-admin:
47 external: true
48 value: ${_param:jenkins_client_password}