Introduce SALT_VERSION var
As we plan to move to salt 2017.7 and at the same time
we need to check 2016.3 as well (and upgrdae path), introduce
new var SALT_VERSION with default value 2016.3
Also update repo path to salt from mirror mirantis and clened up
commented hacks
Reelated: PROD-19373
Change-Id: I3c327aa4b6369750f5bdabe1b96cb52ab5770f03
diff --git a/tcp_tests/templates/virtual-mcp10-ovs/salt.yaml b/tcp_tests/templates/virtual-mcp10-ovs/salt.yaml
index 57c0417..3b6c798 100644
--- a/tcp_tests/templates/virtual-mcp10-ovs/salt.yaml
+++ b/tcp_tests/templates/virtual-mcp10-ovs/salt.yaml
@@ -4,7 +4,7 @@
{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %}
# Other salt model repository parameters see in shared-salt.yaml
-
+{% set SALT_VERSION = os_env('SALT_VERSION', '2016.3') %}
{% import 'shared-salt.yaml' as SHARED with context %}
# Install salt to the config node
@@ -15,8 +15,8 @@
which wget >/dev/null || (apt-get update; apt-get install -y wget);
echo "deb [arch=amd64] http://apt.mirantis.com/xenial nightly salt extra" > /etc/apt/sources.list.d/mcp_salt.list;
wget -O - http://apt.mirantis.com/public.gpg | apt-key add -;
- echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3 xenial main" > /etc/apt/sources.list.d/saltstack.list;
- wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub | apt-key add -;
+ echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/{{ SALT_VERSION }} xenial main" > /etc/apt/sources.list.d/saltstack.list;
+ wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/"+SALT_VERSION+ "/SALTSTACK-GPG-KEY.pub | apt-key add -;
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 1}
skip_fail: false
@@ -69,21 +69,25 @@
{{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }}
-- description: Hack gtw node
- cmd: salt 'gtw*' cmd.run "ip addr del 172.16.10.110/24 dev ens4; ip addr flush dev ens4";
- node_name: {{ HOSTNAME_CFG01 }}
- retry: {count: 1, delay: 10}
- skip_fail: false
+{{SHARED.MACRO_CHECK_SALT_VERSION_SERVICES_ON_CFG()}}
-- description: Hack cmp01 node
- cmd: salt 'cmp01*' cmd.run "ip addr del 172.16.10.105/24 dev ens4; ip addr flush dev ens4";
- node_name: {{ HOSTNAME_CFG01 }}
- retry: {count: 1, delay: 10}
- skip_fail: false
+{{SHARED.MACRO_CHECK_SALT_VERSION_ON_NODES()}}
-- description: Hack cmp02 node
- cmd: salt 'cmp02*' cmd.run "ip addr del 172.16.10.106/24 dev ens4; ip addr flush dev ens4";
- node_name: {{ HOSTNAME_CFG01 }}
- retry: {count: 1, delay: 10}
- skip_fail: false
-
+#- description: Hack gtw node
+# cmd: salt 'gtw*' cmd.run "ip addr del 172.16.10.110/24 dev ens4; ip addr flush dev ens4";
+# node_name: {{ HOSTNAME_CFG01 }}
+# retry: {count: 1, delay: 10}
+# skip_fail: false
+#
+#- description: Hack cmp01 node
+# cmd: salt 'cmp01*' cmd.run "ip addr del 172.16.10.105/24 dev ens4; ip addr flush dev ens4";
+# node_name: {{ HOSTNAME_CFG01 }}
+# retry: {count: 1, delay: 10}
+# skip_fail: false
+#
+#- description: Hack cmp02 node
+# cmd: salt 'cmp02*' cmd.run "ip addr del 172.16.10.106/24 dev ens4; ip addr flush dev ens4";
+# node_name: {{ HOSTNAME_CFG01 }}
+# retry: {count: 1, delay: 10}
+# skip_fail: false
+#
diff --git a/tcp_tests/templates/virtual-mcp10-ovs/underlay--user-data1404.yaml b/tcp_tests/templates/virtual-mcp10-ovs/underlay--user-data1404.yaml
index b0b0daf..487ccfa 100644
--- a/tcp_tests/templates/virtual-mcp10-ovs/underlay--user-data1404.yaml
+++ b/tcp_tests/templates/virtual-mcp10-ovs/underlay--user-data1404.yaml
@@ -52,8 +52,8 @@
# saltstack repo is for minions that have the same version in the xenial and trusty (2016.3.3)
#- echo "deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest trusty main" > /etc/apt/sources.list.d/saltstack.list
#- wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add -
- - echo "deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/2016.3 trusty main" > /etc/apt/sources.list.d/saltstack.list
- - wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub | apt-key add -
+ - echo "deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/{{ SALT_VERSION }} trusty main" > /etc/apt/sources.list.d/saltstack.list
+ - wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/{{ SALT_VERSION }}/SALTSTACK-GPG-KEY.pub | apt-key add -
- apt-get clean
- apt-get update
diff --git a/tcp_tests/templates/virtual-mcp10-ovs/underlay--user-data1604.yaml b/tcp_tests/templates/virtual-mcp10-ovs/underlay--user-data1604.yaml
index dcc77d2..3e0c1fd 100644
--- a/tcp_tests/templates/virtual-mcp10-ovs/underlay--user-data1604.yaml
+++ b/tcp_tests/templates/virtual-mcp10-ovs/underlay--user-data1604.yaml
@@ -59,8 +59,8 @@
# saltstack repo is for minions that have the same version in the xenial and trusty (2016.3.3)
#- echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest xenial main" > /etc/apt/sources.list.d/saltstack.list
#- wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add -
- - echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3 xenial main" > /etc/apt/sources.list.d/saltstack.list
- - wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub | apt-key add -
+ - echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/{{ SALT_VERSION }} xenial main" > /etc/apt/sources.list.d/saltstack.list
+ - wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/{{ SALT_VERSION }}/SALTSTACK-GPG-KEY.pub | apt-key add -
- apt-get clean
- apt-get update