Merge "ceph jenkins pipelines"
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 4fd75aa..35dcda3 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,8 @@
 Changelog
 ==========
 
+* 2017-05-22 Petr Michalec <pmichalec@mirantis.com}
+- enable galera cluster check script for haproxy, require salt-formula-galera >= MCP 1.1
 
 * 2017-03-03 Tomáš Kukrál <tkukral@mirantis.com}
 - change default Salt-API port to 6969
diff --git a/aptly/server/docker.yml b/aptly/server/docker.yml
index 4e70a92..c33f169 100644
--- a/aptly/server/docker.yml
+++ b/aptly/server/docker.yml
@@ -8,13 +8,15 @@
     aptly_gpg_private_key: none
     aptly_server_mirror_sources: false
     aptly_server_mirror_ubuntu_sources: ${_param:aptly_server_mirror_sources}
+    docker_image_aptly:
+      base: tcpcloud/aptly
   aptly:
     server:
       enabled: true
       secure: ${_param:aptly_server_secure}
       source:
         engine: docker
-        image: tcpcloud/aptly
+        image: ${_param:docker_image_aptly:base}
       user:
         uid: 501
         gid: 501
diff --git a/aptly/server/mirror/debian/aptly.yml b/aptly/server/mirror/debian/aptly.yml
index d4e4a61..ce05ee6 100644
--- a/aptly/server/mirror/debian/aptly.yml
+++ b/aptly/server/mirror/debian/aptly.yml
@@ -3,7 +3,7 @@
     mirror_aptly_source: http://repo.aptly.info/
     mirror_aptly_distribution: squeeze
     mirror_aptly_components: main
-    mirrot_aptly_gpgkeys:
+    mirror_aptly_gpgkeys:
       - 9C7DE460
   aptly:
     server:
diff --git a/designate/server/backend/pdns.yml b/designate/server/backend/pdns.yml
index 50ec3a2..45ad0b7 100644
--- a/designate/server/backend/pdns.yml
+++ b/designate/server/backend/pdns.yml
@@ -1,3 +1,5 @@
+classes:
+- service.powerdns.server.single
 parameters:
   designate:
     server:
@@ -7,7 +9,6 @@
           api_endpoint: ${_param:designate_pdns_api_endpoint}
   powerdns:
     server:
-      enabled: true
       bind:
         address: ${_param:single_address}
         port: 53
diff --git a/devops_portal/service/rundeck.yml b/devops_portal/service/rundeck.yml
index 946e0c2..542974e 100644
--- a/devops_portal/service/rundeck.yml
+++ b/devops_portal/service/rundeck.yml
@@ -1,4 +1,8 @@
 parameters:
+  _param:
+    oss_rundeck_user: ${_param:rundeck_admin_username}
+    oss_rundeck_password: ${_param:rundeck_admin_password}
+    oss_rundeck_token: ${_param:rundeck_admin_token}
   devops_portal:
     config:
       service:
@@ -10,9 +14,9 @@
           proxy_read_timeout: 300
           send_timeout: 300
           credentials:
-            username: ${_param:rundeck_admin_username}
-            password: ${_param:rundeck_admin_password}
-            token: ${_param:rundeck_admin_token}
+            username: ${_param:oss_rundeck_user}
+            password: ${_param:oss_rundeck_password}
+            token: ${_param:oss_rundeck_token}
           endpoint:
             address: ${_param:haproxy_rundeck_bind_host}
             port: ${_param:haproxy_rundeck_bind_port}
diff --git a/devops_portal/service/security_monkey.yml b/devops_portal/service/security_monkey.yml
index 9fce180..36b79f6 100644
--- a/devops_portal/service/security_monkey.yml
+++ b/devops_portal/service/security_monkey.yml
@@ -1,4 +1,7 @@
 parameters:
+  _param:
+    oss_security_monkey_user: ${_param:security_monkey_user}
+    oss_security_monkey_password: ${_param:security_monkey_password}
   devops_portal:
     config:
       service:
