Fix docker install for offline case
Change-Id: Idc34037ee826e048c7a35d7286fa2ea07e387d96
diff --git a/tcp_tests/templates/virtual-offline-pike-ovs/openstack.yaml b/tcp_tests/templates/virtual-offline-pike-ovs/openstack.yaml
index 1ade409..0575c58 100644
--- a/tcp_tests/templates/virtual-offline-pike-ovs/openstack.yaml
+++ b/tcp_tests/templates/virtual-offline-pike-ovs/openstack.yaml
@@ -5,7 +5,8 @@
{% from 'virtual-offline-pike-ovs/underlay.yaml' import HOSTNAME_GTW01 with context %}
{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
-
+{% set REPOSITORY_SUITE = os_env('REPOSITORY_SUITE', 'testing') %}
+{% set DOCKER_LOCAL_REPO = os_env('DOCKER_LOCAL_REPO', 'deb [arch=amd64] http://mirror.mcp.mirantis.local.test/ubuntu-xenial/docker/ ' + REPOSITORY_SUITE + ' stable') %}
# Install OpenStack control services
- description: Install glance on all controllers
@@ -328,8 +329,17 @@
retry: {count: 1, delay: 30}
skip_fail: false
-- description: Install docker.io on gtw
- cmd: salt-call cmd.run 'apt-get install docker.io -y'
+- description: Enable local docker repo
+ cmd: |
+ set -e;
+ echo "{{ DOCKER_LOCAL_REPO }}" > /etc/apt/sources.list.d/mcp_docker.list;
+ apt-get clean; apt-get update;
+ node_name: {{ HOSTNAME_GTW01 }}
+ retry: {count: 1, delay: 30}
+ skip_fail: false
+
+- description: Install docker-ce on gtw
+ cmd: salt-call cmd.run 'apt-get install docker-ce -y'
node_name: {{ HOSTNAME_GTW01 }}
retry: {count: 1, delay: 30}
skip_fail: false