Merge pull request #220 from zahedreza/pr_support_zkhurasani

Updated Zahed's ssh key
diff --git a/aptly/server/mirror/ubuntu/trusty/glusterfs.yml b/aptly/server/mirror/ubuntu/trusty/glusterfs.yml
new file mode 100644
index 0000000..2d3fbaf
--- /dev/null
+++ b/aptly/server/mirror/ubuntu/trusty/glusterfs.yml
@@ -0,0 +1,17 @@
+parameters:
+  _param:
+    apt_mk_version: stable
+  aptly:
+    server:
+      mirror:
+        glusterfs_upstream_trusty:
+          source: http://ppa.launchpad.net/gluster/glusterfs-3.7/ubuntu
+          distribution: trusty
+          components: main
+          architectures: amd64
+          gpgkeys:
+            - 3FE869A9
+          publisher:
+            component: main
+            distributions:
+              - ubuntu-trusty/${_param:apt_mk_version}
\ No newline at end of file
diff --git a/aptly/server/mirror/ubuntu/trusty/mcp/openstack.yml b/aptly/server/mirror/ubuntu/trusty/mcp/openstack.yml
index b419b8b..32e3b90 100644
--- a/aptly/server/mirror/ubuntu/trusty/mcp/openstack.yml
+++ b/aptly/server/mirror/ubuntu/trusty/mcp/openstack.yml
@@ -1,16 +1,15 @@
 parameters:
   _param:
     mcp_repo_version: 1.0
-    linux_system_codename: trusty
   aptly:
     server:
       mirror:
         mirantis_openstack_trusty:
-          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}
+          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/trusty
           distribution: mitaka
           components: main restricted
           architectures: amd64
-          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}/archive-mcp${_param:mcp_repo_version}.key"
+          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/trusty/archive-mcp${_param:mcp_repo_version}.key"
           gpgkeys:
             - 1FA22B08
           publisher:
@@ -19,11 +18,11 @@
               - ubuntu-trusty/mitaka
 
         mirantis_openstack_hotfix_trusty:
-          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}
+          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/trusty
           distribution: mitaka-hotfix
           components: main restricted
           architectures: amd64
-          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}/archive-mcp${_param:mcp_repo_version}.key"
+          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/trusty/archive-mcp${_param:mcp_repo_version}.key"
           gpgkeys:
             - 1FA22B08
           publisher:
@@ -32,11 +31,11 @@
               - ubuntu-trusty/mitaka-hotfix
 
         mirantis_openstack_security_trusty:
-          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}
+          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/trusty
           distribution: mitaka-security
           components: main restricted
           architectures: amd64
-          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}/archive-mcp${_param:mcp_repo_version}.key"
+          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/trusty/archive-mcp${_param:mcp_repo_version}.key"
           gpgkeys:
             - 1FA22B08
           publisher:
@@ -46,11 +45,11 @@
 
         # required for alternative horizon plugins/etc..
         mirantis_openstack_updates_trusty:
-          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}
+          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/trusty
           distribution: mitaka-updates
           components:  main restricted
           architectures: amd64
-          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}/archive-mcp${_param:mcp_repo_version}.key"
+          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/trusty/archive-mcp${_param:mcp_repo_version}.key"
           gpgkeys:
             - 1FA22B08
           publisher:
@@ -60,11 +59,11 @@
 
         # required for salt formulas
         mirantis_openstack_holdback_trusty:
-          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}
+          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/trusty
           distribution: mitaka-holdback
           components: main restricted
           architectures: amd64
-          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}/archive-mcp${_param:mcp_repo_version}.key"
+          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/trusty/archive-mcp${_param:mcp_repo_version}.key"
           gpgkeys:
           - 1FA22B08
           publisher:
