Merge "Add system level reclass for panko"
diff --git a/aptly/server/mirror/ubuntu/trusty/mcp/apt_mk/fluentd.yml b/aptly/server/mirror/ubuntu/trusty/mcp/apt_mk/fluentd.yml
new file mode 100644
index 0000000..060e5ec
--- /dev/null
+++ b/aptly/server/mirror/ubuntu/trusty/mcp/apt_mk/fluentd.yml
@@ -0,0 +1,21 @@
+parameters:
+  _param:
+    apt_mk_version: stable
+    mirror_mirantis_openstack_trusty_fluentd_source: http://mirror.mirantis.com/${_param:apt_mk_version}/td-agent-trusty
+    mirror_mirantis_openstack_trusty_fluentd_distribution: trusty
+    mirror_mirantis_openstack_trusty_fluentd_components: contrib
+    mirror_mirantis_openstack_trusty_fluentd_gpgkeys:
+      - 901F9177AB97ACBE
+  aptly:
+    server:
+      mirror:
+        mirantis_openstack_trusty_fluentd:
+          source: ${_param:mirror_mirantis_openstack_trusty_fluentd_source}
+          distribution: ${_param:mirror_mirantis_openstack_trusty_fluentd_distribution}
+          components: ${_param:mirror_mirantis_openstack_trusty_fluentd_components}
+          architectures: amd64
+          gpgkeys: ${_param:mirror_mirantis_openstack_trusty_fluentd_gpgkeys}
+          publisher:
+            component: contrib
+            distributions:
+              - ubuntu-trusty/fluentd/${_param:apt_mk_version}
diff --git a/aptly/server/mirror/ubuntu/xenial/mcp/apt_mk/fluentd.yml b/aptly/server/mirror/ubuntu/xenial/mcp/apt_mk/fluentd.yml
new file mode 100644
index 0000000..e87580c
--- /dev/null
+++ b/aptly/server/mirror/ubuntu/xenial/mcp/apt_mk/fluentd.yml
@@ -0,0 +1,21 @@
+parameters:
+  _param:
+    apt_mk_version: stable
+    mirror_mirantis_openstack_xenial_fluentd_source: http://mirror.mirantis.com/${_param:apt_mk_version}/td-agent-xenial
+    mirror_mirantis_openstack_xenial_fluentd_distribution: xenial
+    mirror_mirantis_openstack_xenial_fluentd_components: contrib
+    mirror_mirantis_openstack_xenial_fluentd_gpgkeys:
+      - 901F9177AB97ACBE
+  aptly:
+    server:
+      mirror:
+        mirantis_openstack_xenial_fluentd:
+          source: ${_param:mirror_mirantis_openstack_xenial_fluentd_source}
+          distribution: ${_param:mirror_mirantis_openstack_xenial_fluentd_distribution}
+          components: ${_param:mirror_mirantis_openstack_xenial_fluentd_components}
+          architectures: amd64
+          gpgkeys: ${_param:mirror_mirantis_openstack_xenial_fluentd_gpgkeys}
+          publisher:
+            component: contrib
+            distributions:
+              - ubuntu-xenial/fluentd/${_param:apt_mk_version}
diff --git a/devops_portal/service/stacklight-prometheus.yml b/devops_portal/service/stacklight-prometheus.yml
index 119c13f..9b5a74f 100644
--- a/devops_portal/service/stacklight-prometheus.yml
+++ b/devops_portal/service/stacklight-prometheus.yml
@@ -6,7 +6,7 @@
     config:
       service:
         stacklight-prometheus:
-          configure_proxy: false
+          configure_proxy: true
           enabled: true
           endpoint:
             address: ${_param:grafana_prometheus_address}
diff --git a/haproxy/proxy/listen/openstack/nova-placement.yml b/haproxy/proxy/listen/openstack/nova-placement.yml
index 9fec963..de0504b 100644
--- a/haproxy/proxy/listen/openstack/nova-placement.yml
+++ b/haproxy/proxy/listen/openstack/nova-placement.yml
@@ -3,17 +3,11 @@
     proxy:
       listen:
         nova_placement_api:
-          mode: http
+          type: openstack-service
+          service_name: nova_placement
           binds:
           - address: ${_param:cluster_vip_address}
             port: 8778
