Merge "Fix k8s master/pool enabled parameters"
diff --git a/aptly/server/single.yml b/aptly/server/single.yml
index e8da341..9f2d401 100644
--- a/aptly/server/single.yml
+++ b/aptly/server/single.yml
@@ -8,47 +8,6 @@
     aptly_server_secure: true
     aptly_server_mirror_sources: false
     aptly_server_mirror_ubuntu_sources: ${_param:aptly_server_mirror_sources}
-  iptables:
-    service:
-      enabled: true
-      chain:
-        INPUT:
-          rules:
-            # Only local network can access WebDav and aptly API
-            - destination_port: 8088
-              protocol: tcp
-              source_network: 10.0.107.0/24
-              jump: ACCEPT
-            - destination_port: 8088
-              protocol: tcp
-              source_network: 185.22.96.0/22
-              jump: ACCEPT
-            - destination_port: 8088
-              protocol: tcp
-              source_network: 10.0.174.0/23
-              jump: ACCEPT
-            - destination_port: 8088
-              protocol: tcp
-              source_network: 10.0.175.0/23
-              jump: ACCEPT
-            - destination_port: 8088
-              protocol: tcp
-              jump: DROP
-            - destination_port: 8081
-              protocol: tcp
-              source_network: 10.0.107.0/24
-              jump: ACCEPT
-            - destination_port: 8081
-              protocol: tcp
-              source_network: 10.0.174.0/23
-              jump: ACCEPT
-            - destination_port: 8081
-              protocol: tcp
-              source_network: 10.0.175.0/23
-              jump: ACCEPT
-            - destination_port: 8081
-              protocol: tcp
-              jump: DROP
   nginx:
     server:
       site:
diff --git a/ceilometer/server/backend/gnocchi.yml b/ceilometer/server/backend/gnocchi.yml
index 9eca73b..e93eeaa 100644
--- a/ceilometer/server/backend/gnocchi.yml
+++ b/ceilometer/server/backend/gnocchi.yml
@@ -17,3 +17,7 @@
           # filter_project is deprecated since queens
           filter_project: ${_param:ceilometer_gnocchi_filter_project}
           create_resources: ${_param:ceilometer_create_gnocchi_resources}
+        event_alarm_notifier:
+          enabled: true
+          url: "notifier://?topic=${_param:openstack_event_alarm_topic}"
+          publish_event: true
diff --git a/docker/swarm/stack/monitoring/pushgateway.yml b/docker/swarm/stack/monitoring/pushgateway.yml
index af108a6..461eb0b 100644
--- a/docker/swarm/stack/monitoring/pushgateway.yml
+++ b/docker/swarm/stack/monitoring/pushgateway.yml
@@ -23,8 +23,11 @@
               environment:
                 PUSHGATEWAY_BIND_PORT: ${prometheus:pushgateway:bind:port}
                 PUSHGATEWAY_BIND_ADDRESS: ${prometheus:pushgateway:bind:address}
+                PUSHGATEWAY_DATA_DIR: ${_param:prometheus_pushgateway_data_directory}
               labels:
                 com.mirantis.monitoring: "pushgateway"
               image: ${_param:docker_image_pushgateway}
               ports:
                 - 15012:${prometheus:pushgateway:bind:port}
+              volumes:
+                - ${prometheus:pushgateway:dir:data}:${_param:prometheus_pushgateway_data_directory}
diff --git a/glance/control/single.yml b/glance/control/single.yml
index b285d38..5580b66 100644
--- a/glance/control/single.yml
+++ b/glance/control/single.yml
@@ -11,4 +11,6 @@
     server:
       database:
         host: ${_param:single_address}
+      identity:
+        region: ${_param:openstack_region}
       show_multiple_locations: True
diff --git a/grafana/client/datasource/prometheus.yml b/grafana/client/datasource/prometheus.yml
index 681b9df..22d5728 100644
--- a/grafana/client/datasource/prometheus.yml
+++ b/grafana/client/datasource/prometheus.yml
@@ -12,4 +12,3 @@
           host: ${_param:grafana_prometheus_address}
           port: ${_param:grafana_prometheus_port}
           is_default: ${_param:grafana_prometheus_is_default}
-
diff --git a/heat/server/single.yml b/heat/server/single.yml
index cd548bf..0c83206 100644
--- a/heat/server/single.yml
+++ b/heat/server/single.yml
@@ -9,6 +9,7 @@
           version: latest
   heat:
     server:
+      region: ${_param:openstack_region}
       stack_domain_admin:
         name: heat_domain_admin
         password: ${_param:heat_domain_admin_password}
