mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
Make use of the EE resolver code when launching jobs
This commit is contained in:
committed by
Shane McDonald
parent
6d935f740c
commit
8562c378c0
@@ -887,14 +887,7 @@ class BaseTask(object):
|
|||||||
return os.path.abspath(os.path.join(os.path.dirname(__file__), *args))
|
return os.path.abspath(os.path.join(os.path.dirname(__file__), *args))
|
||||||
|
|
||||||
def build_execution_environment_params(self, instance):
|
def build_execution_environment_params(self, instance):
|
||||||
if getattr(instance, 'execution_environment', None):
|
image = instance.execution_environment.image
|
||||||
# TODO: process heirarchy, JT-project-org, maybe here
|
|
||||||
# or maybe in create_unified_job
|
|
||||||
logger.info('using custom image {}'.format(instance.execution_environment.image))
|
|
||||||
image = instance.execution_environment.image
|
|
||||||
else:
|
|
||||||
logger.info('using default image')
|
|
||||||
image = settings.AWX_EXECUTION_ENVIRONMENT_DEFAULT_IMAGE
|
|
||||||
params = {
|
params = {
|
||||||
"container_image": image,
|
"container_image": image,
|
||||||
"process_isolation": True
|
"process_isolation": True
|
||||||
|
|||||||
@@ -59,12 +59,15 @@ DATABASES = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# TODO: remove this setting in favor of a default execution environment
|
||||||
AWX_EXECUTION_ENVIRONMENT_DEFAULT_IMAGE = 'quay.io/shanemcd/ee'
|
AWX_EXECUTION_ENVIRONMENT_DEFAULT_IMAGE = 'quay.io/shanemcd/ee'
|
||||||
|
|
||||||
AWX_CONTAINER_GROUP_K8S_API_TIMEOUT = 10
|
AWX_CONTAINER_GROUP_K8S_API_TIMEOUT = 10
|
||||||
AWX_CONTAINER_GROUP_POD_LAUNCH_RETRIES = 100
|
AWX_CONTAINER_GROUP_POD_LAUNCH_RETRIES = 100
|
||||||
AWX_CONTAINER_GROUP_POD_LAUNCH_RETRY_DELAY = 5
|
AWX_CONTAINER_GROUP_POD_LAUNCH_RETRY_DELAY = 5
|
||||||
AWX_CONTAINER_GROUP_DEFAULT_NAMESPACE = 'default'
|
AWX_CONTAINER_GROUP_DEFAULT_NAMESPACE = 'default'
|
||||||
|
|
||||||
|
# TODO: remove this setting in favor of a default execution environment
|
||||||
AWX_CONTAINER_GROUP_DEFAULT_IMAGE = AWX_EXECUTION_ENVIRONMENT_DEFAULT_IMAGE
|
AWX_CONTAINER_GROUP_DEFAULT_IMAGE = AWX_EXECUTION_ENVIRONMENT_DEFAULT_IMAGE
|
||||||
|
|
||||||
# Internationalization
|
# Internationalization
|
||||||
|
|||||||
Reference in New Issue
Block a user