-          options:
-          - httpclose
-          - httplog
-          health-check:
-            http:
-              options:
-              - expect status 401
           servers:
           - name: ${_param:cluster_node01_hostname}
             host: ${_param:cluster_node01_address}
diff --git a/jenkins/client/job/debian/packages/salt.yml b/jenkins/client/job/debian/packages/salt.yml
index 6089195..82135f4 100644
--- a/jenkins/client/job/debian/packages/salt.yml
+++ b/jenkins/client/job/debian/packages/salt.yml
@@ -260,6 +260,9 @@
             - name: prometheus
               upload_source_package: false
               dist: trusty
+            - name: pv
+              upload_source_package: false
+              dist: trusty
             - name: python
               upload_source_package: false
               dist: trusty
@@ -602,6 +605,9 @@
             - name: powerdns
               upload_source_package: true
               dist: xenial
+            - name: pv
+              upload_source_package: true
+              dist: xenial
             - name: python
               upload_source_package: true
               dist: xenial
diff --git a/jenkins/client/job/deploy/lab/cleanup.yml b/jenkins/client/job/deploy/lab/cleanup.yml
index 0db6463..286d091 100644
--- a/jenkins/client/job/deploy/lab/cleanup.yml
+++ b/jenkins/client/job/deploy/lab/cleanup.yml
@@ -36,7 +36,7 @@
               default: "openstack-devcloud-credentials"
             OPENSTACK_API_PROJECT:
               type: string
-              default: "mcp-mk"
+              default: "mcp-k8s, mcp-maintenance, mcp-mk, mcp-networking, mcp-opencontrail, mcp-oss, mcp-platform, mcp-scale, mcp-stacklight, mcp-support"
             OPENSTACK_API_CLIENT:
               type: string
               default: ""
diff --git a/jenkins/client/job/deploy/lab/release/mcp11.yml b/jenkins/client/job/deploy/lab/release/mcp11.yml
index 657e1d1..480faa1 100644
--- a/jenkins/client/job/deploy/lab/release/mcp11.yml
+++ b/jenkins/client/job/deploy/lab/release/mcp11.yml
@@ -27,6 +27,12 @@
         stack_type: heat
         stack_test: ""
         job_timer: ""
+      - stack_name: virtual_mcp11_aio_manila
+        stack_env: devcloud
+        stack_install: core,openstack,ovs
+        stack_type: heat
+        stack_test: ""
+        job_timer: ""
       - stack_name: virtual_mcp11_aio
         stack_env: devcloud
         stack_install: core,openstack,ovs
@@ -81,3 +87,15 @@
         stack_type: heat
         stack_test: ""
         job_timer: ""
+      - stack_name: virtual_mcp_pike_dvr
+        stack_env: devcloud
+        stack_install: core,openstack,dvr
+        stack_type: heat
+        stack_test: ""
+        job_timer: ""
+      - stack_name: virtual_mcp_pike_dvr_ssl
+        stack_env: devcloud
+        stack_install: core,openstack,dvr
+        stack_type: heat
+        stack_test: ""
+        job_timer: ""
diff --git a/jenkins/client/job/deploy/update/init.yml b/jenkins/client/job/deploy/update/init.yml
index 4e6f460..0b10ff2 100644
--- a/jenkins/client/job/deploy/update/init.yml
+++ b/jenkins/client/job/deploy/update/init.yml
@@ -13,3 +13,4 @@
   - system.jenkins.client.job.deploy.update.restore_mysql
   - system.jenkins.client.job.deploy.update.restore_cassandra
   - system.jenkins.client.job.deploy.update.restore_zookeeper
+  - system.jenkins.client.job.deploy.update.virt_snapshot
diff --git a/jenkins/client/job/deploy/update/upgrade.yml b/jenkins/client/job/deploy/update/upgrade.yml
index 2c76753..7e94c10 100644
--- a/jenkins/client/job/deploy/update/upgrade.yml
+++ b/jenkins/client/job/deploy/update/upgrade.yml
@@ -36,6 +36,10 @@
               type: boolean
               default: 'true'
               description: "Rollback if control upgrade fails"
