Merge "Add cvp-sanity jenkins job See also https://gerrit.mcp.mirantis.net/#/c/11076/ Change-Id: I9a3ccb54d0b45ec7c7370ade1d275ca31bfe4e7e"
diff --git a/.releasenotes/notes/remove-repo-includes-from-system-d4af8a0ac985d4e5.yaml b/.releasenotes/notes/remove-repo-includes-from-system-d4af8a0ac985d4e5.yaml
index 8ab3536..c0d8932 100644
--- a/.releasenotes/notes/remove-repo-includes-from-system-d4af8a0ac985d4e5.yaml
+++ b/.releasenotes/notes/remove-repo-includes-from-system-d4af8a0ac985d4e5.yaml
@@ -1,19 +1,23 @@
 ---
 summary: >
-    Removed included classes for linux.system.repo from the system level reclass
-    model because they were breaking installation from local repos.
+    Removed included classes for ``linux.system.repo`` from the system level
+    Reclass model because they were breaking installation from local repos
+
 features:
-  - |
-    Added linux.system.repo definition for MAAS.
+  - Added ``linux.system.repo`` definition for MAAS.
+
 deprecations:
   - |
     Removed:
-     - system.linux.system.repo.mcp.salt from salt/master/pkg.yml
-     - system.linux.system.repo.docker from docker/host.yml
-     - service.maas.region.vendor_repo from maas/region/single.yml
 
-    These repos should be added to appropriate cluster level classes. New cluster
-    models from Cookiecutter have them already included.
+    - ``system.linux.system.repo.mcp.salt`` from ``salt/master/pkg.yml``
+    - ``system.linux.system.repo.docker`` from ``docker/host.yml``
+    - ``service.maas.region.vendor_repo`` from ``maas/region/single.yml``
+
+    These repos should be added to appropriate cluster level classes.
+    New cluster models from Cookiecutter have them already included.
+
 fixes:
-  - |
-    MCP deployments can now be installed from local repositories without problems.
\ No newline at end of file
+  - MCP deployments can now be installed from local repositories without
+    problems.
+
diff --git a/galera/server/cluster.yml b/galera/server/cluster.yml
index 1ab0aae..ba2a3ff 100644
--- a/galera/server/cluster.yml
+++ b/galera/server/cluster.yml
@@ -2,19 +2,3 @@
 - service.keepalived.cluster.single
 - service.haproxy.proxy.single
 - 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/galera/server/clustercheck.yml b/galera/server/clustercheck.yml
new file mode 100644
index 0000000..a5d7137
--- /dev/null
+++ b/galera/server/clustercheck.yml
@@ -0,0 +1,18 @@
+parameters:
+  _param:
+    galera_clustercheck_password: clustercheck
+  galera:
+    clustercheck:
+      enabled: True
+      user: clustercheck
+      password: ${_param:galera_clustercheck_password}
+      port: 9200
+      available_when_donor: 0
+      available_when_readonly: 0
+  mysql:
+    server:
+      users:
+      - name: clustercheck
+        password: ${_param:galera_clustercheck_password}
+        database: '*.*'
+        grants: PROCESS
diff --git a/jenkins/client/approved_scripts.yml b/jenkins/client/approved_scripts.yml
index 12a7e9f..daafadd 100644
--- a/jenkins/client/approved_scripts.yml
+++ b/jenkins/client/approved_scripts.yml
@@ -49,6 +49,7 @@
         - method java.net.URLConnection setRequestProperty java.lang.String java.lang.String
         - method java.util.Collection remove java.lang.Object
         - method java.util.Collection stream
+        - method java.util.Date getTime
         - method java.util.LinkedHashMap$LinkedHashIterator hasNext
         - method java.util.List subList int int
         - method java.util.Map remove java.lang.Object