diff --git a/jenkins/client/job/deploy/lab/deploy.yml b/jenkins/client/job/deploy/lab/deploy.yml
index 7febca9..a1df125 100644
--- a/jenkins/client/job/deploy/lab/deploy.yml
+++ b/jenkins/client/job/deploy/lab/deploy.yml
@@ -90,6 +90,10 @@
                 default: ""
 
               # salt
+              EXTRA_TARGET:
+                type: string
+                default: ""
+                description: "Salt extra target for edge clouds deployment"
               SALT_MASTER_CREDENTIALS:
                 type: string
                 default: "salt-qa-credentials"
diff --git a/jenkins/client/job/deploy/lab/mom_deploy.yml b/jenkins/client/job/deploy/lab/mom_deploy.yml
new file mode 100644
index 0000000..8ae8f53
--- /dev/null
+++ b/jenkins/client/job/deploy/lab/mom_deploy.yml
@@ -0,0 +1,126 @@
+parameters:
+  jenkins:
+    client:
+      job:
+        deploy-virtual-edge-mom:
+          type: workflow-scm
+          concurrent: true
+          display_name: "Deploy - edge MoM"
+          discard:
+            build:
+              keep_num: 50
+          scm:
+            type: git
+            url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+            branch: "${_param:jenkins_pipelines_branch}"
+            credentials: "gerrit"
+            script: deploy-virtual-edge-mom.groovy
+          param:
+            # general parameters
+            ASK_ON_ERROR:
+              type: boolean
+              default: 'false'
+            FORMULA_PKG_REVISION:
+              type: string
+              default: ""
+              description: "Formulas revision to install on Salt Master bootstrap stage"
+            # heat parameters
+            HEAT_STACK_ENVIRONMENT:
+              type: string
+              default: "devcloud"
+            HEAT_STACK_PUBLIC_NET:
+              type: string
+              default: "public"
+            HEAT_STACK_ZONE:
+              type: string
+              default: "mcp-oscore"
+            OPENSTACK_API_CLIENT:
+              type: string
+              default: ""
+            OPENSTACK_API_CREDENTIALS:
+              type: string
+              default: "openstack-devcloud-credentials"
+            OPENSTACK_API_PROJECT:
+              type: string
+              default: "mcp-oscore"
+            OPENSTACK_API_PROJECT_DOMAIN:
+              type: string
+              default: "default"
+            OPENSTACK_API_PROJECT_ID:
+              type: string
+              default: ""
+            OPENSTACK_API_URL:
+              type: string
+              default: "https://cloud-cz.bud.mirantis.net:5000"
+            OPENSTACK_API_USER_DOMAIN:
+              type: string
+              default: "default"
+            OPENSTACK_API_VERSION:
+              type: string
+              default: "3"
+            OPENSTACK_USER_DOMAIN:
+              type: string
+              default: "default"
+            # salt
+            SALT_MASTER_CREDENTIALS:
+              type: string
+              default: "salt-qa-credentials"
+            SALT_MASTER_URL:
+              type: string
+              default: ""
+            SALT_OVERRIDES:
+              type: text
+              default: ""
+            STACK_CLEANUP_JOB:
+              type: string
+              default: "deploy-stack-cleanup"
+            STACK_DELETE:
+              type: boolean
+              default: 'false'
+              description: "Don't enable it if you need to use the lab after"
+            STACK_INSTALL:
+              type: string
+              default: "core"
+            # deployments
+            STACK_CLUSTER_NAME:
+              type: string
+              default: "virtual-mcp11-aio"
+              description: "Cluster name to use from reclass"
+            STACK_RECLASS_ADDRESS:
+              type: string
+              default: "https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-aio"
+            STACK_RECLASS_BRANCH:
+              type: string
+              default: "stable/pike"
+            STACK_TEMPLATE:
+              type: string
+              default: "virtual_edge_mom"
+            STACK_TEMPLATE_BRANCH:
+              type: string
+              default: "master"
+            STACK_TEMPLATE_CREDENTIALS:
+              type: string
+              default: "gerrit"
+            STACK_TEMPLATE_URL:
+              type: string
+              default: "${_param:jenkins_gerrit_url}/mk/heat-templates"
+            STACK_TEST:
+              type: string
+              default: ""
+            STACK_TYPE:
+              type: string
+              default: "physical"
+            STATIC_MGMT_NETWORK:
+              type: boolean
+              default: 'false'
+              description: "Check if model contains static IP address definitions for all nodes"
+            TEST_DOCKER_INSTALL:
+              type: boolean
+              description: "Install docker on the target if true"
+              default: "false"
+             # edge deploy
+            EDGE_DEPLOY_SCHEMAS:
+              type: string
+              description: "JSON schemas of edge cloud environments"
+              default: ""
+
diff --git a/linux/system/repo/glusterfs.yml b/linux/system/repo/glusterfs.yml
index fb331f0..71d3cb9 100644
--- a/linux/system/repo/glusterfs.yml
+++ b/linux/system/repo/glusterfs.yml
@@ -1,11 +1,5 @@
+classes:
+- system.linux.system.repo.mcp.apt_mirantis.glusterfs
 parameters:
   _param:
