Skip to content

Latest commit

 

History

History
73 lines (39 loc) · 4.18 KB

kubernetes.md

File metadata and controls

73 lines (39 loc) · 4.18 KB

Oracle Kubernetes Engine Installation - Oracle Cloud Infrastructure Data Source for Grafana

Pre-requisites:

Background

Grafana is a popular technology that makes it easy to visualize metrics. The Oracle Cloud Infrastructure Data Source for Grafana is used to extend Grafana by adding OCI as a data source. The plugin enables you to visualize metrics related to a number of OCI resources: Compute, Networking, Storage, and custom metrics.

This walkthrough is intended for use by people who would like to deploy Grafana and the OCI Data Source for Grafana on a Kubernetes environment.

Make sure you have access to the Monitoring Service and that metrics have been enabled for the resources you are trying to monitor.

Configuring the OCI Identity policies

In order to use the the OCI Data Source for Grafana on OKE, the first step is to create a dynamic group used to group virtual machine or bare metal compute instances as “principals” (similar to user groups). Create a dynamic group that corresponds to all of your OKE worker nodes:

Screen Shot 2018-12-17 at 4.01.34 PM

Next, create a policy named “grafana_policy” in the root compartment of your tenancy to permit instances in the dynamic group to make API calls against Oracle Cloud Infrastructure services. Add the following policy statements:

  • allow dynamicgroup grafana to read metrics in tenancy

  • allow dynamicgroup grafana to read compartments in tenancy

    Screen Shot 2018-12-17 at 4.01.47 PM

The Grafana Helm chart

Next, we are going to install the stable Helm chart for Grafana. We will do this in two parts: First, update the stable repository by running: helm repo update

Next, install the chart for Grafana. For OSS Grafana run: helm install --set plugins=oci-metrics-datasource grafana bitnami/grafana

Accessing Grafana

Follow the instructions given in the output, after the helm chart install for accessing Grafana, retrieving password for admin user account etc.

Configure Grafana

The next step is to configure the plugin. Navigate to the Grafana homepage at http://localhost:3000

Screen Shot 2018-12-17 at 3.23.46 PM

Log in with the default username admin and the password you obtained from the kubectl command from the previous section.

On the Home Dashboard click the gear icon on the left side of the page.

Screen Shot 2018-12-17 at 3.24.02 PM

Click Add data source.

Screen Shot 2018-12-17 at 3.24.13 PM

Choose oracle-oci-datasource as your data source type.

Screen Shot 2018-12-17 at 3.24.24 PM

Fill in your Tenancy OCID, Default Region, and Environment. Your Default region is the same as your home region listed in the Tenancy Details page. For Environment choose OCI Instance.

For Environment choose OCI Instance (please note that multitenancy mode is not yet supported with OCI Instance as Environment).

You can then fill in your Default Region.

Screen Shot 2018-12-17 at 3.25.33 PM

Click Save & Test to return to the home dashboard.

Next Steps

Check out how to use the newly installed and configured plugin in our Using Grafana with Oracle Cloud Infrastructure Data Source walkthrough.