Install jenkins in docker on CFG node

* Bump system

Change-Id: I0888f26a6866eab7d71495b59578198ca3dc94a8
Related-task: #PROD-24934 (PROD:24934)
diff --git a/classes/cluster/mcp-day01/infra/config.yml b/classes/cluster/mcp-day01/infra/config.yml
index 33e7772..b59a4eb 100644
--- a/classes/cluster/mcp-day01/infra/config.yml
+++ b/classes/cluster/mcp-day01/infra/config.yml
@@ -1,4 +1,5 @@
 classes:
+- system.linux.system.repo.mcp.apt_mirantis.docker
 - system.linux.system.repo.mcp.apt_mirantis.extra
 - system.linux.system.repo.mcp.apt_mirantis.saltstack
 - system.linux.system.repo.mcp.apt_mirantis.ubuntu
@@ -7,7 +8,8 @@
 - system.salt.master.api
 - system.reclass.storage.salt
 - cluster.mcp-day01.infra.maas
-- cluster.mcp-day01.infra.jenkins
+- cluster.mcp-day01.infra.docker
+- cluster.mcp-day01.infra.jenkins_base
 - cluster.mcp-day01.infra
 parameters:
   _param:
@@ -20,6 +22,9 @@
     salt_api_password_hash: "$6$lGeSiPvI$Gsul5ejaLB41ITn3G56QrgM0qZMW4zXgKc.oSGn.AJLc4Salx/XMBewQYwGkdHc6.ZQvPRQNeGByzYX8kdGae/"
     salt_api_password: Ll7yvUFrd1xWe71RT4m9EmznrUPkqw6c
     salt_master_host: ${_param:infra_config_deploy_address}
+    single_address: ${_param:infra_config_deploy_address}
+    cluster_node01_address: ${_param:infra_config_deploy_address}
+    cluster_vip_address: ${_param:infra_config_deploy_address}
   linux:
     network:
       interface:
diff --git a/classes/cluster/mcp-day01/infra/docker.yml b/classes/cluster/mcp-day01/infra/docker.yml
new file mode 100644
index 0000000..43dcb53
--- /dev/null
+++ b/classes/cluster/mcp-day01/infra/docker.yml
@@ -0,0 +1,13 @@
+classes:
+- system.docker.host
+- system.docker.client
+- system.docker.swarm.manager
+parameters:
+  _param:
+    mcp_docker_registry: "docker-prod-local.artifactory.mirantis.com"
+  docker:
+    host:
+      insecure_registries:
+      - ${_param:mcp_docker_registry}
+      options:
+        bridge: none
diff --git a/classes/cluster/mcp-day01/infra/init.yml b/classes/cluster/mcp-day01/infra/init.yml
index a75c79f..a0cc33f 100644
--- a/classes/cluster/mcp-day01/infra/init.yml
+++ b/classes/cluster/mcp-day01/infra/init.yml
@@ -6,7 +6,7 @@
     # TODO: Uncomment next line "linux_system_user_sudo: true" during the deployment.
     # Don't set it "false" before you configure sudo policies and enable power users.
     # linux_system_user_sudo: true
-    apt_mk_version: "proposed"
+    mcp_version: "proposed"
     linux_repo_refresh_db: true
     infra_config_hostname: cfg01
     salt_minion_ca_host: ${_param:infra_config_hostname}.${_param:cluster_domain}
diff --git a/classes/cluster/mcp-day01/infra/jenkins.yml b/classes/cluster/mcp-day01/infra/jenkins.yml
deleted file mode 100644
index 82187c8..0000000
--- a/classes/cluster/mcp-day01/infra/jenkins.yml
+++ /dev/null
@@ -1,143 +0,0 @@
-classes:
-- system.jenkins.master.config
-- system.jenkins.master.single
-- system.jenkins.client.job.deploy.openstack
-- system.jenkins.client
-- system.jenkins.client.credential.salt
-- system.jenkins.client.user.admin
-- system.linux.system.repo.mcp.apt_mirantis.jenkins
-parameters:
-  _param:
-    jenkins_client_user: admin
-    jenkins_client_password: r00tme
-    jenkins_admin_password: r00tme
-    jenkins_master_host: ${_param:infra_config_deploy_address}
-    jenkins_git_url: 'git@cfg01:/home/repo'
-    jenkins_gerrit_url: ${_param:jenkins_git_url}
-    jenkins_admin_token: AQAAABAAAABwpVdkS7iy4UHuvcbhzVNsGi85cXPhSBCrt/qKkTCNHRXuIlITVCdX9xoTHb5lllS8PAbQlo8ELG/2T3Y+aZkkzKgQrNSqvvbNie8XOMJmsAEN3xbbU7r8iYCZ3jR+VNEgw3BVcPXKyU0rPKm7uYLuHifQ+uRZFCd5v66Mo5q902Y=
-    git_private_key: |
-      -----BEGIN RSA PRIVATE KEY-----
-      MIIEpAIBAAKCAQEA6eooyu4/EBwHKMSDFqWych5qMEattpOI2cSY8dc3dG1QX2BQ
-      lP+WzCT42vopVZ+Mh3Iwr+Gyu1pM6yg9dNhWAEoU9BrE7cOnNQc0MqZ6OGP4rPUc
-      1g7W2pD+1Qtfka8GF60GiHQaEu9QEDN1gmg68uBUFG4CDTCXKQbBYM0HAb6ozUQh
-      aqFd2pT28R7j4oT7zylYxyPs9FZQgq2sMkzbAz+99YazUpGk0lUU4sBOhLZOAsC+
-      4lfazBUnSha43QaSNEWurxlU9d9sBoNCxdjSveUM1nzI838QbdF1kmq60yqH31Gw
-      QnX21pOTYC+I3x6/R0rn4/mdEMkTK6kWAbNJdQIDAQABAoIBAEoW5vDP4Z2iowng
-      pHzJ4umOhKfh2yfXNyNyx9biCiiQb0KmaR+ojQUAOOpzDiCWtpY4Lv+mh0wcX/yj
-      9ENMOoFA9b4TtIhyzkVXkMryPAgccimmQYnzjU4RWwXz4kNsoothPI5/57pTnpJj
-      GjdB+Fnxf/Awn+m5mEdgYmPczPlZ5VWZZL7pEAeiDADGDP++4Iu1vtr9SztZP3BC
-      aJGGQjQ/aLTH3rtAmhuFmMRV5qWes4MOmja+fi+husFJql24rAfHt9mvVcG5QUnz
-      4hPzsAb+BKdByienJLzkqQq3zwueN4AxypScTl6SHYo3Z7HwYKZGlhLSbg0shxYG
-      lvPbO4kCgYEA/TYUYuemcJsIEcE4KKyEQKBPk0HsaOz4FkTZDy4JaFIk8bBBCxJb
-      0r2XimwE0UaMWx+OLKGcMxwO8ol8ft6ywvwV41JX0Ir+wr2NwRcLHZybczKd1KnL
-      VtMENE0vR6CEVlM+XeijZkyvJcfjy1DtbwQlqy3Xtie3ahP2nHNNpaMCgYEA7H2s
-      eMeG8H7XHge+5lpWEbOFaN5t02S4S4mz2Qcjm81s0pUhgQtDJdFb1qfIgBXR1Kz1
-      FwicatyYZFGnOrdgo27lrheUgpqXnXrqjgrIbfAaw+zZiQBOnhpBFV/C8FTYIHL5
-      nGpcpyVTix1zmbmaO2Mx6ScxAs/Hr7h+WGBFVgcCgYEAm+bTMH5OdSCPHFdqG2j0
-      2NGbjSBWzdexfAyR1I3Uzv1cr86EjauVC7Ed/+U4Jh4YxvYr1IEAqltJPL24AGlf
-      iTwqwdbuKIGcEA0jnVJxzp6g+5GbqdeNUf0EpqsrRB+pu3jvemSFTrRCVrG3KHTA
-      a80S4E2OdiIIBPEbswIvOZ8CgYEA2qwOKZQdcw1l7g+tdiR7x1xe9KwPk1Njkf1f
-      PkN6qpsVj9Zzp3X5feOLbv2vyLfkUSooakb9E1as1r4lyoY7poNpf0Owf99gaC56
-      6iKQWA+XQCkmsKaHC2wtWA03HLDnM4H8yqQSzj8Wc+EkvjU/psA/K16g0/+6ngIT
-      WbaTBksCgYBwqik2xtpU/T04kvp4Nxn1B5zF6DNtHb/0bT3BtH4K0Uyb0CMtj6dH
-      apPxcd8cUZ/QIC7alF51jY2DV1q59UxYNs816KoEXCzvCChpZlxq/ugtybyh62xw
-      CZITVJhb06RGOO0TrQybNQ+K8H4J8flt6CZ47vDjyLD3vp+BjmLz6Q==
-      -----END RSA PRIVATE KEY-----
-  linux:
-    system:
-      directory:
-        /home/repo/mcp-ci/pipeline-library:
-          user: git
-          group: www-data
-          mode: 755
-          makedirs: true
-        /home/repo/mk/mk-pipelines:
-          user: git
-          group: www-data
-          mode: 755
-          makedirs: true
-        /var/lib/jenkins/.ssh:
-          user: jenkins
-          group: jenkins
-          mode: 700
-          makedirs: true
-      package:
-        jenkins:
-          version: latest
-        virtualenv:
-          version: latest
-        # For offline pipeline ran
-        salt-pepper:
-          version: latest
-      # file for backwards compatibility of mcp-common-scripts
-      file:
-        /var/lib/jenkins/jenkins.model.JenkinsLocationConfiguration.xml:
-          user: jenkins
-          group: jenkins
-          mode: 644
-          makedirs: true
-      config:
-        jenkins_master:
-          pillar:
-            jenkins:
-              master:
-                home: /var/lib/jenkins
-      user:
-        git:
-          enabled: true
-          name: git
-          sudo: false
-          full_name: git
-          home: /home/git
-        jenkins:
-          enabled: true
-          name: jenkins
-          sudo: false
-          full_name: jenkins
-          home: /var/lib/jenkins
-  openssh:
-    server:
-      enabled: true
-      user:
-        git:
-          enabled: true
-          public_keys:
-            - key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDp6ijK7j8QHAcoxIMWpbJyHmowRq22k4jZxJjx1zd0bVBfYFCU/5bMJPja+ilVn4yHcjCv4bK7WkzrKD102FYAShT0GsTtw6c1BzQypno4Y/is9RzWDtbakP7VC1+RrwYXrQaIdBoS71AQM3WCaDry4FQUbgINMJcpBsFgzQcBvqjNRCFqoV3alPbxHuPihPvPKVjHI+z0VlCCrawyTNsDP731hrNSkaTSVRTiwE6Etk4CwL7iV9rMFSdKFrjdBpI0Ra6vGVT132wGg0LF2NK95QzWfMjzfxBt0XWSarrTKoffUbBCdfbWk5NgL4jfHr9HSufj+Z0QyRMrqRYBs0l1
-          user: ${linux:system:user:git}
-    client:
-      enabled: true
-      user:
-        jenkins:
-          enabled: true
-          private_key:
-            type: rsa
-            key: ${_param:git_private_key}
-          user: ${linux:system:user:jenkins}
-          config:
-            cfg01:
-              identityfile: '/var/lib/jenkins/.ssh/id_rsa'
-  jenkins:
-    master:
-      http:
-        port: 8081
-    client:
-      theme:
-        css_url: '/userContent/theme/mirantis.css'
-        js_url: '/userContent/theme/mirantis.js'
-      node:
-        master:
-          node_mode: Normal
-          remote_home: /var/lib/jenkins
-          num_executors: 4
-          launcher:
-            type: master
-          labels:
-            - python
-            - test
-      lib:
-        pipeline-library:
-          credential_id: git
-  git:
-    server:
-      enabled: true
-      directory: /home/repo
diff --git a/classes/cluster/mcp-day01/infra/jenkins_base.yml b/classes/cluster/mcp-day01/infra/jenkins_base.yml
new file mode 100644
index 0000000..2c72f25
--- /dev/null
+++ b/classes/cluster/mcp-day01/infra/jenkins_base.yml
@@ -0,0 +1,102 @@
+# Basic folders, users and packages required for jenkins in docker
+parameters:
+  _param:
+    jenkins_master_user_id: 1000
+    jenkins_slave_user_id: 10000
+    git_private_key: |
+      -----BEGIN RSA PRIVATE KEY-----
+      MIIEpAIBAAKCAQEA6eooyu4/EBwHKMSDFqWych5qMEattpOI2cSY8dc3dG1QX2BQ
+      lP+WzCT42vopVZ+Mh3Iwr+Gyu1pM6yg9dNhWAEoU9BrE7cOnNQc0MqZ6OGP4rPUc
+      1g7W2pD+1Qtfka8GF60GiHQaEu9QEDN1gmg68uBUFG4CDTCXKQbBYM0HAb6ozUQh
+      aqFd2pT28R7j4oT7zylYxyPs9FZQgq2sMkzbAz+99YazUpGk0lUU4sBOhLZOAsC+
+      4lfazBUnSha43QaSNEWurxlU9d9sBoNCxdjSveUM1nzI838QbdF1kmq60yqH31Gw
+      QnX21pOTYC+I3x6/R0rn4/mdEMkTK6kWAbNJdQIDAQABAoIBAEoW5vDP4Z2iowng
+      pHzJ4umOhKfh2yfXNyNyx9biCiiQb0KmaR+ojQUAOOpzDiCWtpY4Lv+mh0wcX/yj
+      9ENMOoFA9b4TtIhyzkVXkMryPAgccimmQYnzjU4RWwXz4kNsoothPI5/57pTnpJj
+      GjdB+Fnxf/Awn+m5mEdgYmPczPlZ5VWZZL7pEAeiDADGDP++4Iu1vtr9SztZP3BC
+      aJGGQjQ/aLTH3rtAmhuFmMRV5qWes4MOmja+fi+husFJql24rAfHt9mvVcG5QUnz
+      4hPzsAb+BKdByienJLzkqQq3zwueN4AxypScTl6SHYo3Z7HwYKZGlhLSbg0shxYG
+      lvPbO4kCgYEA/TYUYuemcJsIEcE4KKyEQKBPk0HsaOz4FkTZDy4JaFIk8bBBCxJb
+      0r2XimwE0UaMWx+OLKGcMxwO8ol8ft6ywvwV41JX0Ir+wr2NwRcLHZybczKd1KnL
+      VtMENE0vR6CEVlM+XeijZkyvJcfjy1DtbwQlqy3Xtie3ahP2nHNNpaMCgYEA7H2s
+      eMeG8H7XHge+5lpWEbOFaN5t02S4S4mz2Qcjm81s0pUhgQtDJdFb1qfIgBXR1Kz1
+      FwicatyYZFGnOrdgo27lrheUgpqXnXrqjgrIbfAaw+zZiQBOnhpBFV/C8FTYIHL5
+      nGpcpyVTix1zmbmaO2Mx6ScxAs/Hr7h+WGBFVgcCgYEAm+bTMH5OdSCPHFdqG2j0
+      2NGbjSBWzdexfAyR1I3Uzv1cr86EjauVC7Ed/+U4Jh4YxvYr1IEAqltJPL24AGlf
+      iTwqwdbuKIGcEA0jnVJxzp6g+5GbqdeNUf0EpqsrRB+pu3jvemSFTrRCVrG3KHTA
+      a80S4E2OdiIIBPEbswIvOZ8CgYEA2qwOKZQdcw1l7g+tdiR7x1xe9KwPk1Njkf1f
+      PkN6qpsVj9Zzp3X5feOLbv2vyLfkUSooakb9E1as1r4lyoY7poNpf0Owf99gaC56
+      6iKQWA+XQCkmsKaHC2wtWA03HLDnM4H8yqQSzj8Wc+EkvjU/psA/K16g0/+6ngIT
+      WbaTBksCgYBwqik2xtpU/T04kvp4Nxn1B5zF6DNtHb/0bT3BtH4K0Uyb0CMtj6dH
+      apPxcd8cUZ/QIC7alF51jY2DV1q59UxYNs816KoEXCzvCChpZlxq/ugtybyh62xw
+      CZITVJhb06RGOO0TrQybNQ+K8H4J8flt6CZ47vDjyLD3vp+BjmLz6Q==
+      -----END RSA PRIVATE KEY-----
+  linux:
+    system:
+      package:
+        ca-certificates-java:
+          version: latest
+      directory:
+        /home/repo/mcp-ci/pipeline-library:
+          user: git
+          group: www-data
+          mode: 755
+          makedirs: true
+        /home/repo/mk/mk-pipelines:
+          user: git
+          group: www-data
+          mode: 755
+          makedirs: true
+        /srv/volumes:
+          user: root
+          group: root
+          mode: 755
+          makedirs: true
+        /srv/volumes/jenkins:
+          user: ${_param:jenkins_master_user_id}
+          group: ${_param:jenkins_master_user_id}
+          mode: 755
+          makedirs: true
+        /srv/volumes/jenkins/.ssh:
+          user: ${_param:jenkins_master_user_id}
+          group: ${_param:jenkins_master_user_id}
+          mode: 700
+          makedirs: true
+        /var/lib/jenkins:
+          user: ${_param:jenkins_slave_user_id}
+          group: ${_param:jenkins_slave_user_id}
+          mode: 755
+          makedirs: true
+      # TODO: make sure this file is useless and remove it
+      file:
+        /srv/volumes/jenkins/jenkins.model.JenkinsLocationConfiguration.xml:
+          user: ${_param:jenkins_master_user_id}
+          group: ${_param:jenkins_master_user_id}
+          mode: 644
+          makedirs: true
+        /srv/volumes/jenkins/.ssh/id_rsa:
+          user: ${_param:jenkins_master_user_id}
+          group: ${_param:jenkins_master_user_id}
+          mode: 600
+          contents: |
+            ${_param:git_private_key}
+      user:
+        git:
+          enabled: true
+          name: git
+          sudo: false
+          full_name: git
+          home: /home/git
+  openssh:
+    server:
+      enabled: true
+      user:
+        git:
+          enabled: true
+          public_keys:
+            - key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDp6ijK7j8QHAcoxIMWpbJyHmowRq22k4jZxJjx1zd0bVBfYFCU/5bMJPja+ilVn4yHcjCv4bK7WkzrKD102FYAShT0GsTtw6c1BzQypno4Y/is9RzWDtbakP7VC1+RrwYXrQaIdBoS71AQM3WCaDry4FQUbgINMJcpBsFgzQcBvqjNRCFqoV3alPbxHuPihPvPKVjHI+z0VlCCrawyTNsDP731hrNSkaTSVRTiwE6Etk4CwL7iV9rMFSdKFrjdBpI0Ra6vGVT132wGg0LF2NK95QzWfMjzfxBt0XWSarrTKoffUbBCdfbWk5NgL4jfHr9HSufj+Z0QyRMrqRYBs0l1
+          user: ${linux:system:user:git}
+  git:
+    server:
+      enabled: true
+      directory: /home/repo