@@ -14,5 +17,5 @@
             port: ${_param:security_monkey_bind_port}
             https: ${_param:security_monkey_ssl:enabled}
           credentials:
-            username: ${_param:security_monkey_user}
-            password: ${_param:security_monkey_password}
+            username: ${_param:oss_security_monkey_user}
+            password: ${_param:oss_security_monkey_password}
diff --git a/galera/server/cluster.yml b/galera/server/cluster.yml
index f1c3a48..1ab0aae 100644
--- a/galera/server/cluster.yml
+++ b/galera/server/cluster.yml
@@ -1,4 +1,20 @@
 classes:
 - service.keepalived.cluster.single
 - service.haproxy.proxy.single
-- system.haproxy.proxy.listen.openstack.galera
\ No newline at end of file
+- system.haproxy.proxy.listen.openstack.galera
+parameters:
+  galera:
+    clustercheck:
+      enabled: True
+      user: clustercheck
+      password: clustercheck
+      port: 9200
+      available_when_donor: 0
+      available_when_readonly: 0
+  mysql:
+    server:
+      users:
+      - name: clustercheck
+        password: clustercheck
+        database: '*.*'
+        grants: PROCESS
diff --git a/haproxy/proxy/listen/openstack/galera/clustercheck.yml b/haproxy/proxy/listen/openstack/galera/clustercheck.yml
new file mode 100644
index 0000000..f09e404
--- /dev/null
+++ b/haproxy/proxy/listen/openstack/galera/clustercheck.yml
@@ -0,0 +1,12 @@
+parameters:
+  _param:
+    haproxy_params_check: 'check port 9200'
+  haproxy:
+    proxy:
+      listen:
+        mysql_cluster:
+          # mysql clustercheck service at port 9200 is in conflict
+          # with regular haproxy mysql-check option on port 3306
+          health-check:
+            mysql:
+              enabled: False
diff --git a/haproxy/proxy/listen/openstack/galera.yml b/haproxy/proxy/listen/openstack/galera/init.yml
similarity index 67%
rename from haproxy/proxy/listen/openstack/galera.yml
rename to haproxy/proxy/listen/openstack/galera/init.yml
index 7298cfc..c9bd41c 100644
--- a/haproxy/proxy/listen/openstack/galera.yml
+++ b/haproxy/proxy/listen/openstack/galera/init.yml
@@ -1,4 +1,6 @@
 parameters:
+  _param:
+    haproxy_params_check: 'check'
   haproxy:
     proxy:
       timeout:
@@ -19,12 +21,12 @@
           - name: ${_param:cluster_node01_hostname}
             host: ${_param:cluster_node01_address}
             port: 3306
-            params: check inter 20s fastinter 2s downinter 2s rise 3 fall 3
+            params: ${_param:haproxy_params_check} inter 20s fastinter 2s downinter 2s rise 3 fall 3
           - name: ${_param:cluster_node02_hostname}
             host: ${_param:cluster_node02_address}
             port: 3306
-            params: backup check inter 20s fastinter 2s downinter 2s rise 3 fall 3
+            params: backup ${_param:haproxy_params_check} inter 20s fastinter 2s downinter 2s rise 3 fall 3
           - name: ${_param:cluster_node03_hostname}
             host: ${_param:cluster_node03_address}
             port: 3306
-            params: backup check inter 20s fastinter 2s downinter 2s rise 3 fall 3
+            params: backup ${_param:haproxy_params_check} inter 20s fastinter 2s downinter 2s rise 3 fall 3
diff --git a/jenkins/client/approved_scripts.yml b/jenkins/client/approved_scripts.yml
index 6afd67e..12a7e9f 100644
--- a/jenkins/client/approved_scripts.yml
+++ b/jenkins/client/approved_scripts.yml
@@ -99,6 +99,7 @@
         - staticMethod java.util.regex.Pattern quote java.lang.String
         - staticMethod java.util.stream.Collectors joining java.lang.CharSequence
         - staticMethod jenkins.model.Jenkins getInstance
+        - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods asBoolean java.util.regex.Matcher
         - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods collect java.util.Map groovy.lang.Closure
         - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods eachFile java.io.File groovy.io.FileType groovy.lang.Closure
         - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods find java.util.Collection groovy.lang.Closure
diff --git a/jenkins/client/job/deploy/update/init.yml b/jenkins/client/job/deploy/update/init.yml
index 6b0aebd..4d77c7b 100644
--- a/jenkins/client/job/deploy/update/init.yml
+++ b/jenkins/client/job/deploy/update/init.yml
@@ -3,6 +3,7 @@
   - system.jenkins.client.job.deploy.update.config
   - system.jenkins.client.job.deploy.update.saltenv
   - system.jenkins.client.job.deploy.update.update_salt_environment
+  - system.jenkins.client.job.deploy.update.update_mirror_image
   - system.jenkins.client.job.deploy.update.upgrade
   - system.jenkins.client.job.deploy.update.upgrade_compute
   - system.jenkins.client.job.deploy.update.upgrade_ovs_gateway
diff --git a/jenkins/client/job/deploy/update/update_mirror_image.yml b/jenkins/client/job/deploy/update/update_mirror_image.yml
new file mode 100644
index 0000000..75363db
--- /dev/null
+++ b/jenkins/client/job/deploy/update/update_mirror_image.yml
@@ -0,0 +1,25 @@
+#
+# Jobs to update Salt master environment (formulas and models)
+#
+parameters:
+  _param:
+    jenkins_salt_api_url: "http://${_param:salt_master_host}:6969"
+  jenkins:
+    client:
+      job:
+        deploy-update-mirror-image:
+          type: workflow-scm
+          concurrent: true
+          display_name: "Deploy - update mirror image"
+          scm:
+            type: git
+            url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+            credentials: "gerrit"
+            script: update-mirror-image.groovy
+          param:
+            SALT_MASTER_URL:
+              type: string
+              default: "${_param:jenkins_salt_api_url}"
+            SALT_MASTER_CREDENTIALS:
+              type: string
+              default: "salt"
\ No newline at end of file
diff --git a/openssh/server/team/members/listomin.yml b/openssh/server/team/members/listomin.yml
new file mode 100644
index 0000000..4a22a23
--- /dev/null
+++ b/openssh/server/team/members/listomin.yml
@@ -0,0 +1,20 @@
+parameters:
+  linux:
+    system:
+      user:
+        listomin:
+          enabled: true
+          name: listomin
+          sudo: ${_param:linux_system_user_sudo}
+          full_name: Leontii Istomin
+          home: /home/listomin
+          email: listomin@mirantis.com
+  openssh:
+    server:
+      enabled: true
+      user:
+        listomin:
+          enabled: true
+          public_keys:
+            - key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkiHTkB53cYMFqNsKjEa1W+O3KpSRk26zCQtNsJO4KrNTSuROcpSjSGLUL55YgjBzVUUo88WNFJgu5e3oJNmXpWcfyRa2LoQyhAws6LxsGb5hH0YWB34w4uzvcHIpO5QNGmHIMaczdS721cgGMygBla32putV13gZE/y2ucFh4oza5lRuY5GZm2i1iTaDV5QqamDeYC3venjTtnXXuZbsW0Mkyn8mPXe5d3/FYSKLBGGCELnxpyopfpuCBsQEPSuYIz7EWsLCCjKgUrYZ4Uu5Sg5Ifs+Z0lSQR7/wbraDoGSyrubBHP3ub57lJvQ5kvNyKnT+BwGpoF8V+oMuoqR4l listomin@listomin-laptop
+          user: ${linux:system:user:listomin}
\ No newline at end of file
diff --git a/openssh/server/team/members/obasov.yml b/openssh/server/team/members/obasov.yml
new file mode 100644
index 0000000..8f58212
--- /dev/null
+++ b/openssh/server/team/members/obasov.yml
@@ -0,0 +1,20 @@
+parameters:
+  linux:
+    system:
+      user:
+        obasov:
+          enabled: true
+          name: obasov
+          sudo: ${_param:linux_system_user_sudo}
+          full_name: Oleg Basov
+          home: /home/obasov
+          email: obasov@mirantis.com
+  openssh:
+    server:
+      enabled: true
+      user:
+        obasov:
+          enabled: true
+          public_keys:
+            - key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkbt+z214gkpRTA1Fso0ltxDq37Cu0l75stLO9eIPh9Gd38MliXB5NpJsGk3b521y/a2fdIKMfzwlt3WpC/cgx16l2PesEt4b/ASHYiHNtoGPxbcDRfgcamAsUyUyPtKjbBJJJ2aPfYRRhnEDOZwA3P6ITvpfzj4I24Y46j1H+qmi8gKzFTZpj0EobaPTi/sRztuVLspTy3MntcIwGBJMZCaz0jifYLEEFdEQRHdaZy5L2/2jv7GVECBRd0ucHr+zSM1uV4LQbQVCuGquTn05GZBpwgtMyfwhm7ySMsewZpssVReDha+0WVpNiftKcyBAjXdUsLAgZqeaAz4exey1r olegeech@ns1.sytkovo.su
+          user: ${linux:system:user:obasov}
\ No newline at end of file
diff --git a/openssh/server/team/members/sgalkin.yml b/openssh/server/team/members/sgalkin.yml
new file mode 100644
index 0000000..1388ebc
--- /dev/null
+++ b/openssh/server/team/members/sgalkin.yml
@@ -0,0 +1,20 @@
+parameters:
+  linux:
+    system:
+      user:
+        sgalkin:
+          enabled: true
+          name: sgalkin
+          sudo: ${_param:linux_system_user_sudo}
+          full_name: Sergey Galkin
+          home: /home/sgalkin
+          email: sgalkin@mirantis.com
+  openssh:
+    server:
+      enabled: true
+      user:
+        sgalkin:
+          enabled: true
+          public_keys:
+            - key: ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAyaEWaI1tkQiWHIB/pHZ6jrZyN7fQDxYodhT54rtbFcwnxGM0L1PuL1WcHGB9GJgWwOe7FE+9/kGxAuabjiFjg/NagdtAOfBp2b9+9sYCc8luJxIicTXHI5fY/tVW28OL8s51cw3Gr2m0atRDxKpb8Zv78qfYSSaENB9vq02IYu4Cr1CLEB6Zawm9iRq9ahMwWfslwIii4wKFuWcgjT6spMiHNkUwIYwxdFlCUh3gEhJYfwhe3LpoAvHmBESW0hdEj0S9YgTByBRgKkKrh98irf6B4DVOLWQLudLjAl59lb9Gz2s6fKUBYbz++I6bejHQ6I83VzT0DDKnbiQRXLh4/Q== gals@gals
+          user: ${linux:system:user:sgalkin}
\ No newline at end of file
diff --git a/openssh/server/team/qa_scale.yml b/openssh/server/team/qa_scale.yml
index a3f4a91..98c5540 100644
--- a/openssh/server/team/qa_scale.yml
+++ b/openssh/server/team/qa_scale.yml
@@ -1,25 +1,8 @@
+classes:
+- system.openssh.server.team.members.listomin
+- system.openssh.server.team.members.sgalkin
+- system.openssh.server.team.members.obasov
+
 parameters:
   _param:
     linux_system_user_sudo: true
-  linux:
-    system:
-      user:
-        dburnazyan:
-          enabled: true
-          name: dburnazyan
-          sudo: true
-          full_name: David Burnazyan
-          home: /home/dburnazyan
-          email: dburnazyan@mirantis.com
-  openssh:
-    server:
-      enabled: true
-      user:
-        dburnazyan:
-          enabled: true
-          public_keys:
-          - ${public_keys:dburnazyan}
-          user: ${linux:system:user:dburnazyan}
-  public_keys:
-    dburnazyan:
-      key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4xJvnHle7Omjhnv8AsqfXlp1Sg4Ixq/p0Dpcj5SlGN5YTnIs+eRXwy7WHICCgWC1OA+o4omzWQI486u0C4qMkdv+nvuAsvJQVRGNiGVp4gi48x3KqMxlEzeCScMH5oj+W5LJLcb2czHulBPXRluKlITOlF4i5+z3GbFwb8Dg5hBnnbxhhRyh6XyUOh8WQvBqXAk2EqY8vqYAZxV9DXI8OSIYsvpM9jQo/26YrSoTWZ4caCNmL6zVVH7eXaqEzVwDHxpXHLvzSP4bIl85dKygJI1DyN9mZ1B77z1lNZnk7Fu8yQP05Guln5Hzg+VqycAZxOk6ysjRXiYNu56DVZuc3 dburnazyan@dburnazyan-pc.msk.mirantis.net
diff --git a/openssh/server/team/support.yml b/openssh/server/team/support.yml
index f78ceac..1b09ef0 100644
--- a/openssh/server/team/support.yml
+++ b/openssh/server/team/support.yml
@@ -86,8 +86,6 @@
             - ${linux:system:user:nkabanova:name}
             - ${linux:system:user:rsoto:name}
             - ${linux:system:user:rsafonov:name}
