From 44115530148069e200e3a5d92b00e981aaa6e824 Mon Sep 17 00:00:00 2001 From: Steve Milner Date: Mon, 24 Apr 2017 16:28:37 -0400 Subject: System container docker This change allows for the use of either the traditional package install of docker OR a system container install of docker. Two new inventory options, openshift_docker_use_system_container and openshift_docker_systemcontainer_image_registry_override, have been added which are be used to install with a system container. By default this option is commented out. One new fact has been added: - docker.service_name: docker by default, container-engine-docker for system container --- roles/openshift_facts/library/openshift_facts.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'roles/openshift_facts') diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index ca0279426..8f5d3e52b 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -59,7 +59,8 @@ def migrate_docker_facts(facts): 'additional_registries', 'insecure_registries', 'blocked_registries', - 'options' + 'options', + 'use_system_container', ), 'node': ( 'log_driver', @@ -1792,6 +1793,12 @@ def set_container_facts_if_unset(facts): deployer_image = 'openshift/origin-deployer' facts['common']['is_atomic'] = os.path.isfile('/run/ostree-booted') + # If openshift_docker_use_system_container is set and is True .... + if 'use_system_container' in list(facts['docker'].keys()): + if facts['docker']['use_system_container'] is True: + # ... set the service name to container-engine-docker + facts['docker']['service_name'] = 'container-engine-docker' + if 'is_containerized' not in facts['common']: facts['common']['is_containerized'] = facts['common']['is_atomic'] if 'cli_image' not in facts['common']: @@ -2072,6 +2079,7 @@ class OpenShiftFacts(object): hosted_registry_insecure = get_hosted_registry_insecure() if hosted_registry_insecure is not None: docker['hosted_registry_insecure'] = hosted_registry_insecure + docker['service_name'] = 'docker' defaults['docker'] = docker if 'clock' in roles: -- cgit v1.2.3