+            OPERATING_SYSTEM_RELEASE_UPGRADE:
+              type: boolean
+              default: 'false'
+              description: "Set to true if operating system release upgrade is desired. For ex. from Ubuntu 14.04 currently running on ctl and prx nodes to Ubuntu 16.04"
             SKIP_VM_RELAUNCH:
               type: boolean
               default: 'false'
diff --git a/jenkins/client/job/deploy/update/virt_snapshot.yml b/jenkins/client/job/deploy/update/virt_snapshot.yml
new file mode 100644
index 0000000..0388ed1
--- /dev/null
+++ b/jenkins/client/job/deploy/update/virt_snapshot.yml
@@ -0,0 +1,62 @@
+#
+# Job to manage libvirt live snapshots
+#
+parameters:
+  _param:
+    jenkins_salt_api_url: "http://${_param:salt_master_host}:6969"
+  jenkins:
+    client:
+      job:
+        manage-virt-snapshot:
+          type: workflow-scm
+          concurrent: true
+          display_name: "Deploy - virt snapshot VM"
+          scm:
+            type: git
+            url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+            branch: "${_param:jenkins_pipelines_branch}"
+            credentials: "gerrit"
+            script: libvirt-live-snapshots.groovy
+          param:
+            SALT_MASTER_URL:
+              type: string
+              default: "${_param:jenkins_salt_api_url}"
+            SALT_MASTER_CREDENTIALS:
+              type: string
+              default: "salt"
+            CREATE_LIVE_SNAPSHOT:
+              type: boolean
+              default: 'true'
+              description: "Ensures that the live snapshot exists"
+            ROLLBACK_LIVE_SNAPSHOT:
+              type: boolean
+              default: 'false'
+              description: "Rollback the VM to a state before live snapshot was taken"
+            REMOVE_LIVE_SNAPSHOT:
+              type: boolean
+              default: 'false'
+              description: "Ensures that the live snapshot does not exist"
+            MERGE_LIVE_SNAPSHOT:
+              type: boolean
+              default: 'false'
+              description: "Ensures that the live snapshot is merged into it's base image"
+            NODE_PROVIDER:
+              type: string
+              default: "kvm01"
+              description: "KVM node that hosts the VM (for ex. kvm02)"
+            TARGET:
+              type: string
+              default: "ctl01"
+              description: "Unique identification of the VM being snapshoted without domain name (for ex. ctl01)"
+            SNAPSHOT_NAME:
+              type: string
+              default: "snapshot1"
+              description: "Snapshot name"
+            PATH:
+              type: string
+              default: "/var/lib/libvirt/images"
+              description: "Path where snapshot image and dumpxml are being put"
+            DISK_NAME:
+              type: string
+              default: "vda"
+              description: "Disk name of the snapshot"
diff --git a/jenkins/client/job/docker/cicd/init.yml b/jenkins/client/job/docker/cicd/init.yml
new file mode 100644
index 0000000..5b1df1d
--- /dev/null
+++ b/jenkins/client/job/docker/cicd/init.yml
@@ -0,0 +1,3 @@
+classes:
+  - system.jenkins.client.job.docker.cicd.rally
+  - system.jenkins.client.job.docker.cicd.tempest
diff --git a/jenkins/client/job/docker/cicd/rally.yml b/jenkins/client/job/docker/cicd/rally.yml
new file mode 100644
index 0000000..849d453
--- /dev/null
+++ b/jenkins/client/job/docker/cicd/rally.yml
@@ -0,0 +1,56 @@
+parameters:
+  jenkins:
+    client:
+      job:
+        docker-build-images-docker-ci-rally:
+          name: docker-build-images-docker-ci-rally
+          discard:
+            build:
+              keep_num: 30
+            artifact:
+              keep_num: 30
+          type: workflow-scm
+          concurrent: true
+          scm:
+            type: git
+            url: "${_param:jenkins_gerrit_url}/oss/jenkins/pipelines"
+            credentials: "gerrit"
+            script: docker-build-image-pipeline.groovy
+          trigger:
+            gerrit:
+              project:
+                "mcp/docker-ci-rally":
+                  branches:
+                    - master
+              event:
+                patchset:
+                  - created:
+                      excludeDrafts: false
+                      excludeNoCodeChange: false
+                change:
+                  - merged
+                comment:
+                  - addedContains:
+                      commentAddedCommentContains: 'rebuild'
+          param:
+            IMAGE_NAME:
+              type: string
+              default: "ci-rally"
+            IMAGE_TAGS:
+              type: string
+              default: ""
+            CREDENTIALS_ID:
+              type: string
+              default: "gerrit"
+            DOCKER_REGISTRY:
+              type: string
+              default: "docker-dev-virtual.docker.mirantis.net"
+            PROJECT_NAMESPACE:
+              type: string
+              default: "cicd"
+            DOCKERFILE_PATH:
+              type: string
+              default: "Dockerfile"
+            CONTEXT_PATH:
+              type: string
+              default: "."
diff --git a/jenkins/client/job/docker/cicd/tempest.yml b/jenkins/client/job/docker/cicd/tempest.yml
new file mode 100644
index 0000000..7b68403
--- /dev/null
+++ b/jenkins/client/job/docker/cicd/tempest.yml
@@ -0,0 +1,56 @@
+parameters:
+  jenkins:
+    client:
+      job:
+        docker-build-images-docker-ci-tempest:
+          name: docker-build-images-docker-ci-tempest
+          discard:
+            build:
+              keep_num: 30
+            artifact:
+              keep_num: 30
+          type: workflow-scm
+          concurrent: true
+          scm:
+            type: git
+            url: "${_param:jenkins_gerrit_url}/oss/jenkins/pipelines"
+            credentials: "gerrit"
+            script: docker-build-image-pipeline.groovy
+          trigger:
+            gerrit:
+              project:
+                "mcp/docker-ci-tempest":
+                  branches:
+                    - master
+              event:
+                patchset:
+                  - created:
+                      excludeDrafts: false
+                      excludeNoCodeChange: false
+                change:
+                  - merged
+                comment:
+                  - addedContains:
+                      commentAddedCommentContains: 'rebuild'
+          param:
+            IMAGE_NAME:
+              type: string
+              default: "ci-tempest"
+            IMAGE_TAGS:
+              type: string
+              default: ""
+            CREDENTIALS_ID:
+              type: string
+              default: "gerrit"
+            DOCKER_REGISTRY:
+              type: string
+              default: "docker-dev-virtual.docker.mirantis.net"
+            PROJECT_NAMESPACE:
+              type: string
+              default: "cicd"
+            DOCKERFILE_PATH:
+              type: string
+              default: "Dockerfile"
+            CONTEXT_PATH:
+              type: string
+              default: "."
diff --git a/jenkins/client/job/oscore/tests.yml b/jenkins/client/job/oscore/tests.yml
index f5bb092..eb3a325 100644
--- a/jenkins/client/job/oscore/tests.yml
+++ b/jenkins/client/job/oscore/tests.yml
@@ -734,3 +734,11 @@
                 type: string
                 default: "{{systestJobPrefix}}"
                 description: "Systest job prefix. I.e. oscore-formula-systest-virtual_mcp11_aio-"
