summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorSteve Milner <smilner@redhat.com>2017-04-24 16:28:37 -0400
committerSteve Milner <smilner@redhat.com>2017-05-03 09:22:17 -0400
commit44115530148069e200e3a5d92b00e981aaa6e824 (patch)
treed2b30e5d22f58f1e9802b2f8ad7ae2a253b608d4 /roles/openshift_facts/library
parentba5c6594ade6679d055aaecc7c38836444f0f791 (diff)
downloadopenshift-44115530148069e200e3a5d92b00e981aaa6e824.tar.gz
openshift-44115530148069e200e3a5d92b00e981aaa6e824.tar.bz2
openshift-44115530148069e200e3a5d92b00e981aaa6e824.tar.xz
openshift-44115530148069e200e3a5d92b00e981aaa6e824.zip
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
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py10
1 files changed, 9 insertions, 1 deletions
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: