diff --git a/conf/capsule.yaml.template b/conf/capsule.yaml.template index e6747faa5eb..429133f8a78 100644 --- a/conf/capsule.yaml.template +++ b/conf/capsule.yaml.template @@ -10,6 +10,8 @@ CAPSULE: # The base os rhel version where the capsule installed # RHEL_VERSION: # The Ansible Tower workflow used to deploy a capsule - DEPLOY_WORKFLOW: deploy-capsule + DEPLOY_WORKFLOW: + PRODUCT: deploy-satellite # workflow to deploy OS with product running on top of it + OS: deploy-rhel # workflow to deploy OS that is ready to run the product # Dictionary of arguments which should be passed along to the deploy workflow DEPLOY_ARGUMENTS: diff --git a/conf/server.yaml.template b/conf/server.yaml.template index 7f876bccaba..58b7afc900a 100644 --- a/conf/server.yaml.template +++ b/conf/server.yaml.template @@ -27,7 +27,9 @@ SERVER: # this setting determines if they will be automatically checked in AUTO_CHECKIN: False # The Ansible Tower workflow used to deploy a satellite - DEPLOY_WORKFLOW: "deploy-sat-jenkins" + DEPLOY_WORKFLOW: + PRODUCT: deploy-satellite # workflow to deploy OS with product running on top of it + OS: deploy-rhel # workflow to deploy OS that is ready to run the product # Dictionary of arguments which should be passed along to the deploy workflow # DEPLOY_ARGUMENTS: # HTTP scheme when building the server URL diff --git a/pytest_fixtures/core/sat_cap_factory.py b/pytest_fixtures/core/sat_cap_factory.py index 8f83704702e..a2ea8b306ec 100644 --- a/pytest_fixtures/core/sat_cap_factory.py +++ b/pytest_fixtures/core/sat_cap_factory.py @@ -63,7 +63,7 @@ def factory(retry_limit=3, delay=300, workflow=None, **broker_args): vmb = Broker( host_class=Satellite, - workflow=workflow or settings.server.deploy_workflow, + workflow=workflow or settings.server.deploy_workflow.product, **broker_args, ) timeout = (1200 + delay) * retry_limit @@ -95,7 +95,7 @@ def factory(retry_limit=3, delay=300, workflow=None, **broker_args): broker_args.update(settings.capsule.deploy_arguments) vmb = Broker( host_class=Capsule, - workflow=workflow or settings.capsule.deploy_workflow, + workflow=workflow or settings.capsule.deploy_workflow.product, **broker_args, ) timeout = (1200 + delay) * retry_limit @@ -202,7 +202,7 @@ def module_lb_capsule(retry_limit=3, delay=300, **broker_args): timeout = (1200 + delay) * retry_limit hosts = Broker( host_class=Capsule, - workflow=settings.capsule.deploy_workflow, + workflow=settings.capsule.deploy_workflow.product, _count=2, **broker_args, ) @@ -245,12 +245,13 @@ def parametrized_enrolled_sat( def get_deploy_args(request): + '''Get deploy arguments for Satellite base OS deployment. Should not be used for Capsule.''' rhel_version = get_sat_rhel_version() deploy_args = { 'deploy_rhel_version': rhel_version.base_version, 'deploy_flavor': settings.flavors.default, 'promtail_config_template_file': 'config_sat.j2', - 'workflow': settings.content_host.get(f'rhel{rhel_version.major}').vm.workflow, + 'workflow': settings.server.deploy_workflow.os, } if hasattr(request, 'param'): if isinstance(request.param, dict): @@ -277,11 +278,11 @@ def module_sat_ready_rhels(request): @pytest.fixture def cap_ready_rhel(): rhel_version = Version(settings.capsule.version.release) - settings.content_host.get(f'rhel{rhel_version.major}').vm.workflow deploy_args = { 'deploy_rhel_version': rhel_version.base_version, 'deploy_flavor': settings.flavors.default, - 'workflow': settings.content_host.get(f'rhel{rhel_version.major}').vm.workflow, + 'promtail_config_template_file': 'config_sat.j2', + 'workflow': settings.capsule.deploy_workflow.os, } with Broker(**deploy_args, host_class=Capsule) as host: yield host diff --git a/robottelo/config/validators.py b/robottelo/config/validators.py index 383abfb7aed..79328795547 100644 --- a/robottelo/config/validators.py +++ b/robottelo/config/validators.py @@ -23,7 +23,9 @@ ), Validator('server.admin_password', default='changeme'), Validator('server.admin_username', default='admin'), - Validator('server.deploy_workflow', must_exist=True), + Validator('server.deploy_workflow', must_exist=True, is_type_of=dict), + Validator('server.deploy_workflow.product', must_exist=True), + Validator('server.deploy_workflow.os', must_exist=True), Validator('server.deploy_arguments', must_exist=True, is_type_of=dict, default={}), Validator('server.scheme', default='https'), Validator('server.port', default=443), @@ -67,7 +69,9 @@ capsule=[ Validator('capsule.version.release', must_exist=True), Validator('capsule.version.source', must_exist=True), - Validator('capsule.deploy_workflow', must_exist=True), + Validator('capsule.deploy_workflow', must_exist=True, is_type_of=dict), + Validator('capsule.deploy_workflow.product', must_exist=True), + Validator('capsule.deploy_workflow.os', must_exist=True), Validator('capsule.deploy_arguments', must_exist=True, is_type_of=dict, default={}), ], certs=[ diff --git a/robottelo/hosts.py b/robottelo/hosts.py index 4c35dbd41d5..bf13716ae7a 100644 --- a/robottelo/hosts.py +++ b/robottelo/hosts.py @@ -74,7 +74,7 @@ def lru_sat_ready_rhel(rhel_ver): 'deploy_rhel_version': rhel_version, 'deploy_flavor': settings.flavors.default, 'promtail_config_template_file': 'config_sat.j2', - 'workflow': settings.content_host.get(f'rhel{Version(rhel_version).major}').vm.workflow, + 'workflow': settings.server.deploy_workflow.os, } sat_ready_rhel = Broker(**deploy_args, host_class=Satellite).checkout() return sat_ready_rhel