diff --git a/jenkins/client/job/ceph/add-node.yml b/jenkins/client/job/ceph/add-node.yml
index 6ae22ad..9fee51e 100644
--- a/jenkins/client/job/ceph/add-node.yml
+++ b/jenkins/client/job/ceph/add-node.yml
@@ -2,7 +2,7 @@
   jenkins:
     client:
       job:
-        ceph-remove-osd:
+        ceph-add-node:
           type: workflow-scm
           concurrent: true
           display_name: "Ceph - add node"
diff --git a/jenkins/client/job/ceph/backend-migration.yml b/jenkins/client/job/ceph/backend-migration.yml
new file mode 100644
index 0000000..e0dc091
--- /dev/null
+++ b/jenkins/client/job/ceph/backend-migration.yml
@@ -0,0 +1,49 @@
+parameters:
+  jenkins:
+    client:
+      job:
+        ceph-backend-migration:
+          type: workflow-scm
+          concurrent: true
+          display_name: "Ceph - backend migration"
+          discard:
+            build:
+              keep_num: 50
+          scm:
+            type: git
+            url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+            credentials: "gerrit"
+            script: ceph-backend-migration.groovy
+          param:
+            # general parameters
+            SALT_MASTER_URL:
+              type: string
+              description: URL of Salt master
+              default: "http://${_param:salt_master_host}:6969"
+            SALT_MASTER_CREDENTIALS:
+              type: string
+              description: Credentials for login to Salt API
+              default: salt
+            TARGET:
+              type: string
+              description: OSD hosts (minion ids) to be targeted
+              default: 'osd*'
+            OSD:
+              type: string
+              description: OSD ids to be migrated (comma-separated list - 1,2,3)
+              default: '*'
+            ADMIN_HOST:
+              type: string
+              description: Host with admin keyring and access to cluster management
+              default: 'cmn01*'
+            CLUSTER_FLAGS:
+              type: string
+              description: Flags to be aplied before pipeline and after pipeline (comma-separated list)
+            WAIT_FOR_HEALTHY:
+              type: boolean
+              default: 'true'
+              description: Wait for healthy during pipeline
+            ORIGIN_BACKEND:
+              type: string
+              description: Ceph backend before migration
+              default: 'filestore'
diff --git a/jenkins/client/job/ceph/init.yml b/jenkins/client/job/ceph/init.yml
index 4cfc6db..19bafca 100644
--- a/jenkins/client/job/ceph/init.yml
+++ b/jenkins/client/job/ceph/init.yml
@@ -3,4 +3,5 @@
 - system.jenkins.client.job.ceph.replace-failed-osd
 - system.jenkins.client.job.ceph.add-node
 - system.jenkins.client.job.ceph.remove-node
-
+- system.jenkins.client.job.ceph.upgrade
+- system.jenkins.client.job.ceph.backend-migration
diff --git a/jenkins/client/job/ceph/remove-node.yml b/jenkins/client/job/ceph/remove-node.yml
index 9ba449c..4a5efe3 100644
--- a/jenkins/client/job/ceph/remove-node.yml
+++ b/jenkins/client/job/ceph/remove-node.yml
@@ -2,7 +2,7 @@
   jenkins:
     client:
       job:
-        ceph-remove-osd:
+        ceph-remove-node:
           type: workflow-scm
           concurrent: true
           display_name: "Ceph - remove node"
diff --git a/jenkins/client/job/ceph/replace-failed-osd.yml b/jenkins/client/job/ceph/replace-failed-osd.yml
index 50e644b..57081ec 100644
--- a/jenkins/client/job/ceph/replace-failed-osd.yml
+++ b/jenkins/client/job/ceph/replace-failed-osd.yml
@@ -2,7 +2,7 @@
   jenkins:
     client:
       job:
-        ceph-remove-osd:
+        ceph-replace-failed-osd:
           type: workflow-scm
           concurrent: true
           display_name: "Ceph - replace failed OSD"
@@ -40,14 +40,6 @@
               type: string
               description: Host with admin keyring and correct crushmap file in /etc/ceph/crushmap
               default: 'cmn01*'
