Add support for ssh jenkins slaves

PROD-29680

Change-Id: I1e2154ba311f2c0f689a472227979e6946fb7e8b
diff --git a/defaults/docker_images.yml b/defaults/docker_images.yml
index 214578e..eee109e 100644
--- a/defaults/docker_images.yml
+++ b/defaults/docker_images.yml
@@ -18,7 +18,8 @@
     docker_image_mysql: "${_param:mcp_docker_registry}/mirantis/cicd/mysql:${_param:mcp_version}"
     # jenkins:2.150.3
     docker_image_jenkins: "${_param:mcp_docker_registry}/mirantis/cicd/jenkins:${_param:mcp_version}"
-    docker_image_jenkins_slave: "${_param:mcp_docker_registry}/mirantis/cicd/jnlp-slave:${_param:mcp_version}"
+    docker_image_jenkins_jnlp_slave: "${_param:mcp_docker_registry}/mirantis/cicd/jnlp-slave:${_param:mcp_version}"
+    docker_image_jenkins_ssh_slave: "${_param:mcp_docker_registry}/mirantis/cicd/ssh-slave:${_param:mcp_version}"
     # model-generator
     docker_image_operations_api: "${_param:mcp_docker_registry}/mirantis/model-generator/operations-api:${_param:mcp_version}"
     docker_image_operations_ui: "${_param:mcp_docker_registry}/mirantis/model-generator/operations-ui:${_param:mcp_version}"
diff --git a/docker/client/images/cicd.yml b/docker/client/images/cicd.yml
index 895bde3..003b131 100644
--- a/docker/client/images/cicd.yml
+++ b/docker/client/images/cicd.yml
@@ -1,6 +1,3 @@
-classes:
-- system.docker.client.images.jenkins_master
-- system.docker.client.images.jenkins_slave
 parameters:
   docker:
     client:
diff --git a/docker/client/images/jenkins_master.yml b/docker/client/images/jenkins_master.yml
index 929c76e..d74bb20 100644
--- a/docker/client/images/jenkins_master.yml
+++ b/docker/client/images/jenkins_master.yml
@@ -1,6 +1 @@
-parameters:
-  docker:
-    client:
-      enabled: true
-      images:
-      - ${_param:docker_image_jenkins}
\ No newline at end of file
+# Left for providing upgrade path
diff --git a/docker/client/images/jenkins_slave.yml b/docker/client/images/jenkins_slave.yml
index 46114d4..d74bb20 100644
--- a/docker/client/images/jenkins_slave.yml
+++ b/docker/client/images/jenkins_slave.yml
@@ -1,6 +1 @@
-parameters:
-  docker:
-    client:
-      enabled: true
-      images:
-      - ${_param:docker_image_jenkins_slave}
+# Left for providing upgrade path
diff --git a/docker/swarm/stack/jenkins/jnlp_slave_multi.yml b/docker/swarm/stack/jenkins/jnlp_slave_multi.yml
new file mode 100644
index 0000000..5246cb7
--- /dev/null
+++ b/docker/swarm/stack/jenkins/jnlp_slave_multi.yml
@@ -0,0 +1,59 @@
+classes:
+- system.docker.swarm.stack.jenkins.jnlp_slave_single
+parameters:
+  _param:
+    jenkins_slave02_node_name: ${_param:cluster_node02_name}
+    jenkins_slave03_node_name: ${_param:cluster_node03_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_client_user}
+                JENKINS_PASSWORD: ${_param:jenkins_client_password}
+                JAVA_OPTS: "-Dhttp.proxyHost=${_param:docker_http_proxy} -Dhttp.nonProxyHosts=|jenkins_master ${_param:jenkins_slave_extra_opts}"
+                https_proxy: ${_param:docker_https_proxy}
+                http_proxy: ${_param:docker_http_proxy}
+                no_proxy: "jenkins_master,${_param:docker_no_proxy}"
+              deploy:
+                restart_policy:
+                  condition: any
+                placement:
+                  constraints:
+                    - "node.hostname == ${_param:jenkins_slave02_node_name}"
+              image: ${_param:docker_image_jenkins_jnlp_slave}
+              volumes:
+                - /etc/ssl/certs/:/etc/ssl/certs/:ro
+                - /dev/urandom:/dev/random: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_client_user}
+                JENKINS_PASSWORD: ${_param:jenkins_client_password}
+                JAVA_OPTS: "-Dhttp.proxyHost=${_param:docker_http_proxy} -Dhttp.nonProxyHosts=|jenkins_master ${_param:jenkins_slave_extra_opts}"
+                https_proxy: ${_param:docker_https_proxy}
+                http_proxy: ${_param:docker_http_proxy}
+                no_proxy: "jenkins_master,${_param:docker_no_proxy}"
+              deploy:
+                restart_policy:
+                  condition: any
+                placement:
+                  constraints:
+                  - "node.hostname == ${_param:jenkins_slave03_node_name}"
+              image: ${_param:docker_image_jenkins_jnlp_slave}
+              volumes:
+              - /etc/ssl/certs/:/etc/ssl/certs/:ro
+              - /dev/urandom:/dev/random: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/slave01.yml b/docker/swarm/stack/jenkins/jnlp_slave_single.yml
similarity index 83%
rename from docker/swarm/stack/jenkins/slave01.yml
rename to docker/swarm/stack/jenkins/jnlp_slave_single.yml
index 73e8140..8b05c47 100644
--- a/docker/swarm/stack/jenkins/slave01.yml
+++ b/docker/swarm/stack/jenkins/jnlp_slave_single.yml
@@ -1,10 +1,15 @@
 classes:
-- system.docker.swarm.stack.jenkins.slave_base
+- system.docker
 parameters:
   _param:
+    jenkins_master_url: http://jenkins_master:8080
+    jenkins_slave_extra_opts: ""
     jenkins_slave01_node_name: ${_param:cluster_node01_name}
   docker:
     client:
+      enabled: true
+      images:
+        - ${_param:docker_image_jenkins_jnlp_slave}
       stack:
         jenkins:
           service:
@@ -25,7 +30,7 @@
                 placement:
                   constraints:
                     - "node.hostname == ${_param:jenkins_slave01_node_name}"
-              image: ${_param:docker_image_jenkins_slave}
+              image: ${_param:docker_image_jenkins_jnlp_slave}
               volumes:
                 - /etc/ssl/certs/:/etc/ssl/certs/:ro
                 - /dev/urandom:/dev/random:ro
diff --git a/docker/swarm/stack/jenkins/master.yml b/docker/swarm/stack/jenkins/master.yml
index 4647521..921f111 100644
--- a/docker/swarm/stack/jenkins/master.yml
+++ b/docker/swarm/stack/jenkins/master.yml
@@ -1,6 +1,5 @@
 classes:
 - system.docker
-- system.docker.client.images.jenkins_master
 parameters:
   _param:
     jenkins_master_extra_opts: ""
@@ -9,6 +8,9 @@
     jenkins_home_dir_path: /var/jenkins_home
   docker:
     client:
+      enabled: true
+      images:
+        - ${_param:docker_image_jenkins}
       stack:
         jenkins:
           service:
diff --git a/docker/swarm/stack/jenkins/slave.yml b/docker/swarm/stack/jenkins/slave.yml
index 204b29d..4454c5a 100644
--- a/docker/swarm/stack/jenkins/slave.yml
+++ b/docker/swarm/stack/jenkins/slave.yml
@@ -1,5 +1,3 @@
+# jnlp slave
 classes:
-- system.docker
-- system.docker.swarm.stack.jenkins.slave01
-- system.docker.swarm.stack.jenkins.slave02
-- system.docker.swarm.stack.jenkins.slave03
+- system.docker.swarm.stack.jenkins.jnlp_slave_multi
diff --git a/docker/swarm/stack/jenkins/slave02.yml b/docker/swarm/stack/jenkins/slave02.yml
deleted file mode 100644
index ee198cb..0000000
--- a/docker/swarm/stack/jenkins/slave02.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-classes:
-- 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_client_user}
-                JENKINS_PASSWORD: ${_param:jenkins_client_password}
-                JAVA_OPTS: "-Dhttp.proxyHost=${_param:docker_http_proxy} -Dhttp.nonProxyHosts=|jenkins_master ${_param:jenkins_slave_extra_opts}"
-                https_proxy: ${_param:docker_https_proxy}
-                http_proxy: ${_param:docker_http_proxy}
-                no_proxy: "jenkins_master,${_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/:/etc/ssl/certs/:ro
-                - /dev/urandom:/dev/random: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
deleted file mode 100644
index b04ea2a..0000000
--- a/docker/swarm/stack/jenkins/slave03.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-classes:
-- 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_client_user}
-                JENKINS_PASSWORD: ${_param:jenkins_client_password}
-                JAVA_OPTS: "-Dhttp.proxyHost=${_param:docker_http_proxy} -Dhttp.nonProxyHosts=|jenkins_master ${_param:jenkins_slave_extra_opts}"
-                https_proxy: ${_param:docker_https_proxy}
-                http_proxy: ${_param:docker_http_proxy}
-                no_proxy: "jenkins_master,${_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/:/etc/ssl/certs/:ro
-                - /dev/urandom:/dev/random: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
deleted file mode 100644
index 3de4765..0000000
--- a/docker/swarm/stack/jenkins/slave_base.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-classes:
-- system.docker
-- system.docker.client.images.jenkins_slave
-parameters:
-  _param:
-    jenkins_master_url: http://jenkins_master:8080
-    jenkins_slave_extra_opts: ""
diff --git a/docker/swarm/stack/jenkins/slave_single.yml b/docker/swarm/stack/jenkins/slave_single.yml
index 31406d1..ee2bfac 100644
--- a/docker/swarm/stack/jenkins/slave_single.yml
+++ b/docker/swarm/stack/jenkins/slave_single.yml
@@ -1,3 +1,3 @@
+# Left for providing upgrade path
 classes:
-- system.docker
-- system.docker.swarm.stack.jenkins.slave01
+- system.docker.swarm.stack.jenkins.jnlp_slave_single
diff --git a/docker/swarm/stack/jenkins/ssh_slave_multi.yml b/docker/swarm/stack/jenkins/ssh_slave_multi.yml
new file mode 100644
index 0000000..2959e4d
--- /dev/null
+++ b/docker/swarm/stack/jenkins/ssh_slave_multi.yml
@@ -0,0 +1,66 @@
+classes:
+- system.docker.swarm.stack.jenkins.ssh_slave_single
+parameters:
+  _param:
+    jenkins_slave02_node_name: ${_param:cluster_node02_name}
+    jenkins_slave03_node_name: ${_param:cluster_node03_name}
+  docker:
+    client:
+      stack:
+        jenkins:
+          service:
+            slave02:
+              environment:
+                JENKINS_SLAVE_SSH_PUBKEY: ${_param:jenkins_admin_public_key}
+                https_proxy: ${_param:docker_https_proxy}
+                http_proxy: ${_param:docker_http_proxy}
+                no_proxy: "jenkins_master,${_param:docker_no_proxy}"
+              deploy:
+                restart_policy:
+                  condition: any
+                placement:
+                  constraints:
+                    - "node.hostname == ${_param:jenkins_slave02_node_name}"
+              image: ${_param:docker_image_jenkins_ssh_slave}
+              volumes:
+                - /etc/ssl/certs/:/etc/ssl/certs/:ro
+                - /dev/urandom:/dev/random: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_SLAVE_SSH_PUBKEY: ${_param:jenkins_admin_public_key}
+                https_proxy: ${_param:docker_https_proxy}
+                http_proxy: ${_param:docker_http_proxy}
+                no_proxy: "jenkins_master,${_param:docker_no_proxy}"
+              deploy:
+                restart_policy:
+                  condition: any
+                placement:
+                  constraints:
+                  - "node.hostname == ${_param:jenkins_slave03_node_name}"
+              image: ${_param:docker_image_jenkins_ssh_slave}
+              volumes:
+              - /etc/ssl/certs/:/etc/ssl/certs/:ro
+              - /dev/urandom:/dev/random:ro
+              - /var/run/docker.sock:/var/run/docker.sock
+              - /usr/bin/docker:/usr/bin/docker:ro
+              - /var/lib/jenkins:/var/lib/jenkins
+  jenkins:
+    client:
+      node:
+        slave02:
+          launcher:
+            type: ssh
+            host: jenkins_slave02
+            port: 22
+            username: jenkins
+            credentials: ssh_slave
+        slave03:
+          launcher:
+            type: ssh
+            host: jenkins_slave03
+            port: 22
+            username: jenkins
+            credentials: ssh_slave
diff --git a/docker/swarm/stack/jenkins/ssh_slave_single.yml b/docker/swarm/stack/jenkins/ssh_slave_single.yml
new file mode 100644
index 0000000..dbdaf1d
--- /dev/null
+++ b/docker/swarm/stack/jenkins/ssh_slave_single.yml
@@ -0,0 +1,47 @@
+classes:
+- system.docker
+parameters:
+  _param:
+    jenkins_slave01_node_name: ${_param:cluster_node01_name}
+  docker:
+    client:
+      enabled: true
+      images:
+        - ${_param:docker_image_jenkins_ssh_slave}
+      stack:
+        jenkins:
+          service:
+            slave01:
+              environment:
+                JENKINS_SLAVE_SSH_PUBKEY: ${_param:jenkins_admin_public_key}
+                https_proxy: ${_param:docker_https_proxy}
+                http_proxy: ${_param:docker_http_proxy}
+                no_proxy: "jenkins_master,${_param:docker_no_proxy}"
+              deploy:
+                restart_policy:
+                  condition: any
+                placement:
+                  constraints:
+                  - "node.hostname == ${_param:jenkins_slave01_node_name}"
+              image: ${_param:docker_image_jenkins_ssh_slave}
+              volumes:
+              - /etc/ssl/certs/:/etc/ssl/certs/:ro
+              - /dev/urandom:/dev/random:ro
+              - /var/run/docker.sock:/var/run/docker.sock
+              - /usr/bin/docker:/usr/bin/docker:ro
+              - /var/lib/jenkins:/var/lib/jenkins
+  jenkins:
+    client:
+      node:
+        slave01:
+          launcher:
+            type: ssh
+            host: jenkins_slave01
+            port: 22
+            username: jenkins
+            credentials: ssh_slave
+      credential:
+        ssh_slave:
+          username: jenkins
+          key: ${_param:jenkins_admin_private_key}
+
diff --git a/jenkins/client/ssh_node.yml b/jenkins/client/ssh_node.yml
new file mode 100644
index 0000000..4203e6b
--- /dev/null
+++ b/jenkins/client/ssh_node.yml
@@ -0,0 +1,13 @@
+parameters:
+  jenkins:
+    client:
+      node:
+        slave01:
+          launcher:
+            type: ssh
+        slave02:
+          launcher:
+            type: ssh
+        slave03:
+          launcher:
+            type: ssh
diff --git a/kubernetes/control/services/drivetrain/init.yml b/kubernetes/control/services/drivetrain/init.yml
index 2702393..8039aba 100644
--- a/kubernetes/control/services/drivetrain/init.yml
+++ b/kubernetes/control/services/drivetrain/init.yml
@@ -2,7 +2,6 @@
 - system.kubernetes.control.services.drivetrain.gerrit
 - system.kubernetes.control.services.drivetrain.glusterfs_cluster
 - system.kubernetes.control.services.drivetrain.jenkins_master
