From 96ced00e05b50f276841a9212ae89e018de4d92d Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Fri, 16 Feb 2018 20:54:52 +0100 Subject: Updated to OpenShift 3.7 and tested --- anslib/archive/gluster_paths.sh | 9 ++++++++ anslib/link_vars.sh | 26 ++++++++++++++++++++++++ anslib/openshift-ansible | 2 +- anslib/patches/ansible_broker-ds-sc.patch | 10 +++++++++ anslib/patches/glusterfs-ds-mountrun.patch | 25 +++++++++++++++++++++++ anslib/patches/template_broker-ds-badcheck.patch | 23 +++++++++++++++++++++ 6 files changed, 94 insertions(+), 1 deletion(-) create mode 100755 anslib/archive/gluster_paths.sh create mode 100755 anslib/link_vars.sh create mode 100644 anslib/patches/ansible_broker-ds-sc.patch create mode 100644 anslib/patches/glusterfs-ds-mountrun.patch create mode 100644 anslib/patches/template_broker-ds-badcheck.patch (limited to 'anslib') diff --git a/anslib/archive/gluster_paths.sh b/anslib/archive/gluster_paths.sh new file mode 100755 index 0000000..4c3ca0b --- /dev/null +++ b/anslib/archive/gluster_paths.sh @@ -0,0 +1,9 @@ +#! /bin/bash + +# This is not enough. We also need to separate /dev otherwise port clashes (may be cgroups). Not sure about the side effects. +function fixpath_func { + sed -i.orig -e "/ path: \"\/\(var\|etc\|run\)/ s/\//_/g ; s/\"_/\"\/var\/lib\/heketi\//" $1 +} + +export -f fixpath_func +find openshift-ansible/roles/openshift_storage_glusterfs/files/v3.7 -name glusterfs-template.yml -print0 | xargs -0 -L 1 -I {} bash -c 'fixpath_func "$@"' _ {} diff --git a/anslib/link_vars.sh b/anslib/link_vars.sh new file mode 100755 index 0000000..01a9fe9 --- /dev/null +++ b/anslib/link_vars.sh @@ -0,0 +1,26 @@ + +function mklink_func { +# if [ -d openshift-cluster ]; then +# mklink_func "openshift-cluster" +# fi + + name=$(basename "$1") +# [[ $name == "private" ]] && exit + [[ $name == "vars" ]] && exit + [[ $name == "roles" ]] && exit + + ( + cd $1 + path=.. + while [ ! -f "$path/link_vars.sh" ]; do + path="../$path" + done + path="../$path" + + ln -sf "$path/group_vars" + ln -sf "$path/host_vars" + ) +} + +export -f mklink_func +find openshift-ansible/playbooks -mindepth 0 -maxdepth 2 -type d -print0 | xargs -0 -L 1 -I {} bash -c 'mklink_func "$@"' _ {} diff --git a/anslib/openshift-ansible b/anslib/openshift-ansible index f676f1c..ec3bc59 160000 --- a/anslib/openshift-ansible +++ b/anslib/openshift-ansible @@ -1 +1 @@ -Subproject commit f676f1cab3046fa9a288e2b8f79cda066da3e8eb +Subproject commit ec3bc59ab20c4c21b7cfd27065c1a9b811bd9518 diff --git a/anslib/patches/ansible_broker-ds-sc.patch b/anslib/patches/ansible_broker-ds-sc.patch new file mode 100644 index 0000000..9f99056 --- /dev/null +++ b/anslib/patches/ansible_broker-ds-sc.patch @@ -0,0 +1,10 @@ +--- a/roles/ansible_service_broker/tasks/install.yml ++++ b/roles/ansible_service_broker/tasks/install.yml +@@ -211,6 +211,7 @@ + access_modes: + - ReadWriteOnce + volume_capacity: 1G ++ storage_class_name: glusterfs-storage + + - name: Search for existing Ansible Service Broker deployment config + oc_obj: diff --git a/anslib/patches/glusterfs-ds-mountrun.patch b/anslib/patches/glusterfs-ds-mountrun.patch new file mode 100644 index 0000000..02f7e15 --- /dev/null +++ b/anslib/patches/glusterfs-ds-mountrun.patch @@ -0,0 +1,25 @@ +--- a/roles/openshift_storage_glusterfs/files/v3.7/glusterfs-template.yml ++++ b/roles/openshift_storage_glusterfs/files/v3.7/glusterfs-template.yml +@@ -49,6 +49,8 @@ objects: + mountPath: "/var/lib/heketi" + - name: glusterfs-run + mountPath: "/run" ++# - name: glusterfs-socket ++# mountPath: "/run/glusterd.socket" + - name: glusterfs-lvm + mountPath: "/run/lvm" + - name: glusterfs-etc +@@ -98,7 +100,12 @@ objects: + hostPath: + path: "/var/lib/heketi" + - name: glusterfs-run +- emptyDir: {} ++ hostPath: ++ path: "/run/glusterd" ++# emptyDir: {} ++# - name: glusterfs-socket ++# hostPath: ++# path: "/run/glusterd.socket" + - name: glusterfs-lvm + hostPath: + path: "/run/lvm" diff --git a/anslib/patches/template_broker-ds-badcheck.patch b/anslib/patches/template_broker-ds-badcheck.patch new file mode 100644 index 0000000..477ec66 --- /dev/null +++ b/anslib/patches/template_broker-ds-badcheck.patch @@ -0,0 +1,23 @@ +diff --git a/roles/template_service_broker/tasks/install.yml b/roles/template_service_broker/tasks/install.yml +index d674d24..1eff3bc 100644 +--- a/roles/template_service_broker/tasks/install.yml ++++ b/roles/template_service_broker/tasks/install.yml +@@ -1,11 +1,12 @@ + --- ++#DS + # Fact setting +-- name: Ensure that Template Service Broker has nodes to run on +- fail: +- msg: |- +- No schedulable nodes found matching node selector for Template Service Broker - '{{ template_service_broker_selector }}' +- when: +- - openshift_schedulable_node_labels | lib_utils_oo_has_no_matching_selector(template_service_broker_selector) ++#- name: Ensure that Template Service Broker has nodes to run on ++# fail: ++# msg: |- ++# No schedulable nodes found matching node selector for Template Service Broker - '{{ template_service_broker_selector }}' ++# when: ++# - openshift_schedulable_node_labels | lib_utils_oo_has_no_matching_selector(template_service_broker_selector) + + - name: Set default image variables based on openshift_deployment_type + include_vars: "{{ item }}" -- cgit v1.2.1