summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2016-02-11 16:18:12 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2016-02-11 16:18:12 -0500
commit2fd931794bf82cf3e11ad9267df9e0885dde7b1d (patch)
treea0d133dead7cfc2ca567c0238cadf9e1a72cafb2 /roles
parent1d65d7df8bc2829e8b536ba44ad2dd3a426f2461 (diff)
parent2b3af4a3d009e6eac172db437b1e701ec5004dc9 (diff)
downloadopenshift-2fd931794bf82cf3e11ad9267df9e0885dde7b1d.tar.gz
openshift-2fd931794bf82cf3e11ad9267df9e0885dde7b1d.tar.bz2
openshift-2fd931794bf82cf3e11ad9267df9e0885dde7b1d.tar.xz
openshift-2fd931794bf82cf3e11ad9267df9e0885dde7b1d.zip
Merge pull request #1324 from abutcher/fluentd-fixes
Remove fluentd_master and fluentd_node roles
Diffstat (limited to 'roles')
-rw-r--r--roles/fluentd_master/tasks/main.yml57
-rw-r--r--roles/fluentd_master/templates/kubernetes.conf.j29
-rw-r--r--roles/fluentd_node/tasks/main.yml57
-rw-r--r--roles/fluentd_node/templates/kubernetes.conf.j253
-rw-r--r--roles/fluentd_node/templates/td-agent.j22
-rw-r--r--roles/openshift_common/tasks/main.yml1
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py18
7 files changed, 0 insertions, 197 deletions
diff --git a/roles/fluentd_master/tasks/main.yml b/roles/fluentd_master/tasks/main.yml
deleted file mode 100644
index 32f972f0a..000000000
--- a/roles/fluentd_master/tasks/main.yml
+++ /dev/null
@@ -1,57 +0,0 @@
----
-- fail:
- msg: "fluentd master is not yet supported on atomic hosts"
- when: openshift.common.is_atomic | bool
-
-# TODO: Update fluentd install and configuration when packaging is complete
-- name: download and install td-agent
- 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"
- when: not openshift.common.is_atomic | bool
-
-- name: Verify fluentd plugin installed
- command: '/opt/td-agent/embedded/bin/gem query -i fluent-plugin-kubernetes'
- register: _fluent_plugin_check
- failed_when: false
- changed_when: false
-
-- name: install Kubernetes fluentd plugin
- command: '/opt/td-agent/embedded/bin/gem install fluent-plugin-kubernetes'
- when: _fluent_plugin_check.rc == 1
-
-- name: Creates directories
- file:
- path: "{{ item }}"
- state: directory
- group: 'td-agent'
- owner: 'td-agent'
- mode: 0755
- with_items: ['/etc/td-agent/config.d']
-
-- name: Add include to td-agent configuration
- lineinfile:
- dest: '/etc/td-agent/td-agent.conf'
- regexp: '^@include config.d'
- line: '@include config.d/*.conf'
- state: present
-
-- name: install Kubernetes fluentd configuration file
- template:
- src: kubernetes.conf.j2
- dest: /etc/td-agent/config.d/kubernetes.conf
- group: 'td-agent'
- owner: 'td-agent'
- mode: 0444
-
-- name: wait for etcd to start up
- wait_for: port=4001 delay=10
- when: embedded_etcd | bool
-
-- name: wait for etcd peer to start up
- wait_for: port=7001 delay=10
- when: embedded_etcd | bool
-
-- name: ensure td-agent is running
- service:
- name: 'td-agent'
- state: started
- enabled: yes
diff --git a/roles/fluentd_master/templates/kubernetes.conf.j2 b/roles/fluentd_master/templates/kubernetes.conf.j2
deleted file mode 100644
index 7b5c86062..000000000
--- a/roles/fluentd_master/templates/kubernetes.conf.j2
+++ /dev/null
@@ -1,9 +0,0 @@
-<match kubernetes.**>
- type file
- path /var/log/td-agent/containers.log
- time_slice_format %Y%m%d
- time_slice_wait 10m
- time_format %Y%m%dT%H%M%S%z
- compress gzip
- utc
-</match>
diff --git a/roles/fluentd_node/tasks/main.yml b/roles/fluentd_node/tasks/main.yml
deleted file mode 100644
index 9fd908687..000000000
--- a/roles/fluentd_node/tasks/main.yml
+++ /dev/null
@@ -1,57 +0,0 @@
----
-- fail:
- msg: "fluentd node is not yet supported on atomic hosts"
- when: openshift.common.is_atomic | bool
-
-# TODO: Update fluentd install and configuration when packaging is complete
-- name: download and install td-agent
- 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"
- when: not openshift.common.is_atomic | bool
-
-- name: Verify fluentd plugin installed
- command: '/opt/td-agent/embedded/bin/gem query -i fluent-plugin-kubernetes'
- register: _fluent_plugin_check
- failed_when: false
- changed_when: false
-
-- name: install Kubernetes fluentd plugin
- command: '/opt/td-agent/embedded/bin/gem install fluent-plugin-kubernetes'
- when: _fluent_plugin_check.rc == 1
-
-- name: Override td-agent configuration file
- template:
- src: td-agent.j2
- dest: /etc/sysconfig/td-agent
- group: 'td-agent'
- owner: 'td-agent'
- mode: 0444
-
-- name: Creates directories
- file:
- path: "{{ item }}"
- state: directory
- group: 'td-agent'
- owner: 'td-agent'
- mode: 0755
- with_items: ['/etc/td-agent/config.d', '/var/log/td-agent/tmp']
-
-- name: Add include to td-agent configuration
- lineinfile:
- dest: '/etc/td-agent/td-agent.conf'
- regexp: '^@include config.d'
- line: '@include config.d/*.conf'
- state: present
-
-- name: install Kubernetes fluentd configuration file
- template:
- src: kubernetes.conf.j2
- dest: /etc/td-agent/config.d/kubernetes.conf
- group: 'td-agent'
- owner: 'td-agent'
- mode: 0444
-
-- name: ensure td-agent is running
- service:
- name: 'td-agent'
- state: started
- enabled: yes
diff --git a/roles/fluentd_node/templates/kubernetes.conf.j2 b/roles/fluentd_node/templates/kubernetes.conf.j2
deleted file mode 100644
index 5f1eecb20..000000000
--- a/roles/fluentd_node/templates/kubernetes.conf.j2
+++ /dev/null
@@ -1,53 +0,0 @@
-<source>
- type tail
- path /var/lib/docker/containers/*/*-json.log
- pos_file /var/log/td-agent/tmp/fluentd-docker.pos
- time_format %Y-%m-%dT%H:%M:%S
- tag docker.*
- format json
- read_from_head true
-</source>
-
-<match docker.var.lib.docker.containers.*.*.log>
- type kubernetes
- container_id ${tag_parts[5]}
- tag docker.${name}
-</match>
-
-<match kubernetes>
- type copy
-
- <store>
- type forward
- send_timeout 60s
- recover_wait 10s
- heartbeat_interval 1s
- phi_threshold 16
- hard_timeout 60s
- log_level trace
- require_ack_response true
- heartbeat_type tcp
-
- <server>
- name {{groups['oo_first_master'][0]}}
- host {{hostvars[groups['oo_first_master'][0]].openshift.common.hostname}}
- port 24224
- weight 60
- </server>
-
- <secondary>
- type file
- path /var/log/td-agent/forward-failed
- </secondary>
- </store>
-
- <store>
- type file
- path /var/log/td-agent/containers.log
- time_slice_format %Y%m%d
- time_slice_wait 10m
- time_format %Y%m%dT%H%M%S%z
- compress gzip
- utc
- </store>
-</match>
diff --git a/roles/fluentd_node/templates/td-agent.j2 b/roles/fluentd_node/templates/td-agent.j2
deleted file mode 100644
index 7245e11ec..000000000
--- a/roles/fluentd_node/templates/td-agent.j2
+++ /dev/null
@@ -1,2 +0,0 @@
-DAEMON_ARGS=
-TD_AGENT_ARGS="/usr/sbin/td-agent --log /var/log/td-agent/td-agent.log --use-v1-config"
diff --git a/roles/openshift_common/tasks/main.yml b/roles/openshift_common/tasks/main.yml
index 06e2c0878..a2fcff507 100644
--- a/roles/openshift_common/tasks/main.yml
+++ b/roles/openshift_common/tasks/main.yml
@@ -29,7 +29,6 @@
use_openshift_sdn: "{{ openshift_use_openshift_sdn | default(None) }}"
sdn_network_plugin_name: "{{ os_sdn_network_plugin_name | default(None) }}"
deployment_type: "{{ openshift_deployment_type }}"
- use_fluentd: "{{ openshift_use_fluentd | default(None) }}"
use_flannel: "{{ openshift_use_flannel | default(None) }}"
use_nuage: "{{ openshift_use_nuage | default(None) }}"
use_manageiq: "{{ openshift_use_manageiq | default(None) }}"
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 5f5c5c788..20f6cc5c8 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -304,23 +304,6 @@ def normalize_provider_facts(provider, metadata):
facts = normalize_openstack_facts(metadata, facts)
return facts
-def set_fluentd_facts_if_unset(facts):
- """ Set fluentd facts if not already present in facts dict
- dict: the facts dict updated with the generated fluentd facts if
- missing
- Args:
- facts (dict): existing facts
- Returns:
- dict: the facts dict updated with the generated fluentd
- facts if they were not already present
-
- """
- if 'common' in facts:
- if 'use_fluentd' not in facts['common']:
- use_fluentd = False
- facts['common']['use_fluentd'] = use_fluentd
- return facts
-
def set_flannel_facts_if_unset(facts):
""" Set flannel facts if not already present in facts dict
dict: the facts dict updated with the flannel facts if
@@ -1171,7 +1154,6 @@ class OpenShiftFacts(object):
facts['current_config'] = get_current_config(facts)
facts = set_url_facts_if_unset(facts)
facts = set_project_cfg_facts_if_unset(facts)
- facts = set_fluentd_facts_if_unset(facts)
facts = set_flannel_facts_if_unset(facts)
facts = set_nuage_facts_if_unset(facts)
facts = set_node_schedulability(facts)