diff --git a/aptly/server/mirror/ubuntu/xenial/glusterfs.yml b/aptly/server/mirror/ubuntu/xenial/glusterfs.yml
new file mode 100644
index 0000000..79a618a
--- /dev/null
+++ b/aptly/server/mirror/ubuntu/xenial/glusterfs.yml
@@ -0,0 +1,17 @@
+parameters:
+  _param:
+    apt_mk_version: stable
+  aptly:
+    server:
+      mirror:
+        glusterfs_upstream_xenial:
+          source: http://ppa.launchpad.net/gluster/glusterfs-3.7/ubuntu
+          distribution: xenial
+          components: main
+          architectures: amd64
+          gpgkeys:
+            - 3FE869A9
+          publisher:
+            component: main
+            distributions:
+              - ubuntu-xenial/${_param:apt_mk_version}
\ No newline at end of file
diff --git a/aptly/server/mirror/ubuntu/xenial/mcp/openstack.yml b/aptly/server/mirror/ubuntu/xenial/mcp/openstack.yml
index 0d07f5a..a23ece8 100644
--- a/aptly/server/mirror/ubuntu/xenial/mcp/openstack.yml
+++ b/aptly/server/mirror/ubuntu/xenial/mcp/openstack.yml
@@ -1,16 +1,15 @@
 parameters:
   _param:
     mcp_repo_version: 1.0
-    linux_system_codename: xenial
   aptly:
     server:
       mirror:
         mirantis_openstack_xenial:
-          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}
+          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/xenial
           distribution: mitaka
           components: main restricted
           architectures: amd64
-          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}/archive-mcp${_param:mcp_repo_version}.key"
+          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/xenial/archive-mcp${_param:mcp_repo_version}.key"
           gpgkeys:
             - 1FA22B08
           publisher:
@@ -19,11 +18,11 @@
               - ubuntu-xenial/mitaka
 
         mirantis_openstack_hotfix_xenial:
-          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}
+          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/xenial
           distribution: mitaka-hotfix
           components: main restricted
           architectures: amd64
-          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}/archive-mcp${_param:mcp_repo_version}.key"
+          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/xenial/archive-mcp${_param:mcp_repo_version}.key"
           gpgkeys:
             - 1FA22B08
           publisher:
@@ -32,11 +31,11 @@
               - ubuntu-xenial/mitaka-hotfix
 
         mirantis_openstack_security_xenial:
-          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}
+          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/xenial
           distribution: mitaka-security
           components: main restricted
           architectures: amd64
-          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}/archive-mcp${_param:mcp_repo_version}.key"
+          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/xenial/archive-mcp${_param:mcp_repo_version}.key"
           gpgkeys:
             - 1FA22B08
           publisher:
@@ -46,11 +45,11 @@
 
         # required for alternative horizon plugins/etc..
         mirantis_openstack_updates_xenial:
-          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}
+          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/xenial
           distribution: mitaka-updates
           components:  main restricted
           architectures: amd64
-          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}/archive-mcp${_param:mcp_repo_version}.key"
+          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/xenial/archive-mcp${_param:mcp_repo_version}.key"
           gpgkeys:
             - 1FA22B08
           publisher:
@@ -60,11 +59,11 @@
 
         # required for salt formulas
         mirantis_openstack_holdback_xenial:
-          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}
+          source: http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/xenial
           distribution: mitaka-holdback
           components: main restricted
           architectures: amd64
-          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/${_param:linux_system_codename}/archive-mcp${_param:mcp_repo_version}.key"
+          key_url: "http://mirror.fuel-infra.org/mcp-repos/${_param:mcp_repo_version}/xenial/archive-mcp${_param:mcp_repo_version}.key"
           gpgkeys:
           - 1FA22B08
           publisher:
diff --git a/docker/swarm/service/monitoring/prometheus_alertmanager.yml b/docker/swarm/service/monitoring/prometheus_alertmanager.yml
index 99eb226..5d5f237 100644
--- a/docker/swarm/service/monitoring/prometheus_alertmanager.yml
+++ b/docker/swarm/service/monitoring/prometheus_alertmanager.yml
@@ -6,11 +6,12 @@
       service:
         prometheus_alertmanager:
           network: monitoring
-          replica: 2
+          replicas: 2
           environment:
             config_dir: /opt/alertmanager/config
             bind_port: ${prometheus:alertmanager:bind:port}
             bind_address: ${prometheus:alertmanager:bind:address}
+            discovery_domain: 'prometheus_alertmanager'
           restart:
             condition: any
           image: ${_param:docker_image_alertmanager}
diff --git a/docker/swarm/service/monitoring/prometheus_pushgateway.yml b/docker/swarm/service/monitoring/prometheus_pushgateway.yml
index 7ba37af..ad159b6 100644
--- a/docker/swarm/service/monitoring/prometheus_pushgateway.yml
+++ b/docker/swarm/service/monitoring/prometheus_pushgateway.yml
@@ -4,7 +4,7 @@
       service:
         prometheus_pushgateway:
           network: monitoring
-          replica: 2
+          replicas: 2
           restart:
             condition: any
           image: ${_param:docker_image_pushgateway}
diff --git a/docker/swarm/service/monitoring/prometheus_server.yml b/docker/swarm/service/monitoring/prometheus_server.yml
index 94207ca..37bb6d3 100644
--- a/docker/swarm/service/monitoring/prometheus_server.yml
+++ b/docker/swarm/service/monitoring/prometheus_server.yml
@@ -6,7 +6,7 @@
       service:
         prometheus_server:
           network: monitoring
-          replica: 1
+          replicas: 1
           environment:
             config_dir: /opt/prometheus/config
             bind_port: ${prometheus:server:bind:port}
@@ -17,6 +17,7 @@
             storage_local_memory_chunks: ${prometheus:server:storage:local:memory_chunks}
             storage_local_max_chunks_to_persist: ${prometheus:server:storage:local:max_chunks_to_persist}
             storage_local_num_fingerprint_mutexes: ${prometheus:server:storage:local:num_fingerprint_mutexes}
+            discovery_domain: 'prometheus_alertmanager'
           restart:
             condition: any
           image: ${_param:docker_image_prometheus}
diff --git a/docker/swarm/service/phpldapadmin.yml b/docker/swarm/service/phpldapadmin.yml
index fadf714..25332c7 100644
--- a/docker/swarm/service/phpldapadmin.yml
+++ b/docker/swarm/service/phpldapadmin.yml
@@ -1,6 +1,6 @@
 parameters:
   _param:
-    docker_image_phpldapadmin: osixia/phpldapadmin:0.6.12
+    docker_image_phpldapadmin: tcpcloud/phpldapadmin:0.6.12
   docker:
     client:
       service:
@@ -17,5 +17,6 @@
             PHPLDAPADMIN_HTTPS: false
             PHPLDAPADMIN_TRUST_PROXY_SSL: true
             PHPLDAPADMIN_SERVER_ADMIN: ${_param:admin_email}
+            PHPLDAPADMIN_THEME: mirantis
           ports:
             - 18089:80
diff --git a/gerrit/client/init.yml b/gerrit/client/init.yml
index ed4b1d6..25c0b94 100644
--- a/gerrit/client/init.yml
+++ b/gerrit/client/init.yml
@@ -25,7 +25,6 @@
         key: ${_param:gerrit_admin_private_key}
       user:
         admin:
-          fullname: Administrator
           ssh_key: ${_param:gerrit_admin_public_key}
       group:
         Event Streaming Users:
diff --git a/jenkins/client/approved_scripts.yml b/jenkins/client/approved_scripts.yml
index df35e92..bf46803 100644
--- a/jenkins/client/approved_scripts.yml
+++ b/jenkins/client/approved_scripts.yml
@@ -90,3 +90,5 @@
         - method java.util.Collection stream
         - staticMethod java.util.stream.Collectors joining java.lang.CharSequence
         - method java.util.stream.Stream collect java.util.stream.Collector
+        - staticMethod java.util.regex.Pattern compile java.lang.String
+        - method java.util.regex.Matcher find
diff --git a/jenkins/client/job/salt-formulas/tests.yml b/jenkins/client/job/salt-formulas/tests.yml
index 9ac5492..0dd7102 100644
--- a/jenkins/client/job/salt-formulas/tests.yml
+++ b/jenkins/client/job/salt-formulas/tests.yml
@@ -141,3 +141,10 @@
               CREDENTIALS_ID:
                 type: string
                 default: "gerrit"
+              DEFAULT_GIT_URL:
+                type: string
+                description: "Run against alternate system reclass"
+                default: "${_param:jenkins_gerrit_url}/salt-formulas/{{name}}"
+              DEFAULT_GIT_REF:
+                type: string
+                default: master
diff --git a/jenkins/client/job/salt-models/generate.yml b/jenkins/client/job/salt-models/generate.yml
index a943b3b..6f2c85c 100644
--- a/jenkins/client/job/salt-models/generate.yml
+++ b/jenkins/client/job/salt-models/generate.yml
@@ -55,3 +55,6 @@
               RECLASS_MODEL_BRANCH:
                 type: string
                 default: master
