Add missed stuff for offline

* Enable caching for DebMirror to save disk space
  Use caching logic to save disk space for DebMirror, so same packages
  in different repo versions will be used via hardlinks;
* Save in offline default Cirros/Fedora images.
* Add ci-tempest with pinned pike/queens tags to offline registry

Change-Id: I832d45167ad4b70b8349260614ffc8bbb9a911ca
Related-Prod: PROD-32735
diff --git a/debmirror/mirror_mirantis_com/ceph-luminous/xenial.yml b/debmirror/mirror_mirantis_com/ceph-luminous/xenial.yml
index 2e90d54..982372b 100644
--- a/debmirror/mirror_mirantis_com/ceph-luminous/xenial.yml
+++ b/debmirror/mirror_mirantis_com/ceph-luminous/xenial.yml
@@ -14,6 +14,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_root}/ceph-luminous/xenial/"
           target_dir: "${_param:debmirror_mirrors_base_target_dir}/ceph-luminous/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/ceph-luminous/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_ceph_luminous_xenial.log"
           dist: [ xenial ]
           section: [ main ]
diff --git a/debmirror/mirror_mirantis_com/docker/xenial.yml b/debmirror/mirror_mirantis_com/docker/xenial.yml
index dca5d99..3364ff0 100644
--- a/debmirror/mirror_mirantis_com/docker/xenial.yml
+++ b/debmirror/mirror_mirantis_com/docker/xenial.yml
@@ -14,6 +14,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_root}/docker/xenial/"
           target_dir: "${_param:debmirror_mirrors_base_target_dir}/docker/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/docker/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_docker_xenial.log"
           dist: [ xenial ]
           section: [ stable ]
diff --git a/debmirror/mirror_mirantis_com/elasticsearch-5.x/xenial.yml b/debmirror/mirror_mirantis_com/elasticsearch-5.x/xenial.yml
index f9ce996..3a76987 100644
--- a/debmirror/mirror_mirantis_com/elasticsearch-5.x/xenial.yml
+++ b/debmirror/mirror_mirantis_com/elasticsearch-5.x/xenial.yml
@@ -15,6 +15,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_root}/elasticsearch-5.x/xenial/"
           target_dir: "${_param:debmirror_mirrors_base_target_dir}/elasticsearch-5.x/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/elasticsearch-5.x/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_elasticsearch_5_x_xenial.log"
           dist: [ stable ]
           section: [ main ]
diff --git a/debmirror/mirror_mirantis_com/elasticsearch-6.x/xenial.yml b/debmirror/mirror_mirantis_com/elasticsearch-6.x/xenial.yml
index 445f56b..711da9b 100644
--- a/debmirror/mirror_mirantis_com/elasticsearch-6.x/xenial.yml
+++ b/debmirror/mirror_mirantis_com/elasticsearch-6.x/xenial.yml
@@ -15,6 +15,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_root}/elasticsearch-6.x/xenial/"
           target_dir: "${_param:debmirror_mirrors_base_target_dir}/elasticsearch-6.x/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/elasticsearch-6.x/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_elasticsearch_6_x_xenial.log"
           dist: [ stable ]
           section: [ main ]
diff --git a/debmirror/mirror_mirantis_com/extra/xenial.yml b/debmirror/mirror_mirantis_com/extra/xenial.yml
index 2615ee5..1ae00eb 100644
--- a/debmirror/mirror_mirantis_com/extra/xenial.yml
+++ b/debmirror/mirror_mirantis_com/extra/xenial.yml
@@ -14,6 +14,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_root}/extra/xenial/"
           target_dir: "${_param:debmirror_mirrors_base_target_dir}/extra/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/extra/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_extra_xenial.log"
           dist: [ xenial ]
           section: [ main ]
diff --git a/debmirror/mirror_mirantis_com/opencontrail-4.1/xenial.yml b/debmirror/mirror_mirantis_com/opencontrail-4.1/xenial.yml
index 72cf29a..9a0ed44 100644
--- a/debmirror/mirror_mirantis_com/opencontrail-4.1/xenial.yml
+++ b/debmirror/mirror_mirantis_com/opencontrail-4.1/xenial.yml
@@ -14,6 +14,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_root}/opencontrail-4.1/xenial/"
           target_dir: "${_param:debmirror_mirrors_base_target_dir}/opencontrail-4.1/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/opencontrail-4.1/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_oc41_xenial.log"
           dist: [ xenial ]
           section: [ main ]
diff --git a/debmirror/mirror_mirantis_com/openstack-pike/xenial.yml b/debmirror/mirror_mirantis_com/openstack-pike/xenial.yml
index 86dd3b2..294e0e0 100644
--- a/debmirror/mirror_mirantis_com/openstack-pike/xenial.yml
+++ b/debmirror/mirror_mirantis_com/openstack-pike/xenial.yml
@@ -14,6 +14,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_root}/openstack-pike/xenial/"
           target_dir: "${_param:debmirror_mirrors_base_target_dir}/openstack-pike/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/openstack-pike/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_openstack_pike_xenial.log"
           dist: [ xenial ]
           section: [ main ]
diff --git a/debmirror/mirror_mirantis_com/openstack-queens/xenial.yml b/debmirror/mirror_mirantis_com/openstack-queens/xenial.yml
index e8ec6df..1960d8a 100644
--- a/debmirror/mirror_mirantis_com/openstack-queens/xenial.yml
+++ b/debmirror/mirror_mirantis_com/openstack-queens/xenial.yml
@@ -14,6 +14,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_root}/openstack-queens/xenial/"
           target_dir: "${_param:debmirror_mirrors_base_target_dir}/openstack-queens/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/openstack-queens/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_openstack_queens_xenial.log"
           dist: [ xenial ]
           section: [ main ]
diff --git a/debmirror/mirror_mirantis_com/td-agent/xenial.yml b/debmirror/mirror_mirantis_com/td-agent/xenial.yml
index f4ffa7e..03d5bc5 100644
--- a/debmirror/mirror_mirantis_com/td-agent/xenial.yml
+++ b/debmirror/mirror_mirantis_com/td-agent/xenial.yml
@@ -14,6 +14,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_root}/td-agent/xenial/"
           target_dir: "${_param:debmirror_mirrors_base_target_dir}/td-agent/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/td-agent/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_td_agent_xenial.log"
           dist: [ xenial ]
           section: [ contrib ]
diff --git a/debmirror/mirror_mirantis_com/ubuntu/xenial.yml b/debmirror/mirror_mirantis_com/ubuntu/xenial.yml
index d09f75d..ab67cd5 100644
--- a/debmirror/mirror_mirantis_com/ubuntu/xenial.yml
+++ b/debmirror/mirror_mirantis_com/ubuntu/xenial.yml
@@ -18,8 +18,7 @@
           log_file: "/var/log/debmirror/mirror_mirantis_com_ubuntu_xenial.log"
           dist: [ xenial , xenial-security, xenial-updates ]
           section: [ main , restricted, universe ]
-          # TODO : add later
-          # cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/ubuntu/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/ubuntu/"
           # Don't exclude main/x11 - its required for many pkgs.
           exclude_deb_section:
           - Xfce
diff --git a/debmirror/mirror_mirantis_com/update/ceph-luminous/xenial.yml b/debmirror/mirror_mirantis_com/update/ceph-luminous/xenial.yml
index 6c75bb6..f966993 100644
--- a/debmirror/mirror_mirantis_com/update/ceph-luminous/xenial.yml
+++ b/debmirror/mirror_mirantis_com/update/ceph-luminous/xenial.yml
@@ -14,6 +14,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_update_root}/ceph-luminous/xenial/"
           target_dir: "${_param:debmirror_mirrors_update_target_dir}/ceph-luminous/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/ceph-luminous/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_update_ceph_luminous_xenial.log"
           dist: [ xenial ]
           section: [ main ]
diff --git a/debmirror/mirror_mirantis_com/update/docker/xenial.yml b/debmirror/mirror_mirantis_com/update/docker/xenial.yml
index c385ce8..52f4ff2 100644
--- a/debmirror/mirror_mirantis_com/update/docker/xenial.yml
+++ b/debmirror/mirror_mirantis_com/update/docker/xenial.yml
@@ -14,6 +14,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_update_root}/docker/xenial/"
           target_dir: "${_param:debmirror_mirrors_update_target_dir}/docker/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/docker/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_update_docker_xenial.log"
           dist: [ xenial ]
           section: [ stable ]
diff --git a/debmirror/mirror_mirantis_com/update/elasticsearch-5.x/xenial.yml b/debmirror/mirror_mirantis_com/update/elasticsearch-5.x/xenial.yml
index 52f9482..a01cdc0 100644
--- a/debmirror/mirror_mirantis_com/update/elasticsearch-5.x/xenial.yml
+++ b/debmirror/mirror_mirantis_com/update/elasticsearch-5.x/xenial.yml
@@ -15,6 +15,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_update_root}/elasticsearch-5.x/xenial/"
           target_dir: "${_param:debmirror_mirrors_update_target_dir}/elasticsearch-5.x/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/elasticsearch-5.x/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_update_elasticsearch_5_x_xenial.log"
           dist: [ stable ]
           section: [ main ]