-    glusterfs_version: 3.8
-  linux:
-    system:
-      repo:
-        glusterfs-ppa:
-          source: "deb http://ppa.launchpad.net/gluster/glusterfs-${_param:glusterfs_version}/ubuntu ${_param:linux_system_codename} main"
-          architectures: amd64
-          key_id: 3FE869A9
-          key_server: keyserver.ubuntu.com
+    linux_system_repo_mcp_glusterfs_version_number: "3.8"
diff --git a/linux/system/repo/keystorage/glusterfs.yml b/linux/system/repo/keystorage/glusterfs.yml
new file mode 100644
index 0000000..0c9f046
--- /dev/null
+++ b/linux/system/repo/keystorage/glusterfs.yml
@@ -0,0 +1,37 @@
+parameters:
+  linux:
+    system:
+      repo:
+        mcp_glusterfs:
+          # Launchpad PPA for Gluster
+          # pub   4096R/3FE869A9 2014-08-15
+          key: |
+            -----BEGIN PGP PUBLIC KEY BLOCK-----
+            Version: GnuPG v1
+
+            mQINBFPtYFcBEADcQMZ9aSR1ptbaEeq/8Bzu7kipaxVGh3Wcma4Lz+QPe0ofxRf+
+            oYR22UVGmJcPnVcGFbXJ50t8BAxwtQ/TSmGdQ93bl6LORAQBZ/ud1LTr2HKpaa0F
+            1bwpi/TAgBWqP64Hu0LBGISc0G5m3/hn/bi6XxIIOzJ/L/vqLh1deVaDrYYWy5Cm
+            e8AuPtqOARKsefvVgwlpnbCtk+QaE65vgl8MXiYCaOenT07GDCq1xb7hkoVlJS4b
+            f6F3UMJVMVy4oEyYkRw4SP7ULeT1s4yrBeDzbxhFaZRJFvGpvMW3AZxfrhX/5OpZ
+            SkQiFn5/2j4eJli4/MmptAAHpGr4tLA+s6mHmA9E9c7wMfyFZe+wMhvangSDp09g
+            SSZs00bqKSnYIJ/oGRjaxCllkw4SMfTOqv8l/GOxRs12yIcZD08SSmRpoyLffrl1
+            zElyaixtAJRenphTZyq7eRLPyQl6qEDA1XtLs3ThK5/4fghMbe7MOHiMB8MwL1Rz
+            LQkl/PU08vxfum9ki/m/LP5xpJopNHZs2L47RlX2+tq6FJWbDvQwOGoFTTnxmdDf
+            4EkMhlB4N+ujZw64pSMt3c08NShxty2UWpbSbc8/e7Ps4B7Lx6eq6AmqrcUChg8c
+            9+PI2LUqj6mDbc8jxpUslvjsLU05xnq6OLv4U//pUTUz6eI8FgFadVZcoQARAQAB
+            tBlMYXVuY2hwYWQgUFBBIGZvciBHbHVzdGVyiQI4BBMBAgAiBQJT7WBXAhsDBgsJ
+            CAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRAT4Bt7P+hpqZ3LEACYYC4UjxwSHouV
+            295Cxfwt9P32GcWJbFmLYtLHWVTt2vdN/M9Xb02YgVLJm/nVy2vJhqcMowSW2jO5
+            03mLq672g5mHitnIq1lh4zXcHEvP79aDRQuvkgsLEHjlk2NzYqdAsdRk3TgOLcK0
+            SRM7Cwgwd/b/gVUtPYrX1hvQKrjGJM9VZFcCMX2RmGAS0ft3QHzEAPZCgyamk0qB
+            2eo8tLZYm42iMvq+ZSxGulhzi7gJkpv/wNdaP4E6o8o7KY3JIWMmxBn8QZUKYMob
+            ze4PSBg4G4iG2ue9IrGCb8M1o+46aOSyEIc99bznF8Jrw7a8sBufVRjSZIE9A/oM
+            EtB1pTRDn9lwx/DyYbCV16DOsk6d5x4P8cqvgdaGzl7VNLvkwmMaCH0gRFIBr937
+            rEUbeSJHTqrVG0zXzSaUHEwXPZE0Lt2C9dEmMnT6nxC7FbJB1ATPDNx8kL7MvB4j
+            l5HkjrD1W9Xu2y0dzwAKlg5jvzwP46MJgvm+AYK808XhOhMZjWzzt5POeDcDhGhp
+            RSfQtAhSnRkOtKS1drMCt27hLZDEZfCp//aj7jvVL8FjamGEMfm91FLQa5LY7OoJ
+            aYoZlYUtthrXV6w5KHFjFYAKgA8tJzebTvc1Q9avCo2G5qWNZq6TSLxHEMo/g4gu
+            2aGRPRrKu9w2Ibosg4OqZ/YbXC8SjA==
+            =+Qna
+            -----END PGP PUBLIC KEY BLOCK-----
diff --git a/linux/system/repo/mcp/apt_mirantis/glusterfs.yml b/linux/system/repo/mcp/apt_mirantis/glusterfs.yml
index 02f2fd9..3b2bd6d 100644
--- a/linux/system/repo/mcp/apt_mirantis/glusterfs.yml
+++ b/linux/system/repo/mcp/apt_mirantis/glusterfs.yml
@@ -1,14 +1,19 @@
+classes:
+- system.linux.system.repo.keystorage.glusterfs
 parameters:
   _param:
     apt_mk_version: stable
-    linux_system_repo_mcp_glusterfs_version: ${_param:apt_mk_version}
     linux_system_repo_mcp_glusterfs_version_number: "3.8"
+    linux_system_repo_url: http://mirror.mirantis.com/${_param:apt_mk_version}/
+    linux_system_repo_mcp_glusterfs_url: ${_param:linux_system_repo_url}/glusterfs-${_param:linux_system_repo_mcp_glusterfs_version_number}/
   linux:
     system:
       repo:
         mcp_glusterfs:
-          source: "deb [arch=amd64] http://mirror.mirantis.com/${_param:linux_system_repo_mcp_glusterfs_version}/glusterfs-${_param:linux_system_repo_mcp_glusterfs_version_number}/${_param:linux_system_codename}/ ${_param:linux_system_codename} main"
+          source: "deb ${_param:linux_system_repo_mcp_glusterfs_url}/${_param:linux_system_codename}/ ${_param:linux_system_codename} main"
           architectures: amd64
-          key_id: 3FE869A9
-          key_server: keyserver.ubuntu.com
           clean_file: true
+          pin:
+          - pin: "release o=LP-PPA-gluster-glusterfs-${_param:linux_system_repo_mcp_glusterfs_version_number}"
+            priority: 1100
+            package: '*'
diff --git a/manila/common/cluster.yml b/manila/common/cluster.yml
index 8763903..d71364e 100644
--- a/manila/common/cluster.yml
+++ b/manila/common/cluster.yml
@@ -22,7 +22,7 @@
         password: ${_param:mysql_manila_password}
       identity:
         engine: keystone
-        region: RegionOne
+        region: ${_param:openstack_region}
         host: ${_param:cluster_vip_address}
         port: 35357
         user: manila
diff --git a/manila/common/single.yml b/manila/common/single.yml
index 362338f..1b139c2 100644
--- a/manila/common/single.yml
+++ b/manila/common/single.yml
@@ -20,7 +20,7 @@
         password: ${_param:mysql_manila_password}
       identity:
         engine: keystone
-        region: RegionOne
+        region: ${_param:openstack_region}
         host: ${_param:single_address}
         port: 35357
         user: manila
diff --git a/prometheus/pushgateway/container.yml b/prometheus/pushgateway/container.yml
index d0e986e..e4e9cd7 100644
--- a/prometheus/pushgateway/container.yml
+++ b/prometheus/pushgateway/container.yml
@@ -1,2 +1,3 @@
 classes:
 - service.prometheus.pushgateway.container
+- system.prometheus.pushgateway
diff --git a/prometheus/pushgateway/init.yml b/prometheus/pushgateway/init.yml
new file mode 100644
index 0000000..a906807
--- /dev/null
+++ b/prometheus/pushgateway/init.yml
@@ -0,0 +1,7 @@
+parameters:
+  _param:
+    prometheus_pushgateway_data_directory: /opt/pushgateway/data
+  prometheus:
+    pushgateway:
+      dir:
+        data: /srv/volumes/local/pushgateway/data