From a797fee65bb460c58ca9563ed553ca415386b936 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Fri, 10 Jun 2016 15:38:09 -0300 Subject: Remove Docker 1.10 requirement temporarily. Docker 1.10 is not widely available in RHEL / CentOS yet, lets remove the restriction for users of master / origin. We can revert as soon as it's available publically. --- .../upgrades/v3_1_to_v3_2/docker_upgrade.yml | 14 +++++++++++ .../upgrades/v3_1_to_v3_2/upgrade.yml | 6 ++--- roles/docker/tasks/main.yml | 28 ---------------------- 3 files changed, 17 insertions(+), 31 deletions(-) create mode 100644 playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/docker_upgrade.yml diff --git a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/docker_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/docker_upgrade.yml new file mode 100644 index 000000000..c7b18f51b --- /dev/null +++ b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/docker_upgrade.yml @@ -0,0 +1,14 @@ +- name: Check if Docker is installed + command: rpm -q docker + register: pkg_check + failed_when: pkg_check.rc > 1 + changed_when: no + +- name: Upgrade Docker + command: "{{ ansible_pkg_mgr}} update -y docker" + when: pkg_check.rc == 0 and g_docker_version.curr_version | version_compare('1.9','<') + register: docker_upgrade + +- name: Restart Docker + command: systemctl restart docker + when: docker_upgrade | changed diff --git a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/upgrade.yml index 156e80c0f..c93bf2a17 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/upgrade.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/upgrade.yml @@ -3,13 +3,13 @@ # The restart playbook should be run after this playbook completes. ############################################################################### -- include: ../../../../byo/openshift-cluster/upgrades/docker/docker_upgrade.yml - -- name: Update Docker facts +- name: Upgrade docker hosts: oo_masters_to_config:oo_nodes_to_config:oo_etcd_to_config roles: - openshift_facts tasks: + - include: docker_upgrade.yml + when: not openshift.common.is_atomic | bool - name: Set post docker install facts openshift_facts: role: "{{ item.role }}" diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index 3368e7cd9..1f5f891c7 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -1,32 +1,4 @@ --- -# Going forward we require Docker 1.10 or greater. If the user has a lesser version installed they must run a separate upgrade process. -- name: Get current installed Docker version - command: "{{ repoquery_cmd }} --installed --qf '%{version}' docker" - when: not openshift.common.is_atomic | bool - register: curr_docker_version - changed_when: false - -# TODO: The use of upgrading var will be removed in the coming upgrade refactor. This is a temporary -# fix to wory around the fact that right now, this role is called during upgrade, before we're -# ready to upgrade Docker. -- name: Fail if Docker upgrade is required - fail: - msg: "Docker {{ curr_docker_version.stdout }} must be upgraded to Docker 1.10 or greater" - when: not upgrading | bool and not curr_docker_version | skipped and curr_docker_version.stdout | default('0.0', True) | version_compare('1.10', '<') - -- name: Get latest available version of Docker - command: > - {{ repoquery_cmd }} --qf '%{version}' "docker" - register: avail_docker_version - failed_when: false - changed_when: false - when: not curr_docker_version.stdout | default('0.0', True) | version_compare('1.10', '>=') and not openshift.common.is_atomic | bool - -- name: Verify Docker >= 1.10 is available - fail: - msg: "Docker {{ avail_docker_version.stdout }} is available, but 1.10 or greater is required" - when: not avail_docker_version | skipped and avail_docker_version.stdout | default('0.0', True) | version_compare('1.10', '<') - - stat: path=/etc/sysconfig/docker-storage register: docker_storage_check -- cgit v1.2.3 From 666657a4969851a0e08357334ffe60a156024980 Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Fri, 10 Jun 2016 14:59:27 -0400 Subject: Make a note about Requires: docker --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f948319c2..6d38c9945 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,10 @@ #OpenShift Ansible -This repo contains Ansible code for OpenShift +This repo contains Ansible code for OpenShift. This repo and the origin RPMs +that it installs currently require a package that provides `docker`. Currently +the RPMs provided from dockerproject.org do not provide this requirement, though +they may in the future. ##Setup - Install base dependencies: -- cgit v1.2.3