Merge "Add mcp common scripts repo required for generate model job"
diff --git a/docker/swarm/stack/jenkins/slave.yml b/docker/swarm/stack/jenkins/slave.yml
index 1585058..204b29d 100644
--- a/docker/swarm/stack/jenkins/slave.yml
+++ b/docker/swarm/stack/jenkins/slave.yml
@@ -1,85 +1,5 @@
classes:
- system.docker
-parameters:
- _param:
- jenkins_master_host: ${_param:control_vip_address}
- jenkins_master_port: 8081
- jenkins_secret: "7c40abc1a7df2d26dd6b2e4421af17218df75a16fcbd5e3aa6017d9f47eaeabe"
- jenkins_master_url: http://${_param:jenkins_master_host}:${_param:jenkins_master_port}
- jenkins_slave_user: ${_param:jenkins_client_user}
- jenkins_slave_password: ${_param:jenkins_client_password}
- jenkins_slave_extra_opts: ""
- docker:
- client:
- stack:
- jenkins:
- service:
- slave01:
- environment:
- JENKINS_URL: ${_param:jenkins_master_url}
- JENKINS_AGENT_NAME: slave01
- JENKINS_UPDATE_SLAVE: 'true'
- JENKINS_LOGIN: ${_param:jenkins_slave_user}
- JENKINS_PASSWORD: ${_param:jenkins_slave_password}
- JAVA_OPTS: ${_param:jenkins_slave_extra_opts}
- https_proxy: ${_param:docker_https_proxy}
- http_proxy: ${_param:docker_http_proxy}
- no_proxy: ${_param:docker_no_proxy}
- deploy:
- restart_policy:
- condition: any
- placement:
- constraints:
- - "node.hostname == ${_param:cluster_node01_name}"
- image: ${_param:docker_image_jenkins_slave}
- volumes:
- - /etc/ssl/certs/java/cacerts:/etc/ssl/certs/java/cacerts:ro
- - /var/run/docker.sock:/var/run/docker.sock
- - /usr/bin/docker:/usr/bin/docker:ro
- - /var/lib/jenkins:/var/lib/jenkins
- slave02:
- environment:
- JENKINS_URL: ${_param:jenkins_master_url}
- JENKINS_AGENT_NAME: slave02
- JENKINS_UPDATE_SLAVE: 'true'
- JENKINS_LOGIN: ${_param:jenkins_slave_user}
- JENKINS_PASSWORD: ${_param:jenkins_slave_password}
- JAVA_OPTS: ${_param:jenkins_slave_extra_opts}
- https_proxy: ${_param:docker_https_proxy}
- http_proxy: ${_param:docker_http_proxy}
- no_proxy: ${_param:docker_no_proxy}
- deploy:
- restart_policy:
- condition: any
- placement:
- constraints:
- - "node.hostname == ${_param:cluster_node02_name}"
- image: ${_param:docker_image_jenkins_slave}
- volumes:
- - /etc/ssl/certs/java/cacerts:/etc/ssl/certs/java/cacerts:ro
- - /var/run/docker.sock:/var/run/docker.sock
- - /usr/bin/docker:/usr/bin/docker:ro
- - /var/lib/jenkins:/var/lib/jenkins
- slave03:
- environment:
- JENKINS_URL: ${_param:jenkins_master_url}
- JENKINS_AGENT_NAME: slave03
- JENKINS_UPDATE_SLAVE: 'true'
- JENKINS_LOGIN: ${_param:jenkins_slave_user}
- JENKINS_PASSWORD: ${_param:jenkins_slave_password}
- JAVA_OPTS: ${_param:jenkins_slave_extra_opts}
- https_proxy: ${_param:docker_https_proxy}
- http_proxy: ${_param:docker_http_proxy}
- no_proxy: ${_param:docker_no_proxy}
- deploy:
- restart_policy:
- condition: any
- placement:
- constraints:
- - "node.hostname == ${_param:cluster_node03_name}"
- image: ${_param:docker_image_jenkins_slave}
- volumes:
- - /etc/ssl/certs/java/cacerts:/etc/ssl/certs/java/cacerts:ro
- - /var/run/docker.sock:/var/run/docker.sock
- - /usr/bin/docker:/usr/bin/docker:ro
- - /var/lib/jenkins:/var/lib/jenkins
+- system.docker.swarm.stack.jenkins.slave01
+- system.docker.swarm.stack.jenkins.slave02
+- system.docker.swarm.stack.jenkins.slave03
diff --git a/docker/swarm/stack/jenkins/slave01.yml b/docker/swarm/stack/jenkins/slave01.yml
new file mode 100644
index 0000000..f616d89
--- /dev/null
+++ b/docker/swarm/stack/jenkins/slave01.yml
@@ -0,0 +1,34 @@
+classes:
+- system.docker
+- system.docker.swarm.stack.jenkins.slave_base
+parameters:
+ _param:
+ jenkins_slave01_node_name: ${_param:cluster_node01_name}
+ docker:
+ client:
+ stack:
+ jenkins:
+ service:
+ slave01:
+ environment:
+ JENKINS_URL: ${_param:jenkins_master_url}
+ JENKINS_AGENT_NAME: slave01
+ JENKINS_UPDATE_SLAVE: 'true'
+ JENKINS_LOGIN: ${_param:jenkins_slave_user}
+ JENKINS_PASSWORD: ${_param:jenkins_slave_password}
+ JAVA_OPTS: ${_param:jenkins_slave_extra_opts}
+ https_proxy: ${_param:docker_https_proxy}
+ http_proxy: ${_param:docker_http_proxy}
+ no_proxy: ${_param:docker_no_proxy}
+ deploy:
+ restart_policy:
+ condition: any
+ placement:
+ constraints:
+ - "node.hostname == ${_param:jenkins_slave01_node_name}"
+ image: ${_param:docker_image_jenkins_slave}
+ volumes:
+ - /etc/ssl/certs/java/cacerts:/etc/ssl/certs/java/cacerts:ro
+ - /var/run/docker.sock:/var/run/docker.sock
+ - /usr/bin/docker:/usr/bin/docker:ro
+ - /var/lib/jenkins:/var/lib/jenkins
diff --git a/docker/swarm/stack/jenkins/slave02.yml b/docker/swarm/stack/jenkins/slave02.yml
new file mode 100644
index 0000000..cbece06
--- /dev/null
+++ b/docker/swarm/stack/jenkins/slave02.yml
@@ -0,0 +1,34 @@
+classes:
+- system.docker
+- system.docker.swarm.stack.jenkins.slave_base
+parameters:
+ _param:
+ jenkins_slave02_node_name: ${_param:cluster_node02_name}
+ docker:
+ client:
+ stack:
+ jenkins:
+ service:
+ slave02:
+ environment:
+ JENKINS_URL: ${_param:jenkins_master_url}
+ JENKINS_AGENT_NAME: slave02
+ JENKINS_UPDATE_SLAVE: 'true'
+ JENKINS_LOGIN: ${_param:jenkins_slave_user}
+ JENKINS_PASSWORD: ${_param:jenkins_slave_password}
+ JAVA_OPTS: ${_param:jenkins_slave_extra_opts}
+ https_proxy: ${_param:docker_https_proxy}
+ http_proxy: ${_param:docker_http_proxy}
+ no_proxy: ${_param:docker_no_proxy}
+ deploy:
+ restart_policy:
+ condition: any
+ placement:
+ constraints:
+ - "node.hostname == ${_param:jenkins_slave02_node_name}"
+ image: ${_param:docker_image_jenkins_slave}
+ volumes:
+ - /etc/ssl/certs/java/cacerts:/etc/ssl/certs/java/cacerts:ro
+ - /var/run/docker.sock:/var/run/docker.sock
+ - /usr/bin/docker:/usr/bin/docker:ro
+ - /var/lib/jenkins:/var/lib/jenkins
diff --git a/docker/swarm/stack/jenkins/slave03.yml b/docker/swarm/stack/jenkins/slave03.yml
new file mode 100644
index 0000000..6ff900c
--- /dev/null
+++ b/docker/swarm/stack/jenkins/slave03.yml
@@ -0,0 +1,34 @@
+classes:
+- system.docker
+- system.docker.swarm.stack.jenkins.slave_base
+parameters:
+ _param:
+ jenkins_slave03_node_name: ${_param:cluster_node03_name}
+ docker:
+ client:
+ stack:
+ jenkins:
+ service:
+ slave03:
+ environment:
+ JENKINS_URL: ${_param:jenkins_master_url}
+ JENKINS_AGENT_NAME: slave03
+ JENKINS_UPDATE_SLAVE: 'true'
+ JENKINS_LOGIN: ${_param:jenkins_slave_user}
+ JENKINS_PASSWORD: ${_param:jenkins_slave_password}
+ JAVA_OPTS: ${_param:jenkins_slave_extra_opts}
+ https_proxy: ${_param:docker_https_proxy}
+ http_proxy: ${_param:docker_http_proxy}
+ no_proxy: ${_param:docker_no_proxy}
+ deploy:
+ restart_policy:
+ condition: any
+ placement:
+ constraints:
+ - "node.hostname == ${_param:jenkins_slave03_node_name}"
+ image: ${_param:docker_image_jenkins_slave}
+ volumes:
+ - /etc/ssl/certs/java/cacerts:/etc/ssl/certs/java/cacerts:ro
+ - /var/run/docker.sock:/var/run/docker.sock
+ - /usr/bin/docker:/usr/bin/docker:ro
+ - /var/lib/jenkins:/var/lib/jenkins
diff --git a/docker/swarm/stack/jenkins/slave_base.yml b/docker/swarm/stack/jenkins/slave_base.yml
new file mode 100644
index 0000000..630dd14
--- /dev/null
+++ b/docker/swarm/stack/jenkins/slave_base.yml
@@ -0,0 +1,9 @@
+parameters:
+ _param:
+ jenkins_master_host: ${_param:control_vip_address}
+ jenkins_master_port: 8081
+ jenkins_secret: "7c40abc1a7df2d26dd6b2e4421af17218df75a16fcbd5e3aa6017d9f47eaeabe"
+ jenkins_master_url: http://${_param:jenkins_master_host}:${_param:jenkins_master_port}
+ jenkins_slave_user: ${_param:jenkins_client_user}
+ jenkins_slave_password: ${_param:jenkins_client_password}
+ jenkins_slave_extra_opts: ""
diff --git a/docker/swarm/stack/jenkins/slave_single.yml b/docker/swarm/stack/jenkins/slave_single.yml
new file mode 100644
index 0000000..31406d1
--- /dev/null
+++ b/docker/swarm/stack/jenkins/slave_single.yml
@@ -0,0 +1,3 @@
+classes:
+- system.docker
+- system.docker.swarm.stack.jenkins.slave01