+              OPENSTACK_COMPONENTS_LIST:
+                type: string
+                description: "OpenStack related components list"
+                default: "{{openstack_components_list}}"
+              SOURCE_REPO_NAME:
+                type: string
+                description: "Name of the repo where packages are stored"
+                default: "{{source_repo_name}}"
diff --git a/jenkins/client/job/salt-formulas/git-mirrors/2way.yml b/jenkins/client/job/salt-formulas/git-mirrors/2way.yml
index 249a7e5..728f8b8 100644
--- a/jenkins/client/job/salt-formulas/git-mirrors/2way.yml
+++ b/jenkins/client/job/salt-formulas/git-mirrors/2way.yml
@@ -36,6 +36,9 @@
             - name: barbican
               branches: ${_param:salt_formulas_branches}
               notification_recipients: ${_param:salt_formulas_notification_recipients}
+            - name: baremetal-simulator
+              branches: ${_param:salt_formulas_branches}
+              notification_recipients: ${_param:salt_formulas_notification_recipients}
             - name: billometer
               branches: ${_param:salt_formulas_branches}
               notification_recipients: ${_param:salt_formulas_notification_recipients}
@@ -84,6 +87,9 @@
             - name: docker
               branches: ${_param:salt_formulas_branches}
               notification_recipients: ${_param:salt_formulas_notification_recipients}