-- system.kubernetes.control.services.drivetrain.jenkins_slave_multi
 parameters:
   _param:
     kdt_http_proxy: ""
diff --git a/kubernetes/control/services/drivetrain/jenkins_jnlp_slave_multi.yml b/kubernetes/control/services/drivetrain/jenkins_jnlp_slave_multi.yml
new file mode 100644
index 0000000..e46228c
--- /dev/null
+++ b/kubernetes/control/services/drivetrain/jenkins_jnlp_slave_multi.yml
@@ -0,0 +1,110 @@
+classes:
+- system.kubernetes.control.services.drivetrain.jenkins_jnlp_slave_single
+parameters:
+  kubernetes:
+    control:
+      service:
+        jenkins_slave02:
+          create: true
+          service: slave02
+          namespace: drivetrain
+          apiVersion: extensions/v1beta1
+          kind: Deployment
+          replicas: 1
+          container:
+            jenkins-slave:
+              image: ${_param:docker_image_jenkins_jnlp_slave}
+              image_pull_policy: IfNotPresent
+              variables:
+                - name: JENKINS_URL
+                  value: ${_param:jenkins_master_url}
+                - name: JENKINS_AGENT_NAME
+                  value: slave02
+                - name: JENKINS_UPDATE_SLAVE
+                  value: "'true'"
+                - name: JENKINS_LOGIN
+                  value: ${_param:jenkins_client_user}
+                - name: JENKINS_PASSWORD
+                  value: ${_param:jenkins_client_password}
+                - name: JAVA_OPTS
+                  value: "-Dhttp.proxyHost=${_param:kdt_http_proxy} -Dhttp.nonProxyHosts=|jenkins ${_param:jenkins_slave_extra_opts}"
+                - name: https_proxy
+                  value: ${_param:kdt_https_proxy}
+                - name: http_proxy
+                  value: ${_param:kdt_http_proxy}
+                - name: no_proxy
+                  value: ${_param:kdt_no_proxy}
+              volumes:
+                - name: jenkins-slave02
+                  mount: /srv/volumes/jenkins_slaves/slave02
+                  read_only: false
+                - name: docker-sock-volume02
+                  mount: /var/run/docker.sock
+                  read_only: false
+                - name: entropy-volume02
+                  mount: /dev/random
+                  read_only: true
+          volume:
+            jenkins-slave02:
+              type: glusterfs
+              endpoints: glusterfs
+              path: jenkins_slave02
+              read_only: false
+            docker-sock-volume02:
+              type: hostPath
+              path: /var/run/docker.sock
+            entropy-volume02:
+              type: hostPath
+              path: /dev/urandom
+        jenkins_slave03:
+          create: true
+          service: slave03
+          namespace: drivetrain
+          apiVersion: extensions/v1beta1
+          kind: Deployment
+          replicas: 1
+          container:
+            jenkins-slave:
+              image: ${_param:docker_image_jenkins_jnlp_slave}
+              image_pull_policy: IfNotPresent
+              variables:
+              - name: JENKINS_URL
+                value: ${_param:jenkins_master_url}
+              - name: JENKINS_AGENT_NAME
+                value: slave03
+              - name: JENKINS_UPDATE_SLAVE
+                value: "'true'"
+              - name: JENKINS_LOGIN
+                value: ${_param:jenkins_client_user}
+              - name: JENKINS_PASSWORD
+                value: ${_param:jenkins_client_password}
+              - name: JAVA_OPTS
+                value: "-Dhttp.proxyHost=${_param:kdt_http_proxy} -Dhttp.nonProxyHosts=|jenkins ${_param:jenkins_slave_extra_opts}"
+              - name: https_proxy
+                value: ${_param:kdt_https_proxy}
+              - name: http_proxy
+                value: ${_param:kdt_http_proxy}
+              - name: no_proxy
+                value: ${_param:kdt_no_proxy}
+              volumes:
+              - name: jenkins-slave03
+                mount: /srv/volumes/jenkins_slaves/slave03
+                read_only: false
+              - name: docker-sock-volume03
+                mount: /var/run/docker.sock
+                read_only: false
+              - name: entropy-volume03
+                mount: /dev/random
+                read_only: true
+          volume:
+            jenkins-slave03:
+              type: glusterfs
+              endpoints: glusterfs
+              path: jenkins_slave03
+              read_only: false
+            docker-sock-volume03:
+              type: hostPath
+              path: /var/run/docker.sock
+            entropy-volume03:
+              type: hostPath
+              path: /dev/urandom
diff --git a/kubernetes/control/services/drivetrain/jenkins_jnlp_slave_single.yml b/kubernetes/control/services/drivetrain/jenkins_jnlp_slave_single.yml
new file mode 100644
index 0000000..7f343f5
--- /dev/null
+++ b/kubernetes/control/services/drivetrain/jenkins_jnlp_slave_single.yml
@@ -0,0 +1,62 @@
+parameters:
+  _param:
+    jenkins_slave_extra_opts: ""
+    jenkins_master_url: http://jenkins:8080/jenkins
+  kubernetes:
+    pool:
+      images:
+      - ${_param:docker_image_jenkins_jnlp_slave}
+    control:
+      service:
+        jenkins_slave01:
+          create: true
+          service: slave01
+          namespace: drivetrain
+          apiVersion: extensions/v1beta1
+          kind: Deployment
+          replicas: 1
+          container:
+            jenkins-slave:
+              image: ${_param:docker_image_jenkins_jnlp_slave}
+              image_pull_policy: IfNotPresent
+              variables:
+                - name: JENKINS_URL
+                  value: ${_param:jenkins_master_url}
+                - name: JENKINS_AGENT_NAME
+                  value: slave01
+                - name: JENKINS_UPDATE_SLAVE
+                  value: "'true'"
+                - name: JENKINS_LOGIN
+                  value: ${_param:jenkins_client_user}
+                - name: JENKINS_PASSWORD
+                  value: ${_param:jenkins_client_password}
+                - name: JAVA_OPTS
+                  value: "-Dhttp.proxyHost=${_param:kdt_http_proxy} -Dhttp.nonProxyHosts=|jenkins ${_param:jenkins_slave_extra_opts}"
+                - name: https_proxy
+                  value: ${_param:kdt_https_proxy}
+                - name: http_proxy
+                  value: ${_param:kdt_http_proxy}
+                - name: no_proxy
+                  value: ${_param:kdt_no_proxy}
+              volumes:
+                - name: jenkins-slave01
+                  mount: /srv/volumes/jenkins_slaves/slave01
+                  read_only: false
+                - name: docker-sock-volume
+                  mount: /var/run/docker.sock
+                  read_only: false
+                - name: entropy-volume
+                  mount: /dev/random
+                  read_only: true
+          volume:
+            jenkins-slave01:
+              type: glusterfs
+              endpoints: glusterfs
+              path: jenkins_slave01
+              read_only: false
+            docker-sock-volume:
+              type: hostPath
+              path: /var/run/docker.sock
+            entropy-volume:
+              type: hostPath
+              path: /dev/urandom
diff --git a/kubernetes/control/services/drivetrain/jenkins_slave_multi.yml b/kubernetes/control/services/drivetrain/jenkins_slave_multi.yml
index f1617b4..9165ef6 100644
--- a/kubernetes/control/services/drivetrain/jenkins_slave_multi.yml
+++ b/kubernetes/control/services/drivetrain/jenkins_slave_multi.yml
@@ -1,110 +1,3 @@
+# Remove this file after CC update
 classes:
-- system.kubernetes.control.services.drivetrain.jenkins_slave_single
-parameters:
-  kubernetes:
-    control:
-      service:
-        jenkins_slave02:
-          create: true
-          service: slave02
-          namespace: drivetrain
-          apiVersion: extensions/v1beta1
-          kind: Deployment
-          replicas: 1
-          container:
-            jenkins-slave:
-              image: ${_param:docker_image_jenkins_slave}
-              image_pull_policy: IfNotPresent
-              variables:
-                - name: JENKINS_URL
-                  value: ${_param:jenkins_master_url}
-                - name: JENKINS_AGENT_NAME
-                  value: slave02
-                - name: JENKINS_UPDATE_SLAVE
-                  value: "'true'"
-                - name: JENKINS_LOGIN
-                  value: ${_param:jenkins_client_user}
-                - name: JENKINS_PASSWORD
-                  value: ${_param:jenkins_client_password}
-                - name: JAVA_OPTS
-                  value: "-Dhttp.proxyHost=${_param:kdt_http_proxy} -Dhttp.nonProxyHosts=|jenkins ${_param:jenkins_slave_extra_opts}"
-                - name: https_proxy
-                  value: ${_param:kdt_https_proxy}
-                - name: http_proxy
-                  value: ${_param:kdt_http_proxy}
-                - name: no_proxy
-                  value: ${_param:kdt_no_proxy}
-              volumes:
-                - name: jenkins-slave02
-                  mount: /srv/volumes/jenkins_slaves/slave02
-                  read_only: false
-                - name: docker-sock-volume02
-                  mount: /var/run/docker.sock
-                  read_only: false
-                - name: entropy-volume02
-                  mount: /dev/random
-                  read_only: true
-          volume:
-            jenkins-slave02:
-              type: glusterfs
-              endpoints: glusterfs
-              path: jenkins_slave02
-              read_only: false
-            docker-sock-volume02:
-              type: hostPath
-              path: /var/run/docker.sock
-            entropy-volume02:
-              type: hostPath
-              path: /dev/urandom
-        jenkins_slave03:
-          create: true
-          service: slave03
-          namespace: drivetrain
-          apiVersion: extensions/v1beta1
-          kind: Deployment
-          replicas: 1
-          container:
-            jenkins-slave:
-              image: ${_param:docker_image_jenkins_slave}
-              image_pull_policy: IfNotPresent
-              variables:
-              - name: JENKINS_URL
-                value: ${_param:jenkins_master_url}
-              - name: JENKINS_AGENT_NAME
-                value: slave03
-              - name: JENKINS_UPDATE_SLAVE
-                value: "'true'"
-              - name: JENKINS_LOGIN
-                value: ${_param:jenkins_client_user}
-              - name: JENKINS_PASSWORD
-                value: ${_param:jenkins_client_password}
-              - name: JAVA_OPTS
-                value: "-Dhttp.proxyHost=${_param:kdt_http_proxy} -Dhttp.nonProxyHosts=|jenkins ${_param:jenkins_slave_extra_opts}"
-              - name: https_proxy
-                value: ${_param:kdt_https_proxy}
-              - name: http_proxy
-                value: ${_param:kdt_http_proxy}
-              - name: no_proxy
-                value: ${_param:kdt_no_proxy}
-              volumes:
-              - name: jenkins-slave03
-                mount: /srv/volumes/jenkins_slaves/slave03
-                read_only: false
-              - name: docker-sock-volume03
-                mount: /var/run/docker.sock
-                read_only: false
-              - name: entropy-volume03
-                mount: /dev/random
-                read_only: true
-          volume:
-            jenkins-slave03:
-              type: glusterfs
-              endpoints: glusterfs
-              path: jenkins_slave03
-              read_only: false
-            docker-sock-volume03:
-              type: hostPath
-              path: /var/run/docker.sock
-            entropy-volume03:
-              type: hostPath
-              path: /dev/urandom
+- system.kubernetes.control.services.drivetrain.jenkins_jnlp_slave_multi
\ No newline at end of file
diff --git a/kubernetes/control/services/drivetrain/jenkins_slave_single.yml b/kubernetes/control/services/drivetrain/jenkins_slave_single.yml
index ee327dd..b4fdfe9 100644
--- a/kubernetes/control/services/drivetrain/jenkins_slave_single.yml
+++ b/kubernetes/control/services/drivetrain/jenkins_slave_single.yml
@@ -1,59 +1,3 @@
-parameters:
-  _param:
-    jenkins_slave_extra_opts: ""
-    jenkins_master_url: http://jenkins:8080/jenkins
-  kubernetes:
-    control:
-      service:
-        jenkins_slave01:
-          create: true
-          service: slave01
-          namespace: drivetrain
-          apiVersion: extensions/v1beta1
-          kind: Deployment
-          replicas: 1
-          container:
-            jenkins-slave:
-              image: ${_param:docker_image_jenkins_slave}
-              image_pull_policy: IfNotPresent
-              variables:
-                - name: JENKINS_URL
-                  value: ${_param:jenkins_master_url}
-                - name: JENKINS_AGENT_NAME
-                  value: slave01
-                - name: JENKINS_UPDATE_SLAVE
-                  value: "'true'"
-                - name: JENKINS_LOGIN
-                  value: ${_param:jenkins_client_user}
-                - name: JENKINS_PASSWORD
-                  value: ${_param:jenkins_client_password}
-                - name: JAVA_OPTS
-                  value: "-Dhttp.proxyHost=${_param:kdt_http_proxy} -Dhttp.nonProxyHosts=|jenkins ${_param:jenkins_slave_extra_opts}"
-                - name: https_proxy
-                  value: ${_param:kdt_https_proxy}
-                - name: http_proxy
-                  value: ${_param:kdt_http_proxy}
-                - name: no_proxy
-                  value: ${_param:kdt_no_proxy}
-              volumes:
-                - name: jenkins-slave01
-                  mount: /srv/volumes/jenkins_slaves/slave01
-                  read_only: false
-                - name: docker-sock-volume
-                  mount: /var/run/docker.sock
-                  read_only: false
-                - name: entropy-volume
-                  mount: /dev/random
-                  read_only: true
-          volume:
-            jenkins-slave01:
-              type: glusterfs
-              endpoints: glusterfs
-              path: jenkins_slave01
-              read_only: false
-            docker-sock-volume:
-              type: hostPath
-              path: /var/run/docker.sock
-            entropy-volume:
-              type: hostPath
-              path: /dev/urandom
+# Remove this file after CC update
+classes:
+- system.kubernetes.control.services.drivetrain.jenkins_jnlp_slave_single
\ No newline at end of file
diff --git a/kubernetes/control/services/drivetrain/jenkins_ssh_slave_multi.yml b/kubernetes/control/services/drivetrain/jenkins_ssh_slave_multi.yml
new file mode 100644
index 0000000..af7a579
--- /dev/null
+++ b/kubernetes/control/services/drivetrain/jenkins_ssh_slave_multi.yml
@@ -0,0 +1,125 @@
+classes:
+- system.kubernetes.control.services.drivetrain.jenkins_ssh_slave_single
+parameters:
+  kubernetes:
+    control:
+      service:
+        jenkins_slave02:
+          create: true
+          service: slave02
+          namespace: drivetrain
+          apiVersion: extensions/v1beta1
+          kind: Deployment
+          replicas: 1
+          container:
+            jenkins-slave:
+              image: ${_param:docker_image_jenkins_ssh_slave}
+              image_pull_policy: IfNotPresent
+              variables:
+                - name: JENKINS_URL
+                  value: ${_param:jenkins_master_url}
+                - name: JENKINS_AGENT_NAME
+                  value: slave02
+                - name: JENKINS_UPDATE_SLAVE
+                  value: "'true'"
+                - name: JENKINS_LOGIN
+                  value: ${_param:jenkins_client_user}
+                - name: JENKINS_PASSWORD
+                  value: ${_param:jenkins_client_password}
+                - name: JAVA_OPTS
+                  value: "-Dhttp.proxyHost=${_param:kdt_http_proxy} -Dhttp.nonProxyHosts=|jenkins ${_param:jenkins_slave_extra_opts}"
+                - name: https_proxy
+                  value: ${_param:kdt_https_proxy}
+                - name: http_proxy
+                  value: ${_param:kdt_http_proxy}
+                - name: no_proxy
+                  value: ${_param:kdt_no_proxy}
+              volumes:
+                - name: jenkins-slave02
+                  mount: /srv/volumes/jenkins_slaves/slave02
+                  read_only: false
+                - name: docker-sock-volume02
+                  mount: /var/run/docker.sock
+                  read_only: false
+                - name: entropy-volume02
+                  mount: /dev/random
+                  read_only: true
+          volume:
+            jenkins-slave02:
+              type: glusterfs
+              endpoints: glusterfs
+              path: jenkins_slave02
+              read_only: false
+            docker-sock-volume02:
+              type: hostPath
+              path: /var/run/docker.sock
+            entropy-volume02:
+              type: hostPath
+              path: /dev/urandom
+        jenkins_slave03:
+          create: true
+          service: slave03
+          namespace: drivetrain
+          apiVersion: extensions/v1beta1
+          kind: Deployment
+          replicas: 1
+          container:
+            jenkins-slave:
+              image: ${_param:docker_image_jenkins_jnlp_slave}
+              image_pull_policy: IfNotPresent
+              variables:
+              - name: JENKINS_URL
+                value: ${_param:jenkins_master_url}
+              - name: JENKINS_AGENT_NAME
+                value: slave03
+              - name: JENKINS_UPDATE_SLAVE
+                value: "'true'"
+              - name: JENKINS_LOGIN
+                value: ${_param:jenkins_client_user}
+              - name: JENKINS_PASSWORD
+                value: ${_param:jenkins_client_password}
+              - name: JAVA_OPTS
+                value: "-Dhttp.proxyHost=${_param:kdt_http_proxy} -Dhttp.nonProxyHosts=|jenkins ${_param:jenkins_slave_extra_opts}"
+              - name: https_proxy
+                value: ${_param:kdt_https_proxy}
+              - name: http_proxy
+                value: ${_param:kdt_http_proxy}
+              - name: no_proxy
+                value: ${_param:kdt_no_proxy}
+              volumes:
+              - name: jenkins-slave03
+                mount: /srv/volumes/jenkins_slaves/slave03
+                read_only: false
+              - name: docker-sock-volume03
+                mount: /var/run/docker.sock
+                read_only: false
+              - name: entropy-volume03
+                mount: /dev/random
+                read_only: true
+          volume:
+            jenkins-slave03:
+              type: glusterfs
+              endpoints: glusterfs
+              path: jenkins_slave03
+              read_only: false
+            docker-sock-volume03:
+              type: hostPath
+              path: /var/run/docker.sock
+            entropy-volume03:
+              type: hostPath
+              path: /dev/urandom
+  jenkins:
+    client:
+      node:
+        slave02:
+          launcher:
+            type: ssh
+            host: jenkins_slave02
+            port: 22
+            credentials: ssh_slave
+        slave03:
+          launcher:
+            type: ssh
+            host: jenkins_slave03
+            port: 22
+            credentials: ssh_slave
diff --git a/kubernetes/control/services/drivetrain/jenkins_ssh_slave_single.yml b/kubernetes/control/services/drivetrain/jenkins_ssh_slave_single.yml
new file mode 100644
index 0000000..f122b8c
--- /dev/null
+++ b/kubernetes/control/services/drivetrain/jenkins_ssh_slave_single.yml
@@ -0,0 +1,63 @@
+parameters:
+  _param:
+  kubernetes:
+    pool:
+      images:
+        - ${_param:docker_image_jenkins_ssh_slave}
+    control:
+      service:
+        jenkins_slave01:
+          create: true
+          service: slave01
+          namespace: drivetrain
+          apiVersion: extensions/v1beta1
+          kind: Deployment
+          replicas: 1
+          container:
+            jenkins-slave:
+              image: ${_param:docker_image_jenkins_ssh_slave}
+              image_pull_policy: IfNotPresent
+              variables:
+                - name: JENKINS_SLAVE_SSH_PUBKEY
+                  value: ${_param:jenkins_admin_public_key}
+                - name: https_proxy
+                  value: ${_param:kdt_https_proxy}
+                - name: http_proxy
+                  value: ${_param:kdt_http_proxy}
+                - name: no_proxy
+                  value: ${_param:kdt_no_proxy}
+              volumes:
+                - name: jenkins-slave01
+                  mount: /srv/volumes/jenkins_slaves/slave01
+                  read_only: false
+                - name: docker-sock-volume
+                  mount: /var/run/docker.sock
+                  read_only: false
+                - name: entropy-volume
+                  mount: /dev/random
+                  read_only: true
+          volume:
+            jenkins-slave01:
+              type: glusterfs
+              endpoints: glusterfs
+              path: jenkins_slave01
+              read_only: false
+            docker-sock-volume:
+              type: hostPath
+              path: /var/run/docker.sock
+            entropy-volume:
+              type: hostPath
+              path: /dev/urandom
+  jenkins:
+    client:
+      node:
+        slave01:
+          launcher:
+            type: ssh
+            host: jenkins_slave01
+            port: 22
+            credentials: ssh_slave
+      credential:
+        ssh_slave:
+          username: jenkins
+          key: ${_param:jenkins_admin_private_key}
diff --git a/kubernetes/pool/images/drivetrain.yml b/kubernetes/pool/images/drivetrain.yml
index c62a31c..48d4bdb 100644
--- a/kubernetes/pool/images/drivetrain.yml
+++ b/kubernetes/pool/images/drivetrain.yml
@@ -3,7 +3,6 @@
     pool:
       images:
       - ${_param:docker_image_gerrit}
-      - ${_param:docker_image_jenkins_slave}
       - ${_param:docker_image_jenkins}
       - ${_param:docker_image_openldap}
       - ${_param:docker_image_phpldapadmin}