{"id":764,"date":"2018-06-09T23:35:23","date_gmt":"2018-06-09T21:35:23","guid":{"rendered":"https:\/\/blog.unetresgrossebite.com\/?p=764"},"modified":"2018-09-02T19:09:29","modified_gmt":"2018-09-02T17:09:29","slug":"openshift-supervision","status":"publish","type":"post","link":"https:\/\/blog.unetresgrossebite.com\/?p=764","title":{"rendered":"OpenShift Supervision"},"content":{"rendered":"<p>Today I am looking back on a few topics I had a hard time properly deploying using OpenShift 3.7 and missing proper dynamic provisioning despite a poorly-configured GlusterFS cluster.<br \/>\nSince then, I deployed a 3 nodes Ceph cluster, using Sebastien Han&#8217;s ceph-ansible playbooks, allowing me to further experiment with persistent volumes.<br \/>\nAnd OpenShift Origin 3.9 also came out, shipping with various fixes and new features, such Gluster Block volumes support, that might address some of GlusterFS performances issues.<\/p>\n<p>&nbsp;<\/p>\n<p>OpenShift Ansible playbooks include a set of roles focused on collecting and making sense out of your cluster metrics, starting with Hawkular.<\/p>\n<p>We could set up a few Pods running Hawkular, Heapster to collect data from your OpenShift nodes and a Cassandra database to store them, defining the following variables and applying the <em>playbooks\/openshift-metrics\/config.yml<\/em> playbook:<\/p>\n<div id=\"attachment_771\" style=\"width: 310px\" class=\"wp-caption alignright\"><a href=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/hawkular.png\"><img aria-describedby=\"caption-attachment-771\" decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-771\" src=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/hawkular-300x152.png\" alt=\"Hawkular\" width=\"300\" height=\"152\" srcset=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/hawkular-300x152.png 300w, https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/hawkular-768x389.png 768w, https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/hawkular-1024x519.png 1024w, https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/hawkular.png 1684w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-771\" class=\"wp-caption-text\">Hawkular integration with OpenShift<\/p><\/div>\n<blockquote><p><em>openshift_metrics_cassandra_limit_cpu: 3000m<\/em><br \/>\n<em>openshift_metrics_cassandra_limit_memory: 3Gi<\/em><br \/>\n<em>openshift_metrics_cassandra_node_selector: {&#8220;region&#8221;:&#8221;infra&#8221;}<\/em><br \/>\n<em>openshift_metrics_cassandra_pvc_prefix: hawkular-metrics<\/em><br \/>\n<em>openshift_metrics_cassandra_pvc_size: 40G<\/em><br \/>\n<em>openshift_metrics_cassandra_request_cpu: 2000m<\/em><br \/>\n<em>openshift_metrics_cassandra_request_memory: 2Gi<\/em><br \/>\n<em>openshift_metrics_cassandra_storage_type: pv<\/em><br \/>\n<em>openshift_metrics_cassandra_pvc_storage_class_name: ceph-storage<br \/>\nopenshift_metrics_cassanda_pvc_storage_class_name: ceph-storage<\/em><br \/>\n<em>openshift_metrics_image_version: v3.9<\/em><br \/>\n<em>openshift_metrics_install_metrics: True<\/em><br \/>\n<em>openshift_metrics_duration: 14<\/em><br \/>\n<em>openshift_metrics_hawkular_limits_cpu: 3000m<\/em><br \/>\n<em>openshift_metrics_hawkular_limits_memory: 3Gi<\/em><br \/>\n<em>openshift_metrics_hawkular_node_selector: {&#8220;region&#8221;:&#8221;infra&#8221;}<\/em><br \/>\n<em>openshift_metrics_hawkular_requests_cpu: 2000m<\/em><br \/>\n<em>openshift_metrics_hawkular_requests_memory: 2Gi<\/em><br \/>\n<em>openshift_metrics_heapster_limits_cpu: 3000m<\/em><br \/>\n<em>openshift_metrics_heapster_limits_memory: 3Gi<\/em><br \/>\n<em>openshift_metrics_heapster_node_selector: {&#8220;region&#8221;:&#8221;infra&#8221;}<\/em><br \/>\n<em>openshift_metrics_heapster_requests_cpu: 2000m<\/em><br \/>\n<em>openshift_metrics_heapster_requests_memory: 2Gi<\/em><\/p><\/blockquote>\n<p>Note that we are defining both\u00a0<em>openshift_metrics_cassandra_pvc_storage_class_name<\/em> and\u00a0<em>openshit_metrics_cassanda_pvc_storage_class_name<\/em> due to a typo that was <a href=\"https:\/\/github.com\/openshift\/openshift-ansible\/pull\/8624\" target=\"_blank\" rel=\"noopener\">recently fixed<\/a>, yet not in OpenShift Origin last packages.<\/p>\n<p>Setting up those metrics may allow you to create Nagios commands based on querying for resources allocations and consumptions, using:<\/p>\n<blockquote><p><em>$ oc adm top node &#8211;heapster-namespacce=openshift-infra &#8211;heapster-scheme=https node.example.com<\/em><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>Another solution that integrates well with OpenShift is Prometheus, that could be deployed using the <em>playbooks\/openshift-prometheus\/config.yml<\/em> playbook and those Ansible variables:<\/p>\n<div id=\"attachment_766\" style=\"width: 310px\" class=\"wp-caption alignright\"><a href=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/prometheus.png\"><img aria-describedby=\"caption-attachment-766\" decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-766\" src=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/prometheus-300x153.png\" alt=\"Prometheus\" width=\"300\" height=\"153\" srcset=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/prometheus-300x153.png 300w, https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/prometheus-768x390.png 768w, https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/prometheus-1024x521.png 1024w, https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/prometheus.png 1902w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-766\" class=\"wp-caption-text\">Prometheus showing OpenShift Pods CPU usages<\/p><\/div>\n<blockquote><p><em>openshift_prometheus_alertbuffer_pvc_size: 20Gi<\/em><br \/>\n<em>openshift_prometheus_alertbuffer_storage_class: ceph-storage<\/em><br \/>\n<em>openshift_prometheus_alertbuffer_storage_type: pvc<\/em><br \/>\n<em>openshift_prometheus_alertmanager_pvc_size: 20Gi<\/em><br \/>\n<em>openshift_prometheus_alertmanager_storage_class: ceph-storage<\/em><br \/>\n<em>openshift_prometheus_alertmanager_storage_type: pvc<\/em><br \/>\n<em>openshift_prometheus_namespace: openshift-metrics<\/em><br \/>\n<em>openshift_prometheus_node_selector: {&#8220;region&#8221;:&#8221;infra&#8221;}<\/em><br \/>\n<em>openshift_prometheus_pvc_size: 20Gi<\/em><br \/>\n<em>openshift_prometheus_state: present<\/em><br \/>\n<em>openshift_prometheus_storage_class: ceph-storage<\/em><br \/>\n<em>openshift_prometheus_storage_type: pvc<\/em><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>We could also deploy some Grafana, that could include a pre-configured dashboard, rendering some Prometheus metrics &#8211; thanks to the <em>playbooks\/openshift-grafana\/config.yml<\/em> playbook and the following Ansible variables:<\/p>\n<div id=\"attachment_768\" style=\"width: 310px\" class=\"wp-caption alignright\"><a href=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/openshift-grafana2.png\"><img aria-describedby=\"caption-attachment-768\" decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-768\" src=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/openshift-grafana2-300x164.png\" alt=\"Grafana\" width=\"300\" height=\"164\" srcset=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/openshift-grafana2-300x164.png 300w, https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/openshift-grafana2-768x420.png 768w, https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/openshift-grafana2-1024x559.png 1024w, https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/openshift-grafana2.png 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-768\" class=\"wp-caption-text\">OpenShift Dashboard on Grafana<\/p><\/div>\n<blockquote><p><em>openshift_grafana_datasource_name: prometheus<\/em><br \/>\n<em>openshift_grafana_graph_granularity: 2m<\/em><br \/>\n<em>openshift_grafana_namespace: openshift-grafana<\/em><br \/>\n<em>openshift_grafana_node_exporter: True<\/em><br \/>\n<em>openshift_grafana_node_selector: {&#8220;region&#8221;:&#8221;infra&#8221;}<\/em><br \/>\n<em>openshift_grafana_prometheus_namespace: openshift-metrics<\/em><br \/>\n<em>openshift_grafana_prometheus_serviceaccount: prometheus<\/em><br \/>\n<em>openshift_grafana_storage_class: ceph-storage<\/em><br \/>\n<em>openshift_grafana_storage_type: pvc<\/em><br \/>\n<em>openshift_grafana_storage_volume_size: 15Gi<\/em><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>And finally, we could also deploy logs centralization with the <em>playbooks\/openshift-logging\/config.yml<\/em> playbook, setting the following:<\/p>\n<div id=\"attachment_777\" style=\"width: 310px\" class=\"wp-caption alignright\"><a href=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/kibana-2.png\"><img aria-describedby=\"caption-attachment-777\" decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-777\" src=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/kibana-2-300x155.png\" alt=\"Kibana\" width=\"300\" height=\"155\" srcset=\"https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/kibana-2-300x155.png 300w, https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/kibana-2-768x396.png 768w, https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/kibana-2-1024x528.png 1024w, https:\/\/blog.unetresgrossebite.com\/wp-content\/uploads\/2018\/06\/kibana-2.png 1900w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-777\" class=\"wp-caption-text\">Kibana integration with EFK<\/p><\/div>\n<blockquote><p>openshift_logging_install_logging: True<br \/>\nopenshift_logging_curator_default_days: &#8216;7&#8217;<br \/>\nopenshift_logging_curator_cpu_request: 100m<br \/>\nopenshift_logging_curator_memory_limit: 256Mi<br \/>\nopenshift_logging_curator_nodeselector: {&#8220;region&#8221;:&#8221;infra&#8221;}<br \/>\nopenshift_logging_elasticsearch_storage_type: pvc<br \/>\nopenshift_logging_es_cluster_size: &#8216;1&#8217;<br \/>\nopenshift_logging_es_cpu_request: &#8216;1&#8217;<br \/>\nopenshift_logging_es_memory_limit: 8Gi<br \/>\nopenshift_logging_es_pvc_storage_class_name: ceph-storage<br \/>\nopenshift_logging_es_pvc_dynamic: True<br \/>\nopenshift_logging_es_pvc_size: 25Gi<br \/>\nopenshift_logging_es_recover_after_time: 10m<br \/>\nopenshift_logging_es_nodeslector: {&#8220;region&#8221;:&#8221;infra&#8221;}<br \/>\nopenshift_logging_es_number_of_shards: &#8216;1&#8217;<br \/>\nopenshift_logging_es_number_of_replicas: &#8216;0&#8217;<br \/>\nopenshift_logging_fluentd_buffer_queue_limit: 1024<br \/>\nopenshift_logging_fluentd_buffer_size_limit: 1m<br \/>\nopenshift_logging_fluentd_cpu_request: 100m<br \/>\nopenshift_logging_fluentd_file_buffer_limit: 256Mi<br \/>\nopenshift_logging_fluentd_memory_limit: 512Mi<br \/>\nopenshift_logging_fluentd_nodeselector: {&#8220;region&#8221;:&#8221;infra&#8221;}<br \/>\nopenshift_logging_fluentd_replica_count: 2<br \/>\nopenshift_logging_kibana_cpu_request: 600m<br \/>\nopenshift_logging_kibana_hostname: kibana.router.intra.unetresgrossebite.com<br \/>\nopenshift_logging_kibana_memory_limit: 736Mi<br \/>\nopenshift_logging_kibana_proxy_cpu_request: 200m<br \/>\nopenshift_logging_kibana_proxy_memory_limit: 256Mi<br \/>\nopenshift_logging_kibana_replica_count: 2<br \/>\nopenshift_logging_kibana_nodeselector: {&#8220;region&#8221;:&#8221;infra&#8221;}<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>Meanwhile we could note that cri-o is getting better support in the latter versions of OpenShift, among a never-ending list of ongoing works and upcoming features.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I am looking back on a few topics I had a hard time properly deploying using OpenShift 3.7 and missing proper dynamic provisioning despite a poorly-configured GlusterFS cluster. Since then, I deployed a 3 nodes Ceph cluster, using Sebastien Han&#8217;s ceph-ansible playbooks, allowing me to further experiment with persistent volumes. And OpenShift Origin 3.9 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8,7,13,6],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=\/wp\/v2\/posts\/764"}],"collection":[{"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=764"}],"version-history":[{"count":8,"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=\/wp\/v2\/posts\/764\/revisions"}],"predecessor-version":[{"id":778,"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=\/wp\/v2\/posts\/764\/revisions\/778"}],"wp:attachment":[{"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=764"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.unetresgrossebite.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}