+              COMMIT_CHANGES:
+                type: boolean
+                default: false
diff --git a/jenkins/client/job/salt-models/tests.yml b/jenkins/client/job/salt-models/tests.yml
index e451daf..c980d1d 100644
--- a/jenkins/client/job/salt-models/tests.yml
+++ b/jenkins/client/job/salt-models/tests.yml
@@ -40,14 +40,13 @@
               SALT_OPTS:
                 type: string
                 default: "--force-color"
-              GIT_URL:
-                type: string
-                default: "${_param:jenkins_gerrit_url}/salt-models/{{name}}"
-              RECLASS_SYSTEM_GIT_URL:
+              DEFAULT_GIT_URL:
                 type: string
                 description: "Run against alternate system reclass"
-              RECLASS_SYSTEM_GIT_REF:
+                default: "${_param:jenkins_gerrit_url}/salt-models/{{name}}"
+              DEFAULT_GIT_REF:
                 type: string
+                default: master
               CREDENTIALS_ID:
                 type: string
                 default: "gerrit"
@@ -83,3 +82,10 @@
               TEST_MODELS:
                 type: string
                 default: "{{clusters}}"
+              DEFAULT_GIT_URL:
+                type: string
+                description: "Run against alternate system reclass"
+                default: "${_param:jenkins_gerrit_url}/salt-models/reclass-system"
+              DEFAULT_GIT_REF:
+                type: string
+                default: master
diff --git a/jenkins/client/security/matrix.yml b/jenkins/client/security/matrix.yml
index 4c3c8a9..b08aefd 100644
--- a/jenkins/client/security/matrix.yml
+++ b/jenkins/client/security/matrix.yml
@@ -3,6 +3,7 @@
     # Full admin access
     jenkins_security_matrix_admins:
       - ${_param:jenkins_client_user}
+      - admins
     # Read only access
     jenkins_security_matrix_read: []
     # Read + permissions to build jobs
diff --git a/linux/system/repo_local/glusterfs.yml b/linux/system/repo_local/glusterfs.yml
new file mode 100644
index 0000000..c34a6f2
--- /dev/null
+++ b/linux/system/repo_local/glusterfs.yml
@@ -0,0 +1,11 @@
+parameters:
+  _param:
+    apt_mk_version: stable
+  linux:
+    system:
+      repo:
+        glusterfs:
+          refresh_db: ${_param:linux_repo_refresh_db}
+          source: "deb [arch=amd64] http://${_param:local_repo_url}/ubuntu-${_param:linux_system_codename}/ ${_param:apt_mk_version} main"
+          architectures: amd64
+          key_url: "http://${_param:local_repo_url}/public.gpg"
\ No newline at end of file
diff --git a/linux/system/repo_local/maas.yml b/linux/system/repo_local/maas.yml
new file mode 100644
index 0000000..ca65a79
--- /dev/null
+++ b/linux/system/repo_local/maas.yml
@@ -0,0 +1,11 @@
+parameters:
+  _param:
+    apt_mk_version: stable
+  linux:
+    system:
+      repo:
+        maas:
+          refresh_db: ${_param:linux_repo_refresh_db}
+          source: "deb [arch=amd64] http://${_param:local_repo_url}/${_param:linux_system_codename}/ ${_param:apt_mk_version} maas"
+          architectures: amd64
+          key_url: "http://${_param:local_repo_url}/public.gpg"
\ No newline at end of file
diff --git a/neutron/control/openvswitch/cluster.yml b/neutron/control/openvswitch/cluster.yml
index dfc3c82..cc39b0a 100644
--- a/neutron/control/openvswitch/cluster.yml
+++ b/neutron/control/openvswitch/cluster.yml
@@ -22,8 +22,12 @@
         mechanism:
           ovs:
             driver: openvswitch
+      compute:
+        region: $_param:openstack_region}
       database:
         host: ${_param:openstack_database_address}
