From 0d2ac10fc27b1ddf8aac47da30181cd31c00d95b Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Mon, 3 Jun 2019 09:40:37 -0500 Subject: [PATCH] Update apparmor job after fluent-logging split This updates the apparmor job to account for the splitting of the fluent-logging chart, as it was missed during that change. Now, the apparmor job will deploy fluentbit as well as fluentd deployed as a daemonset running as a collecting agent Change-Id: Iefa50f474b57a10c5e7e5a9032c7b23d26d97640 Signed-off-by: Steve Wilkerson --- ...100-fluent-logging.sh => 100-fluentbit.sh} | 12 +- .../apparmor/110-fluentd-daemonset.sh | 175 ++++++++++++++++++ ...{110-openvswitch.sh => 120-openvswitch.sh} | 0 zuul.d/jobs.yaml | 5 +- 4 files changed, 184 insertions(+), 8 deletions(-) rename tools/deployment/apparmor/{100-fluent-logging.sh => 100-fluentbit.sh} (82%) create mode 100755 tools/deployment/apparmor/110-fluentd-daemonset.sh rename tools/deployment/apparmor/{110-openvswitch.sh => 120-openvswitch.sh} (100%) diff --git a/tools/deployment/apparmor/100-fluent-logging.sh b/tools/deployment/apparmor/100-fluentbit.sh similarity index 82% rename from tools/deployment/apparmor/100-fluent-logging.sh rename to tools/deployment/apparmor/100-fluentbit.sh index 6ba75eb77..bea993f36 100755 --- a/tools/deployment/apparmor/100-fluent-logging.sh +++ b/tools/deployment/apparmor/100-fluentbit.sh @@ -16,9 +16,9 @@ set -xe #NOTE: Lint and package chart -make fluent-logging +make fluentbit -tee /tmp/fluent-logging.yaml < + bind 0.0.0.0 + port 24220 + @type monitor_agent + + + + + time_format %Y-%m-%dT%H:%M:%S.%NZ + @type json + + path /var/log/containers/*.log + read_from_head true + tag kubernetes.* + @type tail + + + + @type kubernetes_metadata + + + + bind 0.0.0.0 + port "#{ENV['FLUENTD_PORT']}" + @type forward + + + + @type null + + + + + chunk_limit_size 500K + flush_interval 5s + flush_thread_count 8 + queue_limit_length 16 + retry_forever false + retry_max_interval 30 + + host "#{ENV['ELASTICSEARCH_HOST']}" + include_tag_key true + logstash_format true + logstash_prefix libvirt + password "#{ENV['ELASTICSEARCH_PASSWORD']}" + port "#{ENV['ELASTICSEARCH_PORT']}" + @type elasticsearch + user "#{ENV['ELASTICSEARCH_USERNAME']}" + + + + + chunk_limit_size 500K + flush_interval 5s + flush_thread_count 8 + queue_limit_length 16 + retry_forever false + retry_max_interval 30 + + host "#{ENV['ELASTICSEARCH_HOST']}" + include_tag_key true + logstash_format true + logstash_prefix qemu + password "#{ENV['ELASTICSEARCH_PASSWORD']}" + port "#{ENV['ELASTICSEARCH_PORT']}" + @type elasticsearch + user "#{ENV['ELASTICSEARCH_USERNAME']}" + + + + + chunk_limit_size 500K + flush_interval 5s + flush_thread_count 8 + queue_limit_length 16 + retry_forever false + retry_max_interval 30 + + host "#{ENV['ELASTICSEARCH_HOST']}" + include_tag_key true + logstash_format true + logstash_prefix journal + password "#{ENV['ELASTICSEARCH_PASSWORD']}" + port "#{ENV['ELASTICSEARCH_PORT']}" + @type elasticsearch + user "#{ENV['ELASTICSEARCH_USERNAME']}" + + + + + chunk_limit_size 500K + flush_interval 5s + flush_thread_count 8 + queue_limit_length 16 + retry_forever false + retry_max_interval 30 + + host "#{ENV['ELASTICSEARCH_HOST']}" + include_tag_key true + logstash_format true + logstash_prefix kernel + password "#{ENV['ELASTICSEARCH_PASSWORD']}" + port "#{ENV['ELASTICSEARCH_PORT']}" + @type elasticsearch + user "#{ENV['ELASTICSEARCH_USERNAME']}" + + + + + chunk_limit_size 500K + flush_interval 5s + flush_thread_count 8 + queue_limit_length 16 + retry_forever false + retry_max_interval 30 + + flush_interval 15s + host "#{ENV['ELASTICSEARCH_HOST']}" + include_tag_key true + logstash_format true + password "#{ENV['ELASTICSEARCH_PASSWORD']}" + port "#{ENV['ELASTICSEARCH_PORT']}" + @type elasticsearch + type_name fluent + user "#{ENV['ELASTICSEARCH_USERNAME']}" + +EOF + +#NOTE: Deploy command +helm upgrade --install fluentd-daemonset ./fluentd \ + --namespace=osh-infra \ + --values=/tmp/fluentd-daemonset.yaml + +#NOTE: Wait for deploy +./tools/deployment/common/wait-for-pods.sh osh-infra + +#NOTE: Validate Deployment info +helm status fluentd-daemonset + +helm test fluentd-daemonset diff --git a/tools/deployment/apparmor/110-openvswitch.sh b/tools/deployment/apparmor/120-openvswitch.sh similarity index 100% rename from tools/deployment/apparmor/110-openvswitch.sh rename to tools/deployment/apparmor/120-openvswitch.sh diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index b5185d9d0..3f38ec0b9 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -218,8 +218,9 @@ - ./tools/deployment/apparmor/070-prometheus-openstack-exporter.sh - ./tools/deployment/apparmor/080-prometheus-process-exporter.sh - ./tools/deployment/apparmor/090-elasticsearch.sh - - ./tools/deployment/apparmor/100-fluent-logging.sh - - ./tools/deployment/apparmor/110-openvswitch.sh + - ./tools/deployment/apparmor/100-fluentbit.sh + - ./tools/deployment/apparmor/110-fluentd-daemonset.sh + - ./tools/deployment/apparmor/120-openvswitch.sh - job: name: openstack-helm-infra-openstack-support