From a069be8c5c54ff1661baa992d3f0e89afd6c92b6 Mon Sep 17 00:00:00 2001 From: IshentRas Date: Mon, 13 Jun 2016 11:05:57 +0100 Subject: - Prevent the script to override n number of the time the same nameserver - Prevent the script to echo blank values from IP4_NAMESERVERS variable --- roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh b/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh index 51a43d113..5a187710b 100755 --- a/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh +++ b/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh @@ -47,11 +47,14 @@ EOF # zero out our upstream servers list and feed it into dnsmasq echo -n > /etc/dnsmasq.d/origin-upstream-dns.conf for ns in ${IP4_NAMESERVERS}; do - echo "server=${ns}" >> /etc/dnsmasq.d/origin-upstream-dns.conf + if [[ ! -z $ns ]]; then + echo "server=${ns}" >> /etc/dnsmasq.d/origin-upstream-dns.conf + fi done systemctl restart dnsmasq - sed -i 's/^nameserver.*$/nameserver '"${def_route_ip}"'/g' /etc/resolv.conf + sed -i '0,/^nameserver/ s/^nameserver.*$/nameserver '"${def_route_ip}"'/g' /etc/resolv.conf + if ! grep -q '99-origin-dns.sh' /etc/resolv.conf; then echo "# nameserver updated by /etc/NetworkManager/dispatcher.d/99-origin-dns.sh" >> /etc/resolv.conf fi -- cgit v1.2.3 From e88c4dc7765ae94e31c0050fabe64c213d08204c Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Mon, 27 Jun 2016 10:20:38 -0400 Subject: Check if last rule is DROP when inserting iptables rules. --- roles/os_firewall/library/os_firewall_manage_iptables.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/os_firewall/library/os_firewall_manage_iptables.py b/roles/os_firewall/library/os_firewall_manage_iptables.py index 1cb539a8c..190016c14 100755 --- a/roles/os_firewall/library/os_firewall_manage_iptables.py +++ b/roles/os_firewall/library/os_firewall_manage_iptables.py @@ -37,14 +37,14 @@ class IpTablesSaveError(IpTablesError): class IpTablesCreateChainError(IpTablesError): - def __init__(self, chain, msg, cmd, exit_code, output): # pylint: disable=too-many-arguments, line-too-long + def __init__(self, chain, msg, cmd, exit_code, output): # pylint: disable=too-many-arguments, line-too-long, redefined-outer-name super(IpTablesCreateChainError, self).__init__(msg, cmd, exit_code, output) self.chain = chain class IpTablesCreateJumpRuleError(IpTablesError): - def __init__(self, chain, msg, cmd, exit_code, output): # pylint: disable=too-many-arguments, line-too-long + def __init__(self, chain, msg, cmd, exit_code, output): # pylint: disable=too-many-arguments, line-too-long, redefined-outer-name super(IpTablesCreateJumpRuleError, self).__init__(msg, cmd, exit_code, output) self.chain = chain @@ -152,11 +152,11 @@ class IpTablesManager(object): # pylint: disable=too-many-instance-attributes continue last_rule_target = rule[1] - # Naively assume that if the last row is a REJECT rule, then - # we can add insert our rule right before it, otherwise we + # Naively assume that if the last row is a REJECT or DROP rule, + # then we can insert our rule right before it, otherwise we # assume that we can just append the rule. if (last_rule_num and last_rule_target - and last_rule_target == 'REJECT'): + and last_rule_target in ['REJECT', 'DROP']): # insert rule cmd = self.cmd + ['-I', self.jump_rule_chain, str(last_rule_num)] -- cgit v1.2.3 From 9fce180414a4cfbebea1f4b4acc2f67356b7e4fc Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Mon, 27 Jun 2016 09:35:06 -0400 Subject: Speed up copying OpenShift examples * The `copy` module does not scale to hundreds of files * Replace `copy` with `unarchive` Create a temp dir locally to tar all the OpenShift examples into. Make the dest dir on the remote side, drop examples in place with the `unarchive` module. --- roles/openshift_examples/tasks/main.yml | 43 ++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/roles/openshift_examples/tasks/main.yml b/roles/openshift_examples/tasks/main.yml index fb10188f2..e9966d735 100644 --- a/roles/openshift_examples/tasks/main.yml +++ b/roles/openshift_examples/tasks/main.yml @@ -1,9 +1,46 @@ --- -- name: Copy openshift examples - copy: - src: "examples/{{ content_version }}/" +###################################################################### +# Copying Examples +# +# We used to use the copy module to transfer the openshift examples to +# the remote. Then it started taking more than a minute to transfer +# the files. As noted in the module: +# +# "The 'copy' module recursively copy facility does not scale to +# lots (>hundreds) of files." +# +# The `synchronize` module is suggested as an alternative, we can't +# use it either due to changes introduced in Ansible 2.x. +- name: Create local temp dir for OpenShift examples copy + local_action: command mktemp -d /tmp/openshift-ansible-XXXXXXX + become: False + register: copy_examples_mktemp + run_once: True + +- name: Create tar of OpenShift examples + local_action: command tar -C "{{ role_path }}/files/examples/{{ content_version }}/" -cvf "{{ copy_examples_mktemp.stdout }}/openshift-examples.tar" . + become: False + register: copy_examples_tar + +- name: Create the remote OpenShift examples directory + file: + dest: "{{ examples_base }}" + state: directory + mode: 0755 + +- name: Unarchive the OpenShift examples on the remote + unarchive: + src: "{{ copy_examples_mktemp.stdout }}/openshift-examples.tar" dest: "{{ examples_base }}/" +- name: Cleanup the OpenShift Examples temp dir + become: False + local_action: file dest="{{ copy_examples_mktemp.stdout }}" state=absent + +# Done copying examples +###################################################################### +# Begin image streams + - name: Modify registry paths if registry_url is not registry.access.redhat.com shell: > find {{ examples_base }} -type f | xargs -n 1 sed -i 's|registry.access.redhat.com|{{ registry_host | quote }}|g' -- cgit v1.2.3 From 807d35904363c59c5c887b70cd1c075c3607c483 Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Tue, 28 Jun 2016 16:47:00 -0400 Subject: Set any_errors_fatal for etcd facts play. --- playbooks/common/openshift-etcd/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/common/openshift-etcd/config.yml b/playbooks/common/openshift-etcd/config.yml index 6cb3a954f..a95de8cf3 100644 --- a/playbooks/common/openshift-etcd/config.yml +++ b/playbooks/common/openshift-etcd/config.yml @@ -1,6 +1,7 @@ --- - name: Set etcd facts needed for generating certs hosts: oo_etcd_to_config + any_errors_fatal: true roles: - openshift_facts tasks: -- cgit v1.2.3 From 6fb5124fa888816731bf91280bd3cdd420490814 Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Tue, 28 Jun 2016 17:44:57 -0400 Subject: Set any_errors_fatal for initialize facts play. --- playbooks/common/openshift-cluster/initialize_facts.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/common/openshift-cluster/initialize_facts.yml b/playbooks/common/openshift-cluster/initialize_facts.yml index cda490b1f..37f523246 100644 --- a/playbooks/common/openshift-cluster/initialize_facts.yml +++ b/playbooks/common/openshift-cluster/initialize_facts.yml @@ -1,6 +1,7 @@ --- - name: Initialize host facts hosts: oo_all_hosts + any_errors_fatal: true roles: - openshift_facts tasks: -- cgit v1.2.3 From a704c30b3a07f0cae4b1aa30931e60e0632433f3 Mon Sep 17 00:00:00 2001 From: George Goh Date: Wed, 29 Jun 2016 10:10:05 +0800 Subject: Enable additional 'virt_sandbox_use_nfs' seboolean as per documentation: https://docs.openshift.org/latest/install_config/persistent_storage/persistent_storage_nfs.html#nfs-selinux --- roles/openshift_node/tasks/storage_plugins/nfs.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/openshift_node/tasks/storage_plugins/nfs.yml b/roles/openshift_node/tasks/storage_plugins/nfs.yml index 14a613786..8380714d4 100644 --- a/roles/openshift_node/tasks/storage_plugins/nfs.yml +++ b/roles/openshift_node/tasks/storage_plugins/nfs.yml @@ -9,3 +9,10 @@ state: yes persistent: yes when: ansible_selinux and ansible_selinux.status == "enabled" + +- name: Set seboolean to allow nfs storage plugin access from containers(sandbox) + seboolean: + name: virt_sandbox_use_nfs + state: yes + persistent: yes + when: ansible_selinux and ansible_selinux.status == "enabled" -- cgit v1.2.3 From 56d77b5c62a1389b644ecc44871516562b9a1aa3 Mon Sep 17 00:00:00 2001 From: liangxia Date: Wed, 29 Jun 2016 16:12:57 +0800 Subject: update conditional expression to save steps --- .../upgrades/docker/files/nuke_images.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/playbooks/byo/openshift-cluster/upgrades/docker/files/nuke_images.sh b/playbooks/byo/openshift-cluster/upgrades/docker/files/nuke_images.sh index 9a5ee2276..6b155f7fa 100644 --- a/playbooks/byo/openshift-cluster/upgrades/docker/files/nuke_images.sh +++ b/playbooks/byo/openshift-cluster/upgrades/docker/files/nuke_images.sh @@ -1,22 +1,22 @@ #!/bin/bash # Stop any running containers -running_container_count=`docker ps -q | wc -l` -if test $running_container_count -gt 0 +running_container_ids=`docker ps -q` +if test -n "$running_container_ids" then - docker stop $(docker ps -q) + docker stop $running_container_ids fi # Delete all containers -container_count=`docker ps -a -q | wc -l` -if test $container_count -gt 0 +container_ids=`docker ps -a -q` +if test -n "$container_ids" then - docker rm -f -v $(docker ps -a -q) + docker rm -f -v $container_ids fi # Delete all images (forcefully) -image_count=`docker images -q | wc -l` -if test $image_count -gt 0 +image_ids=`docker images -q` +if test -n "$image_ids" then # Taken from: https://gist.github.com/brianclements/f72b2de8e307c7b56689#gistcomment-1443144 docker rmi $(docker images | grep "$2/\|/$2 \| $2 \|$2 \|$2-\|$2_" | awk '{print $1 ":" $2}') 2>/dev/null || echo "No images matching \"$2\" left to purge." -- cgit v1.2.3 From c64bd9065511bc6cb508750d167ab9d8a03b182f Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Wed, 29 Jun 2016 09:46:53 -0400 Subject: Switch to repoquery, enable plugins for satellite support --- .../common/openshift-cluster/upgrades/files/rpm_versions.sh | 10 +++++++--- roles/docker/vars/main.yml | 1 - roles/openshift_docker_facts/vars/main.yml | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/playbooks/common/openshift-cluster/upgrades/files/rpm_versions.sh b/playbooks/common/openshift-cluster/upgrades/files/rpm_versions.sh index a2a9579b5..8d7543f3c 100644 --- a/playbooks/common/openshift-cluster/upgrades/files/rpm_versions.sh +++ b/playbooks/common/openshift-cluster/upgrades/files/rpm_versions.sh @@ -1,7 +1,11 @@ #!/bin/bash - -installed=$(yum list installed -e 0 -q "$@" 2>&1 | tail -n +2 | awk '{ print $2 }' | sort -r | tr '\n' ' ') -available=$(yum list available -e 0 -q "$@" 2>&1 | tail -n +2 | grep -v 'el7ose' | awk '{ print $2 }' | sort -r | tr '\n' ' ') +if [ `which dnf 2> /dev/null` ]; then + installed=$(dnf repoquery --installed --latest-limit 1 -d 0 --qf '%{version}-%{release}' "${@}" 2> /dev/null) + installed=$(dnf repoquery --available --latest-limit 1 -d 0 --qf '%{version}-%{release}' "${@}" 2> /dev/null) +else + installed=$(repoquery --plugins --pkgnarrow=installed --qf '%{version}-%{release}' "${@}" 2> /dev/null) + available=$(repoquery --plugins --pkgnarrow=available --qf '%{version}-%{release}' "${@}" 2> /dev/null) +fi echo "---" echo "curr_version: ${installed}" diff --git a/roles/docker/vars/main.yml b/roles/docker/vars/main.yml index 606cdb9b9..f81f99e2b 100644 --- a/roles/docker/vars/main.yml +++ b/roles/docker/vars/main.yml @@ -1,3 +1,2 @@ --- -repoquery_cmd: "{{ 'dnf repoquery --latest-limit 1 -d 0' if ansible_pkg_mgr == 'dnf' else 'repoquery' }}" udevw_udevd_dir: /etc/systemd/system/systemd-udevd.service.d diff --git a/roles/openshift_docker_facts/vars/main.yml b/roles/openshift_docker_facts/vars/main.yml index f7ad1b329..55c04b0c1 100644 --- a/roles/openshift_docker_facts/vars/main.yml +++ b/roles/openshift_docker_facts/vars/main.yml @@ -1,2 +1,2 @@ --- -repoquery_cmd: "{{ 'dnf repoquery --latest-limit 1 -d 0' if ansible_pkg_mgr == 'dnf' else 'repoquery' }}" +repoquery_cmd: "{{ 'dnf repoquery --latest-limit 1 -d 0' if ansible_pkg_mgr == 'dnf' else 'repoquery --plugins' }}" -- cgit v1.2.3 From 1448af9bfa2eea834de1426268f68ecdae7b8126 Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Wed, 29 Jun 2016 10:28:21 -0400 Subject: Revert "Speed up copying OpenShift examples" --- roles/openshift_examples/tasks/main.yml | 43 +++------------------------------ 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/roles/openshift_examples/tasks/main.yml b/roles/openshift_examples/tasks/main.yml index e9966d735..fb10188f2 100644 --- a/roles/openshift_examples/tasks/main.yml +++ b/roles/openshift_examples/tasks/main.yml @@ -1,46 +1,9 @@ --- -###################################################################### -# Copying Examples -# -# We used to use the copy module to transfer the openshift examples to -# the remote. Then it started taking more than a minute to transfer -# the files. As noted in the module: -# -# "The 'copy' module recursively copy facility does not scale to -# lots (>hundreds) of files." -# -# The `synchronize` module is suggested as an alternative, we can't -# use it either due to changes introduced in Ansible 2.x. -- name: Create local temp dir for OpenShift examples copy - local_action: command mktemp -d /tmp/openshift-ansible-XXXXXXX - become: False - register: copy_examples_mktemp - run_once: True - -- name: Create tar of OpenShift examples - local_action: command tar -C "{{ role_path }}/files/examples/{{ content_version }}/" -cvf "{{ copy_examples_mktemp.stdout }}/openshift-examples.tar" . - become: False - register: copy_examples_tar - -- name: Create the remote OpenShift examples directory - file: - dest: "{{ examples_base }}" - state: directory - mode: 0755 - -- name: Unarchive the OpenShift examples on the remote - unarchive: - src: "{{ copy_examples_mktemp.stdout }}/openshift-examples.tar" +- name: Copy openshift examples + copy: + src: "examples/{{ content_version }}/" dest: "{{ examples_base }}/" -- name: Cleanup the OpenShift Examples temp dir - become: False - local_action: file dest="{{ copy_examples_mktemp.stdout }}" state=absent - -# Done copying examples -###################################################################### -# Begin image streams - - name: Modify registry paths if registry_url is not registry.access.redhat.com shell: > find {{ examples_base }} -type f | xargs -n 1 sed -i 's|registry.access.redhat.com|{{ registry_host | quote }}|g' -- cgit v1.2.3 From 158911805ab785536205e4a7a88f6636673713e7 Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Thu, 30 Jun 2016 16:14:36 -0400 Subject: Bump rhel subscribe default version. --- roles/rhel_subscribe/tasks/enterprise.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/rhel_subscribe/tasks/enterprise.yml b/roles/rhel_subscribe/tasks/enterprise.yml index c4aa7db6a..8d11276d0 100644 --- a/roles/rhel_subscribe/tasks/enterprise.yml +++ b/roles/rhel_subscribe/tasks/enterprise.yml @@ -7,7 +7,7 @@ when: deployment_type == 'enterprise' - set_fact: - default_ose_version: '3.1' + default_ose_version: '3.2' when: deployment_type in ['atomic-enterprise', 'openshift-enterprise'] - set_fact: -- cgit v1.2.3 From a072feb4f88ab120b7cb58128d728a64d60e58d4 Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Fri, 1 Jul 2016 08:55:07 -0400 Subject: Update image streams with SCL 2.2 components --- .../v1.2/image-streams/image-streams-centos7.json | 130 ++++++++++++++---- .../v1.2/image-streams/image-streams-rhel7.json | 146 +++++++++++++++++---- 2 files changed, 228 insertions(+), 48 deletions(-) diff --git a/roles/openshift_examples/files/examples/v1.2/image-streams/image-streams-centos7.json b/roles/openshift_examples/files/examples/v1.2/image-streams/image-streams-centos7.json index 719aee772..d971e5e7a 100644 --- a/roles/openshift_examples/files/examples/v1.2/image-streams/image-streams-centos7.json +++ b/roles/openshift_examples/files/examples/v1.2/image-streams/image-streams-centos7.json @@ -7,8 +7,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "ruby", - "creationTimestamp": null + "name": "ruby" }, "spec": { "tags": [ @@ -23,7 +22,7 @@ }, "from": { "kind": "ImageStreamTag", - "name": "2.2" + "name": "2.3" } }, { @@ -55,6 +54,21 @@ "kind": "DockerImage", "name": "centos/ruby-22-centos7:latest" } + }, + { + "name": "2.3", + "annotations": { + "description": "Build and run Ruby 2.3 applications", + "iconClass": "icon-ruby", + "tags": "builder,ruby", + "supports": "ruby:2.3,ruby", + "version": "2.3", + "sampleRepo": "https://github.com/openshift/ruby-ex.git" + }, + "from": { + "kind": "DockerImage", + "name": "centos/ruby-23-centos7:latest" + } } ] } @@ -63,8 +77,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "nodejs", - "creationTimestamp": null + "name": "nodejs" }, "spec": { "tags": [ @@ -104,8 +117,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "perl", - "creationTimestamp": null + "name": "perl" }, "spec": { "tags": [ @@ -161,8 +173,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "php", - "creationTimestamp": null + "name": "php" }, "spec": { "tags": [ @@ -217,8 +228,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "python", - "creationTimestamp": null + "name": "python" }, "spec": { "tags": [ @@ -233,7 +243,7 @@ }, "from": { "kind": "ImageStreamTag", - "name": "3.4" + "name": "3.5" } }, { @@ -280,6 +290,21 @@ "kind": "DockerImage", "name": "centos/python-34-centos7:latest" } + }, + { + "name": "3.5", + "annotations": { + "description": "Build and run Python 3.5 applications", + "iconClass": "icon-python", + "tags": "builder,python", + "supports":"python:3.5,python", + "version": "3.5", + "sampleRepo": "https://github.com/openshift/django-ex.git" + }, + "from": { + "kind": "DockerImage", + "name": "centos/python-35-centos7:latest" + } } ] } @@ -288,8 +313,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "wildfly", - "creationTimestamp": null + "name": "wildfly" }, "spec": { "tags": [ @@ -359,8 +383,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "mysql", - "creationTimestamp": null + "name": "mysql" }, "spec": { "tags": [ @@ -409,8 +432,43 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "postgresql", - "creationTimestamp": null + "name": "mariadb" + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": { + "description": "Provides a MariaDB database", + "iconClass": "icon-mariadb", + "tags": "mariadb" + }, + "from": { + "kind": "ImageStreamTag", + "name": "10.1" + } + }, + { + "name": "10.1", + "annotations": { + "description": "Provides a MariaDB v10.1 database", + "iconClass": "icon-mariadb", + "tags": "mariadb", + "version": "10.1" + }, + "from": { + "kind": "DockerImage", + "name": "centos/mariadb-101-centos7:latest" + } + } + ] + } + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "postgresql" }, "spec": { "tags": [ @@ -423,7 +481,7 @@ }, "from": { "kind": "ImageStreamTag", - "name": "9.4" + "name": "9.5" } }, { @@ -451,6 +509,19 @@ "kind": "DockerImage", "name": "centos/postgresql-94-centos7:latest" } + }, + { + "name": "9.5", + "annotations": { + "description": "Provides a PostgreSQL v9.5 database", + "iconClass": "icon-postgresql", + "tags": "postgresql", + "version": "9.5" + }, + "from": { + "kind": "DockerImage", + "name": "centos/postgresql-95-centos7:latest" + } } ] } @@ -459,8 +530,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "mongodb", - "creationTimestamp": null + "name": "mongodb" }, "spec": { "tags": [ @@ -473,7 +543,7 @@ }, "from": { "kind": "ImageStreamTag", - "name": "2.6" + "name": "3.2" } }, { @@ -501,6 +571,19 @@ "kind": "DockerImage", "name": "centos/mongodb-26-centos7:latest" } + }, + { + "name": "3.2", + "annotations": { + "description": "Provides a MongoDB v3.2 database", + "iconClass": "icon-mongodb", + "tags": "mongodb", + "version": "3.2" + }, + "from": { + "kind": "DockerImage", + "name": "centos/mongodb-32-centos7:latest" + } } ] } @@ -509,8 +592,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "jenkins", - "creationTimestamp": null + "name": "jenkins" }, "spec": { "tags": [ diff --git a/roles/openshift_examples/files/examples/v1.2/image-streams/image-streams-rhel7.json b/roles/openshift_examples/files/examples/v1.2/image-streams/image-streams-rhel7.json index 00635ec78..56c63263b 100644 --- a/roles/openshift_examples/files/examples/v1.2/image-streams/image-streams-rhel7.json +++ b/roles/openshift_examples/files/examples/v1.2/image-streams/image-streams-rhel7.json @@ -7,8 +7,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "ruby", - "creationTimestamp": null + "name": "ruby" }, "spec": { "tags": [ @@ -18,12 +17,12 @@ "description": "Build and run Ruby applications", "iconClass": "icon-ruby", "tags": "builder,ruby", - "supports": "ruby,ruby", + "supports": "ruby", "sampleRepo": "https://github.com/openshift/ruby-ex.git" }, "from": { "kind": "ImageStreamTag", - "name": "2.2" + "name": "2.3" } }, { @@ -55,6 +54,21 @@ "kind": "DockerImage", "name": "registry.access.redhat.com/rhscl/ruby-22-rhel7:latest" } + }, + { + "name": "2.3", + "annotations": { + "description": "Build and run Ruby 2.3 applications", + "iconClass": "icon-ruby", + "tags": "builder,ruby", + "supports": "ruby:2.3,ruby", + "version": "2.3", + "sampleRepo": "https://github.com/openshift/ruby-ex.git" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/rhscl/ruby-23-rhel7:latest" + } } ] } @@ -63,8 +77,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "nodejs", - "creationTimestamp": null + "name": "nodejs" }, "spec": { "tags": [ @@ -79,7 +92,7 @@ }, "from": { "kind": "ImageStreamTag", - "name": "0.10" + "name": "4" } }, { @@ -96,6 +109,21 @@ "kind": "DockerImage", "name": "registry.access.redhat.com/openshift3/nodejs-010-rhel7:latest" } + }, + { + "name": "4", + "annotations": { + "description": "Build and run NodeJS 4.x applications", + "iconClass": "icon-nodejs", + "tags": "builder,nodejs", + "supports":"nodejs:4,nodejs", + "version": "4", + "sampleRepo": "https://github.com/openshift/nodejs-ex.git" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/rhscl/nodejs-4-rhel7:latest" + } } ] } @@ -104,8 +132,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "perl", - "creationTimestamp": null + "name": "perl" }, "spec": { "tags": [ @@ -161,8 +188,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "php", - "creationTimestamp": null + "name": "php" }, "spec": { "tags": [ @@ -217,8 +243,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "python", - "creationTimestamp": null + "name": "python" }, "spec": { "tags": [ @@ -233,7 +258,7 @@ }, "from": { "kind": "ImageStreamTag", - "name": "3.4" + "name": "3.5" } }, { @@ -280,6 +305,21 @@ "kind": "DockerImage", "name": "registry.access.redhat.com/rhscl/python-34-rhel7:latest" } + }, + { + "name": "3.5", + "annotations": { + "description": "Build and run Python 3.5 applications", + "iconClass": "icon-python", + "tags": "builder,python", + "supports":"python:3.5,python", + "version": "3.5", + "sampleRepo": "https://github.com/openshift/django-ex.git" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/rhscl/python-35-rhel7:latest" + } } ] } @@ -288,8 +328,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "mysql", - "creationTimestamp": null + "name": "mysql" }, "spec": { "tags": [ @@ -338,8 +377,43 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "postgresql", - "creationTimestamp": null + "name": "mariadb" + }, + "spec": { + "tags": [ + { + "name": "latest", + "annotations": { + "description": "Provides a MariaDB database", + "iconClass": "icon-mariadb", + "tags": "mariadb" + }, + "from": { + "kind": "ImageStreamTag", + "name": "10.1" + } + }, + { + "name": "10.1", + "annotations": { + "description": "Provides a MariaDB v10.1 database", + "iconClass": "icon-mariadb", + "tags": "mariadb", + "version": "10.1" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/rhscl/mariadb-101-rhel7:latest" + } + } + ] + } + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "postgresql" }, "spec": { "tags": [ @@ -352,7 +426,7 @@ }, "from": { "kind": "ImageStreamTag", - "name": "9.4" + "name": "9.5" } }, { @@ -380,6 +454,19 @@ "kind": "DockerImage", "name": "registry.access.redhat.com/rhscl/postgresql-94-rhel7:latest" } + }, + { + "name": "9.5", + "annotations": { + "description": "Provides a PostgreSQL v9.5 database", + "iconClass": "icon-postgresql", + "tags": "postgresql", + "version": "9.5" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/rhscl/postgresql-95-rhel7:latest" + } } ] } @@ -388,8 +475,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "mongodb", - "creationTimestamp": null + "name": "mongodb" }, "spec": { "tags": [ @@ -402,7 +488,7 @@ }, "from": { "kind": "ImageStreamTag", - "name": "2.6" + "name": "3.2" } }, { @@ -430,6 +516,19 @@ "kind": "DockerImage", "name": "registry.access.redhat.com/rhscl/mongodb-26-rhel7:latest" } + }, + { + "name": "3.2", + "annotations": { + "description": "Provides a MongoDB v3.2 database", + "iconClass": "icon-mongodb", + "tags": "mongodb", + "version": "3.2" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/rhscl/mongodb-32-rhel7:latest" + } } ] } @@ -438,8 +537,7 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "jenkins", - "creationTimestamp": null + "name": "jenkins" }, "spec": { "tags": [ -- cgit v1.2.3 From 31953e459c8cc4f8f819e05468e4fcbd13911237 Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Thu, 30 Jun 2016 16:31:08 -0400 Subject: Add support for supplying a dnsmasq.conf file Useful for POC environments where DNS may not actually be setup yet. Make sure you don't define anything that would conflict with the default configuration. You have been warned. --- inventory/byo/hosts.origin.example | 5 ++++- inventory/byo/hosts.ose.example | 5 ++++- roles/openshift_node_dnsmasq/handlers/main.yml | 7 ++++++- roles/openshift_node_dnsmasq/tasks/main.yml | 10 ++++++++++ 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/inventory/byo/hosts.origin.example b/inventory/byo/hosts.origin.example index 7c9c7152b..ef5488d67 100644 --- a/inventory/byo/hosts.origin.example +++ b/inventory/byo/hosts.origin.example @@ -381,7 +381,10 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', # and configure node's dnsIP to point at the node's local dnsmasq instance. Defaults # to True for Origin 1.2 and OSE 3.2. False for 1.1 / 3.1 installs, this cannot # be used with 1.0 and 3.0. -# openshift_use_dnsmasq=False +#openshift_use_dnsmasq=False +# Define an additional dnsmasq.conf file to deploy to /etc/dnsmasq.d/openshift-ansible.conf +# This is useful for POC environments where DNS may not actually be available yet. +#openshift_node_dnsmasq_additional_config_file=/home/bob/ose-dnsmasq.conf # Global Proxy Configuration # These options configure HTTP_PROXY, HTTPS_PROXY, and NOPROXY environment diff --git a/inventory/byo/hosts.ose.example b/inventory/byo/hosts.ose.example index 55f9fa66c..b4c6ff9b5 100644 --- a/inventory/byo/hosts.ose.example +++ b/inventory/byo/hosts.ose.example @@ -376,7 +376,10 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', # and configure node's dnsIP to point at the node's local dnsmasq instance. Defaults # to True for Origin 1.2 and OSE 3.2. False for 1.1 / 3.1 installs, this cannot # be used with 1.0 and 3.0. -# openshift_use_dnsmasq=False +#openshift_use_dnsmasq=False +# Define an additional dnsmasq.conf file to deploy to /etc/dnsmasq.d/openshift-ansible.conf +# This is useful for POC environments where DNS may not actually be available yet. +#openshift_node_dnsmasq_additional_config_file=/home/bob/ose-dnsmasq.conf # Global Proxy Configuration # These options configure HTTP_PROXY, HTTPS_PROXY, and NOPROXY environment diff --git a/roles/openshift_node_dnsmasq/handlers/main.yml b/roles/openshift_node_dnsmasq/handlers/main.yml index 7e9e4d299..7d43b6106 100644 --- a/roles/openshift_node_dnsmasq/handlers/main.yml +++ b/roles/openshift_node_dnsmasq/handlers/main.yml @@ -1,5 +1,10 @@ --- - name: restart NetworkManager - service: + service: name: NetworkManager state: restarted + +- name: restart dnsmasq + service: + name: dnsmasq + state: restarted diff --git a/roles/openshift_node_dnsmasq/tasks/main.yml b/roles/openshift_node_dnsmasq/tasks/main.yml index 7147b78f5..f8fa29a90 100644 --- a/roles/openshift_node_dnsmasq/tasks/main.yml +++ b/roles/openshift_node_dnsmasq/tasks/main.yml @@ -18,6 +18,16 @@ src: origin-dns.conf.j2 dest: /etc/dnsmasq.d/origin-dns.conf +- name: Deploy additional dnsmasq.conf + template: + src: "{{ openshift_node_dnsmasq_additional_config_file }}" + dest: /etc/dnsmasq.d/openshift-ansible.conf + owner: root + group: root + mode: 0644 + when: openshift_node_dnsmasq_additional_config_file is defined + notify: restart dnsmasq + # Dynamic NetworkManager based dispatcher - include: ./network-manager.yml when: network_manager_active | bool -- cgit v1.2.3 From 3f51b9847508ed0334d6d5c9d5717e83578668ba Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Fri, 1 Jul 2016 14:14:37 -0400 Subject: Restart dnsmasq encase it was already running --- roles/openshift_node_dnsmasq/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/openshift_node_dnsmasq/tasks/main.yml b/roles/openshift_node_dnsmasq/tasks/main.yml index f8fa29a90..bd9a0ffb6 100644 --- a/roles/openshift_node_dnsmasq/tasks/main.yml +++ b/roles/openshift_node_dnsmasq/tasks/main.yml @@ -17,6 +17,7 @@ template: src: origin-dns.conf.j2 dest: /etc/dnsmasq.d/origin-dns.conf + notify: restart dnsmasq - name: Deploy additional dnsmasq.conf template: -- cgit v1.2.3 From ec6714080e7b77a64b974cef78a0c102fbbb566b Mon Sep 17 00:00:00 2001 From: Scott Merrill Date: Sun, 3 Jul 2016 00:48:37 -0400 Subject: Adds quotes to gpgkey element in byo/config.yml As described in https://github.com/openshift/openshift-ansible/issues/1987#issuecomment-223965843 Hopefully this will help others who are trying install Origin. --- inventory/byo/hosts.origin.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inventory/byo/hosts.origin.example b/inventory/byo/hosts.origin.example index ef5488d67..9cb6b3740 100644 --- a/inventory/byo/hosts.origin.example +++ b/inventory/byo/hosts.origin.example @@ -82,11 +82,11 @@ deployment_type=origin #oreg_url=example.com/openshift3/ose-${component}:${version} # Origin copr repo -#openshift_additional_repos=[{'id': 'openshift-origin-copr', 'name': 'OpenShift Origin COPR', 'baseurl': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/epel-7-$basearch/', 'enabled': 1, 'gpgcheck': 1, gpgkey: 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/pubkey.gpg'}] +#openshift_additional_repos=[{'id': 'openshift-origin-copr', 'name': 'OpenShift Origin COPR', 'baseurl': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/epel-7-$basearch/', 'enabled': 1, 'gpgcheck': 1, 'gpgkey': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/pubkey.gpg'}] # Origin Fedora copr repo # Use this if you are installing on Fedora -#openshift_additional_repos=[{'id': 'fedora-openshift-origin-copr', 'name': 'OpenShift Origin COPR for Fedora', 'baseurl': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/fedora-openshift/fedora-$releasever-$basearch/', 'enabled': 1, 'gpgcheck': 1, gpgkey: 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/fedora-openshift/pubkey.gpg'}] +#openshift_additional_repos=[{'id': 'fedora-openshift-origin-copr', 'name': 'OpenShift Origin COPR for Fedora', 'baseurl': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/fedora-openshift/fedora-$releasever-$basearch/', 'enabled': 1, 'gpgcheck': 1, 'gpgkey': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/fedora-openshift/pubkey.gpg'}] # htpasswd auth openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}] -- cgit v1.2.3