Merge "Revert "Adding sahara tests for nightly job""
This commit is contained in:
commit
aa82b5bf31
@ -300,60 +300,6 @@ SERVTEST_SAHARA_VANILLA_2_IMAGE_META = {'_sahara_tag_2.7.1': 'True',
|
||||
'_sahara_tag_vanilla': 'True',
|
||||
'_sahara_username': 'ubuntu'}
|
||||
|
||||
SAHARA_SCENARIO_IMAGES = [
|
||||
{
|
||||
'image': 'sahara-liberty-ambari-2.2-centos-6.6.qcow2',
|
||||
'md5_sum': '445086de3e9a9562201ff30276af5496',
|
||||
'tags':
|
||||
{
|
||||
'_sahara_tag_2.2': 'True',
|
||||
'_sahara_tag_2.3': 'True',
|
||||
'_sahara_tag_ambari': 'True',
|
||||
'_sahara_username': 'cloud-user'
|
||||
}
|
||||
},
|
||||
{
|
||||
'image': 'sahara-liberty-vanilla-2.7.1-ubuntu-14.04.qcow2',
|
||||
'md5_sum': '3da49911332fc46db0c5fb7c197e3a77',
|
||||
'tags':
|
||||
{
|
||||
'_sahara_tag_2.7.1': 'True',
|
||||
'_sahara_tag_vanilla': 'True',
|
||||
'_sahara_username': 'ubuntu'
|
||||
}
|
||||
},
|
||||
{
|
||||
'image': 'sahara-liberty-cdh-5.4.0-ubuntu-14.04.qcow2',
|
||||
'md5_sum': 'f5c833d2d34a41ea9b52a6c1f95054be',
|
||||
'tags':
|
||||
{
|
||||
'_sahara_tag_5.4.0': 'True',
|
||||
'_sahara_tag_cdh': 'True',
|
||||
'_sahara_username': 'ubuntu'
|
||||
}
|
||||
},
|
||||
{
|
||||
'image': 'sahara-liberty-mapr-5.0.0-ubuntu-14.04.qcow2',
|
||||
'md5_sum': '77d16c462311a7c5db9144e1e8ab30a8',
|
||||
'tags':
|
||||
{
|
||||
'_sahara_tag_5.0.0': 'True',
|
||||
'_sahara_tag_mapr': 'True',
|
||||
'_sahara_username': 'ubuntu'
|
||||
}
|
||||
},
|
||||
{
|
||||
'image': 'sahara-liberty-spark-1.3.1-ubuntu-14.04.qcow2',
|
||||
'md5_sum': '19640faead38e82528af6d85cd9894c5',
|
||||
'tags':
|
||||
{
|
||||
'_sahara_tag_1.3.1': 'True',
|
||||
'_sahara_tag_spark': 'True',
|
||||
'_sahara_username': 'ubuntu'
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
SERVTEST_MURANO_IMAGE = "ubuntu_14_04-murano-agent_stable_juno_26_02_15.qcow2"
|
||||
SERVTEST_MURANO_IMAGE_MD5 = '3da5ec5984d6d19c1b88d0062c885a89'
|
||||
SERVTEST_MURANO_IMAGE_NAME = 'murano'
|
||||
|
@ -129,140 +129,14 @@ class SaharaHAOneController(TestBasic):
|
||||
cluster_id=cluster_id, test_sets=['tests_platform'],
|
||||
test_name=path_to_tests + test_name, timeout=60 * 200)
|
||||
|
||||
self.env.make_snapshot("deploy_sahara_ha_one_controller_tun",
|
||||
is_make=True)
|
||||
|
||||
|
||||
@test(groups=["services_external", "services_external.sahara",
|
||||
"services_ha_one_controller_external"])
|
||||
class SaharaHAOneControllerExternal(TestBasic):
|
||||
"""Sahara ha with 1 controller scenario tests.
|
||||
Put Sahara image before start
|
||||
"""
|
||||
@test(depends_on=[SetupEnvironment.prepare_slaves_3],
|
||||
groups=["deploy_sahara_ha_one_controller_tun"])
|
||||
@log_snapshot_after_test
|
||||
def deploy_sahara_ha_one_controller_tun_external(self):
|
||||
"""Run Sahara scenario tests (1 controller Neutron VXLAN)
|
||||
|
||||
Scenario:
|
||||
1. Check md5 sum of images
|
||||
2. Revert snapshot with sahara env on one controller
|
||||
3. Verify Sahara service on controller
|
||||
4. Run all sanity and smoke tests
|
||||
5. Register images for Sahara
|
||||
6. Run scenario tests for Sahara
|
||||
|
||||
Duration 360m
|
||||
Snapshot: deploy_sahara_ha_one_controller_tun_external
|
||||
"""
|
||||
LOGGER.debug('Check MD5 sums of Sahara images')
|
||||
self.show_step(1)
|
||||
|
||||
for image in settings.SAHARA_SCENARIO_IMAGES:
|
||||
|
||||
check_image = checkers.check_image(
|
||||
image['image'], image['md5_sum'],
|
||||
settings.SERVTEST_LOCAL_PATH)
|
||||
asserts.assert_true(check_image)
|
||||
|
||||
LOGGER.debug('Revert snapshot with Fuel cluster for Sahara tests')
|
||||
self.show_step(2)
|
||||
self.env.revert_snapshot("deploy_sahara_ha_one_controller_tun")
|
||||
|
||||
cluster_id = self.fuel_web.get_last_created_cluster()
|
||||
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
||||
|
||||
os_conn = os_actions.OpenStackActions(
|
||||
self.fuel_web.get_public_vip(cluster_id), 'saharaSimple',
|
||||
'saharaSimple', 'saharaSimple')
|
||||
|
||||
LOGGER.debug('Verify Sahara service on controller')
|
||||
self.show_step(3)
|
||||
|
||||
_ip = self.fuel_web.get_nailgun_node_by_name("slave-01")['ip']
|
||||
with self.env.d_env.get_ssh_to_remote(_ip) as remote:
|
||||
checkers.verify_service(
|
||||
remote,
|
||||
service_name='sahara-api')
|
||||
checkers.verify_service(
|
||||
remote,
|
||||
service_name='sahara-engine')
|
||||
|
||||
LOGGER.debug('Run all sanity and smoke tests')
|
||||
self.show_step(4)
|
||||
path_to_tests = 'fuel_health.tests.sanity.test_sanity_sahara.'
|
||||
test_names = ['VanillaTwoTemplatesTest.test_vanilla_two_templates',
|
||||
'HDPTwoTemplatesTest.test_hdp_two_templates']
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=self.fuel_web.get_last_created_cluster(),
|
||||
tests_must_be_passed=[path_to_tests + test_name
|
||||
for test_name in test_names]
|
||||
)
|
||||
|
||||
LOGGER.debug('Import images for Sahara')
|
||||
self.show_step(5)
|
||||
|
||||
for image in settings.SAHARA_SCENARIO_IMAGES:
|
||||
with open('{0}/{1}'.format(settings.SERVTEST_LOCAL_PATH,
|
||||
image['image'])) as data:
|
||||
os_conn.create_image(
|
||||
name=image['image'][:-6],
|
||||
properties=image['tags'],
|
||||
data=data,
|
||||
is_public=True,
|
||||
disk_format='qcow2',
|
||||
container_format='bare')
|
||||
|
||||
LOGGER.debug('Starting scenario tests for Sahara')
|
||||
self.show_step(6)
|
||||
"""
|
||||
This script install all packages for running sahara scenario tests,
|
||||
clone sahara repo, move scenarios for current releases in separate dir,
|
||||
generate file with variables for sahara scenarios and run all sahara
|
||||
scenario tests.
|
||||
"""
|
||||
cmd = (
|
||||
"sudo apt-get install -y git python-pip python-tox libpq-dev && "
|
||||
"rm -rf sahara && "
|
||||
"git clone https://github.com/openstack/sahara && "
|
||||
"mkdir sahara/etc/scenario/8.0 && "
|
||||
"cp sahara/etc/scenario/sahara-ci/{credentials.yaml.mako,"
|
||||
"edp.yaml.mako,vanilla-2.7.1.yaml.mako,ambari-2.3.yaml.mako,"
|
||||
"cdh-5.4.0.yaml.mako,mapr-5.0.0.mrv2.yaml.mako,"
|
||||
"spark-1.3.1.yaml.mako,transient.yaml.mako} "
|
||||
"sahara/etc/scenario/8.0 && "
|
||||
"echo '[DEFAULT]\n"
|
||||
"OS_USERNAME: saharaHA\n"
|
||||
"OS_PASSWORD: saharaHA\n"
|
||||
"OS_TENANT_NAME: saharaHA\n"
|
||||
"OS_AUTH_URL: http://%s:5000/v2.0\n"
|
||||
"network_type: neutron\n"
|
||||
"network_private_name: net04\n"
|
||||
"network_public_name: net04_ext\n"
|
||||
"cluster_name: test-cluster\n"
|
||||
"ci_flavor_id: m1.small\n"
|
||||
"medium_flavor_id: m1.medium\n"
|
||||
"large_flavor_id: m1.large\n' > templatesvar.ini && "
|
||||
"cd sahara && "
|
||||
"echo 'concurrency: 2' >> "
|
||||
"etc/scenario/8.0/credentials.yaml.mako && "
|
||||
"tox -e scenario -- -V ~/templatesvar.ini etc/scenario/8.0" % (
|
||||
self.fuel_web.get_public_vip(cluster_id)))
|
||||
|
||||
with self.env.d_env.get_ssh_to_remote(_ip) as remote:
|
||||
result = remote.execute(cmd)
|
||||
|
||||
LOGGER.debug(result)
|
||||
|
||||
self.env.make_snapshot("deploy_sahara_ha_one_controller_tun_external")
|
||||
self.env.make_snapshot("deploy_sahara_ha_one_controller_tun")
|
||||
|
||||
|
||||
@test(groups=["services", "services.sahara", "services_ha"])
|
||||
class SaharaHA(TestBasic):
|
||||
"""Sahara HA scenario tests.
|
||||
"""Sahara HA tests.
|
||||
Don't recommend to start tests without kvm
|
||||
Put Sahara images before start
|
||||
Put Sahara image before start
|
||||
"""
|
||||
@test(depends_on=[SetupEnvironment.prepare_slaves_5],
|
||||
groups=["deploy_sahara_ha_tun"])
|
||||
@ -364,132 +238,7 @@ class SaharaHA(TestBasic):
|
||||
cluster_id=cluster_id, test_sets=['tests_platform'],
|
||||
test_name=path_to_tests + test_name, timeout=60 * 200)
|
||||
|
||||
self.env.make_snapshot("deploy_sahara_ha_tun", is_make=True)
|
||||
|
||||
|
||||
@test(groups=["services_external", "services_external.sahara",
|
||||
"services_external_ha"])
|
||||
class SaharaHAExternal(TestBasic):
|
||||
"""Sahara HA tests.
|
||||
Put Sahara images before start
|
||||
"""
|
||||
@test(depends_on=[SetupEnvironment.prepare_slaves_5],
|
||||
groups=["deploy_sahara_ha_tun_external"])
|
||||
@log_snapshot_after_test
|
||||
def deploy_sahara_ha_tun_external(self):
|
||||
"""Run Sahara scenario tests (HA, Neutron VXLAN)
|
||||
|
||||
Scenario:
|
||||
1. Check md5 sum of images
|
||||
2. Revert snapshot with sahara HA
|
||||
3. Verify Sahara service on all controllers
|
||||
4. Run all sanity and smoke tests
|
||||
5. Register images for Sahara
|
||||
6. Run scenario tests for Sahara
|
||||
|
||||
Duration 6h
|
||||
Snapshot: deploy_sahara_ha_tun_external
|
||||
|
||||
"""
|
||||
LOGGER.debug('Check MD5 sums of Sahara images')
|
||||
self.show_step(1)
|
||||
for image in settings.SAHARA_SCENARIO_IMAGES:
|
||||
|
||||
check_image = checkers.check_image(
|
||||
image['image'], image['md5_sum'],
|
||||
settings.SERVTEST_LOCAL_PATH)
|
||||
asserts.assert_true(check_image)
|
||||
|
||||
LOGGER.debug('Revert snapshot with Fuel cluster for Sahara tests HA')
|
||||
self.show_step(2)
|
||||
self.env.revert_snapshot("deploy_sahara_ha_tun")
|
||||
|
||||
cluster_id = self.fuel_web.get_last_created_cluster()
|
||||
self.fuel_web.assert_nodes_in_ready_state(cluster_id)
|
||||
|
||||
cluster_vip = self.fuel_web.get_public_vip(cluster_id)
|
||||
os_conn = os_actions.OpenStackActions(
|
||||
cluster_vip, 'saharaHA', 'saharaHA', 'saharaHA')
|
||||
self.fuel_web.assert_cluster_ready(os_conn, smiles_count=13)
|
||||
|
||||
LOGGER.debug('Verify Sahara service on all controllers')
|
||||
self.show_step(3)
|
||||
for slave in ["slave-01", "slave-02", "slave-03"]:
|
||||
_ip = self.fuel_web.get_nailgun_node_by_name(slave)['ip']
|
||||
with self.env.d_env.get_ssh_to_remote(_ip) as remote:
|
||||
checkers.verify_service(
|
||||
remote,
|
||||
service_name='sahara-api')
|
||||
checkers.verify_service(
|
||||
remote,
|
||||
service_name='sahara-engine')
|
||||
|
||||
LOGGER.debug('Run all sanity and smoke tests')
|
||||
self.show_step(4)
|
||||
path_to_tests = 'fuel_health.tests.sanity.test_sanity_sahara.'
|
||||
test_names = ['VanillaTwoTemplatesTest.test_vanilla_two_templates',
|
||||
'HDPTwoTemplatesTest.test_hdp_two_templates']
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=self.fuel_web.get_last_created_cluster(),
|
||||
tests_must_be_passed=[path_to_tests + test_name
|
||||
for test_name in test_names]
|
||||
)
|
||||
|
||||
LOGGER.debug('Import images for Sahara')
|
||||
self.show_step(5)
|
||||
for image in settings.SAHARA_SCENARIO_IMAGES:
|
||||
with open('{0}/{1}'.format(settings.SERVTEST_LOCAL_PATH,
|
||||
image['image'])) as data:
|
||||
os_conn.create_image(
|
||||
name=image['image'][:-6],
|
||||
properties=image['tags'],
|
||||
data=data,
|
||||
is_public=True,
|
||||
disk_format='qcow2',
|
||||
container_format='bare')
|
||||
|
||||
LOGGER.debug('Starting scenario tests for Sahara')
|
||||
self.show_step(6)
|
||||
"""
|
||||
This script install all packages for running sahara scenario tests,
|
||||
clone sahara repo, move scenarios for current releases in separate dir,
|
||||
generate file with variables for sahara scenarios and run all sahara
|
||||
scenario tests.
|
||||
"""
|
||||
cmd = (
|
||||
"sudo apt-get install -y git python-pip python-tox libpq-dev && "
|
||||
"rm -rf sahara && "
|
||||
"git clone https://github.com/openstack/sahara && "
|
||||
"mkdir sahara/etc/scenario/8.0 && "
|
||||
"cp sahara/etc/scenario/sahara-ci/{credentials.yaml.mako,"
|
||||
"edp.yaml.mako,vanilla-2.7.1.yaml.mako,ambari-2.3.yaml.mako,"
|
||||
"cdh-5.4.0.yaml.mako,mapr-5.0.0.mrv2.yaml.mako,"
|
||||
"spark-1.3.1.yaml.mako,transient.yaml.mako} "
|
||||
"sahara/etc/scenario/8.0 && "
|
||||
"echo '[DEFAULT]\n"
|
||||
"OS_USERNAME: saharaSimple\n"
|
||||
"OS_PASSWORD: saharaSimple\n"
|
||||
"OS_TENANT_NAME: saharaSimple\n"
|
||||
"OS_AUTH_URL: http://%s:5000/v2.0\n"
|
||||
"network_type: neutron\n"
|
||||
"network_private_name: net04\n"
|
||||
"network_public_name: net04_ext\n"
|
||||
"cluster_name: test-cluster\n"
|
||||
"ci_flavor_id: m1.small\n"
|
||||
"medium_flavor_id: m1.medium\n"
|
||||
"large_flavor_id: m1.large\n' > templatesvar.ini && "
|
||||
"cd sahara && "
|
||||
"echo 'concurrency: 2' >> "
|
||||
"etc/scenario/8.0/credentials.yaml.mako && "
|
||||
"tox -e scenario -- -V ~/templatesvar.ini etc/scenario/8.0" % (
|
||||
self.fuel_web.get_public_vip(cluster_id)))
|
||||
|
||||
with self.env.d_env.get_ssh_to_remote(_ip) as remote:
|
||||
result = remote.execute(cmd)
|
||||
|
||||
LOGGER.debug(result)
|
||||
|
||||
self.env.make_snapshot("deploy_sahara_ha_tun_external")
|
||||
self.env.make_snapshot("deploy_sahara_ha_tun")
|
||||
|
||||
|
||||
@test(groups=["services", "services.murano", "services_ha_one_controller"])
|
||||
|
Loading…
Reference in New Issue
Block a user