-            ENFORCE_CRUSHMAP:
-              type: boolean
-              default: 'false'
-              description: Set to true if the prepared crush map should be enforced
-            WAIT_FOR_PG_REBALANCE:
-              type: boolean
-              default: 'true'
-              description: Wait for PGs to rebalance after osd is removed from crush map
             WAIT_FOR_HEALTHY:
               type: boolean
               default: 'false'
diff --git a/jenkins/client/job/ceph/upgrade.yml b/jenkins/client/job/ceph/upgrade.yml
new file mode 100644
index 0000000..bf8e9e4
--- /dev/null
+++ b/jenkins/client/job/ceph/upgrade.yml
@@ -0,0 +1,66 @@
+parameters:
+  jenkins:
+    client:
+      job:
+        ceph-upgrade:
+          type: workflow-scm
+          concurrent: true
+          display_name: "Ceph - upgrade"
+          discard:
+            build:
+              keep_num: 50
+          scm:
+            type: git
+            url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+            credentials: "gerrit"
+            script: ceph-upgrade.groovy
+          param:
+            # general parameters
+            SALT_MASTER_URL:
+              type: string
+              description: URL of Salt master
+              default: "http://${_param:salt_master_host}:6969"
+            SALT_MASTER_CREDENTIALS:
+              type: string
+              description: Credentials for login to Salt API
+              default: salt
+            ADMIN_HOST:
+              type: string
+              description: Host with admin keyring and correct crushmap file in /etc/ceph/crushmap
+              default: 'cmn01*'
+            WAIT_FOR_HEALTHY:
+              type: boolean
+              default: 'true'
+              description: Wait for healthy during pipeline
+            CLUSTER_FLAGS:
+              type: string
+              default: 'sortbitwise,noout'
+              description: Flags to be aplied before pipeline and after pipeline (comma-separated list)
+            ORIGIN_RELEASE:
+              type: string
+              description: Ceph release version before upgrade
+              default: 'jewel'
+            TARGET_RELEASE:
+              type: string
+              description: Ceph release version after upgrade
+              default: 'luminous'
+            STAGE_UPGRADE_MON:
+              type: boolean
+              default: 'true'
+              description: Set to True if Ceph mon nodes upgrade is desired
+            STAGE_UPGRADE_MGR:
+              type: boolean
+              default: 'true'
+              description: Set to True if Ceph mgr nodes upgrade or new deploy is desired
+            STAGE_UPGRADE_OSD:
+              type: boolean
+              default: 'true'
+              description: Set to True if Ceph osd nodes upgrade is desired
+            STAGE_UPGRADE_RGW:
+              type: boolean
+              default: 'true'
+              description: Set to True if Ceph rgw nodes upgrade is desired
+            STAGE_UPGRADE_CLIENT:
+              type: boolean
+              default: 'true'
+              description: Set to True if Ceph client nodes upgrade is desired (includes for example ctl/cmp nodes)
diff --git a/jenkins/client/job/debian/packages/salt.yml b/jenkins/client/job/debian/packages/salt.yml
index 41fdb7a..2430724 100644
--- a/jenkins/client/job/debian/packages/salt.yml
+++ b/jenkins/client/job/debian/packages/salt.yml
@@ -83,6 +83,9 @@
             - name: fluentbit
               upload_source_package: false
               dist: trusty
+            - name: fluentd
+              upload_source_package: false
+              dist: trusty
             - name: foreman
               upload_source_package: false
               dist: trusty
diff --git a/jenkins/client/job/deploy/lab/deploy.yml b/jenkins/client/job/deploy/lab/deploy.yml
index e64858a..108e30d 100644
--- a/jenkins/client/job/deploy/lab/deploy.yml
+++ b/jenkins/client/job/deploy/lab/deploy.yml
@@ -27,6 +27,9 @@
               ASK_ON_ERROR:
                 type: boolean
                 default: 'false'
+              SLAVE_NODE:
+                type: string
+                default: 'python'
 
               # deployments
               STACK_NAME:
diff --git a/jenkins/client/job/oscore/tests.yml b/jenkins/client/job/oscore/tests.yml
index 298e00e..5e5f743 100644
--- a/jenkins/client/job/oscore/tests.yml
+++ b/jenkins/client/job/oscore/tests.yml
@@ -15,7 +15,7 @@
             scm:
               type: git
               url: "${_param:jenkins_gerrit_url}/openstack-ci/openstack-pipelines.git"
-              credentials: "mcp-gerrit"
+              credentials: "gerrit"
               branch: 'master'
               script: test-openstack-component-pipeline.groovy
             trigger:
@@ -48,7 +48,7 @@
                 default: 'core,openstack,ovs'
               STACK_DELETE:
                 type: boolean
-                default: 'true'
+                default: 'false'
                 description: Don't enable it if you need to use the lab after
               STACK_CLEANUP_JOB:
                 type: string
@@ -104,6 +104,10 @@
                 type: string
                 description: Product milestone
                 default: "{{milestone}}"
+              TEST_TEMPEST_CONF:
+                type: string
+                description: Tempest configuration file path inside container
+                default: "{{tempest_conf}}"
               TEST_TEMPEST_TARGET:
                 type: string
                 description: Node to run tests
@@ -137,7 +141,7 @@
             scm:
               type: git
               url: "${_param:jenkins_gerrit_url}/openstack-ci/openstack-pipelines.git"
-              credentials: "mcp-gerrit"
+              credentials: "gerrit"
               branch: 'master'
               script: run-openstack-tests.groovy
             param:
@@ -185,6 +189,10 @@
                 type: string
                 description: How much test threads to run
                 default: "2"
+              TEST_TEMPEST_CONF:
+                type: string
+                description: Tempest configuration file path inside container
+                default: "mcp.conf"
               TEST_MODEL:
                 type: string
                 description: Environment salt model
@@ -209,7 +217,7 @@
             scm:
               type: git
               url: "${_param:jenkins_gerrit_url}/openstack-ci/openstack-pipelines.git"
-              credentials: "mcp-gerrit"
+              credentials: "gerrit"
               branch: 'master'
               script: process-openstack-test-results.groovy
             param:
@@ -269,3 +277,84 @@
                 type: string
                 description: Tests pass rate to consider build successful
                 default: "90"
+        deploy-kvm-virtual-template:
+          name: "{{job_prefix}}-deploy-kvm-VMs"
+          template:
+            discard:
+              build:
+                keep_num: 30
+              artifact:
+                keep_num: 30
+            type: workflow-scm
+            concurrent: true
+            scm:
+              type: git
+              url: "${_param:jenkins_gerrit_url}/openstack-ci/openstack-pipelines.git"
+              credentials: "gerrit"
+              branch: 'master'
+              script: deploy-kvm-pipeline.groovy
+            param:
+              # general
+              STACK_NAME:
+                type: string
+                description: "VM prefix name"
+                default: "kvm-aio-node"
+              TEMPLATE:
+                type: choice
+                choices:
+                  - AIO
+                  - Multi
+                default: "AIO"
+              DEPLOY_OPENSTACK:
+                type: boolean
+                default: 'false'
+                description: "Enable it if openstack deployment is required"
+              JOB_DEP_NAME:
+                type: string
+                default:
+                description: "Name of the job to deploy openstack"
+              DESTROY_ENV:
+                type: boolean
+                default: 'false'
+                description: "Enable if env have to be destoyed."
+              CREATE_ENV:
+                type: boolean
+                default: 'true'
+                description: "Enable it if KVM VM have to be created."
+              STACK_DELETE:
+                type: boolean
+                default: 'false'
+                description: "Enable it if KVM VM have to be deleted."
+              STACK_TYPE:
+                type: string
+                default: "{{stack_type}}"
+              OPENSTACK_API_PROJECT:
+                type: string
+                default: "mcp-oscore-ci"
+              HEAT_STACK_ZONE:
+                type: string
+                description: AZ
+                default: "mcp-oscore-ci"
+              STACK_INSTALL:
+                type: string
+                description: components to install
+                default: 'core,openstack,ovs'
+              STACK_TEST:
+                type: string
+                description: Job for environment deployment
+                default: ''
+              # salt
+              SALT_MASTER_CREDENTIALS:
+                type: string
+                default: "salt-qa-credentials"
+              SALT_MASTER_URL:
+                type: string
+                default: ""
+              SALT_OVERRIDES:
+                type: text
+                default: ""
+                description: YAML with overrides for Salt deployment
+              TEST_MODEL:
+                type: string
+                description: Environment salt model
+                default: "{{model}}"
diff --git a/jenkins/client/job/salt-formulas/git-mirrors/2way.yml b/jenkins/client/job/salt-formulas/git-mirrors/2way.yml
index 34b7460..90a96a0 100644
--- a/jenkins/client/job/salt-formulas/git-mirrors/2way.yml
+++ b/jenkins/client/job/salt-formulas/git-mirrors/2way.yml
@@ -61,6 +61,8 @@
               branches: ${_param:salt_formulas_branches}
             - name: fluentbit
               branches: ${_param:salt_formulas_branches}