diff --git a/debmirror/mirror_mirantis_com/update/elasticsearch-6.x/xenial.yml b/debmirror/mirror_mirantis_com/update/elasticsearch-6.x/xenial.yml
index 938b3fb..1a640e5 100644
--- a/debmirror/mirror_mirantis_com/update/elasticsearch-6.x/xenial.yml
+++ b/debmirror/mirror_mirantis_com/update/elasticsearch-6.x/xenial.yml
@@ -15,6 +15,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_update_root}/elasticsearch-6.x/xenial/"
           target_dir: "${_param:debmirror_mirrors_update_target_dir}/elasticsearch-6.x/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/elasticsearch-6.x/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_update_elasticsearch_6_x_xenial.log"
           dist: [ stable ]
           section: [ main ]
diff --git a/debmirror/mirror_mirantis_com/update/extra/xenial.yml b/debmirror/mirror_mirantis_com/update/extra/xenial.yml
index 1c64647..c655030 100644
--- a/debmirror/mirror_mirantis_com/update/extra/xenial.yml
+++ b/debmirror/mirror_mirantis_com/update/extra/xenial.yml
@@ -14,6 +14,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_update_root}/extra/xenial/"
           target_dir: "${_param:debmirror_mirrors_update_target_dir}/extra/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/extra/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_update_extra_xenial.log"
           dist: [ xenial ]
           section: [ main ]
diff --git a/debmirror/mirror_mirantis_com/update/opencontrail-4.1/xenial.yml b/debmirror/mirror_mirantis_com/update/opencontrail-4.1/xenial.yml
index 7803e7a..7a195aa 100644
--- a/debmirror/mirror_mirantis_com/update/opencontrail-4.1/xenial.yml
+++ b/debmirror/mirror_mirantis_com/update/opencontrail-4.1/xenial.yml
@@ -14,6 +14,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_update_root}/opencontrail-4.1/xenial/"
           target_dir: "${_param:debmirror_mirrors_update_target_dir}/opencontrail-4.1/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/opencontrail-4.1/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_update_oc41_xenial.log"
           dist: [ xenial ]
           section: [ main ]
diff --git a/debmirror/mirror_mirantis_com/update/openstack-pike/xenial.yml b/debmirror/mirror_mirantis_com/update/openstack-pike/xenial.yml
index eb1d17a..20a4d05 100644
--- a/debmirror/mirror_mirantis_com/update/openstack-pike/xenial.yml
+++ b/debmirror/mirror_mirantis_com/update/openstack-pike/xenial.yml
@@ -14,6 +14,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_update_root}/openstack-pike/xenial/"
           target_dir: "${_param:debmirror_mirrors_update_target_dir}/openstack-pike/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/openstack-pike/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_update_openstack_pike_xenial.log"
           dist: [ xenial ]
           section: [ main ]
diff --git a/debmirror/mirror_mirantis_com/update/openstack-queens/xenial.yml b/debmirror/mirror_mirantis_com/update/openstack-queens/xenial.yml
index 5701b7a..ef917fb 100644
--- a/debmirror/mirror_mirantis_com/update/openstack-queens/xenial.yml
+++ b/debmirror/mirror_mirantis_com/update/openstack-queens/xenial.yml
@@ -14,6 +14,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_update_root}/openstack-queens/xenial/"
           target_dir: "${_param:debmirror_mirrors_update_target_dir}/openstack-queens/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/openstack-queens/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_update_openstack_queens_xenial.log"
           dist: [ xenial ]
           section: [ main ]
diff --git a/debmirror/mirror_mirantis_com/update/td-agent/xenial.yml b/debmirror/mirror_mirantis_com/update/td-agent/xenial.yml
index 5d951ee..c838b73 100644
--- a/debmirror/mirror_mirantis_com/update/td-agent/xenial.yml
+++ b/debmirror/mirror_mirantis_com/update/td-agent/xenial.yml
@@ -14,6 +14,7 @@
           mirror_host: "${_param:debmirror_mirrors_host}"
           mirror_root: "${_param:debmirror_mirrors_update_root}/td-agent/xenial/"
           target_dir: "${_param:debmirror_mirrors_update_target_dir}/td-agent/xenial/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/td-agent/"
           log_file: "/var/log/debmirror/mirror_mirantis_com_update_td_agent_xenial.log"
           dist: [ xenial ]
           section: [ contrib ]
diff --git a/debmirror/mirror_mirantis_com/update/ubuntu/xenial.yml b/debmirror/mirror_mirantis_com/update/ubuntu/xenial.yml
index 12a17e7..3986e60 100644
--- a/debmirror/mirror_mirantis_com/update/ubuntu/xenial.yml
+++ b/debmirror/mirror_mirantis_com/update/ubuntu/xenial.yml
@@ -18,8 +18,7 @@
           log_file: "/var/log/debmirror/mirror_mirantis_com_update_ubuntu_xenial.log"
           dist: [ xenial , xenial-security, xenial-updates ]
           section: [ main , restricted, universe ]
-          # TODO : add later
-          # cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/ubuntu/"
+          cache_dir: "${_param:debmirror_mirrors_common_cache_dir}/ubuntu/"
           # Don't exclude main/x11 - its required for many pkgs.
           exclude_deb_section:
           - Xfce
diff --git a/defaults/docker_images.yml b/defaults/docker_images.yml
index 54fbfa4..bd97ea5 100644
--- a/defaults/docker_images.yml
+++ b/defaults/docker_images.yml
@@ -161,7 +161,10 @@
         # QA\CVP tool-set's
         - registry: ${_param:mcp_docker_registry}/mirantis/cicd
           target_registry: ${_param:default_local_mirrror_content:docker_client_registry_target_registry}/mirantis/cicd
-          name: ci-tempest:${_param:openstack_version}
+          name: ci-tempest:pike
+        - registry: ${_param:mcp_docker_registry}/mirantis/cicd
+          target_registry: ${_param:default_local_mirrror_content:docker_client_registry_target_registry}/mirantis/cicd
+          name: ci-tempest:queens
         - registry: ${_param:mcp_docker_registry}/mirantis/cvp
           target_registry: ${_param:default_local_mirrror_content:docker_client_registry_target_registry}/mirantis/cvp
           name: cvp-rally:2019.2.5
diff --git a/defaults/linux_system_file.yml b/defaults/linux_system_file.yml
index 8af3075..1a8e075 100644
--- a/defaults/linux_system_file.yml
+++ b/defaults/linux_system_file.yml
@@ -33,3 +33,9 @@
         amphora-x64-haproxy-rocky.qcow2.md5:
           name: /srv/http/images.mirantis.com/octavia/amphora-x64-haproxy-rocky-${_param:mcp_version}.qcow2.md5
           source: ${_param:mcp_static_images_url}/octavia/amphora-x64-haproxy-rocky-${_param:mcp_version}.qcow2.md5
+        cirros-0.3.5-x86_64-disk.img:
+          source: ${_param:mcp_binary_registry}/mirantis/external/images/cirros/0.3.5/cirros-0.3.5-x86_64-disk.img
+          name: /srv/http/artifactory.mirantis.com/artifactory/binary-prod-local/mirantis/external/images/cirros/0.3.5/cirros-0.3.5-x86_64-disk.img
+        Fedora-Cloud-Base-27-1.6.x86_64.qcow2:
+          source: ${_param:mcp_binary_registry}/mirantis/external/images/cloud-fedora/27/Fedora-Cloud-Base-27-1.6.x86_64.qcow2
+          name: /srv/http/artifactory.mirantis.com/artifactory/binary-prod-local/mirantis/external/images/cloud-fedora/27/Fedora-Cloud-Base-27-1.6.x86_64.qcow2
diff --git a/defaults/openstack/init.yml b/defaults/openstack/init.yml
index 0e940a0..1c742db 100644
--- a/defaults/openstack/init.yml
+++ b/defaults/openstack/init.yml
@@ -241,6 +241,12 @@
     #
     amphora_image_name: amphora-x64-haproxy
     amphora_image_url: ${_param:mcp_static_images_url}/octavia/amphora-x64-haproxy-${_param:openstack_version}-${_param:mcp_version}.qcow2
+
+    glance_image_cirros_name: 'TestCirros-0.3.5'
+    glance_image_cirros_location: "${_param:mcp_binary_registry}/mirantis/external/images/cirros/0.3.5/cirros-0.3.5-x86_64-disk.img"
+
+    glance_image_fedora_name: 'TestFedora-27-1.6'
+    glance_image_fedora_location: "${_param:mcp_binary_registry}/mirantis/external/images/cloud-fedora/27/Fedora-Cloud-Base-27-1.6.x86_64.qcow2"
     # Sahara
     mysql_sahara_username: sahara
     keystone_sahara_username: sahara