+      identity:
+        region: $_param:openstack_region}
       message_queue:
         members:
           - host: ${_param:openstack_message_queue_node01_address}
@@ -64,4 +68,4 @@
           - name: ctl03
             host: ${_param:cluster_node03_address}
             port: 9696
-            params: check inter 10s fastinter 2s downinter 3s rise 3 fall 3
\ No newline at end of file
+            params: check inter 10s fastinter 2s downinter 3s rise 3 fall 3
diff --git a/prometheus/server/target/dns.yml b/prometheus/server/target/dns.yml
new file mode 100644
index 0000000..1dd3afb
--- /dev/null
+++ b/prometheus/server/target/dns.yml
@@ -0,0 +1,14 @@
+parameters:
+  server:
+    target:
+      dns:
+        - name: 'pushgateway'
+          domain:
+          - 'tasks.prometheus_pushgateway'
+          type: A
+          port: 9091
+        - name: 'prometheus'
+          domain:
+          - 'tasks.prometheus_server'
+          type: A
+          port: 9090
diff --git a/prometheus/server/target/etcd.yml b/prometheus/server/target/etcd.yml
index e343bda..41204b5 100644
--- a/prometheus/server/target/etcd.yml
+++ b/prometheus/server/target/etcd.yml
@@ -1,6 +1,10 @@
-classes:
-- service.etcd.server.cluster
 parameters:
   server:
     target:
-      etcd: ${etcd:server:members}
+      etcd:
+        - host: ${_param:cluster_node01_address}
+          port: ${_param:cluster_node01_port}
+        - host: ${_param:cluster_node02_address}
+          port: ${_param:cluster_node02_port}
+        - host: ${_param:cluster_node03_address}
+          port: ${_param:cluster_node03_port}
diff --git a/prometheus/server/target/kubernetes.yml b/prometheus/server/target/kubernetes.yml
index 293895b..d77ab3f 100644
--- a/prometheus/server/target/kubernetes.yml
+++ b/prometheus/server/target/kubernetes.yml
@@ -1,10 +1,8 @@
-classes:
-- service.kubernetes.master.cluster
 parameters:
   server:
     target:
       kubernetes:
-        api_ip: ${kubernetes:master:apiserver:address}
+        api_ip: ${_param:kubernetes_control_address}
         ssl_dir: /opt/prometheus/config
         cert_name: kubelet-client.crt
         key_name: kubelet-client.key
diff --git a/salt/master/git.yml b/salt/master/git.yml
index 02d0b67..267bdb1 100644
--- a/salt/master/git.yml
+++ b/salt/master/git.yml
@@ -4,6 +4,7 @@
 - system.salt.master.formula.git.foundation
 - system.salt.master.formula.git.kubernetes
 - system.salt.master.formula.git.openstack
+- system.salt.master.formula.git.oss
 - system.salt.master.formula.git.saltstack
 - system.salt.master.formula.git.stacklight
 - system.salt.master.formula.git.monitoring
diff --git a/salt/master/pkg.yml b/salt/master/pkg.yml
index b075138..1001d49 100644
--- a/salt/master/pkg.yml
+++ b/salt/master/pkg.yml
@@ -4,6 +4,7 @@
 - system.salt.master.formula.pkg.foundation
 - system.salt.master.formula.pkg.kubernetes
 - system.salt.master.formula.pkg.openstack
+- system.salt.master.formula.pkg.oss
 - system.salt.master.formula.pkg.saltstack
 - system.salt.master.formula.pkg.stacklight
 - system.salt.master.formula.pkg.monitoring
diff --git a/salt/minion/cert/k8s_client_prometheus.yml b/salt/minion/cert/k8s_client_prometheus.yml
index 678ddbe..138fce8 100644
--- a/salt/minion/cert/k8s_client_prometheus.yml
+++ b/salt/minion/cert/k8s_client_prometheus.yml
@@ -10,3 +10,4 @@
           common_name: kubelet-client
           signing_policy: cert_client
           alternative_names: IP:${_param:cluster_vip_address},IP:${_param:cluster_node01_address},IP:${_param:cluster_node02_address},IP:${_param:cluster_node03_address},IP:${_param:kubernetes_internal_api_address}
+          mode: '0444'