-            - ${linux:system:user:smachtmes:name}
-            - ${linux:system:user:zkhurasani:name}
             # L2OPS
             - ${linux:system:user:aepifanov:name}
             - ${linux:system:user:apetrenko:name}
@@ -104,12 +102,9 @@
             - ${linux:system:user:oliemieshko:name}
             - ${linux:system:user:sovsianikov:name}
             - ${linux:system:user:pmichalec:name}
-            - ${linux:system:user:pmathews:name}
             - ${linux:system:user:pcizinsky:name}
             - ${linux:system:user:osmola:name}
-            - ${linux:system:user:cade:name}
             - ${linux:system:user:jmosher:name}
-            - ${linux:system:user:ecantwell:name}
             - ${linux:system:user:lmercl:name}
       sudo:
         enabled: true
diff --git a/salt/control/cluster/stacklight_log_cluster.yml b/salt/control/cluster/stacklight_log_cluster.yml
index 330e301..e4c08b6 100644
--- a/salt/control/cluster/stacklight_log_cluster.yml
+++ b/salt/control/cluster/stacklight_log_cluster.yml
@@ -5,7 +5,7 @@
         stacklight.log:
           cpu: 32
           ram: 65536
-          disk_profile: small
+          disk_profile: xxxxlarge
           net_profile: default
       cluster:
         internal:
diff --git a/salt/control/cluster/stacklight_server_cluster.yml b/salt/control/cluster/stacklight_server_cluster.yml
index 0055d20..6e7da61 100644
--- a/salt/control/cluster/stacklight_server_cluster.yml
+++ b/salt/control/cluster/stacklight_server_cluster.yml
@@ -5,7 +5,7 @@
         stacklight.server:
           cpu: 32
           ram: 65536
-          disk_profile: small
+          disk_profile: xxlarge
           net_profile: default
       cluster:
         internal:
diff --git a/salt/control/cluster/stacklight_telemetry_cluster.yml b/salt/control/cluster/stacklight_telemetry_cluster.yml
index bfd14b0..1b39b61 100644
--- a/salt/control/cluster/stacklight_telemetry_cluster.yml
+++ b/salt/control/cluster/stacklight_telemetry_cluster.yml
@@ -5,7 +5,7 @@
         stacklight.telemetry:
           cpu: 32
           ram: 65536
-          disk_profile: small
+          disk_profile: xxxlarge
           net_profile: default
       cluster:
         internal: