Merge "Add model for contrail4.0"
diff --git a/tcp_tests/fixtures/ceph_fixtures.py b/tcp_tests/fixtures/ceph_fixtures.py
index 0b2ef50..94315c4 100644
--- a/tcp_tests/fixtures/ceph_fixtures.py
+++ b/tcp_tests/fixtures/ceph_fixtures.py
@@ -22,18 +22,17 @@
@pytest.fixture(scope='function')
-def ceph_actions(config, hardware, underlay, salt_deployed):
+def ceph_actions(config, underlay, salt_deployed):
"""Fixture that provides various actions for OpenStack
:param config: fixture provides oslo.config
- :param config: fixture provides oslo.config
:param underlay: fixture provides underlay manager
:param salt_deployed: fixture provides salt manager
:rtype: CephManager
For use in tests or fixtures to deploy a custom OpenStack
"""
- return ceph_manager.CephManager(config, underlay, hardware, salt_deployed)
+ return ceph_manager.CephManager(config, underlay, salt_deployed)
@pytest.mark.revert_snapshot(ext.SNAPSHOT.ceph_deployed)
diff --git a/tcp_tests/fixtures/k8s_fixtures.py b/tcp_tests/fixtures/k8s_fixtures.py
index 08176fc..f59ff61 100644
--- a/tcp_tests/fixtures/k8s_fixtures.py
+++ b/tcp_tests/fixtures/k8s_fixtures.py
@@ -13,6 +13,7 @@
# under the License.
import pytest
+import time
from tcp_tests.helpers import ext
from tcp_tests.helpers import utils
@@ -79,7 +80,8 @@
LOG.warning('Restarting keepalived service on controllers...')
k8s_actions._salt.local(tgt='ctl*', fun='cmd.run',
args='systemctl restart keepalived.service')
-
+ # give some time to keepalived to enter in MASTER state
+ time.sleep(5)
return k8s_actions
diff --git a/tcp_tests/fixtures/openstack_fixtures.py b/tcp_tests/fixtures/openstack_fixtures.py
index 8e92e77..8f997a3 100644
--- a/tcp_tests/fixtures/openstack_fixtures.py
+++ b/tcp_tests/fixtures/openstack_fixtures.py
@@ -22,7 +22,7 @@
@pytest.fixture(scope='function')
-def openstack_actions(config, hardware, underlay, salt_deployed):
+def openstack_actions(config, underlay, salt_deployed):
"""Fixture that provides various actions for OpenStack
:param config: fixture provides oslo.config
@@ -33,8 +33,7 @@
For use in tests or fixtures to deploy a custom OpenStack
"""
- return openstack_manager.OpenstackManager(config, underlay,
- hardware, salt_deployed)
+ return openstack_manager.OpenstackManager(config, underlay, salt_deployed)
@pytest.mark.revert_snapshot(ext.SNAPSHOT.openstack_deployed)
diff --git a/tcp_tests/managers/ceph_manager.py b/tcp_tests/managers/ceph_manager.py
index bd68496..b2111be 100644
--- a/tcp_tests/managers/ceph_manager.py
+++ b/tcp_tests/managers/ceph_manager.py
@@ -23,12 +23,10 @@
__config = None
__underlay = None
- __hardware = None
- def __init__(self, config, underlay, hardware, salt):
+ def __init__(self, config, underlay, salt):
self.__config = config
self.__underlay = underlay
- self.__hardware = hardware
self._salt = salt
super(CephManager, self).__init__(
config=config, underlay=underlay)
diff --git a/tcp_tests/managers/envmanager_devops.py b/tcp_tests/managers/envmanager_devops.py
index 79bec94..7424a49 100644
--- a/tcp_tests/managers/envmanager_devops.py
+++ b/tcp_tests/managers/envmanager_devops.py
@@ -427,6 +427,22 @@
timeout_msg=('Node {0} failed '
'to become active'.format(node)))
+ def warm_shutdown_nodes(self, underlay, nodes_prefix, timeout=600):
+ node_names = underlay.get_target_node_names(nodes_prefix)
+ for node in node_names:
+ LOG.debug('Shutdown node {0}'.format(node))
+ underlay.check_call(cmd="shutdown +1", node_name=node)
+ for node in node_names:
+ self.wait_for_node_state(node, state='offline', timeout=timeout)
+
+ def warm_restart_nodes(self, underlay, nodes_prefix, timeout=600):
+ self.warm_shutdown_nodes(underlay, nodes_prefix, timeout)
+ node_names = underlay.get_target_node_names(nodes_prefix)
+ for node in node_names:
+ LOG.debug('Starting node {0}'.format(node))
+ self.start_node(node)
+ self.wait_for_node_state(node, state='active', timeout=timeout)
+
def has_snapshot(self, name):
return self.__env.has_snapshot(name)
diff --git a/tcp_tests/managers/envmanager_empty.py b/tcp_tests/managers/envmanager_empty.py
index b543c87..c4bb57e 100644
--- a/tcp_tests/managers/envmanager_empty.py
+++ b/tcp_tests/managers/envmanager_empty.py
@@ -104,3 +104,11 @@
def delete_environment(self):
"""Delete environment"""
pass
+
+ def warm_shutdown_nodes(self, underlay, nodes_prefix, timeout=600):
+ raise Exception(
+ "Node shutdown method unsupported on this environment manager")
+
+ def warm_restart_nodes(self, underlay, nodes_prefix, timeout=600):
+ raise Exception(
+ "Node restart method unsupported on this environment manager")
diff --git a/tcp_tests/managers/k8smanager.py b/tcp_tests/managers/k8smanager.py
index 1a6144f..38521c7 100644
--- a/tcp_tests/managers/k8smanager.py
+++ b/tcp_tests/managers/k8smanager.py
@@ -343,15 +343,17 @@
return sum(pods)
def run_conformance(self, timeout=60 * 60, log_out='k8s_conformance.log',
- raise_on_err=True):
- with self.__underlay.remote(
- node_name=self.ctl_host) as remote:
- result = remote.check_call(
- "set -o pipefail; docker run --net=host -e API_SERVER="
- "'http://127.0.0.1:8080' {0} | tee {1}".format(
- self.__config.k8s.k8s_conformance_image, log_out),
- timeout=timeout, raise_on_err=raise_on_err)['stdout']
- return result
+ raise_on_err=True, node_name=None,
+ api_server='http://127.0.0.1:8080'):
+ if node_name is None:
+ node_name = self.ctl_host
+ cmd = "set -o pipefail; docker run --net=host -e API_SERVER="\
+ "'{api}' {image} | tee '{log}'".format(
+ api=api_server, image=self.__config.k8s.k8s_conformance_image,
+ log=log_out)
+ return self.__underlay.check_call(
+ cmd=cmd, node_name=node_name, timeout=timeout,
+ raise_on_err=raise_on_err)
def get_k8s_masters(self):
k8s_masters_fqdn = self._salt.get_pillar(tgt='I@kubernetes:master',
@@ -704,3 +706,14 @@
update_commands = self.__underlay.read_template(steps_path)
self.execute_commands(
update_commands, label="Updating kubernetes to '{}'".format(tag))
+
+ def get_keepalived_vip(self):
+ """
+ Return k8s VIP IP address
+
+ :return: str, IP address
+ """
+ ctl_vip_pillar = self._salt.get_pillar(
+ tgt="I@kubernetes:control:enabled:True",
+ pillar="_param:cluster_vip_address")[0]
+ return [vip for minion_id, vip in ctl_vip_pillar.items()][0]
diff --git a/tcp_tests/managers/openstack_manager.py b/tcp_tests/managers/openstack_manager.py
index 464dc56..d47aceb 100644
--- a/tcp_tests/managers/openstack_manager.py
+++ b/tcp_tests/managers/openstack_manager.py
@@ -26,12 +26,10 @@
__config = None
__underlay = None
- __hardware = None
- def __init__(self, config, underlay, hardware, salt):
+ def __init__(self, config, underlay, salt):
self.__config = config
self.__underlay = underlay
- self.__hardware = hardware
self._salt = salt
super(OpenstackManager, self).__init__(
config=config, underlay=underlay)
@@ -164,37 +162,6 @@
LOG.debug("Found files {0}".format(file_name))
r.download(destination=file_name, target=os.getcwd())
- def get_node_name_by_subname(self, node_sub_name):
- return [node_name for node_name
- in self.__underlay.node_names()
- if node_sub_name in node_name]
-
- def warm_shutdown_openstack_nodes(self, node_sub_name, timeout=10 * 60):
- """Gracefully shutting down the node """
- node_names = self.get_node_name_by_subname(node_sub_name)
- LOG.info('Shutting down nodes {}'.format(node_names))
- for node in node_names:
- LOG.debug('Shutdown node {0}'.format(node))
- self.__underlay.check_call(cmd="shutdown +1", node_name=node)
- for node in node_names:
- LOG.info('Destroy node {}'.format(node))
- self.__hardware.destroy_node(node)
- self.__hardware.wait_for_node_state(
- node, state='offline', timeout=timeout)
-
- def warm_start_nodes(self, node_sub_name, timeout=10 * 60):
- node_names = self.get_node_name_by_subname(node_sub_name)
- LOG.info('Starting nodes {}'.format(node_names))
- for node in node_names:
- self.__hardware.start_node(node)
- self.__hardware.wait_for_node_state(
- node, state='active', timeout=timeout)
-
- def warm_restart_nodes(self, node_names, timeout=10 * 60):
- LOG.info('Reboot (warm restart) nodes {0}'.format(node_names))
- self.warm_shutdown_openstack_nodes(node_names, timeout=timeout)
- self.warm_start_nodes(node_names)
-
def auth_in_horizon(self, host, port, user, password):
client = requests.session()
url = "http://{0}:{1}".format(
diff --git a/tcp_tests/settings_oslo.py b/tcp_tests/settings_oslo.py
index 8bd2b50..45b871d 100644
--- a/tcp_tests/settings_oslo.py
+++ b/tcp_tests/settings_oslo.py
@@ -311,13 +311,13 @@
default='{}/mirantis/kubernetes/pause-amd64:v1.10.4-4'.format(
settings.DOCKER_REGISTRY)),
ct.Cfg('kubernetes_calico_image', ct.String(),
- default='{}/mirantis/projectcalico/calico/node:v2.6.9'.format(
+ default='{}/mirantis/projectcalico/calico/node:v2.6.10'.format(
settings.DOCKER_REGISTRY)),
ct.Cfg('kubernetes_calico_calicoctl_image', ct.String(),
default='{}/mirantis/projectcalico/calico/ctl:v1.6.4'.format(
settings.DOCKER_REGISTRY)),
ct.Cfg('kubernetes_calico_cni_image', ct.String(),
- default='{}/mirantis/projectcalico/calico/cni:v1.11.5'.format(
+ default='{}/mirantis/projectcalico/calico/cni:v1.11.6'.format(
settings.DOCKER_REGISTRY)),
ct.Cfg('kubernetes_netchecker_enabled', ct.Boolean(),
help="", default=True),
diff --git a/tcp_tests/templates/cookied-bm-contrail-maas/salt.yaml b/tcp_tests/templates/cookied-bm-contrail-maas/salt.yaml
index 8c470b1..7e819ca 100644
--- a/tcp_tests/templates/cookied-bm-contrail-maas/salt.yaml
+++ b/tcp_tests/templates/cookied-bm-contrail-maas/salt.yaml
@@ -24,7 +24,7 @@
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
-{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "glusterfs" "xtrabackup" "maas" "backupninja" "jenkins" "fluentd"') }}
+{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "glusterfs" "xtrabackup" "maas" "backupninja" "jenkins" "fluentd" "auditd"') }}
{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
diff --git a/tcp_tests/templates/cookied-bm-contrail-nfv-maas/salt.yaml b/tcp_tests/templates/cookied-bm-contrail-nfv-maas/salt.yaml
index ed6b196..434fbde 100644
--- a/tcp_tests/templates/cookied-bm-contrail-nfv-maas/salt.yaml
+++ b/tcp_tests/templates/cookied-bm-contrail-nfv-maas/salt.yaml
@@ -24,7 +24,7 @@
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
-{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "glusterfs" "xtrabackup" "maas" "backupninja" "jenkins" "fluentd"') }}
+{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "glusterfs" "xtrabackup" "maas" "backupninja" "jenkins" "fluentd" "auditd" ') }}
{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
diff --git a/tcp_tests/templates/cookied-bm-mcp-dvr-vxlan/salt.yaml b/tcp_tests/templates/cookied-bm-mcp-dvr-vxlan/salt.yaml
index 812fd9a..9e176ab 100644
--- a/tcp_tests/templates/cookied-bm-mcp-dvr-vxlan/salt.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-dvr-vxlan/salt.yaml
@@ -52,7 +52,7 @@
retry: {count: 1, delay: 10}
skip_fail: false
-{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "glusterfs" "xtrabackup" "maas" "backupninja" "jenkins" "fluentd" "runtest"') }}
+{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "glusterfs" "xtrabackup" "maas" "backupninja" "jenkins" "fluentd" "runtest" "auditd" ') }}
{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
diff --git a/tcp_tests/templates/cookied-bm-mcp-ocata-contrail-nfv/salt.yaml b/tcp_tests/templates/cookied-bm-mcp-ocata-contrail-nfv/salt.yaml
index f6c8996..a7296b5 100644
--- a/tcp_tests/templates/cookied-bm-mcp-ocata-contrail-nfv/salt.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-ocata-contrail-nfv/salt.yaml
@@ -23,7 +23,7 @@
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
-{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "glusterfs" "xtrabackup" "maas" "backupninja" "jenkins" "fluentd"') }}
+{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "glusterfs" "xtrabackup" "maas" "backupninja" "jenkins" "fluentd" "auditd" ') }}
{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
diff --git a/tcp_tests/templates/cookied-bm-mcp-ocata-contrail/salt.yaml b/tcp_tests/templates/cookied-bm-mcp-ocata-contrail/salt.yaml
index fe77b24..731548c 100644
--- a/tcp_tests/templates/cookied-bm-mcp-ocata-contrail/salt.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-ocata-contrail/salt.yaml
@@ -25,7 +25,7 @@
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
-{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "glusterfs" "xtrabackup" "maas" "backupninja" "jenkins" "fluentd"') }}
+{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "glusterfs" "xtrabackup" "maas" "backupninja" "jenkins" "fluentd" "auditd" ') }}
{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
diff --git a/tcp_tests/templates/cookied-bm-mcp-ovs-dpdk/salt.yaml b/tcp_tests/templates/cookied-bm-mcp-ovs-dpdk/salt.yaml
index 02875ee..6293886 100644
--- a/tcp_tests/templates/cookied-bm-mcp-ovs-dpdk/salt.yaml
+++ b/tcp_tests/templates/cookied-bm-mcp-ovs-dpdk/salt.yaml
@@ -14,7 +14,7 @@
{{ SHARED.MACRO_CLONE_RECLASS_MODELS() }}
-{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "fluentd" "runtest"') }}
+{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "fluentd" "runtest" "auditd"') }}
{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
diff --git a/tcp_tests/templates/cookied-bm-ocata-cicd-pipeline/salt.yaml b/tcp_tests/templates/cookied-bm-ocata-cicd-pipeline/salt.yaml
index 8bdd414..6ce4ca9 100644
--- a/tcp_tests/templates/cookied-bm-ocata-cicd-pipeline/salt.yaml
+++ b/tcp_tests/templates/cookied-bm-ocata-cicd-pipeline/salt.yaml
@@ -27,7 +27,7 @@
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
-{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "glusterfs" "xtrabackup" "maas" "backupninja" "jenkins"') }}
+{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "glusterfs" "xtrabackup" "maas" "backupninja" "jenkins" "auditd" ') }}
- description: 'Workaround for typo in salt.minion.service (https://gerrit.mcp.mirantis.net/#/c/14806/)'
cmd: |
diff --git a/tcp_tests/templates/cookied-cicd-k8s-calico-sl/underlay--user-data-cfg01.yaml b/tcp_tests/templates/cookied-cicd-k8s-calico-sl/underlay--user-data-cfg01.yaml
index 4b134b7..4c43578 100644
--- a/tcp_tests/templates/cookied-cicd-k8s-calico-sl/underlay--user-data-cfg01.yaml
+++ b/tcp_tests/templates/cookied-cicd-k8s-calico-sl/underlay--user-data-cfg01.yaml
@@ -64,12 +64,11 @@
- |
set -x
cd /root/config-drive
- if /bin/bash -xe ./user-data > /var/log/cloud-init-user-data.log; then
+ if /bin/bash -xe ./user-data; then
touch /is_cloud_init_finished
else
set +x
- echo "bootstrap script /root/config-drive/user-data failed. tail -n 10 /var/log/cloud-init-user-data.log:\n" > /is_cloud_init_failed
- tail -n 10 /var/log/cloud-init-user-data.log >> /is_cloud_init_failed
+ echo "bootstrap script /root/config-drive/user-data failed\n" > /is_cloud_init_failed
fi
# Enable root access (after reboot)
diff --git a/tcp_tests/templates/cookied-cicd-k8s-calico/underlay--user-data-cfg01.yaml b/tcp_tests/templates/cookied-cicd-k8s-calico/underlay--user-data-cfg01.yaml
index 4b134b7..4c43578 100644
--- a/tcp_tests/templates/cookied-cicd-k8s-calico/underlay--user-data-cfg01.yaml
+++ b/tcp_tests/templates/cookied-cicd-k8s-calico/underlay--user-data-cfg01.yaml
@@ -64,12 +64,11 @@
- |
set -x
cd /root/config-drive
- if /bin/bash -xe ./user-data > /var/log/cloud-init-user-data.log; then
+ if /bin/bash -xe ./user-data; then
touch /is_cloud_init_finished
else
set +x
- echo "bootstrap script /root/config-drive/user-data failed. tail -n 10 /var/log/cloud-init-user-data.log:\n" > /is_cloud_init_failed
- tail -n 10 /var/log/cloud-init-user-data.log >> /is_cloud_init_failed
+ echo "bootstrap script /root/config-drive/user-data failed\n" > /is_cloud_init_failed
fi
# Enable root access (after reboot)
diff --git a/tcp_tests/templates/cookied-mcp-pike-dpdk/salt.yaml b/tcp_tests/templates/cookied-mcp-pike-dpdk/salt.yaml
index a72e323..991f1d7 100644
--- a/tcp_tests/templates/cookied-mcp-pike-dpdk/salt.yaml
+++ b/tcp_tests/templates/cookied-mcp-pike-dpdk/salt.yaml
@@ -14,7 +14,7 @@
{{ SHARED.MACRO_CLONE_RECLASS_MODELS() }}
-{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "fluentd" "runtest"') }}
+{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "fluentd" "runtest" "maas" "jenkins" "glusterfs" "backupninja" "auditd" ') }}
{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
diff --git a/tcp_tests/templates/cookied-mcp-pike-dvr-ssl/salt.yaml b/tcp_tests/templates/cookied-mcp-pike-dvr-ssl/salt.yaml
index c36e59c..82702a5 100644
--- a/tcp_tests/templates/cookied-mcp-pike-dvr-ssl/salt.yaml
+++ b/tcp_tests/templates/cookied-mcp-pike-dvr-ssl/salt.yaml
@@ -14,7 +14,7 @@
{{ SHARED.MACRO_CLONE_RECLASS_MODELS() }}
-{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "fluentd"') }}
+{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "fluentd" "maas" "jenkins" "glusterfs" "backupninja" "auditd" ') }}
{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
diff --git a/tcp_tests/templates/cookied-mcp-pike-dvr/salt.yaml b/tcp_tests/templates/cookied-mcp-pike-dvr/salt.yaml
index 47c92ec..2ddcbc7 100644
--- a/tcp_tests/templates/cookied-mcp-pike-dvr/salt.yaml
+++ b/tcp_tests/templates/cookied-mcp-pike-dvr/salt.yaml
@@ -14,7 +14,7 @@
{{ SHARED.MACRO_CLONE_RECLASS_MODELS() }}
-{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "fluentd" "runtest"') }}
+{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "glusterfs" "jenkins" "maas" "backupninja" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "powerdns" "fluentd" "runtest" "auditd" ') }}
{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
diff --git a/tcp_tests/templates/cookied-mcp-pike-ovs/salt.yaml b/tcp_tests/templates/cookied-mcp-pike-ovs/salt.yaml
index b273804..867aca6 100644
--- a/tcp_tests/templates/cookied-mcp-pike-ovs/salt.yaml
+++ b/tcp_tests/templates/cookied-mcp-pike-ovs/salt.yaml
@@ -14,7 +14,7 @@
{{ SHARED.MACRO_CLONE_RECLASS_MODELS() }}
-{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "fluentd" "runtest"') }}
+{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "fluentd" "runtest" "maas" "jenkins" "glusterfs" "backupninja" "auditd" ') }}
{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-dvr-vxlan.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-dvr-vxlan.yaml
index c9ad78f..d27b6ae 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-dvr-vxlan.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-dvr-vxlan.yaml
@@ -21,6 +21,23 @@
retry: {count: 1, delay: 1}
skip_fail: false
+- description: Sync formulas to service
+ cmd: |
+ set -e;
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
{{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL(CONTROL_VLAN=CONTROL_VLAN, TENANT_VLAN=TENANT_VLAN) }}
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-ocata-contrail.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-ocata-contrail.yaml
index 9f6b678..c5681be 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-ocata-contrail.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-ocata-contrail.yaml
@@ -21,6 +21,23 @@
retry: {count: 1, delay: 1}
skip_fail: false
+- description: Sync formulas to service
+ cmd: |
+ set -e;
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
{{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL(CONTROL_VLAN=CONTROL_VLAN, TENANT_VLAN=TENANT_VLAN) }}
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-ovs-dpdk.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-ovs-dpdk.yaml
index 613c07f..125b6e1 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-ovs-dpdk.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-bm-mcp-ovs-dpdk.yaml
@@ -31,6 +31,23 @@
retry: {count: 1, delay: 1}
skip_fail: false
+- description: Sync formulas to service
+ cmd: |
+ set -e;
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
- description: "Workaround for rack01 compute generator"
cmd: |
set -e;
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-cicd-k8s-calico-sl.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-cicd-k8s-calico-sl.yaml
index 4642e7c..952e798 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-cicd-k8s-calico-sl.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-cicd-k8s-calico-sl.yaml
@@ -11,10 +11,20 @@
{% import 'shared-salt.yaml' as SHARED with context %}
{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CFG01) }}
-- description: Re-install all the fromulas
+
+- description: Sync formulas to service
cmd: |
set -e;
- apt-get install -y salt-formula-*
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 1}
skip_fail: false
@@ -23,6 +33,8 @@
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
+{{ SHARED.MACRO_INSTALL_FORMULAS('\*') }}
+
- description: "Workaround for combined roles: remove unnecessary classes"
cmd: |
set -e;
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-cicd-k8s-calico.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-cicd-k8s-calico.yaml
index ceace31..bbf295c 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-cicd-k8s-calico.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-cicd-k8s-calico.yaml
@@ -11,10 +11,20 @@
{% import 'shared-salt.yaml' as SHARED with context %}
{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CFG01) }}
-- description: Re-install all the fromulas
+
+- description: Sync formulas to service
cmd: |
set -e;
- apt-get install -y salt-formula-*
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 1}
skip_fail: false
@@ -23,6 +33,8 @@
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
+{{ SHARED.MACRO_INSTALL_FORMULAS('\*') }}
+
- description: "Workaround for combined roles: remove unnecessary classes"
cmd: |
set -e;
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-mitaka-dvr.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-mitaka-dvr.yaml
index 664bc17..602fae8 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-mitaka-dvr.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-mitaka-dvr.yaml
@@ -40,6 +40,24 @@
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 1}
skip_fail: false
+
+- description: Sync formulas to service
+ cmd: |
+ set -e;
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
{{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL() }}
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-mitaka-ovs.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-mitaka-ovs.yaml
index b245ef4..37e7e92 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-mitaka-ovs.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-mitaka-ovs.yaml
@@ -30,6 +30,23 @@
retry: {count: 1, delay: 1}
skip_fail: false
+- description: Sync formulas to service
+ cmd: |
+ set -e;
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CFG01) }}
- description: Re-install all the fromulas
cmd: |
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-dop-sl2.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-dop-sl2.yaml
index f09392b..6193a47 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-dop-sl2.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-dop-sl2.yaml
@@ -22,6 +22,23 @@
retry: {count: 1, delay: 1}
skip_fail: false
+- description: Sync formulas to service
+ cmd: |
+ set -e;
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
{{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL() }}
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-dvr-vxlan.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-dvr-vxlan.yaml
index 83a433c..10835d9 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-dvr-vxlan.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-dvr-vxlan.yaml
@@ -19,6 +19,23 @@
retry: {count: 1, delay: 1}
skip_fail: false
+- description: Sync formulas to service
+ cmd: |
+ set -e;
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
{{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL() }}
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-dvr.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-dvr.yaml
index c49f52d..477fe44 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-dvr.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-dvr.yaml
@@ -22,6 +22,23 @@
retry: {count: 1, delay: 1}
skip_fail: false
+- description: Sync formulas to service
+ cmd: |
+ set -e;
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
{{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL() }}
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-ovs.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-ovs.yaml
index b2f2324..39ddd46 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-ovs.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-ocata-ovs.yaml
@@ -22,6 +22,23 @@
retry: {count: 1, delay: 1}
skip_fail: false
+- description: Sync formulas to service
+ cmd: |
+ set -e;
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
{{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL() }}
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-dpdk.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-dpdk.yaml
index cbc9f2d..6e0d764 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-dpdk.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-dpdk.yaml
@@ -19,6 +19,23 @@
retry: {count: 1, delay: 1}
skip_fail: false
+- description: Sync formulas to service
+ cmd: |
+ set -e;
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
{{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL() }}
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-dvr.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-dvr.yaml
index a21a23c..5bfde95 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-dvr.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-dvr.yaml
@@ -19,6 +19,23 @@
retry: {count: 1, delay: 1}
skip_fail: false
+- description: Sync formulas to service
+ cmd: |
+ set -e;
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
{{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL() }}
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
diff --git a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-ovs.yaml b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-ovs.yaml
index 0c82575..1e72770 100644
--- a/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-ovs.yaml
+++ b/tcp_tests/templates/cookied-model-generator/salt_cookied-mcp-pike-ovs.yaml
@@ -19,6 +19,23 @@
retry: {count: 1, delay: 1}
skip_fail: false
+- description: Sync formulas to service
+ cmd: |
+ set -e;
+ RECLASS_ROOT=${RECLASS_ROOT:-/srv/salt/reclass/};
+ FORMULAS_PATH=${FORMULAS_PATH:-/usr/share/salt-formulas};
+ [ ! -d ${RECLASS_ROOT}/classes/service ] && mkdir -p ${RECLASS_ROOT}/classes/service;
+ for formula_service in $(ls /usr/share/salt-formulas/reclass/service/); do
+ #Since some salt formula names contain "-" and in symlinks they should contain "_" adding replacement;
+ formula_service=${formula_service//-/$'_'};
+ if [ ! -L "${RECLASS_ROOT}/classes/service/${formula_service}" ]; then
+ ln -sf ${FORMULAS_PATH}/reclass/service/${formula_service} ${RECLASS_ROOT}/classes/service/${formula_service};
+ fi;
+ done
+ node_name: {{ HOSTNAME_CFG01 }}
+ retry: {count: 1, delay: 1}
+ skip_fail: false
+
{{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL() }}
{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
diff --git a/tcp_tests/templates/cookied-model-generator/underlay.yaml b/tcp_tests/templates/cookied-model-generator/underlay.yaml
index 4783bd8..ef444e7 100644
--- a/tcp_tests/templates/cookied-model-generator/underlay.yaml
+++ b/tcp_tests/templates/cookied-model-generator/underlay.yaml
@@ -68,6 +68,11 @@
forward:
mode: route
+ group_volumes:
+ - name: cfg01_day01_image # Pre-configured day01 image
+ source_image: {{ os_env('IMAGE_PATH_CFG01_DAY01') }} # http://images.mirantis.com/cfg01-day01.qcow2
+ format: qcow2
+
nodes:
- name: {{ HOSTNAME_CFG01 }}
role: salt_master
@@ -81,7 +86,7 @@
volumes:
- name: system
capacity: {{ os_env('CFG_NODE_VOLUME_SIZE', 150) }}
- shared_backing_store_name: {{ os_env('CFG01_DAY01_VOLUME_NAME') }}
+ backing_store: cfg01_day01_image
format: qcow2
- name: iso # Volume with name 'iso' will be used
# for store image with cloud-init metadata.
diff --git a/tcp_tests/templates/k8s-ha-calico/underlay--user-data-cfg01.yaml b/tcp_tests/templates/k8s-ha-calico/underlay--user-data-cfg01.yaml
index 5cb2924..7f8b8ec 100644
--- a/tcp_tests/templates/k8s-ha-calico/underlay--user-data-cfg01.yaml
+++ b/tcp_tests/templates/k8s-ha-calico/underlay--user-data-cfg01.yaml
@@ -18,8 +18,6 @@
expire: False
bootcmd:
- # Block access to SSH while node is preparing
- - cloud-init-per once sudo iptables -A INPUT -p tcp --dport 22 -j DROP
# Enable root access
- sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
- service sshd restart
@@ -46,29 +44,6 @@
- swapon /swapfile
- echo "/swapfile none swap defaults 0 0" >> /etc/fstab
- ############## TCP Cloud cfg01 node ##################
- #- sleep 120
- - echo "Preparing base OS"
-
- - echo "nameserver 172.18.208.44" >> /etc/resolv.conf;
- - which wget >/dev/null || (apt-get update; apt-get install -y wget);
-
- - echo "deb [arch=amd64] http://apt.mirantis.com/xenial {{ REPOSITORY_SUITE }} 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/{{ 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 -;
-
- - eatmydata apt-get clean && apt-get update
-
- # Install common packages
- - eatmydata apt-get install -y python-pip git curl tmux byobu iputils-ping traceroute htop tree
-
- ########################################################
- # Node is ready, allow SSH access
- - echo "Allow SSH access ..."
- - sudo iptables -D INPUT -p tcp --dport 22 -j DROP
- ########################################################
-
write_files:
- path: /etc/network/interfaces
content: |
diff --git a/tcp_tests/templates/k8s-ha-calico/underlay--user-data1604.yaml b/tcp_tests/templates/k8s-ha-calico/underlay--user-data1604.yaml
index 57fd394..6fd3272 100644
--- a/tcp_tests/templates/k8s-ha-calico/underlay--user-data1604.yaml
+++ b/tcp_tests/templates/k8s-ha-calico/underlay--user-data1604.yaml
@@ -18,8 +18,6 @@
expire: False
bootcmd:
- # Block access to SSH while node is preparing
- - cloud-init-per once sudo iptables -A INPUT -p tcp --dport 22 -j DROP
# Enable root access
- sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
- service sshd restart
@@ -45,29 +43,6 @@
- swapon /swapfile
- echo "/swapfile none swap defaults 0 0" >> /etc/fstab
-
- ############## TCP Cloud cfg01 node ##################
- #- sleep 120
- - echo "Preparing base OS"
- - which wget >/dev/null || (apt-get update; apt-get install -y wget)
-
- - echo "deb [arch=amd64] http://apt.mirantis.com/xenial {{ REPOSITORY_SUITE }} 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/{{ 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
- - eatmydata apt-get update && apt-get -y upgrade
-
- # Install common packages
- - eatmydata apt-get install -y python-pip git curl tmux byobu iputils-ping traceroute htop tree mc
-
- ########################################################
- # Node is ready, allow SSH access
- - echo "Allow SSH access ..."
- - sudo iptables -D INPUT -p tcp --dport 22 -j DROP
- ########################################################
-
write_files:
- path: /etc/network/interfaces
content: |
diff --git a/tcp_tests/templates/shared-salt.yaml b/tcp_tests/templates/shared-salt.yaml
index 86ab50e..9a2bcd9 100644
--- a/tcp_tests/templates/shared-salt.yaml
+++ b/tcp_tests/templates/shared-salt.yaml
@@ -583,7 +583,7 @@
declare -a formula_services=({{ FORMULA_SERVICES }});
echo -e "\nInstalling all required salt formulas\n";
apt-get install -y "${formula_services[@]/#/salt-formula-}";
- for formula_service in "${formula_services[@]}"; do
+ for formula_service in $(ls -1 ${FORMULA_PATH}/reclass/service); do
echo -e "\nLink service metadata for formula ${formula_service} ...\n";
[ ! -L "/srv/salt/reclass/classes/service/${formula_service}" ] && ln -s ${FORMULA_PATH}/reclass/service/${formula_service} /srv/salt/reclass/classes/service/${formula_service};
done;
@@ -695,7 +695,7 @@
{%- macro MACRO_INSTALL_FORMULAS(FORMULA_SERVICES='') %}
{#######################################################}
-- description: Configure reclass
+- description: Install salt formulas
cmd: |
set -e;
FORMULA_PATH=${FORMULA_PATH:-/usr/share/salt-formulas};
@@ -708,25 +708,13 @@
declare -a formula_services=({{ FORMULA_SERVICES }});
echo -e "\nInstalling all required salt formulas\n";
eatmydata apt-get install -y "${formula_services[@]/#/salt-formula-}";
- for formula_service in "${formula_services[@]}"; do
+ for formula_service in $(ls -1 ${FORMULA_PATH}/reclass/service); do
echo -e "\nLink service metadata for formula ${formula_service} ...\n";
[ ! -L "/srv/salt/reclass/classes/service/${formula_service}" ] && ln -s ${FORMULA_PATH}/reclass/service/${formula_service} /srv/salt/reclass/classes/service/${formula_service};
done;
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 1}
skip_fail: false
-
-- description: Show reclass-salt --top for cfg01 node
- cmd: reclass-salt --top
- node_name: {{ HOSTNAME_CFG01 }}
- retry: {count: 1, delay: 5}
- skip_fail: false
-
-- description: Restart salt-master service
- cmd: systemctl restart salt-master;
- node_name: {{ HOSTNAME_CFG01 }}
- retry: {count: 1, delay: 5}
- skip_fail: false
{%- endmacro %}
{%- macro MACRO_CONFIG_DAY01_SALT_MINION() %}
diff --git a/tcp_tests/templates/shared-sl-tests.yaml b/tcp_tests/templates/shared-sl-tests.yaml
index 35af573..a2103a4 100644
--- a/tcp_tests/templates/shared-sl-tests.yaml
+++ b/tcp_tests/templates/shared-sl-tests.yaml
@@ -9,6 +9,7 @@
- description: Install stacklight-pytest into virlual environemnt
cmd: |
set -e;
+ apt-get install -y build-essential python-dev;
apt-get -y install python-virtualenv;
virtualenv --system-site-packages venv-stacklight-pytest;
. venv-stacklight-pytest/bin/activate;
diff --git a/tcp_tests/templates/virtual-mcp-sl-os/underlay--user-data-cfg01.yaml b/tcp_tests/templates/virtual-mcp-sl-os/underlay--user-data-cfg01.yaml
index 600f6fb..a8afd05 100644
--- a/tcp_tests/templates/virtual-mcp-sl-os/underlay--user-data-cfg01.yaml
+++ b/tcp_tests/templates/virtual-mcp-sl-os/underlay--user-data-cfg01.yaml
@@ -18,8 +18,6 @@
expire: False
bootcmd:
- # Block access to SSH while node is preparing
- - cloud-init-per once sudo iptables -A INPUT -p tcp --dport 22 -j DROP
# Enable root access
- sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
- service sshd restart
@@ -44,36 +42,18 @@
- swapon /swapfile
- echo "/swapfile none swap defaults 0 0" >> /etc/fstab
- ############## TCP Cloud cfg01 node ##################
- #- sleep 120
- - echo "Preparing base OS"
-
- echo "nameserver 172.18.208.44" >> /etc/resolv.conf;
- - which wget >/dev/null || (apt-get update; apt-get install -y wget);
- # Configure Ubuntu mirrors
- - echo "deb [arch=amd64] http://mirror.mirantis.com/{{ REPOSITORY_SUITE }}/ubuntu/ xenial main restricted universe" > /etc/apt/sources.list
- - echo "deb [arch=amd64] http://mirror.mirantis.com/{{ REPOSITORY_SUITE }}/ubuntu/ xenial-updates main restricted universe" >> /etc/apt/sources.list
- - echo "deb [arch=amd64] http://mirror.mirantis.com/{{ REPOSITORY_SUITE }}/ubuntu/ xenial-security main restricted universe" >> /etc/apt/sources.list
-
- - echo "deb [arch=amd64] http://apt.mirantis.com/xenial {{ REPOSITORY_SUITE }} 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/{{ 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
-
- # Install common packages
- - eatmydata apt-get install -y python-pip git curl tmux byobu iputils-ping traceroute htop tree
-
- ########################################################
- # Node is ready, allow SSH access
- - echo "Allow SSH access ..."
- - sudo iptables -D INPUT -p tcp --dport 22 -j DROP
- ########################################################
+ # Enable grub menu using updated config below
+ - update-grub
write_files:
+ - path: /etc/default/grub.d/97-enable-grub-menu.cfg
+ content: |
+ GRUB_RECORDFAIL_TIMEOUT=30
+ GRUB_TIMEOUT=3
+ GRUB_TIMEOUT_STYLE=menu
+
- path: /etc/network/interfaces
content: |
auto ens3
@@ -87,4 +67,4 @@
ServerAliveInterval 300
ServerAliveCountMax 10
StrictHostKeyChecking no
- UserKnownHostsFile /dev/null
+ UserKnownHostsFile /dev/null
\ No newline at end of file
diff --git a/tcp_tests/templates/virtual-mcp-sl-os/underlay--user-data1604.yaml b/tcp_tests/templates/virtual-mcp-sl-os/underlay--user-data1604.yaml
index 48e3a15..3fbb777 100644
--- a/tcp_tests/templates/virtual-mcp-sl-os/underlay--user-data1604.yaml
+++ b/tcp_tests/templates/virtual-mcp-sl-os/underlay--user-data1604.yaml
@@ -18,8 +18,6 @@
expire: False
bootcmd:
- # Block access to SSH while node is preparing
- - cloud-init-per once sudo iptables -A INPUT -p tcp --dport 22 -j DROP
# Enable root access
- sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
- service sshd restart
@@ -44,34 +42,6 @@
- swapon /swapfile
- echo "/swapfile none swap defaults 0 0" >> /etc/fstab
-
- ############## TCP Cloud cfg01 node ##################
- #- sleep 120
- - echo "Preparing base OS"
- - which wget >/dev/null || (apt-get update; apt-get install -y wget)
-
- # Configure Ubuntu mirrors
- - echo "deb [arch=amd64] http://mirror.mirantis.com/{{ REPOSITORY_SUITE }}/ubuntu/ xenial main restricted universe" > /etc/apt/sources.list
- - echo "deb [arch=amd64] http://mirror.mirantis.com/{{ REPOSITORY_SUITE }}/ubuntu/ xenial-updates main restricted universe" >> /etc/apt/sources.list
- - echo "deb [arch=amd64] http://mirror.mirantis.com/{{ REPOSITORY_SUITE }}/ubuntu/ xenial-security main restricted universe" >> /etc/apt/sources.list
-
- - echo "deb [arch=amd64] http://apt.mirantis.com/xenial {{ REPOSITORY_SUITE }} 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/{{ 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
- - eatmydata apt-get update && apt-get -y upgrade
-
- # Install common packages
- - eatmydata apt-get install -y python-pip git curl tmux byobu iputils-ping traceroute htop tree mc
-
- ########################################################
- # Node is ready, allow SSH access
- - echo "Allow SSH access ..."
- - sudo iptables -D INPUT -p tcp --dport 22 -j DROP
- ########################################################
-
write_files:
- path: /etc/network/interfaces
content: |
diff --git a/tcp_tests/templates/virtual-mcp-trusty/underlay--user-data-cfg01.yaml b/tcp_tests/templates/virtual-mcp-trusty/underlay--user-data-cfg01.yaml
index 600f6fb..a8afd05 100644
--- a/tcp_tests/templates/virtual-mcp-trusty/underlay--user-data-cfg01.yaml
+++ b/tcp_tests/templates/virtual-mcp-trusty/underlay--user-data-cfg01.yaml
@@ -18,8 +18,6 @@
expire: False
bootcmd:
- # Block access to SSH while node is preparing
- - cloud-init-per once sudo iptables -A INPUT -p tcp --dport 22 -j DROP
# Enable root access
- sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
- service sshd restart
@@ -44,36 +42,18 @@
- swapon /swapfile
- echo "/swapfile none swap defaults 0 0" >> /etc/fstab
- ############## TCP Cloud cfg01 node ##################
- #- sleep 120
- - echo "Preparing base OS"
-
- echo "nameserver 172.18.208.44" >> /etc/resolv.conf;
- - which wget >/dev/null || (apt-get update; apt-get install -y wget);
- # Configure Ubuntu mirrors
- - echo "deb [arch=amd64] http://mirror.mirantis.com/{{ REPOSITORY_SUITE }}/ubuntu/ xenial main restricted universe" > /etc/apt/sources.list
- - echo "deb [arch=amd64] http://mirror.mirantis.com/{{ REPOSITORY_SUITE }}/ubuntu/ xenial-updates main restricted universe" >> /etc/apt/sources.list
- - echo "deb [arch=amd64] http://mirror.mirantis.com/{{ REPOSITORY_SUITE }}/ubuntu/ xenial-security main restricted universe" >> /etc/apt/sources.list
-
- - echo "deb [arch=amd64] http://apt.mirantis.com/xenial {{ REPOSITORY_SUITE }} 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/{{ 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
-
- # Install common packages
- - eatmydata apt-get install -y python-pip git curl tmux byobu iputils-ping traceroute htop tree
-
- ########################################################
- # Node is ready, allow SSH access
- - echo "Allow SSH access ..."
- - sudo iptables -D INPUT -p tcp --dport 22 -j DROP
- ########################################################
+ # Enable grub menu using updated config below
+ - update-grub
write_files:
+ - path: /etc/default/grub.d/97-enable-grub-menu.cfg
+ content: |
+ GRUB_RECORDFAIL_TIMEOUT=30
+ GRUB_TIMEOUT=3
+ GRUB_TIMEOUT_STYLE=menu
+
- path: /etc/network/interfaces
content: |
auto ens3
@@ -87,4 +67,4 @@
ServerAliveInterval 300
ServerAliveCountMax 10
StrictHostKeyChecking no
- UserKnownHostsFile /dev/null
+ UserKnownHostsFile /dev/null
\ No newline at end of file
diff --git a/tcp_tests/templates/virtual-mcp-trusty/underlay--user-data1404.yaml b/tcp_tests/templates/virtual-mcp-trusty/underlay--user-data1404.yaml
index 6864e4f..b30ee21 100644
--- a/tcp_tests/templates/virtual-mcp-trusty/underlay--user-data1404.yaml
+++ b/tcp_tests/templates/virtual-mcp-trusty/underlay--user-data1404.yaml
@@ -18,8 +18,6 @@
expire: False
bootcmd:
- # Block access to SSH while node is preparing
- - cloud-init-per once sudo iptables -A INPUT -p tcp --dport 22 -j DROP
# Enable root access
- sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
- service sshd restart
@@ -44,34 +42,6 @@
- swapon /swapfile
- echo "/swapfile none swap defaults 0 0" >> /etc/fstab
-
- ############## TCP Cloud cfg01 node ##################
- #- sleep 120
- - echo "Preparing base OS"
- - which wget >/dev/null || (apt-get update; apt-get install -y wget)
-
- # Configure Ubuntu mirrors
- - echo "deb [arch=amd64] http://mirror.mirantis.com/{{ REPOSITORY_SUITE }}/ubuntu/ trusty main restricted universe" > /etc/apt/sources.list
- - echo "deb [arch=amd64] http://mirror.mirantis.com/{{ REPOSITORY_SUITE }}/ubuntu/ trusty-updates main restricted universe" >> /etc/apt/sources.list
- - echo "deb [arch=amd64] http://mirror.mirantis.com/{{ REPOSITORY_SUITE }}/ubuntu/ trusty-security main restricted universe" >> /etc/apt/sources.list
-
- - echo "deb [arch=amd64] http://apt.mirantis.com/trusty {{ REPOSITORY_SUITE }} 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/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
- - eatmydata apt-get update && apt-get -y upgrade
-
- # Install common packages
- - eatmydata apt-get install -y python-pip git curl tmux byobu iputils-ping traceroute htop tree mc
-
- ########################################################
- # Node is ready, allow SSH access
- - echo "Allow SSH access ..."
- - sudo iptables -D INPUT -p tcp --dport 22 -j DROP
- ########################################################
-
write_files:
- path: /etc/network/interfaces
content: |
diff --git a/tcp_tests/templates/virtual-mcp11-k8s-calico/sl.yaml b/tcp_tests/templates/virtual-mcp11-k8s-calico/sl.yaml
index 01dcabf..70d9a3b 100644
--- a/tcp_tests/templates/virtual-mcp11-k8s-calico/sl.yaml
+++ b/tcp_tests/templates/virtual-mcp11-k8s-calico/sl.yaml
@@ -219,44 +219,6 @@
retry: {count: 2, delay: 10}
skip_fail: false
-###
-# From pipeline-library:
-# if (!common.checkContains('STACK_INSTALL', 'k8s')) {
-# salt.enforceState(master, 'I@docker:swarm and I@prometheus:server', 'heka.remote_collector', true, false)
-# }
-
-#- description: Configure Remote Collector in Docker Swarm for Openstack deployments
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@docker:swarm and I@prometheus:server' state.sls heka.remote_collector
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 10}
-# skip_fail: false
-###
-
-- description: Install sphinx
- cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@sphinx:server' state.sls sphinx
- node_name: {{ HOSTNAME_CFG01 }}
- retry: {count: 1, delay: 10}
- skip_fail: false
-
-
-#- description: Install prometheus alertmanager
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@docker:swarm' state.sls prometheus,heka.remote_collector -b 1
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 10}
-# skip_fail: false
-
-#- description: run docker state
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@docker:swarm:role:master' state.sls docker
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 10}
-# skip_fail: false
-#
-#- description: docker ps
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@docker:swarm' dockerng.ps
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 10}
-# skip_fail: false
-
- description: Configure Grafana dashboards and datasources
cmd: sleep 30; salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@grafana:client' state.sls grafana.client
node_name: {{ HOSTNAME_CFG01 }}
diff --git a/tcp_tests/templates/virtual-mcp11-k8s-contrail/sl.yaml b/tcp_tests/templates/virtual-mcp11-k8s-contrail/sl.yaml
index c6e2234..a5b37a2 100644
--- a/tcp_tests/templates/virtual-mcp11-k8s-contrail/sl.yaml
+++ b/tcp_tests/templates/virtual-mcp11-k8s-contrail/sl.yaml
@@ -231,30 +231,6 @@
# skip_fail: false
###
-- description: Install sphinx
- cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@sphinx:server' state.sls sphinx
- node_name: {{ HOSTNAME_CFG01 }}
- retry: {count: 1, delay: 10}
- skip_fail: false
-
-
-#- description: Install prometheus alertmanager
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@docker:swarm' state.sls prometheus,heka.remote_collector -b 1
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 10}
-# skip_fail: false
-
-#- description: run docker state
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@docker:swarm:role:master' state.sls docker
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 10}
-# skip_fail: false
-#
-#- description: docker ps
-# cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@docker:swarm' dockerng.ps
-# node_name: {{ HOSTNAME_CFG01 }}
-# retry: {count: 1, delay: 10}
-# skip_fail: false
- description: Configure Grafana dashboards and datasources
cmd: sleep 30; salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@grafana:client' state.sls grafana.client
diff --git a/tcp_tests/templates/virtual-offline-pike-ovs-dpdk/underlay--user-data-apt01.yaml b/tcp_tests/templates/virtual-offline-pike-ovs-dpdk/underlay--user-data-apt01.yaml
index 69772ac..7297a41 100644
--- a/tcp_tests/templates/virtual-offline-pike-ovs-dpdk/underlay--user-data-apt01.yaml
+++ b/tcp_tests/templates/virtual-offline-pike-ovs-dpdk/underlay--user-data-apt01.yaml
@@ -55,8 +55,8 @@
- which wget >/dev/null || (apt-get update; apt-get install -y wget);
- echo "deb [arch=amd64] http://apt.mirantis.com/xenial {{ REPOSITORY_SUITE }} 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/{{ 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 -;
+ - echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2017.7 xenial main" > /etc/apt/sources.list.d/saltstack.list;
+ - wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2017.7/SALTSTACK-GPG-KEY.pub | apt-key add -;
- eatmydata apt-get clean && apt-get update
diff --git a/tcp_tests/templates/virtual-offline-pike-ovs/underlay--user-data-apt01.yaml b/tcp_tests/templates/virtual-offline-pike-ovs/underlay--user-data-apt01.yaml
index 69772ac..7297a41 100644
--- a/tcp_tests/templates/virtual-offline-pike-ovs/underlay--user-data-apt01.yaml
+++ b/tcp_tests/templates/virtual-offline-pike-ovs/underlay--user-data-apt01.yaml
@@ -55,8 +55,8 @@
- which wget >/dev/null || (apt-get update; apt-get install -y wget);
- echo "deb [arch=amd64] http://apt.mirantis.com/xenial {{ REPOSITORY_SUITE }} 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/{{ 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 -;
+ - echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2017.7 xenial main" > /etc/apt/sources.list.d/saltstack.list;
+ - wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2017.7/SALTSTACK-GPG-KEY.pub | apt-key add -;
- eatmydata apt-get clean && apt-get update
diff --git a/tcp_tests/templates/virtual-offline-ssl/underlay--user-data-apt01.yaml b/tcp_tests/templates/virtual-offline-ssl/underlay--user-data-apt01.yaml
index 69772ac..7297a41 100644
--- a/tcp_tests/templates/virtual-offline-ssl/underlay--user-data-apt01.yaml
+++ b/tcp_tests/templates/virtual-offline-ssl/underlay--user-data-apt01.yaml
@@ -55,8 +55,8 @@
- which wget >/dev/null || (apt-get update; apt-get install -y wget);
- echo "deb [arch=amd64] http://apt.mirantis.com/xenial {{ REPOSITORY_SUITE }} 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/{{ 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 -;
+ - echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2017.7 xenial main" > /etc/apt/sources.list.d/saltstack.list;
+ - wget -O - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2017.7/SALTSTACK-GPG-KEY.pub | apt-key add -;
- eatmydata apt-get clean && apt-get update
diff --git a/tcp_tests/tests/system/test_failover_ceph.py b/tcp_tests/tests/system/test_failover_ceph.py
index 4a68705..2f1bc25 100644
--- a/tcp_tests/tests/system/test_failover_ceph.py
+++ b/tcp_tests/tests/system/test_failover_ceph.py
@@ -44,7 +44,7 @@
@pytest.mark.fail_snapshot
def test_restart_osd_node(self, func_name, underlay, config,
openstack_deployed, ceph_deployed,
- openstack_actions,
+ openstack_actions, hardware,
rally, show_step):
"""Test restart ceph osd node
@@ -78,7 +78,7 @@
# STEP #3
show_step(3)
- openstack_actions.warm_restart_nodes('osd01')
+ hardware.warm_restart_nodes(underlay, 'osd01')
openstack_actions._salt.local(
tgt='*', fun='cmd.run',
@@ -112,7 +112,7 @@
openstack_deployed, ceph_deployed,
common_services_actions,
salt_actions, openstack_actions,
- rally, show_step):
+ rally, show_step, hardware):
"""Test restart ceph cmn node
Scenario:
@@ -145,7 +145,7 @@
# STEP #3
show_step(3)
- openstack_actions.warm_restart_nodes('cmn01')
+ hardware.warm_restart_nodes(underlay, 'cmn01')
openstack_actions._salt.local(
tgt='*', fun='cmd.run',
@@ -177,7 +177,7 @@
@pytest.mark.fail_snapshot
def test_restart_rgw_node(self, func_name, underlay, config,
openstack_deployed, ceph_deployed,
- common_services_actions,
+ common_services_actions, hardware,
salt_actions, openstack_actions,
rally, show_step):
"""Test restart ceph rgw node
@@ -215,7 +215,7 @@
# STEP #3
show_step(3)
- openstack_actions.warm_restart_nodes('rgw01')
+ hardware.warm_restart_nodes(underlay, 'rgw01')
openstack_actions._salt.local(
tgt='*', fun='cmd.run',
diff --git a/tcp_tests/tests/system/test_failover_k8s.py b/tcp_tests/tests/system/test_failover_k8s.py
new file mode 100644
index 0000000..1ad43b9
--- /dev/null
+++ b/tcp_tests/tests/system/test_failover_k8s.py
@@ -0,0 +1,75 @@
+# Copyright 2017 Mirantis, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+import pytest
+import time
+
+from tcp_tests import logger
+
+LOG = logger.logger
+
+
+class TestFailoverK8s(object):
+
+ @pytest.mark.grap_versions
+ @pytest.mark.fail_snapshot
+ def test_k8s_master_vip_migration(self, show_step, k8s_deployed, underlay,
+ k8s_actions, common_services_actions,
+ config, hardware):
+ """Test restart and shutdown master with VIP
+
+ Scenario:
+ 1. Deploy mcp with k8s ha
+ 2. Check keepalived pillar configuration
+ 3. Find master node with assigned VIP
+ 4. Reboot server with VIP
+ 5. Check that VIP was migrated
+ 6. Check keepalived pillar configuration
+ 7. Check api server availability
+ 8. Run conformance on node with VIP
+ """
+ show_step(1)
+ show_step(2)
+ common_services_actions.check_keepalived_pillar()
+
+ show_step(3)
+ vip = k8s_actions.get_keepalived_vip()
+ LOG.info("VIP ip address: {}".format(vip))
+ minion_vip = common_services_actions.get_keepalived_vip_minion_id(vip)
+ LOG.info("VIP {0} is on {1}".format(vip, minion_vip))
+
+ show_step(4)
+ hardware.warm_restart_nodes(underlay, minion_vip)
+
+ show_step(5)
+ try:
+ new_minion_vip =\
+ common_services_actions.get_keepalived_vip_minion_id(vip)
+ except Exception:
+ time.sleep(15)
+ new_minion_vip = \
+ common_services_actions.get_keepalived_vip_minion_id(vip)
+ LOG.info("VIP {0} migrated to {1}".format(vip, new_minion_vip))
+ assert new_minion_vip != minion_vip
+
+ show_step(6)
+ common_services_actions.check_keepalived_pillar()
+
+ show_step(7)
+ curl_output = ''.join(underlay.check_call(
+ cmd="curl -k -s 'https://{}'".format(vip),
+ host=config.salt.salt_master_host, raise_on_err=False)['stdout'])
+ assert "apiVersion" in curl_output
+
+ show_step(8)
+ k8s_actions.run_conformance(node_name=new_minion_vip)
diff --git a/tcp_tests/tests/system/test_failover_nodes.py b/tcp_tests/tests/system/test_failover_nodes.py
index 0abada9..87a7de8 100644
--- a/tcp_tests/tests/system/test_failover_nodes.py
+++ b/tcp_tests/tests/system/test_failover_nodes.py
@@ -24,8 +24,8 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
- def test_warm_shutdown_ctl01_node(self, underlay, openstack_deployed,
- openstack_actions, show_step):
+ def test_warm_shutdown_ctl01_node(self, underlay, hardware, show_step,
+ openstack_deployed, openstack_actions):
"""Test warm shutdown ctl01
Scenario:
@@ -43,7 +43,7 @@
show_step(3)
# STEP #4
show_step(4)
- openstack_actions.warm_shutdown_openstack_nodes('ctl01')
+ hardware.warm_shutdown_nodes(underlay, 'ctl01')
# STEP #5
show_step(5)
openstack_actions.run_tempest(pattern='smoke')
@@ -52,7 +52,7 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
- def test_restart_ctl01_node(self, underlay, openstack_deployed,
+ def test_restart_ctl01_node(self, underlay, hardware, openstack_deployed,
openstack_actions, show_step):
"""Test restart ctl01
@@ -72,7 +72,7 @@
# STEP #4
show_step(4)
- openstack_actions.warm_restart_nodes('ctl01')
+ hardware.warm_restart_nodes(underlay, 'ctl01')
# STEP #5
show_step(5)
openstack_actions.run_tempest(pattern='smoke')
@@ -82,7 +82,7 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
def test_warm_shutdown_cmp01_node(self, underlay, openstack_deployed,
- openstack_actions, show_step):
+ hardware, openstack_actions, show_step):
"""Test warm shutdown cmp01
Scenario:
@@ -101,7 +101,7 @@
# STEP #4
show_step(4)
- openstack_actions.warm_shutdown_openstack_nodes('cmp01')
+ hardware.warm_shutdown_nodes(underlay, 'cmp01')
# STEP #5
show_step(5)
openstack_actions.run_tempest(pattern='smoke')
@@ -111,7 +111,7 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
def test_restart_cmp01_node(self, underlay, openstack_deployed,
- openstack_actions, show_step):
+ openstack_actions, show_step, hardware):
"""Test restart cmp01
Scenario:
@@ -130,7 +130,7 @@
# STEP #4
show_step(4)
- openstack_actions.warm_restart_nodes('cmp01')
+ hardware.warm_restart_nodes(underlay, 'cmp01')
# STEP #5
show_step(5)
openstack_actions.run_tempest(pattern='smoke')
@@ -140,7 +140,7 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
@pytest.mark.revert_snapshot(ext.SNAPSHOT.sl_deployed)
- def test_restart_mon01_node(self, openstack_actions,
+ def test_restart_mon01_node(self, openstack_actions, hardware, underlay,
sl_os_deployed, show_step):
"""Test restart mon01
@@ -172,7 +172,7 @@
before_result if 'passed' not in test['outcome']]
# STEP #5
show_step(5)
- openstack_actions.warm_restart_nodes('mon01')
+ hardware.warm_restart_nodes(underlay, 'mon01')
# STEP #6
show_step(6)
sl_os_deployed.check_prometheus_targets(mon_nodes)
@@ -191,9 +191,8 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
@pytest.mark.revert_snapshot(ext.SNAPSHOT.sl_deployed)
- def test_warm_shutdown_mon01_node(self, openstack_actions,
- sl_os_deployed,
- show_step):
+ def test_warm_shutdown_mon01_node(self, underlay, hardware, sl_os_deployed,
+ openstack_actions, show_step):
"""Test warm shutdown mon01
Scenario:
@@ -223,7 +222,7 @@
before_result if 'passed' not in test['outcome']]
# STEP #5
show_step(5)
- openstack_actions.warm_shutdown_openstack_nodes('mon01')
+ hardware.warm_shutdown_nodes(underlay, 'mon01')
# STEP #6
show_step(6)
# Run SL component tetsts
@@ -239,7 +238,7 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
@pytest.mark.revert_snapshot(ext.SNAPSHOT.sl_deployed)
- def test_restart_mon_with_vip(self, sl_os_deployed,
+ def test_restart_mon_with_vip(self, underlay, hardware, sl_os_deployed,
openstack_actions, salt_actions,
common_services_actions, show_step):
"""Test restart mon with VIP
@@ -286,7 +285,7 @@
# STEP #6
show_step(6)
- openstack_actions.warm_restart_nodes(minion_vip)
+ hardware.warm_restart_nodes(underlay, minion_vip)
# STEP #7
show_step(7)
@@ -314,7 +313,7 @@
@pytest.mark.grab_versions
@pytest.mark.fail_snapshot
@pytest.mark.revert_snapshot(ext.SNAPSHOT.openstack_deployed)
- def test_restart_ctl_with_vip(self, underlay, openstack_deployed,
+ def test_restart_ctl_with_vip(self, underlay, hardware, openstack_deployed,
openstack_actions, salt_actions,
common_services_actions, show_step):
"""Test restart clt with VIP
@@ -350,7 +349,7 @@
# STEP #5
show_step(5)
- openstack_actions.warm_restart_nodes(minion_vip)
+ hardware.warm_restart_nodes(underlay, minion_vip)
# STEP #6
show_step(6)