summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/ansible/tasks/main.yml4
-rw-r--r--roles/ansible_tower/tasks/main.yaml2
-rw-r--r--roles/ansible_tower_cli/tasks/main.yml2
-rw-r--r--roles/cockpit/tasks/main.yml4
-rw-r--r--roles/copr_cli/tasks/main.yml4
-rw-r--r--roles/docker/README.md18
-rw-r--r--roles/docker/handlers/main.yml5
-rw-r--r--roles/docker/meta/main.yml128
-rw-r--r--roles/docker/tasks/main.yml6
-rw-r--r--roles/docker/tasks/udev_workaround.yml30
-rw-r--r--roles/docker/vars/main.yml3
-rw-r--r--roles/etcd/README.md2
-rw-r--r--roles/etcd/tasks/main.yml2
-rw-r--r--roles/etcd_common/defaults/main.yml2
-rw-r--r--roles/flannel/README.md3
-rw-r--r--roles/flannel/tasks/main.yml2
-rw-r--r--roles/fluentd_master/tasks/main.yml4
-rw-r--r--roles/fluentd_node/tasks/main.yml4
-rw-r--r--roles/haproxy/tasks/main.yml4
-rw-r--r--roles/kube_nfs_volumes/tasks/main.yml2
-rw-r--r--roles/kube_nfs_volumes/tasks/nfs.yml4
-rw-r--r--roles/lib_zabbix/library/zbx_action.py130
-rw-r--r--roles/nickhammond.logrotate/tasks/main.yml2
-rw-r--r--roles/openshift_ansible_inventory/tasks/main.yml4
-rw-r--r--roles/openshift_cluster_metrics/tasks/main.yml6
-rw-r--r--roles/openshift_common/tasks/main.yml8
-rw-r--r--roles/openshift_examples/README.md9
-rw-r--r--roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-centos7-v1-0.json285
-rw-r--r--roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-centos7.json207
-rw-r--r--roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-rhel7-v1-0.json254
-rw-r--r--roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-rhel7.json196
-rw-r--r--roles/openshift_examples/files/examples/v1.0/infrastructure-templates/origin/metrics-deployer.yaml4
-rw-r--r--roles/openshift_examples/files/examples/v1.1/db-templates/README.md100
-rw-r--r--roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-ephemeral-template.json2
-rw-r--r--roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json2
-rw-r--r--roles/openshift_examples/files/examples/v1.1/db-templates/postgresql-ephemeral-template.json2
-rw-r--r--roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-centos7.json14
-rw-r--r--roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-rhel7.json14
-rw-r--r--roles/openshift_examples/files/examples/v1.1/infrastructure-templates/origin/metrics-deployer.yaml4
-rw-r--r--roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp-mysql.json26
-rw-r--r--roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp.json5
-rw-r--r--roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer-mysql.json26
-rw-r--r--roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer.json5
-rw-r--r--roles/openshift_examples/files/examples/v1.1/quickstart-templates/django-postgresql.json26
-rw-r--r--roles/openshift_examples/files/examples/v1.1/quickstart-templates/django.json5
-rw-r--r--roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-ephemeral-template.json22
-rw-r--r--roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-persistent-template.json22
-rw-r--r--roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs-mongodb.json24
-rw-r--r--roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs.json3
-rw-r--r--roles/openshift_examples/files/examples/v1.1/quickstart-templates/rails-postgresql.json28
-rw-r--r--roles/openshift_expand_partition/README.md2
-rw-r--r--roles/openshift_expand_partition/tasks/main.yml2
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py13
-rw-r--r--roles/openshift_facts/tasks/main.yml4
-rw-r--r--roles/openshift_manageiq/tasks/main.yaml50
-rw-r--r--roles/openshift_manageiq/vars/main.yml24
-rw-r--r--roles/openshift_master/tasks/main.yml17
-rw-r--r--roles/openshift_master/templates/master.yaml.v1.j22
-rw-r--r--roles/openshift_master_ca/tasks/main.yml3
-rw-r--r--roles/openshift_node/tasks/main.yml16
-rw-r--r--roles/openshift_node/tasks/storage_plugins/ceph.yml4
-rw-r--r--roles/openshift_node/tasks/storage_plugins/glusterfs.yml6
-rw-r--r--roles/openshift_node/templates/node.yaml.v1.j26
-rw-r--r--roles/openshift_repos/files/fedora-origin/repos/maxamillion-fedora-openshift-fedora.repo8
-rw-r--r--roles/openshift_repos/handlers/main.yml3
-rw-r--r--roles/openshift_repos/tasks/main.yaml34
-rw-r--r--roles/openshift_serviceaccounts/tasks/main.yml6
-rw-r--r--roles/openshift_storage_nfs_lvm/tasks/nfs.yml4
-rw-r--r--roles/os_env_extras/tasks/main.yaml4
-rw-r--r--roles/os_firewall/tasks/firewall/firewalld.yml4
-rw-r--r--roles/os_firewall/tasks/firewall/iptables.yml4
-rw-r--r--roles/os_update_latest/tasks/main.yml2
-rw-r--r--roles/os_zabbix/vars/template_openshift_master.yml104
-rw-r--r--roles/os_zabbix/vars/template_os_linux.yml34
-rw-r--r--roles/tito/tasks/main.yml4
-rw-r--r--roles/yum_repos/README.md2
76 files changed, 806 insertions, 1226 deletions
diff --git a/roles/ansible/tasks/main.yml b/roles/ansible/tasks/main.yml
index 5d20a3b35..2a6ac7713 100644
--- a/roles/ansible/tasks/main.yml
+++ b/roles/ansible/tasks/main.yml
@@ -2,9 +2,7 @@
# Install ansible client
- name: Install Ansible
- yum:
- pkg: ansible
- state: installed
+ action: "{{ ansible_pkg_mgr }} name=ansible state=present"
- include: config.yml
vars:
diff --git a/roles/ansible_tower/tasks/main.yaml b/roles/ansible_tower/tasks/main.yaml
index b7757214d..36fc9b282 100644
--- a/roles/ansible_tower/tasks/main.yaml
+++ b/roles/ansible_tower/tasks/main.yaml
@@ -1,6 +1,6 @@
---
- name: install some useful packages
- yum: name={{ item }}
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
with_items:
- git
- python-pip
diff --git a/roles/ansible_tower_cli/tasks/main.yml b/roles/ansible_tower_cli/tasks/main.yml
index 41fac22a0..0c5163b50 100644
--- a/roles/ansible_tower_cli/tasks/main.yml
+++ b/roles/ansible_tower_cli/tasks/main.yml
@@ -1,6 +1,6 @@
---
- name: Install python-ansible-tower-cli
- yum: name=python-ansible-tower-cli
+ action: "{{ ansible_pkg_mgr }} name=python-ansible-tower-cli state=present"
- template:
src: tower_cli.cfg.j2
diff --git a/roles/cockpit/tasks/main.yml b/roles/cockpit/tasks/main.yml
index 875cbad21..b90e7dfd6 100644
--- a/roles/cockpit/tasks/main.yml
+++ b/roles/cockpit/tasks/main.yml
@@ -1,8 +1,6 @@
---
- name: Install cockpit-ws
- yum:
- name: "{{ item }}"
- state: present
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
with_items:
- cockpit-ws
- cockpit-shell
diff --git a/roles/copr_cli/tasks/main.yml b/roles/copr_cli/tasks/main.yml
index f7ef1c26e..4bfd551d3 100644
--- a/roles/copr_cli/tasks/main.yml
+++ b/roles/copr_cli/tasks/main.yml
@@ -1,4 +1,2 @@
---
-- yum:
- name: copr-cli
- state: present
+- action: "{{ ansible_pkg_mgr }} name=copr-cli state=present"
diff --git a/roles/docker/README.md b/roles/docker/README.md
index 225dd44b9..46f259eb7 100644
--- a/roles/docker/README.md
+++ b/roles/docker/README.md
@@ -1,38 +1,38 @@
Role Name
=========
-A brief description of the role goes here.
+Ensures docker package is installed, and optionally raises timeout for systemd-udevd.service to 5 minutes.
Requirements
------------
-Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
+None
Role Variables
--------------
-A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
+udevw_udevd_dir: location of systemd config for systemd-udevd.service
+docker_udev_workaround: raises udevd timeout to 5 minutes (https://bugzilla.redhat.com/show_bug.cgi?id=1272446)
Dependencies
------------
-A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
+None
Example Playbook
----------------
-Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
-
- hosts: servers
roles:
- - { role: username.rolename, x: 42 }
+ - role: docker
+ docker_udev_workaround: "true"
License
-------
-BSD
+ASL 2.0
Author Information
------------------
-An optional section for the role authors to include contact information, or a website (HTML is not allowed).
+OpenShift operations, Red Hat, Inc
diff --git a/roles/docker/handlers/main.yml b/roles/docker/handlers/main.yml
index eca7419c1..7d60f1891 100644
--- a/roles/docker/handlers/main.yml
+++ b/roles/docker/handlers/main.yml
@@ -2,3 +2,8 @@
- name: restart docker
service: name=docker state=restarted
+
+- name: restart udev
+ service:
+ name: systemd-udevd
+ state: restarted
diff --git a/roles/docker/meta/main.yml b/roles/docker/meta/main.yml
index c5c362c60..6e2c98601 100644
--- a/roles/docker/meta/main.yml
+++ b/roles/docker/meta/main.yml
@@ -1,124 +1,12 @@
---
galaxy_info:
- author: your name
- description:
- company: your company (optional)
- # Some suggested licenses:
- # - BSD (default)
- # - MIT
- # - GPLv2
- # - GPLv3
- # - Apache
- # - CC-BY
- license: license (GPLv2, CC-BY, etc)
+ author: OpenShift
+ description: docker package install
+ company: Red Hat, Inc
+ license: ASL 2.0
min_ansible_version: 1.2
- #
- # Below are all platforms currently available. Just uncomment
- # the ones that apply to your role. If you don't see your
- # platform on this list, let us know and we'll get it added!
- #
- #platforms:
- #- name: EL
- # versions:
- # - all
- # - 5
- # - 6
- # - 7
- #- name: GenericUNIX
- # versions:
- # - all
- # - any
- #- name: Fedora
- # versions:
- # - all
- # - 16
- # - 17
- # - 18
- # - 19
- # - 20
- #- name: opensuse
- # versions:
- # - all
- # - 12.1
- # - 12.2
- # - 12.3
- # - 13.1
- # - 13.2
- #- name: Amazon
- # versions:
- # - all
- # - 2013.03
- # - 2013.09
- #- name: GenericBSD
- # versions:
- # - all
- # - any
- #- name: FreeBSD
- # versions:
- # - all
- # - 8.0
- # - 8.1
- # - 8.2
- # - 8.3
- # - 8.4
- # - 9.0
- # - 9.1
- # - 9.1
- # - 9.2
- #- name: Ubuntu
- # versions:
- # - all
- # - lucid
- # - maverick
- # - natty
- # - oneiric
- # - precise
- # - quantal
- # - raring
- # - saucy
- # - trusty
- #- name: SLES
- # versions:
- # - all
- # - 10SP3
- # - 10SP4
- # - 11
- # - 11SP1
- # - 11SP2
- # - 11SP3
- #- name: GenericLinux
- # versions:
- # - all
- # - any
- #- name: Debian
- # versions:
- # - all
- # - etch
- # - lenny
- # - squeeze
- # - wheezy
- #
- # Below are all categories currently available. Just as with
- # the platforms above, uncomment those that apply to your role.
- #
- #categories:
- #- cloud
- #- cloud:ec2
- #- cloud:gce
- #- cloud:rax
- #- clustering
- #- database
- #- database:nosql
- #- database:sql
- #- development
- #- monitoring
- #- networking
- #- packaging
- #- system
- #- web
+ platforms:
+ - name: EL
+ versions:
+ - 7
dependencies: []
- # List your role dependencies here, one per line. Only
- # dependencies available via galaxy should be listed here.
- # Be sure to remove the '[]' above if you add dependencies
- # to this list.
-
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index 96949230d..e94ebe3e1 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -1,8 +1,10 @@
---
# tasks file for docker
- name: Install docker
- yum: pkg=docker
-
+ action: "{{ ansible_pkg_mgr }} name=docker state=present"
+
- name: enable and start the docker service
service: name=docker enabled=yes state=started
+- include: udev_workaround.yml
+ when: docker_udev_workaround | default(False)
diff --git a/roles/docker/tasks/udev_workaround.yml b/roles/docker/tasks/udev_workaround.yml
new file mode 100644
index 000000000..3c236f698
--- /dev/null
+++ b/roles/docker/tasks/udev_workaround.yml
@@ -0,0 +1,30 @@
+---
+
+- name: Getting current systemd-udevd exec command
+ command: grep -e "^ExecStart=" /lib/systemd/system/systemd-udevd.service
+ changed_when: false
+ register: udevw_udev_start_cmd
+
+- name: Assure systemd-udevd.service.d directory exists
+ file:
+ path: "{{ udevw_udevd_dir }}"
+ state: directory
+
+- name: Create systemd-udevd override file
+ copy:
+ content: |
+ [Service]
+ #Need blank ExecStart to "clear" pre-exising one
+ ExecStart=
+ {{ udevw_udev_start_cmd.stdout }} --event-timeout=300
+ dest: "{{ udevw_udevd_dir }}/override.conf"
+ owner: root
+ mode: "0644"
+ notify:
+ - restart udev
+ register: udevw_override_conf
+
+- name: reload systemd config files
+ command: systemctl daemon-reload
+ when: udevw_override_conf | changed
+
diff --git a/roles/docker/vars/main.yml b/roles/docker/vars/main.yml
new file mode 100644
index 000000000..162487545
--- /dev/null
+++ b/roles/docker/vars/main.yml
@@ -0,0 +1,3 @@
+---
+
+udevw_udevd_dir: /etc/systemd/system/systemd-udevd.service.d
diff --git a/roles/etcd/README.md b/roles/etcd/README.md
index 88e4ff874..329a926c0 100644
--- a/roles/etcd/README.md
+++ b/roles/etcd/README.md
@@ -7,7 +7,7 @@ Requirements
------------
This role assumes it's being deployed on a RHEL/Fedora based host with package
-named 'etcd' available via yum.
+named 'etcd' available via yum or dnf (conditionally).
Role Variables
--------------
diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml
index fcbdecd37..61892fe06 100644
--- a/roles/etcd/tasks/main.yml
+++ b/roles/etcd/tasks/main.yml
@@ -8,7 +8,7 @@
when: "'ipv4' not in hostvars[inventory_hostname]['ansible_' ~ etcd_interface] or 'address' not in hostvars[inventory_hostname]['ansible_' ~ etcd_interface].ipv4"
- name: Install etcd
- yum: pkg=etcd-2.* state=present
+ action: "{{ ansible_pkg_mgr }} name=etcd-2.* state=present"
- name: Validate permissions on the config dir
file:
diff --git a/roles/etcd_common/defaults/main.yml b/roles/etcd_common/defaults/main.yml
index 96f4b63af..3af509448 100644
--- a/roles/etcd_common/defaults/main.yml
+++ b/roles/etcd_common/defaults/main.yml
@@ -1,5 +1,5 @@
---
-etcd_peers_group: etcd
+etcd_peers_group: oo_etcd_to_config
# etcd server vars
etcd_conf_dir: /etc/etcd
diff --git a/roles/flannel/README.md b/roles/flannel/README.md
index b8aa830ac..8f271aada 100644
--- a/roles/flannel/README.md
+++ b/roles/flannel/README.md
@@ -7,7 +7,8 @@ Requirements
------------
This role assumes it's being deployed on a RHEL/Fedora based host with package
-named 'flannel' available via yum, in version superior to 0.3.
+named 'flannel' available via yum or dnf (conditionally), in version superior
+to 0.3.
Role Variables
--------------
diff --git a/roles/flannel/tasks/main.yml b/roles/flannel/tasks/main.yml
index acfb009ec..1e86176ea 100644
--- a/roles/flannel/tasks/main.yml
+++ b/roles/flannel/tasks/main.yml
@@ -1,7 +1,7 @@
---
- name: Install flannel
sudo: true
- yum: pkg=flannel state=present
+ action: "{{ ansible_pkg_mgr }} name=flannel state=present"
- name: Set flannel etcd url
sudo: true
diff --git a/roles/fluentd_master/tasks/main.yml b/roles/fluentd_master/tasks/main.yml
index 55cd94460..65c67fe8d 100644
--- a/roles/fluentd_master/tasks/main.yml
+++ b/roles/fluentd_master/tasks/main.yml
@@ -1,9 +1,7 @@
---
# TODO: Update fluentd install and configuration when packaging is complete
- name: download and install td-agent
- yum:
- name: 'http://packages.treasuredata.com/2/redhat/7/x86_64/td-agent-2.2.0-0.x86_64.rpm'
- state: present
+ action: "{{ ansible_pkg_mgr }} name='http://packages.treasuredata.com/2/redhat/7/x86_64/td-agent-2.2.0-0.x86_64.rpm' state=present"
- name: Verify fluentd plugin installed
command: '/opt/td-agent/embedded/bin/gem query -i fluent-plugin-kubernetes'
diff --git a/roles/fluentd_node/tasks/main.yml b/roles/fluentd_node/tasks/main.yml
index f9ef30b83..85488b55e 100644
--- a/roles/fluentd_node/tasks/main.yml
+++ b/roles/fluentd_node/tasks/main.yml
@@ -1,9 +1,7 @@
---
# TODO: Update fluentd install and configuration when packaging is complete
- name: download and install td-agent
- yum:
- name: 'http://packages.treasuredata.com/2/redhat/7/x86_64/td-agent-2.2.0-0.x86_64.rpm'
- state: present
+ action: "{{ ansible_pkg_mgr }} name='http://packages.treasuredata.com/2/redhat/7/x86_64/td-agent-2.2.0-0.x86_64.rpm' state=present"
- name: Verify fluentd plugin installed
command: '/opt/td-agent/embedded/bin/gem query -i fluent-plugin-kubernetes'
diff --git a/roles/haproxy/tasks/main.yml b/roles/haproxy/tasks/main.yml
index 5638b7313..106ab8489 100644
--- a/roles/haproxy/tasks/main.yml
+++ b/roles/haproxy/tasks/main.yml
@@ -1,8 +1,6 @@
---
- name: Install haproxy
- yum:
- pkg: haproxy
- state: present
+ action: "{{ ansible_pkg_mgr }} name=haproxy state=present"
- name: Configure haproxy
template:
diff --git a/roles/kube_nfs_volumes/tasks/main.yml b/roles/kube_nfs_volumes/tasks/main.yml
index d1dcf261a..2cc35844c 100644
--- a/roles/kube_nfs_volumes/tasks/main.yml
+++ b/roles/kube_nfs_volumes/tasks/main.yml
@@ -1,6 +1,6 @@
---
- name: Install pyparted (RedHat/Fedora)
- yum: name=pyparted,python-httplib2 state=present
+ action: "{{ ansible_pkg_mgr }} name=pyparted,python-httplib2 state=present"
- name: partition the drives
partitionpool: disks={{ disks }} force={{ force }} sizes={{ sizes }}
diff --git a/roles/kube_nfs_volumes/tasks/nfs.yml b/roles/kube_nfs_volumes/tasks/nfs.yml
index 559fcf17c..eaec28544 100644
--- a/roles/kube_nfs_volumes/tasks/nfs.yml
+++ b/roles/kube_nfs_volumes/tasks/nfs.yml
@@ -1,6 +1,6 @@
---
-- name: Install NFS server on Fedora/Red Hat
- yum: name=nfs-utils state=present
+- name: Install NFS server
+ action: "{{ ansible_pkg_mgr }} name=nfs-utils state=present"
- name: Start rpcbind on Fedora/Red Hat
service: name=rpcbind state=started enabled=yes
diff --git a/roles/lib_zabbix/library/zbx_action.py b/roles/lib_zabbix/library/zbx_action.py
index 24693e5db..c08bef4f7 100644
--- a/roles/lib_zabbix/library/zbx_action.py
+++ b/roles/lib_zabbix/library/zbx_action.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python
+# vim: expandtab:tabstop=4:shiftwidth=4
'''
Ansible module for zabbix actions
'''
-# vim: expandtab:tabstop=4:shiftwidth=4
#
# Zabbix action ansible module
#
@@ -30,6 +30,17 @@
# pylint: disable=import-error
from openshift_tools.monitoring.zbxapi import ZabbixAPI, ZabbixConnection, ZabbixAPIError
+CUSTOM_SCRIPT_ACTION = '0'
+IPMI_ACTION = '1'
+SSH_ACTION = '2'
+TELNET_ACTION = '3'
+GLOBAL_SCRIPT_ACTION = '4'
+
+EXECUTE_ON_ZABBIX_AGENT = '0'
+EXECUTE_ON_ZABBIX_SERVER = '1'
+
+OPERATION_REMOTE_COMMAND = '1'
+
def exists(content, key='result'):
''' Check if key exists in content or the size of content[key] > 0
'''
@@ -70,6 +81,40 @@ def filter_differences(zabbix_filters, user_filters):
return rval
+def host_in_zabbix(zab_hosts, usr_host):
+ ''' Check whether a particular user host is already in the
+ Zabbix list of hosts '''
+
+ for usr_hst_key, usr_hst_val in usr_host.items():
+ for zab_host in zab_hosts:
+ if usr_hst_key in zab_host and \
+ zab_host[usr_hst_key] == str(usr_hst_val):
+ return True
+
+ return False
+
+def hostlist_in_zabbix(zab_hosts, usr_hosts):
+ ''' Check whether user-provided list of hosts are already in
+ the Zabbix action '''
+
+ if len(zab_hosts) != len(usr_hosts):
+ return False
+
+ for usr_host in usr_hosts:
+ if not host_in_zabbix(zab_hosts, usr_host):
+ return False
+
+ return True
+
+def opcommand_diff(zab_op_cmd, usr_op_cmd):
+ ''' Check whether user-provided opcommand matches what's already
+ stored in Zabbix '''
+
+ for usr_op_cmd_key, usr_op_cmd_val in usr_op_cmd.items():
+ if zab_op_cmd[usr_op_cmd_key] != str(usr_op_cmd_val):
+ return True
+ return False
+
# This logic is quite complex. We are comparing two lists of dictionaries.
# The outer for-loops allow us to descend down into both lists at the same time
# and then walk over the key,val pairs of the incoming user dict's changes
@@ -116,6 +161,18 @@ def operation_differences(zabbix_ops, user_ops):
if usr_ids != zab_usr_ids:
rval[key] = val
+ elif key == 'opcommand':
+ if opcommand_diff(zab[key], val):
+ rval[key] = val
+ break
+
+ # opcommand_grp can be treated just like opcommand_hst
+ # as opcommand_grp[] is just a list of groups
+ elif key == 'opcommand_hst' or key == 'opcommand_grp':
+ if not hostlist_in_zabbix(zab[key], val):
+ rval[key] = val
+ break
+
elif zab[key] != str(val):
rval[key] = val
return rval
@@ -288,7 +345,7 @@ def get_condition_type(event_source, inc_condition):
def get_operation_type(inc_operation):
''' determine the correct operation type'''
o_types = {'send message': 0,
- 'remote command': 1,
+ 'remote command': OPERATION_REMOTE_COMMAND,
'add host': 2,
'remove host': 3,
'add to host group': 4,
@@ -301,7 +358,64 @@ def get_operation_type(inc_operation):
return o_types[inc_operation]
-def get_action_operations(zapi, inc_operations):
+def get_opcommand_type(opcommand_type):
+ ''' determine the opcommand type '''
+ oc_types = {'custom script': CUSTOM_SCRIPT_ACTION,
+ 'IPMI': IPMI_ACTION,
+ 'SSH': SSH_ACTION,
+ 'Telnet': TELNET_ACTION,
+ 'global script': GLOBAL_SCRIPT_ACTION,
+ }
+
+ return oc_types[opcommand_type]
+
+def get_execute_on(execute_on):
+ ''' determine the execution target '''
+ e_types = {'zabbix agent': EXECUTE_ON_ZABBIX_AGENT,
+ 'zabbix server': EXECUTE_ON_ZABBIX_SERVER,
+ }
+
+ return e_types[execute_on]
+
+def action_remote_command(ansible_module, zapi, operation):
+ ''' Process remote command type of actions '''
+
+ if 'type' not in operation['opcommand']:
+ ansible_module.exit_json(failed=True, changed=False, state='unknown',
+ results="No Operation Type provided")
+
+ operation['opcommand']['type'] = get_opcommand_type(operation['opcommand']['type'])
+
+ if operation['opcommand']['type'] == CUSTOM_SCRIPT_ACTION:
+
+ if 'execute_on' in operation['opcommand']:
+ operation['opcommand']['execute_on'] = get_execute_on(operation['opcommand']['execute_on'])
+
+ # custom script still requires the target hosts/groups to be set
+ operation['opcommand_hst'] = []
+ operation['opcommand_grp'] = []
+ for usr_host in operation['target_hosts']:
+ if usr_host['target_type'] == 'zabbix server':
+ # 0 = target host local/current host
+ operation['opcommand_hst'].append({'hostid': 0})
+ elif usr_host['target_type'] == 'group':
+ group_name = usr_host['target']
+ gid = get_host_group_id_by_name(zapi, group_name)
+ operation['opcommand_grp'].append({'groupid': gid})
+ elif usr_host['target_type'] == 'host':
+ host_name = usr_host['target']
+ hid = get_host_id_by_name(zapi, host_name)
+ operation['opcommand_hst'].append({'hostid': hid})
+
+ # 'target_hosts' is just to make it easier to build zbx_actions
+ # not part of ZabbixAPI
+ del operation['target_hosts']
+ else:
+ ansible_module.exit_json(failed=True, changed=False, state='unknown',
+ results="Unsupported remote command type")
+
+
+def get_action_operations(ansible_module, zapi, inc_operations):
'''Convert the operations into syntax for api'''
for operation in inc_operations:
operation['operationtype'] = get_operation_type(operation['operationtype'])
@@ -315,9 +429,8 @@ def get_action_operations(zapi, inc_operations):
else:
operation['opmessage']['default_msg'] = 0
- # NOT supported for remote commands
- elif operation['operationtype'] == 1:
- continue
+ elif operation['operationtype'] == OPERATION_REMOTE_COMMAND:
+ action_remote_command(ansible_module, zapi, operation)
# Handle Operation conditions:
# Currently there is only 1 available which
@@ -457,14 +570,15 @@ def main():
if not exists(content):
module.exit_json(changed=False, state="absent")
- content = zapi.get_content(zbx_class_name, 'delete', [content['result'][0]['itemid']])
+ content = zapi.get_content(zbx_class_name, 'delete', [content['result'][0]['actionid']])
module.exit_json(changed=True, results=content['result'], state="absent")
# Create and Update
if state == 'present':
conditions = get_action_conditions(zapi, module.params['event_source'], module.params['conditions_filter'])
- operations = get_action_operations(zapi, module.params['operations'])
+ operations = get_action_operations(module, zapi,
+ module.params['operations'])
params = {'name': module.params['name'],
'esc_period': module.params['escalation_time'],
'eventsource': get_event_source(module.params['event_source']),
diff --git a/roles/nickhammond.logrotate/tasks/main.yml b/roles/nickhammond.logrotate/tasks/main.yml
index fda23e05e..0a0cf1fae 100644
--- a/roles/nickhammond.logrotate/tasks/main.yml
+++ b/roles/nickhammond.logrotate/tasks/main.yml
@@ -1,6 +1,6 @@
---
- name: nickhammond.logrotate | Install logrotate
- action: "{{ansible_pkg_mgr}} pkg=logrotate state=present"
+ action: "{{ ansible_pkg_mgr }} name=logrotate state=present"
- name: nickhammond.logrotate | Setup logrotate.d scripts
template:
diff --git a/roles/openshift_ansible_inventory/tasks/main.yml b/roles/openshift_ansible_inventory/tasks/main.yml
index f6919dada..4a0968686 100644
--- a/roles/openshift_ansible_inventory/tasks/main.yml
+++ b/roles/openshift_ansible_inventory/tasks/main.yml
@@ -1,7 +1,5 @@
---
-- yum:
- name: "{{ item }}"
- state: present
+- action: "{{ ansible_pkg_mgr }} name={{ item}} state=present"
with_items:
- openshift-ansible-inventory
- openshift-ansible-inventory-aws
diff --git a/roles/openshift_cluster_metrics/tasks/main.yml b/roles/openshift_cluster_metrics/tasks/main.yml
index 3938aba4c..9b7735e54 100644
--- a/roles/openshift_cluster_metrics/tasks/main.yml
+++ b/roles/openshift_cluster_metrics/tasks/main.yml
@@ -7,7 +7,7 @@
- name: Create InfluxDB Services
command: >
- {{ openshift.common.client_binary }} create -f
+ {{ openshift.common.client_binary }} create -f
/etc/openshift/cluster-metrics/influxdb.yaml
register: oex_influxdb_services
failed_when: "'already exists' not in oex_influxdb_services.stderr and oex_influxdb_services.rc != 0"
@@ -15,14 +15,14 @@
- name: Create Heapster Service Account
command: >
- {{ openshift.common.client_binary }} create -f
+ {{ openshift.common.client_binary }} create -f
/etc/openshift/cluster-metrics/heapster-serviceaccount.yaml
register: oex_heapster_serviceaccount
failed_when: "'already exists' not in oex_heapster_serviceaccount.stderr and oex_heapster_serviceaccount.rc != 0"
changed_when: false
- name: Add cluster-reader role to Heapster
- command: >
+ command: >
{{ openshift.common.admin_binary }} policy
add-cluster-role-to-user
cluster-reader
diff --git a/roles/openshift_common/tasks/main.yml b/roles/openshift_common/tasks/main.yml
index 55065b3de..c34f42838 100644
--- a/roles/openshift_common/tasks/main.yml
+++ b/roles/openshift_common/tasks/main.yml
@@ -14,6 +14,7 @@
cluster_id: "{{ openshift_cluster_id | default('default') }}"
debug_level: "{{ openshift_debug_level | default(2) }}"
hostname: "{{ openshift_hostname | default(None) }}"
+ install_examples: "{{ openshift_install_examples | default(True) }}"
ip: "{{ openshift_ip | default(None) }}"
public_hostname: "{{ openshift_public_hostname | default(None) }}"
public_ip: "{{ openshift_public_ip | default(None) }}"
@@ -22,6 +23,13 @@
deployment_type: "{{ openshift_deployment_type }}"
use_fluentd: "{{ openshift_use_fluentd | default(None) }}"
use_flannel: "{{ openshift_use_flannel | default(None) }}"
+ use_manageiq: "{{ openshift_use_manageiq | default(None) }}"
+
+- name: Install the base package for versioning
+ action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}{{ openshift_version | default('') }} state=present"
+
+- name: Set version facts
+ openshift_facts:
# For enterprise versions < 3.1 and origin versions < 1.1 we want to set the
# hostname by default.
diff --git a/roles/openshift_examples/README.md b/roles/openshift_examples/README.md
index 7d8735a0a..6ddbe7017 100644
--- a/roles/openshift_examples/README.md
+++ b/roles/openshift_examples/README.md
@@ -11,6 +11,13 @@ ansible.
Requirements
------------
+Facts
+-----
+
+| Name | Default Value | Description |
+-----------------------------|---------------|----------------------------------------|
+| openshift_install_examples | true | Runs the role with the below variables |
+
Role Variables
--------------
@@ -32,7 +39,7 @@ Example Playbook
TODO
----
Currently we use `oc create -f` against various files and we accept non zero return code as a success
-if (and only iff) stderr also contains the string 'already exists'. This means that if one object in the file exists already
+if (and only if) stderr also contains the string 'already exists'. This means that if one object in the file exists already
but others fail to create you won't be aware of the failure. This also means that we do not currently support
updating existing objects.
diff --git a/roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-centos7-v1-0.json b/roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-centos7-v1-0.json
deleted file mode 100644
index 268d680f4..000000000
--- a/roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-centos7-v1-0.json
+++ /dev/null
@@ -1,285 +0,0 @@
-{
- "kind": "ImageStreamList",
- "apiVersion": "v1",
- "metadata": {},
- "items": [
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "ruby",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "openshift/ruby-20-centos7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "2.0",
- "annotations": {
- "description": "Build and run Ruby 2.0 applications",
- "iconClass": "icon-ruby",
- "tags": "builder,ruby",
- "supports": "ruby:2.0,ruby",
- "version": "2.0",
- "sampleRepo": "https://github.com/openshift/ruby-ex.git"
- },
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "nodejs",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "openshift/nodejs-010-centos7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "0.10",
- "annotations": {
- "description": "Build and run NodeJS 0.10 applications",
- "iconClass": "icon-nodejs",
- "tags": "builder,nodejs",
- "supports":"nodejs:0.10,nodejs:0.1,nodejs",
- "version": "0.10",
- "sampleRepo": "https://github.com/openshift/nodejs-ex.git"
- },
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "perl",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "openshift/perl-516-centos7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "5.16",
- "annotations": {
- "description": "Build and run Perl 5.16 applications",
- "iconClass": "icon-perl",
- "tags": "builder,perl",
- "supports":"perl:5.16,perl",
- "version": "5.16",
- "sampleRepo": "https://github.com/openshift/dancer-ex.git"
- },
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "php",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "openshift/php-55-centos7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "5.5",
- "annotations": {
- "description": "Build and run PHP 5.5 applications",
- "iconClass": "icon-php",
- "tags": "builder,php",
- "supports":"php:5.5,php",
- "version": "5.5",
- "sampleRepo": "https://github.com/openshift/cakephp-ex.git"
- },
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "python",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "openshift/python-33-centos7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "3.3",
- "annotations": {
- "description": "Build and run Python 3.3 applications",
- "iconClass": "icon-python",
- "tags": "builder,python",
- "supports":"python:3.3,python",
- "version": "3.3",
- "sampleRepo": "https://github.com/openshift/django-ex.git"
- },
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "wildfly",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "openshift/wildfly-81-centos7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "8.1",
- "annotations": {
- "description": "Build and run Java applications on Wildfly 8.1",
- "iconClass": "icon-wildfly",
- "tags": "builder,wildfly,java",
- "supports":"wildfly:8.1,jee,java",
- "version": "8.1",
- "sampleRepo": "https://github.com/bparees/openshift-jee-sample.git"
- },
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "mysql",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "openshift/mysql-55-centos7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "5.5",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "postgresql",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "openshift/postgresql-92-centos7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "9.2",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "mongodb",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "openshift/mongodb-24-centos7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "2.4",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "jenkins",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "openshift/jenkins-1-centos7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "1",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- }
- ]
-}
diff --git a/roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-centos7.json b/roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-centos7.json
index 1a78b1279..268d680f4 100644
--- a/roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-centos7.json
+++ b/roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-centos7.json
@@ -11,13 +11,10 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "openshift/ruby-20-centos7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "2.0"
- }
+ "name": "latest"
},
{
"name": "2.0",
@@ -30,23 +27,8 @@
"sampleRepo": "https://github.com/openshift/ruby-ex.git"
},
"from": {
- "Kind": "DockerImage",
- "Name": "openshift/ruby-20-centos7:latest"
- }
- },
- {
- "name": "2.2",
- "annotations": {
- "description": "Build and run Ruby 2.2 applications",
- "iconClass": "icon-ruby",
- "tags": "builder,ruby",
- "supports": "ruby:2.2,ruby",
- "version": "2.2",
- "sampleRepo": "https://github.com/openshift/ruby-ex.git"
- },
- "from": {
- "Kind": "DockerImage",
- "Name": "centos/ruby-22-centos7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -60,13 +42,10 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "openshift/nodejs-010-centos7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "0.10"
- }
+ "name": "latest"
},
{
"name": "0.10",
@@ -79,8 +58,8 @@
"sampleRepo": "https://github.com/openshift/nodejs-ex.git"
},
"from": {
- "Kind": "DockerImage",
- "Name": "openshift/nodejs-010-centos7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -94,13 +73,10 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "openshift/perl-516-centos7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "5.16"
- }
+ "name": "latest"
},
{
"name": "5.16",
@@ -113,25 +89,9 @@
"sampleRepo": "https://github.com/openshift/dancer-ex.git"
},
"from": {
- "Kind": "DockerImage",
- "Name": "openshift/perl-516-centos7:latest"
- }
- },
- {
- "name": "5.20",
- "annotations": {
- "description": "Build and run Perl 5.20 applications",
- "iconClass": "icon-perl",
- "tags": "builder,perl",
- "supports":"perl:5.20,perl",
- "version": "5.20",
- "sampleRepo": "https://github.com/openshift/dancer-ex.git"
- },
- "from": {
- "Kind": "DockerImage",
- "Name": "centos/perl-520-centos7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
-
}
]
}
@@ -144,13 +104,10 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "openshift/php-55-centos7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "5.5"
- }
+ "name": "latest"
},
{
"name": "5.5",
@@ -163,23 +120,8 @@
"sampleRepo": "https://github.com/openshift/cakephp-ex.git"
},
"from": {
- "Kind": "DockerImage",
- "Name": "openshift/php-55-centos7:latest"
- }
- },
- {
- "name": "5.6",
- "annotations": {
- "description": "Build and run PHP 5.6 applications",
- "iconClass": "icon-php",
- "tags": "builder,php",
- "supports":"php:5.6,php",
- "version": "5.6",
- "sampleRepo": "https://github.com/openshift/cakephp-ex.git"
- },
- "from": {
- "Kind": "DockerImage",
- "Name": "centos/php-56-centos7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -193,13 +135,10 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "openshift/python-33-centos7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "3.3"
- }
+ "name": "latest"
},
{
"name": "3.3",
@@ -212,38 +151,8 @@
"sampleRepo": "https://github.com/openshift/django-ex.git"
},
"from": {
- "Kind": "DockerImage",
- "Name": "openshift/python-33-centos7:latest"
- }
- },
- {
- "name": "2.7",
- "annotations": {
- "description": "Build and run Python 2.7 applications",
- "iconClass": "icon-python",
- "tags": "builder,python",
- "supports":"python:2.7,python",
- "version": "2.7",
- "sampleRepo": "https://github.com/openshift/django-ex.git"
- },
- "from": {
- "Kind": "DockerImage",
- "Name": "centos/python-27-centos7:latest"
- }
- },
- {
- "name": "3.4",
- "annotations": {
- "description": "Build and run Python 3.4 applications",
- "iconClass": "icon-python",
- "tags": "builder,python",
- "supports":"python:3.4,python",
- "version": "3.4",
- "sampleRepo": "https://github.com/openshift/django-ex.git"
- },
- "from": {
- "Kind": "DockerImage",
- "Name": "centos/python-34-centos7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -257,13 +166,10 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "openshift/wildfly-81-centos7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "8.1"
- }
+ "name": "latest"
},
{
"name": "8.1",
@@ -276,8 +182,8 @@
"sampleRepo": "https://github.com/bparees/openshift-jee-sample.git"
},
"from": {
- "Kind": "DockerImage",
- "Name": "openshift/wildfly-81-centos7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -291,26 +197,16 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "openshift/mysql-55-centos7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "5.5"
- }
+ "name": "latest"
},
{
"name": "5.5",
"from": {
- "Kind": "DockerImage",
- "Name": "openshift/mysql-55-centos7:latest"
- }
- },
- {
- "name": "5.6",
- "from": {
- "Kind": "DockerImage",
- "Name": "centos/mysql-56-centos7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -324,26 +220,16 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "openshift/postgresql-92-centos7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "9.2"
- }
+ "name": "latest"
},
{
"name": "9.2",
"from": {
- "Kind": "DockerImage",
- "Name": "openshift/postgresql-92-centos7:latest"
- }
- },
- {
- "name": "9.4",
- "from": {
- "Kind": "DockerImage",
- "Name": "centos/postgresql-94-centos7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -357,26 +243,16 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "openshift/mongodb-24-centos7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "2.4"
- }
+ "name": "latest"
},
{
"name": "2.4",
"from": {
- "Kind": "DockerImage",
- "Name": "openshift/mongodb-24-centos7:latest"
- }
- },
- {
- "name": "2.6",
- "from": {
- "Kind": "DockerImage",
- "Name": "centos/mongodb-26-centos7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -390,19 +266,16 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "openshift/jenkins-1-centos7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "1"
- }
+ "name": "latest"
},
{
"name": "1",
"from": {
- "Kind": "DockerImage",
- "Name": "openshift/jenkins-1-centos7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
diff --git a/roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-rhel7-v1-0.json b/roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-rhel7-v1-0.json
deleted file mode 100644
index aa62ebd53..000000000
--- a/roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-rhel7-v1-0.json
+++ /dev/null
@@ -1,254 +0,0 @@
-{
- "kind": "ImageStreamList",
- "apiVersion": "v1",
- "metadata": {},
- "items": [
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "ruby",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/ruby-20-rhel7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "2.0",
- "annotations": {
- "description": "Build and run Ruby 2.0 applications",
- "iconClass": "icon-ruby",
- "tags": "builder,ruby",
- "supports": "ruby:2.0,ruby",
- "version": "2.0",
- "sampleRepo": "https://github.com/openshift/ruby-ex.git"
- },
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "nodejs",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/nodejs-010-rhel7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "0.10",
- "annotations": {
- "description": "Build and run NodeJS 0.10 applications",
- "iconClass": "icon-nodejs",
- "tags": "builder,nodejs",
- "supports":"nodejs:0.10,nodejs:0.1,nodejs",
- "version": "0.10",
- "sampleRepo": "https://github.com/openshift/nodejs-ex.git"
- },
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "perl",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/perl-516-rhel7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "5.16",
- "annotations": {
- "description": "Build and run Perl 5.16 applications",
- "iconClass": "icon-perl",
- "tags": "builder,perl",
- "supports":"perl:5.16,perl",
- "version": "5.16",
- "sampleRepo": "https://github.com/openshift/dancer-ex.git"
- },
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "php",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/php-55-rhel7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "5.5",
- "annotations": {
- "description": "Build and run PHP 5.5 applications",
- "iconClass": "icon-php",
- "tags": "builder,php",
- "supports":"php:5.5,php",
- "version": "5.5",
- "sampleRepo": "https://github.com/openshift/cakephp-ex.git"
- },
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "python",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/python-33-rhel7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "3.3",
- "annotations": {
- "description": "Build and run Python 3.3 applications",
- "iconClass": "icon-python",
- "tags": "builder,python",
- "supports":"python:3.3,python",
- "version": "3.3",
- "sampleRepo": "https://github.com/openshift/django-ex.git"
- },
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "mysql",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/mysql-55-rhel7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "5.5",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "postgresql",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/postgresql-92-rhel7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "9.2",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "mongodb",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/mongodb-24-rhel7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "2.4",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- },
- {
- "kind": "ImageStream",
- "apiVersion": "v1",
- "metadata": {
- "name": "jenkins",
- "creationTimestamp": null
- },
- "spec": {
- "dockerImageRepository": "registry.access.redhat.com/openshift3/jenkins-1-rhel7",
- "tags": [
- {
- "name": "latest"
- },
- {
- "name": "1",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "latest"
- }
- }
- ]
- }
- }
- ]
-}
diff --git a/roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-rhel7.json b/roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-rhel7.json
index d2a8cfb1d..aa62ebd53 100644
--- a/roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-rhel7.json
+++ b/roles/openshift_examples/files/examples/v1.0/image-streams/image-streams-rhel7.json
@@ -11,13 +11,10 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "registry.access.redhat.com/openshift3/ruby-20-rhel7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "2.0"
- }
+ "name": "latest"
},
{
"name": "2.0",
@@ -30,23 +27,8 @@
"sampleRepo": "https://github.com/openshift/ruby-ex.git"
},
"from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/openshift3/ruby-20-rhel7:latest"
- }
- },
- {
- "name": "2.2",
- "annotations": {
- "description": "Build and run Ruby 2.2 applications",
- "iconClass": "icon-ruby",
- "tags": "builder,ruby",
- "supports": "ruby:2.2,ruby",
- "version": "2.2",
- "sampleRepo": "https://github.com/openshift/ruby-ex.git"
- },
- "from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/rhscl/ruby-22-rhel7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -60,13 +42,10 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "registry.access.redhat.com/openshift3/nodejs-010-rhel7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "0.10"
- }
+ "name": "latest"
},
{
"name": "0.10",
@@ -79,8 +58,8 @@
"sampleRepo": "https://github.com/openshift/nodejs-ex.git"
},
"from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/openshift3/nodejs-010-rhel7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -94,13 +73,10 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "registry.access.redhat.com/openshift3/perl-516-rhel7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "5.16"
- }
+ "name": "latest"
},
{
"name": "5.16",
@@ -113,25 +89,9 @@
"sampleRepo": "https://github.com/openshift/dancer-ex.git"
},
"from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/openshift3/perl-516-rhel7:latest"
- }
- },
- {
- "name": "5.20",
- "annotations": {
- "description": "Build and run Perl 5.20 applications",
- "iconClass": "icon-perl",
- "tags": "builder,perl",
- "supports":"perl:5.20,perl",
- "version": "5.20",
- "sampleRepo": "https://github.com/openshift/dancer-ex.git"
- },
- "from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/rhscl/perl-520-rhel7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
-
}
]
}
@@ -144,13 +104,10 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "registry.access.redhat.com/openshift3/php-55-rhel7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "5.5"
- }
+ "name": "latest"
},
{
"name": "5.5",
@@ -163,23 +120,8 @@
"sampleRepo": "https://github.com/openshift/cakephp-ex.git"
},
"from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/openshift3/php-55-rhel7:latest"
- }
- },
- {
- "name": "5.6",
- "annotations": {
- "description": "Build and run PHP 5.6 applications",
- "iconClass": "icon-php",
- "tags": "builder,php",
- "supports":"php:5.6,php",
- "version": "5.6",
- "sampleRepo": "https://github.com/openshift/cakephp-ex.git"
- },
- "from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/rhscl/php-56-rhel7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -193,13 +135,10 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "registry.access.redhat.com/openshift3/python-33-rhel7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "3.3"
- }
+ "name": "latest"
},
{
"name": "3.3",
@@ -212,38 +151,8 @@
"sampleRepo": "https://github.com/openshift/django-ex.git"
},
"from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/openshift3/python-33-rhel7:latest"
- }
- },
- {
- "name": "2.7",
- "annotations": {
- "description": "Build and run Python 2.7 applications",
- "iconClass": "icon-python",
- "tags": "builder,python",
- "supports":"python:2.7,python",
- "version": "2.7",
- "sampleRepo": "https://github.com/openshift/django-ex.git"
- },
- "from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/rhscl/python-27-rhel7:latest"
- }
- },
- {
- "name": "3.4",
- "annotations": {
- "description": "Build and run Python 3.4 applications",
- "iconClass": "icon-python",
- "tags": "builder,python",
- "supports":"python:3.4,python",
- "version": "3.4",
- "sampleRepo": "https://github.com/openshift/django-ex.git"
- },
- "from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/rhscl/python-34-rhel7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -257,26 +166,16 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "registry.access.redhat.com/openshift3/mysql-55-rhel7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "5.5"
- }
+ "name": "latest"
},
{
"name": "5.5",
"from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/openshift3/mysql-55-rhel7:latest"
- }
- },
- {
- "name": "5.6",
- "from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/rhscl/mysql-56-rhel7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -290,26 +189,16 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "registry.access.redhat.com/openshift3/postgresql-92-rhel7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "9.2"
- }
+ "name": "latest"
},
{
"name": "9.2",
"from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/openshift3/postgresql-92-rhel7:latest"
- }
- },
- {
- "name": "9.4",
- "from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/rhscl/postgresql-94-rhel7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -323,26 +212,16 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "registry.access.redhat.com/openshift3/mongodb-24-rhel7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "2.4"
- }
+ "name": "latest"
},
{
"name": "2.4",
"from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/openshift3/mongodb-24-rhel7:latest"
- }
- },
- {
- "name": "2.6",
- "from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/rhscl/mongodb-26-rhel7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
@@ -356,19 +235,16 @@
"creationTimestamp": null
},
"spec": {
+ "dockerImageRepository": "registry.access.redhat.com/openshift3/jenkins-1-rhel7",
"tags": [
{
- "name": "latest",
- "from": {
- "Kind": "ImageStreamTag",
- "Name": "1"
- }
+ "name": "latest"
},
{
"name": "1",
"from": {
- "Kind": "DockerImage",
- "Name": "registry.access.redhat.com/openshift3/jenkins-1-rhel7:latest"
+ "Kind": "ImageStreamTag",
+ "Name": "latest"
}
}
]
diff --git a/roles/openshift_examples/files/examples/v1.0/infrastructure-templates/origin/metrics-deployer.yaml b/roles/openshift_examples/files/examples/v1.0/infrastructure-templates/origin/metrics-deployer.yaml
index d823b2587..3e9bcde5b 100644
--- a/roles/openshift_examples/files/examples/v1.0/infrastructure-templates/origin/metrics-deployer.yaml
+++ b/roles/openshift_examples/files/examples/v1.0/infrastructure-templates/origin/metrics-deployer.yaml
@@ -81,11 +81,11 @@ parameters:
-
description: 'Specify prefix for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1", set prefix "openshift/origin-"'
name: IMAGE_PREFIX
- value: "hawkular/"
+ value: "docker.io/openshift/origin-"
-
description: 'Specify version for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1", set version "v1.1"'
name: IMAGE_VERSION
- value: "0.7.0-SNAPSHOT"
+ value: "latest"
-
description: "Internal URL for the master, for authentication retrieval"
name: MASTER_URL
diff --git a/roles/openshift_examples/files/examples/v1.1/db-templates/README.md b/roles/openshift_examples/files/examples/v1.1/db-templates/README.md
new file mode 100644
index 000000000..b39abf8b9
--- /dev/null
+++ b/roles/openshift_examples/files/examples/v1.1/db-templates/README.md
@@ -0,0 +1,100 @@
+OpenShift 3 Database Examples
+=============================
+
+This directory contains example JSON templates to deploy databases in OpenShift.
+They can be used to immediately instantiate a database and expose it as a
+service in the current project, or to add a template that can be later used from
+the Web Console or the CLI.
+
+The examples can also be tweaked to create new templates.
+
+
+## Ephemeral x Persistent
+
+For each supported database, there are two template files.
+
+Files named `*-ephemeral-template.json` use
+"[emptyDir](https://docs.openshift.org/latest/dev_guide/volumes.html)" volumes
+for data storage, which means that data is lost after a pod restart.
+This is tolerable for experimenting, but not suitable for production use.
+
+The other templates, named `*-persistent-template.json`, use [persistent volume
+claims](https://docs.openshift.org/latest/architecture/additional_concepts/storage.html#persistent-volume-claims)
+to request persistent storage provided by [persistent
+volumes](https://docs.openshift.org/latest/architecture/additional_concepts/storage.html#persistent-volumes),
+that must have been created upfront.
+
+
+## Usage
+
+### Instantiating a new database service
+
+Use these instructions if you want to quickly deploy a new database service in
+your current project. Instantiate a new database service with this command:
+
+ $ oc new-app /path/to/template.json
+
+Replace `/path/to/template.json` with an appropriate path, that can be either a
+local path or an URL. Example:
+
+ $ oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/db-templates/mongodb-ephemeral-template.json
+ --> Deploying template mongodb-ephemeral for "https://raw.githubusercontent.com/openshift/origin/master/examples/db-templates/mongodb-ephemeral-template.json"
+ With parameters:
+ DATABASE_SERVICE_NAME=mongodb
+ MONGODB_USER=userJNX # generated
+ MONGODB_PASSWORD=tnEDilMVrgjp5AI2 # generated
+ MONGODB_DATABASE=sampledb
+ MONGODB_ADMIN_PASSWORD=8bYEs8OlNYhVyMBs # generated
+ --> Creating resources ...
+ Service "mongodb" created
+ DeploymentConfig "mongodb" created
+ --> Success
+ Run 'oc status' to view your app.
+
+The parameters listed in the output above can be tweaked by specifying values in
+the command line with the `-p` option:
+
+ $ oc new-app examples/db-templates/mongodb-ephemeral-template.json -p DATABASE_SERVICE_NAME=mydb -p MONGODB_USER=default
+ --> Deploying template mongodb-ephemeral for "examples/db-templates/mongodb-ephemeral-template.json"
+ With parameters:
+ DATABASE_SERVICE_NAME=mydb
+ MONGODB_USER=default
+ MONGODB_PASSWORD=RPvMbWlQFOevSowQ # generated
+ MONGODB_DATABASE=sampledb
+ MONGODB_ADMIN_PASSWORD=K7tIjDxDHHYCvFrJ # generated
+ --> Creating resources ...
+ Service "mydb" created
+ DeploymentConfig "mydb" created
+ --> Success
+ Run 'oc status' to view your app.
+
+Note that the persistent template requires an existing persistent volume,
+otherwise the deployment won't ever succeed.
+
+
+### Adding a database as a template
+
+Use these instructions if, instead of instantiating a service right away, you
+want to load the template into an OpenShift project so that it can be used
+later. Create the template with this command:
+
+ $ oc create -f /path/to/template.json
+
+Replace `/path/to/template.json` with an appropriate path, that can be either a
+local path or an URL. Example:
+
+ $ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/db-templates/mongodb-ephemeral-template.json
+ template "mongodb-ephemeral" created
+
+The new template is now available to use in the Web Console or with `oc
+new-app`.
+
+
+## More information
+
+The usage of each supported database image is further documented in the links
+below:
+
+- [MySQL](https://docs.openshift.org/latest/using_images/db_images/mysql.html)
+- [PostgreSQL](https://docs.openshift.org/latest/using_images/db_images/postgresql.html)
+- [MongoDB](https://docs.openshift.org/latest/using_images/db_images/mongodb.html)
diff --git a/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-ephemeral-template.json b/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-ephemeral-template.json
index 6b90fa54e..11767862d 100644
--- a/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-ephemeral-template.json
+++ b/roles/openshift_examples/files/examples/v1.1/db-templates/mongodb-ephemeral-template.json
@@ -55,7 +55,7 @@
{
"type": "ImageChange",
"imageChangeParams": {
- "automatic": true,
+ "automatic": false,
"containerNames": [
"mongodb"
],
diff --git a/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json b/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json
index b384a5992..84911d2d6 100644
--- a/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json
+++ b/roles/openshift_examples/files/examples/v1.1/db-templates/mysql-ephemeral-template.json
@@ -55,7 +55,7 @@
{
"type": "ImageChange",
"imageChangeParams": {
- "automatic": true,
+ "automatic": false,
"containerNames": [
"mysql"
],
diff --git a/roles/openshift_examples/files/examples/v1.1/db-templates/postgresql-ephemeral-template.json b/roles/openshift_examples/files/examples/v1.1/db-templates/postgresql-ephemeral-template.json
index 60d6b8519..9ee9364a9 100644
--- a/roles/openshift_examples/files/examples/v1.1/db-templates/postgresql-ephemeral-template.json
+++ b/roles/openshift_examples/files/examples/v1.1/db-templates/postgresql-ephemeral-template.json
@@ -55,7 +55,7 @@
{
"type": "ImageChange",
"imageChangeParams": {
- "automatic": true,
+ "automatic": false,
"containerNames": [
"postgresql"
],
diff --git a/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-centos7.json b/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-centos7.json
index 1a78b1279..51805d729 100644
--- a/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-centos7.json
+++ b/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-centos7.json
@@ -16,7 +16,7 @@
"name": "latest",
"from": {
"Kind": "ImageStreamTag",
- "Name": "2.0"
+ "Name": "2.2"
}
},
{
@@ -99,7 +99,7 @@
"name": "latest",
"from": {
"Kind": "ImageStreamTag",
- "Name": "5.16"
+ "Name": "5.20"
}
},
{
@@ -149,7 +149,7 @@
"name": "latest",
"from": {
"Kind": "ImageStreamTag",
- "Name": "5.5"
+ "Name": "5.6"
}
},
{
@@ -198,7 +198,7 @@
"name": "latest",
"from": {
"Kind": "ImageStreamTag",
- "Name": "3.3"
+ "Name": "3.4"
}
},
{
@@ -296,7 +296,7 @@
"name": "latest",
"from": {
"Kind": "ImageStreamTag",
- "Name": "5.5"
+ "Name": "5.6"
}
},
{
@@ -329,7 +329,7 @@
"name": "latest",
"from": {
"Kind": "ImageStreamTag",
- "Name": "9.2"
+ "Name": "9.4"
}
},
{
@@ -362,7 +362,7 @@
"name": "latest",
"from": {
"Kind": "ImageStreamTag",
- "Name": "2.4"
+ "Name": "2.6"
}
},
{
diff --git a/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-rhel7.json b/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-rhel7.json
index d2a8cfb1d..3092ee486 100644
--- a/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-rhel7.json
+++ b/roles/openshift_examples/files/examples/v1.1/image-streams/image-streams-rhel7.json
@@ -16,7 +16,7 @@
"name": "latest",
"from": {
"Kind": "ImageStreamTag",
- "Name": "2.0"
+ "Name": "2.2"
}
},
{
@@ -99,7 +99,7 @@
"name": "latest",
"from": {
"Kind": "ImageStreamTag",
- "Name": "5.16"
+ "Name": "5.20"
}
},
{
@@ -149,7 +149,7 @@
"name": "latest",
"from": {
"Kind": "ImageStreamTag",
- "Name": "5.5"
+ "Name": "5.6"
}
},
{
@@ -198,7 +198,7 @@
"name": "latest",
"from": {
"Kind": "ImageStreamTag",
- "Name": "3.3"
+ "Name": "3.4"
}
},
{
@@ -262,7 +262,7 @@
"name": "latest",
"from": {
"Kind": "ImageStreamTag",
- "Name": "5.5"
+ "Name": "5.6"
}
},
{
@@ -295,7 +295,7 @@
"name": "latest",
"from": {
"Kind": "ImageStreamTag",
- "Name": "9.2"
+ "Name": "9.4"
}
},
{
@@ -328,7 +328,7 @@
"name": "latest",
"from": {
"Kind": "ImageStreamTag",
- "Name": "2.4"
+ "Name": "2.6"
}
},
{
diff --git a/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/origin/metrics-deployer.yaml b/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/origin/metrics-deployer.yaml
index d823b2587..3e9bcde5b 100644
--- a/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/origin/metrics-deployer.yaml
+++ b/roles/openshift_examples/files/examples/v1.1/infrastructure-templates/origin/metrics-deployer.yaml
@@ -81,11 +81,11 @@ parameters:
-
description: 'Specify prefix for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1", set prefix "openshift/origin-"'
name: IMAGE_PREFIX
- value: "hawkular/"
+ value: "docker.io/openshift/origin-"
-
description: 'Specify version for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1", set version "v1.1"'
name: IMAGE_VERSION
- value: "0.7.0-SNAPSHOT"
+ value: "latest"
-
description: "Internal URL for the master, for authentication retrieval"
name: MASTER_URL
diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp-mysql.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp-mysql.json
index da5679444..52143da2d 100644
--- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp-mysql.json
+++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp-mysql.json
@@ -83,7 +83,7 @@
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
- "name": "php:5.5"
+ "name": "php:5.6"
}
}
},
@@ -98,6 +98,9 @@
"type": "ImageChange"
},
{
+ "type": "ConfigChange"
+ },
+ {
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
@@ -250,6 +253,20 @@
},
"triggers": [
{
+ "type": "ImageChange",
+ "imageChangeParams": {
+ "automatic": false,
+ "containerNames": [
+ "mysql"
+ ],
+ "from": {
+ "kind": "ImageStreamTag",
+ "namespace": "openshift",
+ "name": "mysql:5.6"
+ }
+ }
+ },
+ {
"type": "ConfigChange"
}
],
@@ -268,7 +285,7 @@
"containers": [
{
"name": "mysql",
- "image": "${MYSQL_IMAGE}",
+ "image": "mysql",
"ports": [
{
"containerPort": 3306
@@ -347,11 +364,6 @@
"from": "[a-zA-Z0-9]{16}"
},
{
- "name": "MYSQL_IMAGE",
- "description": "Image to use for mysql",
- "value": "openshift/mysql-55-centos7"
- },
- {
"name": "CAKEPHP_SECRET_TOKEN",
"description": "Set this to a long random string",
"generate": "expression",
diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp.json
index f426e1dd6..b77dc0c51 100644
--- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp.json
+++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/cakephp.json
@@ -83,7 +83,7 @@
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
- "name": "php:5.5"
+ "name": "php:5.6"
}
}
},
@@ -98,6 +98,9 @@
"type": "ImageChange"
},
{
+ "type": "ConfigChange"
+ },
+ {
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer-mysql.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer-mysql.json
index 55f655102..edc6a1f3f 100644
--- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer-mysql.json
+++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer-mysql.json
@@ -83,7 +83,7 @@
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
- "name": "perl:5.16"
+ "name": "perl:5.20"
}
}
},
@@ -98,6 +98,9 @@
"type": "ImageChange"
},
{
+ "type": "ConfigChange"
+ },
+ {
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
@@ -224,6 +227,20 @@
},
"triggers": [
{
+ "type": "ImageChange",
+ "imageChangeParams": {
+ "automatic": false,
+ "containerNames": [
+ "mysql"
+ ],
+ "from": {
+ "kind": "ImageStreamTag",
+ "namespace": "openshift",
+ "name": "mysql:5.6"
+ }
+ }
+ },
+ {
"type": "ConfigChange"
}
],
@@ -242,7 +259,7 @@
"containers": [
{
"name": "mysql",
- "image": "${MYSQL_IMAGE}",
+ "image": "mysql",
"ports": [
{
"containerPort": 3306
@@ -329,11 +346,6 @@
"value": "sampledb"
},
{
- "name": "MYSQL_IMAGE",
- "description": "Image to use for mysql",
- "value": "openshift/mysql-55-centos7"
- },
- {
"name": "PERL_APACHE2_RELOAD",
"description": "Set this to \"true\" to enable automatic reloading of modified Perl modules",
"value": ""
diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer.json
index 3ee19be83..409252d82 100644
--- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer.json
+++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/dancer.json
@@ -83,7 +83,7 @@
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
- "name": "perl:5.16"
+ "name": "perl:5.20"
}
}
},
@@ -98,6 +98,9 @@
"type": "ImageChange"
},
{
+ "type": "ConfigChange"
+ },
+ {
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django-postgresql.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django-postgresql.json
index 749064e98..c4c55ddd8 100644
--- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django-postgresql.json
+++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django-postgresql.json
@@ -83,7 +83,7 @@
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
- "name": "python:3.3"
+ "name": "python:3.4"
}
}
},
@@ -98,6 +98,9 @@
"type": "ImageChange"
},
{
+ "type": "ConfigChange"
+ },
+ {
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
@@ -231,6 +234,20 @@
},
"triggers": [
{
+ "type": "ImageChange",
+ "imageChangeParams": {
+ "automatic": false,
+ "containerNames": [
+ "postgresql"
+ ],
+ "from": {
+ "kind": "ImageStreamTag",
+ "namespace": "openshift",
+ "name": "postgresql:9.4"
+ }
+ }
+ },
+ {
"type": "ConfigChange"
}
],
@@ -249,7 +266,7 @@
"containers": [
{
"name": "postgresql",
- "image": "${POSTGRESQL_IMAGE}",
+ "image": "postgresql",
"ports": [
{
"containerPort": 5432
@@ -328,11 +345,6 @@
"from": "[a-zA-Z0-9]{16}"
},
{
- "name": "POSTGRESQL_IMAGE",
- "description": "Image to use for postgresql",
- "value": "openshift/postgresql-92-centos7"
- },
- {
"name": "APP_CONFIG",
"description": "Relative path to Gunicorn configuration file (optional)"
},
diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django.json
index 143a942ab..75b6798b5 100644
--- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django.json
+++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/django.json
@@ -83,7 +83,7 @@
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
- "name": "python:3.3"
+ "name": "python:3.4"
}
}
},
@@ -98,6 +98,9 @@
"type": "ImageChange"
},
{
+ "type": "ConfigChange"
+ },
+ {
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-ephemeral-template.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-ephemeral-template.json
index 14bd032af..0b016373f 100644
--- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-ephemeral-template.json
+++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-ephemeral-template.json
@@ -7,7 +7,7 @@
"annotations": {
"description": "Jenkins service, without persistent storage. WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
"iconClass": "icon-jenkins",
- "tags": "database,jenkins"
+ "tags": "instant-app,jenkins"
}
},
"objects": [
@@ -70,6 +70,21 @@
},
"triggers": [
{
+ "type": "ImageChange",
+ "imageChangeParams": {
+ "automatic": false,
+ "containerNames": [
+ "jenkins"
+ ],
+ "from": {
+ "kind": "ImageStreamTag",
+ "name": "jenkins:latest",
+ "namespace": "openshift"
+ },
+ "lastTriggeredImage": ""
+ }
+ },
+ {
"type": "ConfigChange"
}
],
@@ -133,11 +148,6 @@
"value": "jenkins"
},
{
- "name": "JENKINS_IMAGE",
- "description": "Jenkins Docker image to use",
- "value": "openshift/jenkins-1-centos7"
- },
- {
"name": "JENKINS_PASSWORD",
"description": "Password for the Jenkins user",
"generate": "expression",
diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-persistent-template.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-persistent-template.json
index fa31de486..98f0cea95 100644
--- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-persistent-template.json
+++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/jenkins-persistent-template.json
@@ -7,7 +7,7 @@
"annotations": {
"description": "Jenkins service, with persistent storage.",
"iconClass": "icon-jenkins",
- "tags": "database,jenkins"
+ "tags": "instant-app,jenkins"
}
},
"objects": [
@@ -87,6 +87,21 @@
},
"triggers": [
{
+ "type": "ImageChange",
+ "imageChangeParams": {
+ "automatic": true,
+ "containerNames": [
+ "jenkins"
+ ],
+ "from": {
+ "kind": "ImageStreamTag",
+ "name": "jenkins:latest",
+ "namespace": "openshift"
+ },
+ "lastTriggeredImage": ""
+ }
+ },
+ {
"type": "ConfigChange"
}
],
@@ -156,11 +171,6 @@
"value": "password"
},
{
- "name": "JENKINS_IMAGE",
- "description": "Jenkins Docker image to use",
- "value": "openshift/jenkins-1-centos7"
- },
- {
"name": "VOLUME_CAPACITY",
"description": "Volume space available for data, e.g. 512Mi, 2Gi",
"value": "512Mi",
diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs-mongodb.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs-mongodb.json
index 8760b074c..21f943da7 100644
--- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs-mongodb.json
+++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs-mongodb.json
@@ -98,6 +98,9 @@
"type": "ImageChange"
},
{
+ "type": "ConfigChange"
+ },
+ {
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
@@ -229,6 +232,20 @@
},
"triggers": [
{
+ "type": "ImageChange",
+ "imageChangeParams": {
+ "automatic": false,
+ "containerNames": [
+ "mongodb"
+ ],
+ "from": {
+ "kind": "ImageStreamTag",
+ "namespace": "openshift",
+ "name": "mongodb:2.6"
+ }
+ }
+ },
+ {
"type": "ConfigChange"
}
],
@@ -247,7 +264,7 @@
"containers": [
{
"name": "mongodb",
- "image": "${MONGODB_IMAGE}",
+ "image": "mongodb",
"ports": [
{
"containerPort": 27017
@@ -336,11 +353,6 @@
"description": "Password for the database admin user",
"generate": "expression",
"from": "[a-zA-Z0-9]{16}"
- },
- {
- "name": "MONGODB_IMAGE",
- "description": "Image to use for mongodb",
- "value": "openshift/mongodb-24-centos7"
}
]
}
diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs.json
index e047266e3..1e301c076 100644
--- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs.json
+++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/nodejs.json
@@ -98,6 +98,9 @@
"type": "ImageChange"
},
{
+ "type": "ConfigChange"
+ },
+ {
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
diff --git a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/rails-postgresql.json b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/rails-postgresql.json
index b98282528..5dcbbc729 100644
--- a/roles/openshift_examples/files/examples/v1.1/quickstart-templates/rails-postgresql.json
+++ b/roles/openshift_examples/files/examples/v1.1/quickstart-templates/rails-postgresql.json
@@ -83,7 +83,7 @@
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
- "name": "ruby:2.0"
+ "name": "ruby:2.2"
}
}
},
@@ -98,6 +98,9 @@
"type": "ImageChange"
},
{
+ "type": "ConfigChange"
+ },
+ {
"type": "GitHub",
"github": {
"secret": "${GITHUB_WEBHOOK_SECRET}"
@@ -262,6 +265,20 @@
},
"triggers": [
{
+ "type": "ImageChange",
+ "imageChangeParams": {
+ "automatic": false,
+ "containerNames": [
+ "postgresql"
+ ],
+ "from": {
+ "kind": "ImageStreamTag",
+ "namespace": "openshift",
+ "name": "postgresql:9.4"
+ }
+ }
+ },
+ {
"type": "ConfigChange"
}
],
@@ -280,7 +297,7 @@
"containers": [
{
"name": "postgresql",
- "image": "${POSTGRESQL_IMAGE}",
+ "image": "postgresql",
"ports": [
{
"containerPort": 5432
@@ -384,14 +401,9 @@
"value": "root"
},
{
- "name": "POSTGRESQL_IMAGE",
- "description": "Image to use for postgresql",
- "value": "openshift/postgresql-92-centos7"
- },
- {
"name": "POSTGRESQL_MAX_CONNECTIONS",
"description": "database max connections",
- "value": "10"
+ "value": "100"
},
{
"name": "POSTGRESQL_SHARED_BUFFERS",
diff --git a/roles/openshift_expand_partition/README.md b/roles/openshift_expand_partition/README.md
index cd394e1ba..aed4ec871 100644
--- a/roles/openshift_expand_partition/README.md
+++ b/roles/openshift_expand_partition/README.md
@@ -8,7 +8,7 @@ partition, and then expanding the file system on the partition.
* A machine with a disk that is not fully utilized
-* cloud-utils-growpart rpm (either installed or avialable via yum)
+* cloud-utils-growpart rpm (either installed or avialable via yum or dnf)
* The partition you are expanding needs to be at the end of the partition list
diff --git a/roles/openshift_expand_partition/tasks/main.yml b/roles/openshift_expand_partition/tasks/main.yml
index 8bc399070..84d859553 100644
--- a/roles/openshift_expand_partition/tasks/main.yml
+++ b/roles/openshift_expand_partition/tasks/main.yml
@@ -1,6 +1,6 @@
---
- name: Ensure growpart is installed
- yum: pkg=cloud-utils-growpart state=present
+ action: "{{ ansible_pkg_mgr }} name=cloud-utils-growpart state=present"
- name: Grow the partitions
command: "growpart {{oep_drive}} {{oep_partition}}"
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index b60e42c71..e557853b1 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -528,9 +528,9 @@ def set_aggregate_facts(facts):
internal_hostnames.add(facts['common']['hostname'])
internal_hostnames.add(facts['common']['ip'])
+ cluster_domain = facts['common']['dns_domain']
+
if 'master' in facts:
- # FIXME: not sure why but facts['dns']['domain'] fails
- cluster_domain = 'cluster.local'
if 'cluster_hostname' in facts['master']:
all_hostnames.add(facts['master']['cluster_hostname'])
if 'cluster_public_hostname' in facts['master']:
@@ -623,7 +623,7 @@ def set_deployment_facts_if_unset(facts):
service_type = 'atomic-openshift'
if deployment_type == 'origin':
service_type = 'origin'
- elif deployment_type in ['enterprise', 'online']:
+ elif deployment_type in ['enterprise']:
service_type = 'openshift'
facts['common']['service_type'] = service_type
if 'config_base' not in facts['common']:
@@ -985,7 +985,7 @@ class OpenShiftFacts(object):
Raises:
OpenShiftFactsUnsupportedRoleError:
"""
- known_roles = ['common', 'master', 'node', 'master_sdn', 'node_sdn', 'dns', 'etcd']
+ known_roles = ['common', 'master', 'node', 'master_sdn', 'node_sdn', 'etcd']
def __init__(self, role, filename, local_facts, additive_facts_to_overwrite=False):
self.changed = False
@@ -1053,9 +1053,11 @@ class OpenShiftFacts(object):
common = dict(use_openshift_sdn=True, ip=ip_addr, public_ip=ip_addr,
deployment_type='origin', hostname=hostname,
- public_hostname=hostname)
+ public_hostname=hostname, use_manageiq=False)
common['client_binary'] = 'oc' if os.path.isfile('/usr/bin/oc') else 'osc'
common['admin_binary'] = 'oadm' if os.path.isfile('/usr/bin/oadm') else 'osadm'
+ common['dns_domain'] = 'cluster.local'
+ common['install_examples'] = True
defaults['common'] = common
if 'master' in roles:
@@ -1076,7 +1078,6 @@ class OpenShiftFacts(object):
node = dict(labels={}, annotations={}, portal_net='172.30.0.0/16',
iptables_sync_period='5s', set_node_ip=False)
defaults['node'] = node
-
return defaults
def guess_host_provider(self):
diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml
index 913f0dc78..832f7ad84 100644
--- a/roles/openshift_facts/tasks/main.yml
+++ b/roles/openshift_facts/tasks/main.yml
@@ -7,9 +7,7 @@
- ansible_version | version_compare('1.9.0.1', 'ne')
- name: Ensure PyYaml is installed
- yum: pkg={{ item }} state=installed
- with_items:
- - PyYAML
+ action: "{{ ansible_pkg_mgr }} name=PyYAML state=present"
- name: Gather Cluster facts
openshift_facts:
diff --git a/roles/openshift_manageiq/tasks/main.yaml b/roles/openshift_manageiq/tasks/main.yaml
new file mode 100644
index 000000000..2d3187e21
--- /dev/null
+++ b/roles/openshift_manageiq/tasks/main.yaml
@@ -0,0 +1,50 @@
+---
+- name: Copy Configuration to temporary conf
+ command: >
+ cp {{ openshift.common.config_base }}/master/admin.kubeconfig {{manage_iq_tmp_conf}}
+ changed_when: false
+
+- name: Add Managment Infrastructure project
+ command: >
+ {{ openshift.common.admin_binary }} new-project
+ management-infra
+ --description="Management Infrastructure"
+ --config={{manage_iq_tmp_conf}}
+ register: osmiq_create_mi_project
+ failed_when: "'already exists' not in osmiq_create_mi_project.stderr and osmiq_create_mi_project.rc != 0"
+ changed_when: osmiq_create_mi_project.rc == 0
+
+- name: Create Service Account
+ shell: >
+ echo {{ manageiq_service_account | to_json | quote }} |
+ {{ openshift.common.client_binary }} create
+ -n management-infra
+ --config={{manage_iq_tmp_conf}}
+ -f -
+ register: osmiq_create_service_account
+ failed_when: "'already exists' not in osmiq_create_service_account.stderr and osmiq_create_service_account.rc != 0"
+ changed_when: osmiq_create_service_account.rc == 0
+
+- name: Create Cluster Role
+ shell: >
+ echo {{ manageiq_cluster_role | to_json | quote }} |
+ {{ openshift.common.client_binary }} create
+ --config={{manage_iq_tmp_conf}}
+ -f -
+ register: osmiq_create_cluster_role
+ failed_when: "'already exists' not in osmiq_create_cluster_role.stderr and osmiq_create_cluster_role.rc != 0"
+ changed_when: osmiq_create_cluster_role.rc == 0
+
+- name: Configure role/user permissions
+ command: >
+ {{ openshift.common.admin_binary }} {{item}}
+ --config={{manage_iq_tmp_conf}}
+ with_items: "{{manage_iq_tasks}}"
+ register: osmiq_perm_task
+ failed_when: "'already exists' not in osmiq_perm_task.stderr and osmiq_perm_task.rc != 0"
+ changed_when: osmiq_perm_task.rc == 0
+
+- name: Clean temporary configuration file
+ command: >
+ rm -f {{manage_iq_tmp_conf}}
+ changed_when: false
diff --git a/roles/openshift_manageiq/vars/main.yml b/roles/openshift_manageiq/vars/main.yml
new file mode 100644
index 000000000..77e1c304b
--- /dev/null
+++ b/roles/openshift_manageiq/vars/main.yml
@@ -0,0 +1,24 @@
+manageiq_cluster_role:
+ apiVersion: v1
+ kind: ClusterRole
+ metadata:
+ name: management-infra-admin
+ rules:
+ - resources:
+ - pods/proxy
+ verbs:
+ - '*'
+
+manageiq_service_account:
+ apiVersion: v1
+ kind: ServiceAccount
+ metadata:
+ name: management-admin
+
+manage_iq_tmp_conf: /tmp/manageiq_admin.kubeconfig
+
+manage_iq_tasks:
+ - policy add-role-to-user -n management-infra admin -z management-admin
+ - policy add-role-to-user -n management-infra management-infra-admin -z management-admin
+ - policy add-cluster-role-to-user cluster-reader system:serviceaccount:management-infra:management-admin
+ - policy add-scc-to-user privileged system:serviceaccount:management-infra:management-admin
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 2cf2a53c4..bd3d8f90c 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -78,17 +78,10 @@
controller_lease_ttl: "{{ osm_controller_lease_ttl | default(None) }}"
- name: Install Master package
- yum: pkg={{ openshift.common.service_type }}-master{{ openshift_version }} state=present
- register: install_result
+ action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-master{{ openshift_version }} state=present"
-# TODO: These values need to be configurable
-- name: Set dns facts
+- name: Re-gather package dependent master facts
openshift_facts:
- role: dns
- local_facts:
- ip: "{{ openshift_master_cluster_vip | default(openshift.common.ip, true) | default(None) }}"
- domain: cluster.local
- when: openshift.master.embedded_dns
- name: Create config parent directory if it does not exist
file:
@@ -117,8 +110,8 @@
- restart master controllers
- name: Install httpd-tools if needed
- yum: pkg=httpd-tools state=present
- when: item.kind == 'HTPasswdPasswordIdentityProvider'
+ action: "{{ ansible_pkg_mgr }} name=httpd-tools state=present"
+ when: (item.kind == 'HTPasswdPasswordIdentityProvider')
with_items: openshift.master.identity_providers
- name: Ensure htpasswd directory exists
@@ -262,7 +255,7 @@
when: openshift_master_ha | bool and openshift.master.cluster_method == 'native'
- name: Install cluster packages
- yum: pkg=pcs state=present
+ action: "{{ ansible_pkg_mgr }} name=pcs state=present"
when: openshift_master_ha | bool and openshift.master.cluster_method == 'pacemaker'
register: install_result
diff --git a/roles/openshift_master/templates/master.yaml.v1.j2 b/roles/openshift_master/templates/master.yaml.v1.j2
index 9f4a17f0a..cadb02fa3 100644
--- a/roles/openshift_master/templates/master.yaml.v1.j2
+++ b/roles/openshift_master/templates/master.yaml.v1.j2
@@ -83,7 +83,7 @@ kubernetesMasterConfig:
{% endif %}
apiServerArguments: {{ api_server_args if api_server_args is defined else 'null' }}
controllerArguments: {{ controller_args if controller_args is defined else 'null' }}
- masterCount: {{ openshift.master.master_count }}
+ masterCount: {{ openshift.master.master_count if openshift.master.cluster_method | default(None) == 'native' else 1 }}
masterIP: {{ openshift.common.ip }}
podEvictionTimeout: ""
proxyClientInfo:
diff --git a/roles/openshift_master_ca/tasks/main.yml b/roles/openshift_master_ca/tasks/main.yml
index 314f068e7..0db95a4eb 100644
--- a/roles/openshift_master_ca/tasks/main.yml
+++ b/roles/openshift_master_ca/tasks/main.yml
@@ -1,7 +1,6 @@
---
- name: Install the base package for admin tooling
- yum: pkg={{ openshift.common.service_type }}{{ openshift_version }} state=present
- register: install_result
+ action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}{{ openshift_version }} state=present"
- name: Reload generated facts
openshift_facts:
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index 42d984a09..eef7bec9a 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -1,12 +1,6 @@
---
# TODO: allow for overriding default ports where possible
- fail:
- msg: This role requres that osn_cluster_dns_domain is set
- when: osn_cluster_dns_domain is not defined or not osn_cluster_dns_domain
-- fail:
- msg: This role requres that osn_cluster_dns_ip is set
- when: osn_cluster_dns_ip is not defined or not osn_cluster_dns_ip
-- fail:
msg: "SELinux is disabled, This deployment type requires that SELinux is enabled."
when: (not ansible_selinux or ansible_selinux.status != 'enabled') and deployment_type in ['enterprise', 'online', 'atomic-enterprise', 'openshift-enterprise']
@@ -20,6 +14,10 @@
hostname: "{{ openshift_hostname | default(none) }}"
public_hostname: "{{ openshift_public_hostname | default(none) }}"
deployment_type: "{{ openshift_deployment_type }}"
+ # TODO: Replace this with a lookup or filter plugin.
+ dns_ip: "{{ openshift_dns_ip
+ | default(openshift_master_cluster_vip
+ | default(None if openshift.common.version_greater_than_3_1_or_1_1 | bool else openshift_node_first_master_ip | default(None, true), true), true) }}"
- role: node
local_facts:
annotations: "{{ openshift_node_annotations | default(none) }}"
@@ -39,12 +37,10 @@
# We have to add tuned-profiles in the same transaction otherwise we run into depsolving
# problems because the rpms don't pin the version properly.
- name: Install Node package
- yum: pkg={{ openshift.common.service_type }}-node{{ openshift_version }},tuned-profiles-{{ openshift.common.service_type }}-node{{ openshift_version }} state=present
- register: node_install_result
+ action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-node{{ openshift_version }},tuned-profiles-{{ openshift.common.service_type }}-node{{ openshift_version }} state=present"
- name: Install sdn-ovs package
- yum: pkg={{ openshift.common.service_type }}-sdn-ovs{{ openshift_version }} state=present
- register: sdn_install_result
+ action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-sdn-ovs{{ openshift_version }} state=present"
when: openshift.common.use_openshift_sdn
# TODO: add the validate parameter when there is a validation command to run
diff --git a/roles/openshift_node/tasks/storage_plugins/ceph.yml b/roles/openshift_node/tasks/storage_plugins/ceph.yml
index b6936618a..10d0990a0 100644
--- a/roles/openshift_node/tasks/storage_plugins/ceph.yml
+++ b/roles/openshift_node/tasks/storage_plugins/ceph.yml
@@ -1,5 +1,3 @@
---
- name: Install Ceph storage plugin dependencies
- yum:
- pkg: ceph-common
- state: installed
+ action: "{{ ansible_pkg_mgr }} name=ceph-common state=present" \ No newline at end of file
diff --git a/roles/openshift_node/tasks/storage_plugins/glusterfs.yml b/roles/openshift_node/tasks/storage_plugins/glusterfs.yml
index 5cd4a6041..1080646ee 100644
--- a/roles/openshift_node/tasks/storage_plugins/glusterfs.yml
+++ b/roles/openshift_node/tasks/storage_plugins/glusterfs.yml
@@ -1,8 +1,6 @@
---
- name: Install GlusterFS storage plugin dependencies
- yum:
- pkg: glusterfs-fuse
- state: installed
+ action: "{{ ansible_pkg_mgr }} name=glusterfs-fuse state=present"
- name: Set sebooleans to allow gluster storage plugin access from containers
seboolean:
@@ -14,4 +12,4 @@
- virt_use_fusefs
- virt_sandbox_use_fusefs
register: sebool_result
- failed_when: "'state' not in sebool_result and 'msg' in sebool_result and 'SELinux boolean item does not exist' not in sebool_result.msg"
+ failed_when: "'state' not in sebool_result and 'msg' in sebool_result and 'SELinux boolean {{ item }} does not exist' not in sebool_result.msg"
diff --git a/roles/openshift_node/templates/node.yaml.v1.j2 b/roles/openshift_node/templates/node.yaml.v1.j2
index 41a303dee..23bd81f91 100644
--- a/roles/openshift_node/templates/node.yaml.v1.j2
+++ b/roles/openshift_node/templates/node.yaml.v1.j2
@@ -1,7 +1,9 @@
allowDisabledDocker: false
apiVersion: v1
-dnsDomain: {{ osn_cluster_dns_domain }}
-dnsIP: {{ osn_cluster_dns_ip }}
+dnsDomain: {{ openshift.common.dns_domain }}
+{% if 'dns_ip' in openshift.common %}
+dnsIP: {{ openshift.common.dns_ip }}
+{% endif %}
dockerConfig:
execHandlerName: ""
iptablesSyncPeriod: "{{ openshift.node.iptables_sync_period }}"
diff --git a/roles/openshift_repos/files/fedora-origin/repos/maxamillion-fedora-openshift-fedora.repo b/roles/openshift_repos/files/fedora-origin/repos/maxamillion-fedora-openshift-fedora.repo
new file mode 100644
index 000000000..bc0435d82
--- /dev/null
+++ b/roles/openshift_repos/files/fedora-origin/repos/maxamillion-fedora-openshift-fedora.repo
@@ -0,0 +1,8 @@
+[maxamillion-fedora-openshift]
+name=Copr repo for fedora-openshift owned by maxamillion
+baseurl=https://copr-be.cloud.fedoraproject.org/results/maxamillion/fedora-openshift/fedora-$releasever-$basearch/
+skip_if_unavailable=True
+gpgcheck=1
+gpgkey=https://copr-be.cloud.fedoraproject.org/results/maxamillion/fedora-openshift/pubkey.gpg
+enabled=1
+enabled_metadata=1 \ No newline at end of file
diff --git a/roles/openshift_repos/handlers/main.yml b/roles/openshift_repos/handlers/main.yml
new file mode 100644
index 000000000..198fc7d6e
--- /dev/null
+++ b/roles/openshift_repos/handlers/main.yml
@@ -0,0 +1,3 @@
+---
+- name: refresh cache
+ command: "{{ ansible_pkg_mgr }} clean all"
diff --git a/roles/openshift_repos/tasks/main.yaml b/roles/openshift_repos/tasks/main.yaml
index aa696ae12..9faf0dfd9 100644
--- a/roles/openshift_repos/tasks/main.yaml
+++ b/roles/openshift_repos/tasks/main.yaml
@@ -11,36 +11,58 @@
that: openshift.common.deployment_type in known_openshift_deployment_types
- name: Ensure libselinux-python is installed
- yum:
- pkg: libselinux-python
- state: present
+ action: "{{ ansible_pkg_mgr }} name=libselinux-python state=present"
- name: Create any additional repos that are defined
template:
src: yum_repo.j2
dest: /etc/yum.repos.d/openshift_additional.repo
when: openshift_additional_repos | length > 0
+ notify: refresh cache
- name: Remove the additional repos if no longer defined
file:
dest: /etc/yum.repos.d/openshift_additional.repo
state: absent
when: openshift_additional_repos | length == 0
+ notify: refresh cache
-- name: Remove any yum repo files for other deployment types
+- name: Remove any yum repo files for other deployment types RHEL/CentOS
file:
path: "/etc/yum.repos.d/{{ item | basename }}"
state: absent
with_fileglob:
- '*/repos/*'
- when: not (item | search("/files/" ~ openshift_deployment_type ~ "/repos"))
+ when: not (item | search("/files/" ~ openshift_deployment_type ~ "/repos")) and
+ (ansible_os_family == "RedHat" and ansible_distribution != "Fedora")
+ notify: refresh cache
+
+- name: Remove any yum repo files for other deployment types Fedora
+ file:
+ path: "/etc/yum.repos.d/{{ item | basename }}"
+ state: absent
+ with_fileglob:
+ - '*/repos/*'
+ when: not (item | search("/files/fedora-" ~ openshift_deployment_type ~ "/repos")) and
+ (ansible_distribution == "Fedora")
+ notify: refresh cache
- name: Configure gpg keys if needed
copy: src={{ item }} dest=/etc/pki/rpm-gpg/
with_fileglob:
- "{{ openshift_deployment_type }}/gpg_keys/*"
+ notify: refresh cache
-- name: Configure yum repositories
+- name: Configure yum repositories RHEL/CentOS
copy: src={{ item }} dest=/etc/yum.repos.d/
with_fileglob:
- "{{ openshift_deployment_type }}/repos/*"
+ notify: refresh cache
+ when: (ansible_os_family == "RedHat" and ansible_distribution != "Fedora")
+
+- name: Configure yum repositories Fedora
+ copy: src={{ item }} dest=/etc/yum.repos.d/
+ with_fileglob:
+ - "fedora-{{ openshift_deployment_type }}/repos/*"
+ notify: refresh cache
+ when: (ansible_distribution == "Fedora")
diff --git a/roles/openshift_serviceaccounts/tasks/main.yml b/roles/openshift_serviceaccounts/tasks/main.yml
index d93a25a21..e558a83a2 100644
--- a/roles/openshift_serviceaccounts/tasks/main.yml
+++ b/roles/openshift_serviceaccounts/tasks/main.yml
@@ -13,7 +13,9 @@
changed_when: "'serviceaccounts \"{{ item }}\" already exists' not in _sa_result.stderr and _sa_result.rc == 0"
- name: Get current security context constraints
- shell: "{{ openshift.common.client_binary }} get scc privileged -o yaml > /tmp/scc.yaml"
+ shell: >
+ {{ openshift.common.client_binary }} get scc privileged -o yaml
+ --output-version=v1 > /tmp/scc.yaml
- name: Add security context constraint for {{ item }}
lineinfile:
@@ -23,4 +25,4 @@
with_items: accounts
- name: Apply new scc rules for service accounts
- command: "{{ openshift.common.client_binary }} update -f /tmp/scc.yaml"
+ command: "{{ openshift.common.client_binary }} update -f /tmp/scc.yaml --api-version=v1"
diff --git a/roles/openshift_storage_nfs_lvm/tasks/nfs.yml b/roles/openshift_storage_nfs_lvm/tasks/nfs.yml
index 65ae069df..cf1ba6f25 100644
--- a/roles/openshift_storage_nfs_lvm/tasks/nfs.yml
+++ b/roles/openshift_storage_nfs_lvm/tasks/nfs.yml
@@ -1,7 +1,7 @@
---
- name: Install NFS server
- yum: name=nfs-utils state=present
-
+ action: "{{ ansible_pkg_mgr }} name=nfs-utils state=present"
+
- name: Start rpcbind
service: name=rpcbind state=started enabled=yes
diff --git a/roles/os_env_extras/tasks/main.yaml b/roles/os_env_extras/tasks/main.yaml
index 96b12ad5b..cbf5c37f5 100644
--- a/roles/os_env_extras/tasks/main.yaml
+++ b/roles/os_env_extras/tasks/main.yaml
@@ -12,6 +12,4 @@
dest: /root/.vimrc
- name: Bash Completion
- yum:
- pkg: bash-completion
- state: installed
+ action: "{{ ansible_pkg_mgr }} name=bash-completion state=present" \ No newline at end of file
diff --git a/roles/os_firewall/tasks/firewall/firewalld.yml b/roles/os_firewall/tasks/firewall/firewalld.yml
index 5089eb3e0..ba12c6b0c 100644
--- a/roles/os_firewall/tasks/firewall/firewalld.yml
+++ b/roles/os_firewall/tasks/firewall/firewalld.yml
@@ -1,8 +1,6 @@
---
- name: Install firewalld packages
- yum:
- name: firewalld
- state: present
+ action: "{{ ansible_pkg_mgr }} name=firewalld state=present"
register: install_result
- name: Check if iptables-services is installed
diff --git a/roles/os_firewall/tasks/firewall/iptables.yml b/roles/os_firewall/tasks/firewall/iptables.yml
index 9af9d8d29..d3a5b1fa7 100644
--- a/roles/os_firewall/tasks/firewall/iptables.yml
+++ b/roles/os_firewall/tasks/firewall/iptables.yml
@@ -1,8 +1,6 @@
---
- name: Install iptables packages
- yum:
- name: "{{ item }}"
- state: present
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
with_items:
- iptables
- iptables-services
diff --git a/roles/os_update_latest/tasks/main.yml b/roles/os_update_latest/tasks/main.yml
index 4a2c3d47a..2532059c0 100644
--- a/roles/os_update_latest/tasks/main.yml
+++ b/roles/os_update_latest/tasks/main.yml
@@ -1,3 +1,3 @@
---
- name: Update all packages
- yum: name=* state=latest
+ action: "{{ ansible_pkg_mgr }} name=* state=latest" \ No newline at end of file
diff --git a/roles/os_zabbix/vars/template_openshift_master.yml b/roles/os_zabbix/vars/template_openshift_master.yml
index 8236cf135..514d6fd24 100644
--- a/roles/os_zabbix/vars/template_openshift_master.yml
+++ b/roles/os_zabbix/vars/template_openshift_master.yml
@@ -7,6 +7,12 @@ g_template_openshift_master:
- Openshift Master
key: create_app
+ - key: openshift.master.registry.healthz
+ description: "Shows the health status of the cluster's docker registry"
+ type: int
+ applications:
+ - Openshift Master
+
- key: openshift.master.process.count
description: Shows number of master processes running
type: int
@@ -62,6 +68,36 @@ g_template_openshift_master:
applications:
- Openshift Master
+ - key: openshift.master.pv.total.count
+ description: Total number of Persistent Volumes in the Openshift Cluster
+ type: int
+ applications:
+ - Openshift Master
+
+ - key: openshift.master.pv.available.count
+ description: Total number of Available Persistent Volumes in the Openshift Cluster
+ type: int
+ applications:
+ - Openshift Master
+
+ - key: openshift.master.pv.released.count
+ description: Total number of Released Persistent Volumes in the Openshift Cluster
+ type: int
+ applications:
+ - Openshift Master
+
+ - key: openshift.master.pv.bound.count
+ description: Total number of Bound Persistent Volumes in the Openshift Cluster
+ type: int
+ applications:
+ - Openshift Master
+
+ - key: openshift.master.pv.failed.count
+ description: Total number of Failed Persistent Volumes in the Openshift Cluster
+ type: int
+ applications:
+ - Openshift Master
+
- key: openshift.master.etcd.create.success
description: Show number of successful create actions
type: int
@@ -195,26 +231,6 @@ g_template_openshift_master:
- Openshift Master Metrics
ztriggers:
- - name: 'Application creation has failed on {HOST.NAME}'
- expression: '{Template Openshift Master:create_app.last(#1)}=1 and {Template Openshift Master:create_app.last(#2)}=1'
- url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/check_create_app.asciidoc'
- priority: avg
-
- - name: 'Openshift Master API health check is failing on {HOST.NAME}'
- expression: '{Template Openshift Master:openshift.master.api.healthz.max(#3)}<1'
- url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
- priority: high
-
- - name: 'Openshift Master API PING check is failing on {HOST.NAME}'
- expression: '{Template Openshift Master:openshift.master.api.ping.max(#3)}<1'
- url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
- priority: high
-
- - name: 'Openshift Master metric PING check is failing on {HOST.NAME}'
- expression: '{Template Openshift Master:openshift.master.metric.ping.max(#3)}<1'
- url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
- priority: avg
-
- name: 'Openshift Master process not running on {HOST.NAME}'
expression: '{Template Openshift Master:openshift.master.process.count.max(#3)}<1'
url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
@@ -225,6 +241,16 @@ g_template_openshift_master:
url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
priority: high
+ - name: 'Low number of etcd watchers on {HOST.NAME}'
+ expression: '{Template Openshift Master:openshift.master.etcd.watchers.last(#1)}<10 and {Template Openshift Master:openshift.master.etcd.watchers.last(#2)}<10'
+ url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/check_etcd.asciidoc'
+ priority: avg
+
+ - name: 'Etcd ping failed on {HOST.NAME}'
+ expression: '{Template Openshift Master:openshift.master.etcd.ping.last(#1)}=0 and {Template Openshift Master:openshift.master.etcd.ping.last(#2)}=0'
+ url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/check_etcd.asciidoc'
+ priority: high
+
- name: 'Number of users for Openshift Master on {HOST.NAME}'
expression: '{Template Openshift Master:openshift.master.user.count.last()}=0'
url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
@@ -235,14 +261,40 @@ g_template_openshift_master:
url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
priority: info
- - name: 'Low number of etcd watchers on {HOST.NAME}'
- expression: '{Template Openshift Master:openshift.master.etcd.watchers.last(#1)}<10 and {Template Openshift Master:openshift.master.etcd.watchers.last(#2)}<10'
- url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/check_etcd.asciidoc'
+ # Put triggers that depend on other triggers here (deps must be created first)
+ - name: 'Application creation has failed on {HOST.NAME}'
+ expression: '{Template Openshift Master:create_app.last(#1)}=1 and {Template Openshift Master:create_app.last(#2)}=1'
+ url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/check_create_app.asciidoc'
+ dependencies:
+ - 'Openshift Master process not running on {HOST.NAME}'
priority: avg
- - name: 'Etcd ping failed on {HOST.NAME}'
- expression: '{Template Openshift Master:openshift.master.etcd.ping.last(#1)}=0 and {Template Openshift Master:openshift.master.etcd.ping.last(#2)}=0'
- url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/check_etcd.asciidoc'
+ - name: 'Openshift Master API health check is failing on {HOST.NAME}'
+ expression: '{Template Openshift Master:openshift.master.api.healthz.max(#3)}<1'
+ url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
+ dependencies:
+ - 'Openshift Master process not running on {HOST.NAME}'
+ priority: high
+
+ - name: 'Openshift Master API PING check is failing on {HOST.NAME}'
+ expression: '{Template Openshift Master:openshift.master.api.ping.max(#3)}<1'
+ url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
+ dependencies:
+ - 'Openshift Master process not running on {HOST.NAME}'
+ priority: high
+
+ - name: 'Openshift Master metric PING check is failing on {HOST.NAME}'
+ expression: '{Template Openshift Master:openshift.master.metric.ping.max(#3)}<1'
+ url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
+ dependencies:
+ - 'Openshift Master process not running on {HOST.NAME}'
+ priority: avg
+
+ - name: 'Docker Registry check failed on {HOST.NAME}'
+ expression: '{Template Openshift Master:openshift.master.registry.healthz.max(#2)}<1'
+ url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
+ dependencies:
+ - 'Openshift Master process not running on {HOST.NAME}'
priority: high
zgraphs:
diff --git a/roles/os_zabbix/vars/template_os_linux.yml b/roles/os_zabbix/vars/template_os_linux.yml
index 79d52ef9b..c6e557f12 100644
--- a/roles/os_zabbix/vars/template_os_linux.yml
+++ b/roles/os_zabbix/vars/template_os_linux.yml
@@ -258,26 +258,34 @@ g_template_os_linux:
- Network
ztriggerprototypes:
- - name: 'Filesystem: {#OSO_FILESYS} has less than 15% free disk space on {HOST.NAME}'
- expression: '{Template OS Linux:disc.filesys.full[{#OSO_FILESYS}].last()}>85'
- url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/check_filesys_full.asciidoc'
- priority: warn
-
- name: 'Filesystem: {#OSO_FILESYS} has less than 10% free disk space on {HOST.NAME}'
expression: '{Template OS Linux:disc.filesys.full[{#OSO_FILESYS}].last()}>90'
url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/check_filesys_full.asciidoc'
priority: high
- - name: 'Filesystem: {#OSO_FILESYS} has less than 10% free inodes on {HOST.NAME}'
- expression: '{Template OS Linux:disc.filesys.inodes.pused[{#OSO_FILESYS}].last()}>90'
+ # This has a dependency on the previous trigger
+ # Trigger Prototypes do not work in 2.4. They will work in Zabbix 3.0
+ - name: 'Filesystem: {#OSO_FILESYS} has less than 15% free disk space on {HOST.NAME}'
+ expression: '{Template OS Linux:disc.filesys.full[{#OSO_FILESYS}].last()}>85'
url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/check_filesys_full.asciidoc'
priority: warn
+ dependencies:
+ - 'Filesystem: {#OSO_FILESYS} has less than 10% free disk space on {HOST.NAME}'
- name: 'Filesystem: {#OSO_FILESYS} has less than 5% free inodes on {HOST.NAME}'
expression: '{Template OS Linux:disc.filesys.inodes.pused[{#OSO_FILESYS}].last()}>95'
url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/check_filesys_full.asciidoc'
priority: high
+ # This has a dependency on the previous trigger
+ # Trigger Prototypes do not work in 2.4. They will work in Zabbix 3.0
+ - name: 'Filesystem: {#OSO_FILESYS} has less than 10% free inodes on {HOST.NAME}'
+ expression: '{Template OS Linux:disc.filesys.inodes.pused[{#OSO_FILESYS}].last()}>90'
+ url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/check_filesys_full.asciidoc'
+ priority: warn
+ dependencies:
+ - 'Filesystem: {#OSO_FILESYS} has less than 5% free inodes on {HOST.NAME}'
+
ztriggers:
- name: 'Too many TOTAL processes on {HOST.NAME}'
expression: '{Template OS Linux:proc.nprocs.last()}>5000'
@@ -304,15 +312,3 @@ g_template_os_linux:
description: 'CPU is less than 10% idle'
dependencies:
- 'CPU idle less than 5% on {HOST.NAME}'
-
- zgraphprototypes:
- - name: Network Interface Usage
- width: 1000
- height: 400
- graph_items:
- - item_name: "Bytes per second IN on network interface {#OSO_NET_INTERFACE}"
- item_type: prototype
- color: red
- - item_name: "Bytes per second OUT on network interface {#OSO_NET_INTERFACE}"
- item_type: prototype
- color: blue
diff --git a/roles/tito/tasks/main.yml b/roles/tito/tasks/main.yml
index f7b4ef363..3cf9e2bfd 100644
--- a/roles/tito/tasks/main.yml
+++ b/roles/tito/tasks/main.yml
@@ -1,4 +1,2 @@
---
-- yum:
- name: tito
- state: present
+- action: "{{ ansible_pkg_mgr }} name=tito state=present"
diff --git a/roles/yum_repos/README.md b/roles/yum_repos/README.md
index 51ecd5d34..908ab4972 100644
--- a/roles/yum_repos/README.md
+++ b/roles/yum_repos/README.md
@@ -6,7 +6,7 @@ This role allows easy deployment of yum repository config files.
Requirements
------------
-Yum
+Yum or dnf
Role Variables
--------------