+            - name: dogtag
+              branches: ${_param:salt_formulas_branches}
+              notification_recipients: ${_param:salt_formulas_notification_recipients}
             - name: dovecot
               branches: ${_param:salt_formulas_branches}
               notification_recipients: ${_param:salt_formulas_notification_recipients}
@@ -291,6 +297,9 @@
             - name: prometheus
               branches: ${_param:salt_formulas_branches}
               notification_recipients: ${_param:salt_formulas_notification_recipients}
+            - name: pv
+              branches: ${_param:salt_formulas_branches}
+              notification_recipients: ${_param:salt_formulas_notification_recipients}
             - name: python
               branches: ${_param:salt_formulas_branches}
               notification_recipients: ${_param:salt_formulas_notification_recipients}
diff --git a/jenkins/client/job/salt-formulas/tests.yml b/jenkins/client/job/salt-formulas/tests.yml
index b6d74f2..2f6e807 100644
--- a/jenkins/client/job/salt-formulas/tests.yml
+++ b/jenkins/client/job/salt-formulas/tests.yml
@@ -53,6 +53,7 @@
             - name: haproxy
             - name: heat
             - name: heka
+            - name: heketi
             - name: helm
             - name: horizon
             - name: influxdb
@@ -102,6 +103,7 @@
             - name: powerdns
             - name: pritunl
             - name: prometheus
+            - name: pv
             - name: python
             - name: rabbitmq
             - name: reclass
diff --git a/jenkins/client/job/salt-models/tests.yml b/jenkins/client/job/salt-models/tests.yml
index 9e6b8ac..c68e3d9 100644
--- a/jenkins/client/job/salt-models/tests.yml
+++ b/jenkins/client/job/salt-models/tests.yml
@@ -110,6 +110,10 @@
                     - addedContains:
                         commentAddedCommentContains: '^(?s:Patch Set \d+:.*(test|recheck|reverify)\s*)$'
             param:
+              TEST_CLUSTER_NAMES:
+                type: string
+                description: "Comma separated list of cluster names, empty string means all valid clusters"
+                default: "{{test_cluster_names}}"
               SALT_OPTS:
                 type: string
                 default: "--force-color"
diff --git a/linux/system/repo/mcp/apt_mirantis/fluentd.yml b/linux/system/repo/mcp/apt_mirantis/fluentd.yml
index da7d3ca..246d285 100644
--- a/linux/system/repo/mcp/apt_mirantis/fluentd.yml
+++ b/linux/system/repo/mcp/apt_mirantis/fluentd.yml
@@ -6,9 +6,9 @@
     system:
       repo:
         mcp_fluentd:
-          source: "deb [arch=amd64] http://apt.mirantis.com/${_param:linux_system_codename}/fluentd/ ${_param:linux_system_repo_mcp_fluentd_version} main"
+          source: "deb [arch=amd64] http://mirror.mirantis.com/${_param:linux_system_repo_mcp_fluentd_version}/td-agent-${_param:linux_system_codename} ${_param:linux_system_codename} contrib"
           architectures: amd64
-          key_url: "http://apt.mirantis.com/public.gpg"
+          key_url: "http://packages.treasuredata.com/GPG-KEY-td-agent"
           clean_file: true
           pin:
           - pin: 'release a=${_param:linux_system_repo_mcp_fluentd_version}'
diff --git a/linux/system/repo_local/mcp/apt_mirantis/fluentd.yml b/linux/system/repo_local/mcp/apt_mirantis/fluentd.yml
index 40682d7..d0a1671 100644
--- a/linux/system/repo_local/mcp/apt_mirantis/fluentd.yml
+++ b/linux/system/repo_local/mcp/apt_mirantis/fluentd.yml
@@ -6,7 +6,7 @@
     system:
       repo:
         mcp_fluentd:
-          source: "deb [arch=amd64] http://${_param:local_repo_url}/ubuntu-${_param:linux_system_codename}/fluentd/ ${_param:linux_system_repo_mcp_fluentd_version} main"
+          source: "deb [arch=amd64] http://${_param:local_repo_url}/ubuntu-${_param:linux_system_codename}/fluentd ${_param:apt_mk_version} contrib"
           architectures: amd64
           key_url: "http://${_param:local_repo_url}/public.gpg"
           clean_file: true
diff --git a/linux/system/single/debian.yml b/linux/system/single/debian.yml
index b6d0b2b..b4d08c9 100644
--- a/linux/system/single/debian.yml
+++ b/linux/system/single/debian.yml
@@ -6,5 +6,31 @@
   linux:
     system:
       package:
+        apt-transport-https:
+          version: latest
+        cloud-init:
+          version: purged
+        mcelog:
+          version: latest
         python-msgpack:
           version: latest
+        unattended-upgrades:
+          version: purged
+      apt:
+        config:
+          compression-workaround:
+            "Acquire::CompressionTypes::Order": "gz"
+          aws-s3-mirrors-workaround:
+            "Acquire::http::Pipeline-Depth": "0"
+          dont_install_recommends:
+            "APT::Install-Recommends": "false"
+          dont_install_suggests:
+            "APT::Install-Suggests": "false"
+          dont_acquire_all_languages:
+            "Acquire::Languages": "none"
+          dont_update_package_list:
+            "APT::Periodic::Update-Package-Lists": "0"
+          dont_update_download_upg_packages:
+            "APT::Periodic::Download-Upgradeable-Packages": "0"
+          disable_unattended_upgrade:
+            "APT::Periodic::Unattended-Upgrade": "0"
diff --git a/linux/system/single/init.yml b/linux/system/single/init.yml
index 70eae66..dae70ff 100644
--- a/linux/system/single/init.yml
+++ b/linux/system/single/init.yml
@@ -14,19 +14,6 @@
           enabled: true
           name: root
           home: /root
-      package:
-        cloud-init:
-          version: purged
-        unattended-upgrades:
-          version: purged
-        mcelog:
-          version: latest
-      apt:
-        config:
-          compression-workaround:
-            "Acquire::CompressionTypes::Order": "gz"
-          aws-s3-mirrors-workaround:
-            "Acquire::http::Pipeline-Depth": "0"
       kernel:
         modules:
           - nf_conntrack
diff --git a/nginx/server/proxy/openstack/ironic.yml b/nginx/server/proxy/openstack/ironic.yml
new file mode 100644
index 0000000..95eb1bd
--- /dev/null
+++ b/nginx/server/proxy/openstack/ironic.yml
@@ -0,0 +1,22 @@
+parameters:
+  _param:
+    nginx_proxy_openstack_api_host: ${_param:cluster_public_host}
+    nginx_proxy_openstack_api_address: 0.0.0.0
+    nginx_proxy_openstack_ironic_host: ${_param:ironic_service_host}
+  nginx:
+    server:
+      enabled: true
+      site:
+        nginx_proxy_openstack_api_ironic:
+          enabled: true
+          type: nginx_proxy
+          name: openstack_api_ironic
+          proxy:
+            host: ${_param:nginx_proxy_openstack_ironic_host}
+            port: 6385
+            protocol: http
+          host:
+            name: ${_param:nginx_proxy_openstack_api_host}
+            port: 6385
+            address: ${_param:nginx_proxy_openstack_api_address}
+          ssl: ${_param:nginx_proxy_ssl}
diff --git a/salt/master/formula/git/manila.yml b/salt/master/formula/git/manila.yml
new file mode 100644
index 0000000..b9cf3e0
--- /dev/null
+++ b/salt/master/formula/git/manila.yml
@@ -0,0 +1,10 @@
+parameters:
+  salt:
+    master:
+      environment:
+        dev:
+          formula:
+            manila:
+              source: git
+              address: '${_param:salt_master_environment_repository}/salt-formula-manila.git'
+              revision: ${_param:salt_master_environment_revision}
diff --git a/salt/master/formula/pkg/manila.yml b/salt/master/formula/pkg/manila.yml
new file mode 100644
index 0000000..4777a36
--- /dev/null
+++ b/salt/master/formula/pkg/manila.yml
@@ -0,0 +1,9 @@
+parameters:
+  salt:
+    master:
+      environment:
+        prd:
+          formula:
+            manila:
+              source: pkg
+              name: salt-formula-manila