+            - name: fluentd
+              branches: ${_param:salt_formulas_branches}
             - name: foreman
               branches: ${_param:salt_formulas_branches}
             - name: freeipa
diff --git a/jenkins/client/job/salt-formulas/tests.yml b/jenkins/client/job/salt-formulas/tests.yml
index d35b179..892ca76 100644
--- a/jenkins/client/job/salt-formulas/tests.yml
+++ b/jenkins/client/job/salt-formulas/tests.yml
@@ -33,6 +33,7 @@
             - name: elasticsearch
             - name: etcd
             - name: fluentbit
+            - name: fluentd
             - name: foreman
             - name: freeipa
             - name: galera
diff --git a/jenkins/client/job/salt-models/tests.yml b/jenkins/client/job/salt-models/tests.yml
index e60fe22..1cc904d 100644
--- a/jenkins/client/job/salt-models/tests.yml
+++ b/jenkins/client/job/salt-models/tests.yml
@@ -70,6 +70,12 @@
               LEGACY_TEST_MODE:
                 type: boolean
                 default: "{{legacy_test_mode}}"
+              APT_REPOSITORY:
+                type: string
+                default: ""
+              APT_REPOSITORY_GPG:
+                type: string
+                default: ""
         test_system_reclass:
           name: test-salt-model-{{name}}
           template:
@@ -208,3 +214,9 @@
             LEGACY_TEST_MODE:
               type: boolean
               default: "false"
+            APT_REPOSITORY:
+              type: string
+              default: ""
+            APT_REPOSITORY_GPG:
+              type: string
+              default: ""
diff --git a/openssh/server/team/all.yml b/openssh/server/team/all.yml
index 5106c73..5daf27d 100644
--- a/openssh/server/team/all.yml
+++ b/openssh/server/team/all.yml
@@ -1,13 +1,11 @@
 classes:
+# avoid teams w/sudo group restrictions, or override restrictions
 - system.openssh.server.team.lab
 - system.openssh.server.team.cicd
 - system.openssh.server.team.mcp_qa
 - system.openssh.server.team.mcp_ci
-- system.openssh.server.team.mmo_devops
 - system.openssh.server.team.presales
 - system.openssh.server.team.services
-# avoid teams w/sudo group restrictions, or override restrictions
-#- system.openssh.server.team.support
 - system.openssh.server.team.stacklight
 - system.openssh.server.team.networking
 - system.openssh.server.team.security
@@ -17,6 +15,8 @@
 - system.openssh.server.team.oscore_devops
 - system.openssh.server.team.k8s_team
 - system.openssh.server.team.k8s_apps_team
+# to include support team, please integrate submodule opscare into cluster model
+# https://gerrit.mirantis.com/#/admin/projects/mmo-support/reclass-opscare
 parameters:
   _param:
     linux_system_user_sudo: true
diff --git a/openssh/server/team/l1_support.yml b/openssh/server/team/l1_support.yml
index 1db07d6..8f1d5c1 100644
--- a/openssh/server/team/l1_support.yml
+++ b/openssh/server/team/l1_support.yml
@@ -1,5 +1,6 @@
 ## DEPRECATED, this class will be removed 01/2018
-#  please use support.yml instead
+## please integrate submodule opscare instead
+## https://gerrit.mirantis.com/#/admin/projects/mmo-support/reclass-opscare
 classes:
 - system.linux.system.sudo
 # L1
diff --git a/openssh/server/team/l2_support.yml b/openssh/server/team/l2_support.yml
index d231abc..91c7fa8 100644
--- a/openssh/server/team/l2_support.yml
+++ b/openssh/server/team/l2_support.yml
@@ -1,5 +1,6 @@
 ## DEPRECATED, this class will be removed 01/2018
-#  please use support3.yml instead
+## please integrate submodule opscare instead
+## https://gerrit.mirantis.com/#/admin/projects/mmo-support/reclass-opscare
 classes:
 - system.linux.system.sudo
 # L2
diff --git a/openssh/server/team/mmo_devops.yml b/openssh/server/team/mmo_devops.yml
index 1fe82c6..986c5e3 100644
--- a/openssh/server/team/mmo_devops.yml
+++ b/openssh/server/team/mmo_devops.yml
@@ -1,3 +1,4 @@
+## DEPRECATED, this class will be removed 01/2018
 classes:
 # DevOps/SRE Team
 - system.openssh.server.team.members.cade
diff --git a/openssh/server/team/support.yml b/openssh/server/team/support.yml
index 1b09ef0..1c59bb8 100644
--- a/openssh/server/team/support.yml
+++ b/openssh/server/team/support.yml
@@ -1,3 +1,6 @@
+## DEPRECATED, this class will be removed 01/2018
+## please integrate submodule opscare instead
+## https://gerrit.mirantis.com/#/admin/projects/mmo-support/reclass-opscare
 classes:
 - system.linux.system.sudo
 # L1
diff --git a/salt/master/formula/git/openstack.yml b/salt/master/formula/git/openstack.yml
index 3472f2e..cd9df0a 100644
--- a/salt/master/formula/git/openstack.yml
+++ b/salt/master/formula/git/openstack.yml
@@ -8,10 +8,10 @@
               source: git
               address: '${_param:salt_master_environment_repository}/salt-formula-aodh.git'
               revision: ${_param:salt_master_environment_revision}
-            #avinetworks:
-            #  source: git
-            #  address: '${_param:salt_master_environment_repository}/salt-formula-avinetworks.git'
-            #  revision: ${_param:salt_master_environment_revision}
+            avinetworks:
+              source: git
+              address: '${_param:salt_master_environment_repository}/salt-formula-avinetworks.git'
+              revision: ${_param:salt_master_environment_revision}
             barbican:
               source: git
               address: '${_param:salt_master_environment_repository}/salt-formula-barbican.git'
diff --git a/salt/master/formula/pkg/openstack.yml b/salt/master/formula/pkg/openstack.yml
index 663572b..3d22c41 100644
--- a/salt/master/formula/pkg/openstack.yml
+++ b/salt/master/formula/pkg/openstack.yml
@@ -7,9 +7,9 @@
             aodh:
               source: pkg
               name: salt-formula-aodh
-            #avinetworks:
-            #  source: pkg
-            #  name: salt-formula-avinetworks
+            avinetworks:
+              source: pkg
+              name: salt-formula-avinetworks
             barbican:
               source: pkg
               name: salt-formula-barbican