Skip to content

Commit 56a92be

Browse files
Solution doc update (#88)
* Update README.md
1 parent 3d48db4 commit 56a92be

File tree

3 files changed

+99
-30
lines changed

3 files changed

+99
-30
lines changed

README.md

Lines changed: 99 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@ across their entire environment - using Logs, Metrics, and Object metadata.
1313

1414
It does extensive enrichment of logs, metrics and object information to enable cross correlation across entities from different tiers in OCI Logging Analytics. A collection of dashboards is provided to get users started quickly.
1515

16+
## Solution UI
17+
18+
![Kubernetes Solution - List Clusters View](logan/images/list-clusters.png)
19+
![Kubernetes Solution - Cluster View](logan/images/cluster-view.png)
20+
1621
## Dashboards
1722

1823
![Kubernetes Cluster Summary Dashboard](logan/images/kubernetes-cluster-summary-dashboard.png)
1924

2025
<details>
21-
<summary>Expand for more dasshboard screenshots</summary>
26+
<summary>Expand for more dashboard screenshots</summary>
2227

2328
![Kubernetes Nodes Dashboard](logan/images/kubernetes-nodes-dashboard.png)
2429

@@ -35,7 +40,7 @@ It does extensive enrichment of logs, metrics and object information to enable c
3540

3641
### Pre-requisites
3742

38-
* OCI Logging Analytics service must be onboarded with the minumum required policies, in the OCI region where you want to monitor. Refer [Logging Analytics Quick Start](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/quick-start.html) for details.
43+
* OCI Logging Analytics service must be onboarded with the minimum required policies, in the OCI region where you want to monitor. Refer [Logging Analytics Quick Start](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/quick-start.html) for details.
3944
* Create OCI Logging Analytics LogGroup(s) if not done already. Refer [Create Log Group](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/create-logging-analytics-resources.html#GUID-D1758CFB-861F-420D-B12F-34D1CC5E3E0E) for details.
4045
* OCI Dynamic Groups, User Group and Policies.
4146
<details>
@@ -47,11 +52,11 @@ It does extensive enrichment of logs, metrics and object information to enable c
4752
```
4853
* Create a dynamic group with following sample rule for OKE Instances.
4954
```
50-
ALL {instance.compartment.id='OCI Management Agent Compartment OCID'}
55+
ALL {instance.compartment.id='OKE Cluster Compartment OCID'}
5156
```
5257
- **Note**: _This dynamic group is not required for non OKE or when you choose to use Config file based AuthZ for monitoring the logs._
5358
* Create a user and user group using which the logs to be published to OCI Logging Analytics. Refer [Managing Users](https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managingusers.htm) and [Managing User Groups](https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/managinggroups.htm) for details.
54-
- **Note**: _This is not required for OKE when you choose to use the default (Instance princiapal) AuthZ mechanism._
59+
- **Note**: _This is not required for OKE when you choose to use the default (Instance principal) AuthZ mechanism._
5560
* Create a policy with following statements.
5661
* Policy Statement for providing necessary access to upload the metrics.
5762
```
@@ -60,39 +65,85 @@ It does extensive enrichment of logs, metrics and object information to enable c
6065
* Policy Statement for providing necessary access to upload the logs and objects data.
6166
```
6267
Allow dynamic-group <OKE Instances Dynamic Group> to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in compartment <Compartment Name>
68+
Allow dynamic-group <OKE Instances Dynamic Group> to {LOG_ANALYTICS_DISCOVERY_UPLOAD} in tenancy
6369
```
6470
OR
6571
```
6672
Allow group <User Group> to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in compartment <Compartment Name>
73+
Allow group <User Group> to {LOG_ANALYTICS_DISCOVERY_UPLOAD} in tenancy
6774
```
75+
- **Note**: _The policy definition for LOG_ANALYTICS_DISCOVERY_UPLOAD permission only works at tenancy level and thereby it must be created at tenancy level._
6876
</details>
6977
7078
### Installation instructions
7179
72-
#### Multiple methods of installation are avialble, with following differences:
80+
#### Multiple methods of installation are available, with following differences:
7381
74-
| Deployment Method | Supported Environments | Collection Automation | Dashboards | Customzations |
75-
| ----| :----:| :----:| :---: | ---|
76-
| Helm | All* | :heavy_check_mark: | Manual| Full Control (Recommended)
77-
| OCI Resource Manager | OKE | :heavy_check_mark:| :heavy_check_mark: | Partial Control
78-
| Terraform | OKE | :heavy_check_mark: | :heavy_check_mark: | Partial Control
79-
| kubectl | All* | Manual | Manual | Full Control (Not recommended)
82+
| Deployment Method | Supported Environments | Solution UI | Dashboards | Customisations | Comments |
83+
| :----: | :----: | :----: | :----: | :----: | :----: |
84+
| OCI Logging Analytics Connect Cluster | OKE*** | :heavy_check_mark: | Manual | Partial Control (Recommended) | Customisations are possible through `Helm` once deployed using `Logging Analytics Connect Cluster` flow from Console, which is applicable for both Automatic and Manual Deployment modes. We recommend choosing Manual Deployment mode for OKE clusters with Private API Server endpoint, as support for the automatic deployment for the same would be available soon. |
85+
| Helm | All* | :heavy_check_mark:** | Manual| Full Control (Recommended) | |
86+
| OCI Resource Manager | OKE | :heavy_check_mark:** | :heavy_check_mark: | Partial Control | Customisations are possible through `Helm` once deployed using `OCI Resource Manager`. |
87+
| Terraform | OKE | :heavy_check_mark:** | :heavy_check_mark: | Partial Control | Customisations are possible through `Helm` once deployed using `Terraform`. |
88+
| kubectl | All* | :heavy_check_mark:** | Manual | Full Control (Not recommended) | |
8089
8190
\* For some environments, modification of the configuration may be required.
8291
92+
\** Solution UI experience including Topology and other visualisations are available for customers deploying the solution using methods other than `OCI Logging Analytics Connect Cluster`, only if some additional steps are followed as mentioned in their individual sections.
93+
94+
\*** Connect cluster support for EKS and clusters other than OKE (partially automated flow) would be available soon. Meanwhile, if you would like to experience the Solution for EKS, use [helm](#helm) or other deployment methods.
95+
96+
#### OCI Logging Analytics Connect Cluster
97+
98+
This newly launched UI based workflow from Logging Analytics Console is the recommended approach to start enabling Kubernetes Monitoring Solution for your OKE clusters. In this approach, you would go through a guided flow to enable the monitoring. It has support for both Automatic and Manual deployment modes to install helm charts onto your OKE clusters. The creation of various OCI resources like Logging Analytics LogGroup, Entity, Management Agent Install Key is automatically taken care in this approach irrespective of the deployment method that you choose. The required IAM Dynamic Group and Policies for the collection of logs, metrics, objects discovery data into OCI, can be optionally enabled when using this flow.
99+
100+
Customisations are possible through helm once deployed using `Logging Analytics Connect Cluster` flow from Console, which is applicable for both Automatic and Manual Deployment modes. We recommend choosing Manual Deployment mode for OKE clusters with Private API Server endpoint, as support for the automatic deployment for the same would be available soon.
101+
102+
Refer [this doc](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/kubernetes-solution.html) for complete instructions on using this approach.
103+
104+
:hourglass_flowing_sand: Connect cluster support for EKS and clusters other than OKE (partially automated flow) would be available soon. Meanwhile, if you would like to experience the Solution for EKS, use [helm](#helm) or other deployment methods.
105+
83106
#### Helm
84107
85108
##### 0 Pre-requisites
86109
87110
* Workstation or OCI Cloud Shell with access configured to the target k8s cluster.
88111
* Helm ([Installation instructions](https://helm.sh/docs/intro/install/)).
112+
* [OCI CLI](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cliconcepts.htm)
89113
90-
##### 1 Download helm chart
114+
##### 1 Create Logging Analytics Entity of type Kubernetes Cluster
115+
116+
* Prepate Entity metadata which represents Kubernetes Cluster's details.
117+
- Sample entity_metadata.json
118+
```
119+
{"items":[{"name":"cluster","value":"<Cluster_Name>_<Cluster_Creation_Time>","type":"k8s_solution"},{"name":"cluster_date","value":"<Cluster_Creation_Time>","type":"k8s_solution"},{"name":"cluster_name","value":"<Cluster_Name>","type":"k8s_solution"},{"name":"cluster_ocid","value":"<Unique_Identifier_of_Cluster>","type":"k8s_solution"},{"name":"deployment_stack_ocid","value":"NA","type":"k8s_solution"},{"name":"deployment_status","value":"NA","type":"k8s_solution"},{"name":"k8s_version","value":"<Kubernetes_Version>","type":"k8s_solution"},{"name":"metrics_namespace","value":"mgmtagent_kubernetes_metrics","type":"k8s_solution"},{"name":"name","value":"<Cluster_Name>_<Cluster_Creation_Time>","type":"k8s_solution"},{"name":"onm_compartment","value":"<O&M_Compartment_OCID>","type":"k8s_solution"},{"name":"solution_type","value":"<Cluster_Type>","type":"k8s_solution"}]}
120+
```
121+
- <Cluster_Name> => Replace with Name of the Cluster.
122+
- <Cluster_Creation_Time> => Replace with Cluster's creation time in the format, YYYY-MM-DDTHH:MM:SSZ. It is used to distinguish 2 clusters with same name if exists.
123+
- <Unique_Identifier_of_Cluster> => Replace with OCID of OKE cluster OR ARN of EKS cluster, etc.
124+
- <Kubernetes_Version> => Replace with version of Kubernetes running on the cluster.
125+
- <O&M_Compartment_OCID> => Replace with OCID of the compartment in which the `Logging Analytics LogGroup` exists. Note that for the Logging Analytics Solution UI to work properly, you must keep all your OCI resources like `Logging Analytics LogGroup`, `Logging Analytics Entity`, `Management Agent Install Key` under the same compartment.
126+
- <Cluster_Type> => Replace with `OKE` for OKE cluster, `EKS` for Amazon EKS Cluster, etc.
127+
128+
* Create Logging Analytics Entity of type Kubernetes Cluster using above created metadata.
129+
- Sample command to create entity using OCI CLI
130+
```
131+
oci log-analytics entity create --name <Cluster_Name>_<Cluster_Creation_Time> --namespace-name <Tenancy_Namespace> --compartment-id <O&M_Compartment_OCID> --entity-type-name omc_kubernetes_cluster --metadata file://entity_metadata.json
132+
```
133+
- <Tenancy_Namespace> => Namespace of the tenancy in which the Logging Analytics is subscribed. You find it by `Go to OCI Logging Analytics Administration, click Service Details, and note the namespace value.`
134+
135+
##### 2 Create Logging Analytics LogGroup
136+
137+
Create OCI Logging Analytics LogGroup(s) if not done already. Refer [Create Log Group](https://docs.oracle.com/en-us/iaas/logging-analytics/doc/create-logging-analytics-resources.html#GUID-D1758CFB-861F-420D-B12F-34D1CC5E3E0E) for details.
138+
139+
##### 3 Download helm chart
91140
92141
* [latest](https://github.com/oracle-quickstart/oci-kubernetes-monitoring/releases/latest/download/helm-chart.tgz)
93142
* Go to [releases](https://github.com/oracle-quickstart/oci-kubernetes-monitoring/releases) for a specific version.
94143
95-
##### 2 Update values.yaml
144+
##### 4 Update values.yaml
145+
146+
**Note** that for the Logging Analytics Solution UI to work properly, you must keep all your OCI resources like `Logging Analytics LogGroup`, `Logging Analytics Entity`, `Management Agent Install Key` under the same compartment.
96147
97148
* Create override_values.yaml, to override the minimum required variables in values.yaml.
98149
- override_values.yaml
@@ -108,39 +159,48 @@ It does extensive enrichment of logs, metrics and object information to enable c
108159
ociLANamespace:
109160
# OCI Logging Analytics Log Group OCID
110161
ociLALogGroupID:
111-
162+
# OCI Logging Analytics Entity (of Kubernetes Cluster Type) OCID.
163+
ociLAClusterEntityID:
164+
112165
oci-onm-mgmt-agent:
113166
mgmtagent:
114167
# Provide the base64 encoded content of the Management Agent Install Key file
115168
installKeyFileContent:
116169
```
117170
* **Refer to the oci-onm chart and sub-charts values.yaml for customising or modifying any other configuration.** It is recommended to not modify the values.yaml provided with the charts, instead use override_values.yaml to achieve the same.
118171
119-
##### 3.a Install helm release
172+
##### 5.a Install helm release
120173
121-
Use the following `helm install` command to the install the chart. Provide a desired release name, path to override_values.yaml and path to helm chart.
174+
Use the following `helm install` command to the install the chart. Provide a desired release name, path to override_values.yaml and path to helm chart (oci-onm chart).
122175
```
123176
helm install <release-name> --values <path-to-override-values.yaml> <path-to-helm-chart>
124177
```
125178
Refer [this](https://helm.sh/docs/helm/helm_install/) for further details on `helm install`.
126179
127-
##### 3.b Upgrade helm release
180+
##### 5.b Upgrade helm release
128181
129182
Use the following `helm upgrade` command if any further changes to override_values.yaml needs to be applied or a new chart version needs to be deployed.
130183
```
131184
helm upgrade <release-name> --values <path-to-override-values.yaml> <path-to-helm-chart>
132185
```
133186
Refer [this](https://helm.sh/docs/helm/helm_upgrade/) for further details on `helm upgrade`.
134187
135-
##### 3.c Import Dashboards
188+
**Note** : If you have lost the override_values.yaml that was used while installing the helm (OR) you need to get the default one that was used while installing using other approaches like `OCI Logging Analytics Connect Cluster`, `OCI Resource Manager` etc., then run the following command to generate the same.
189+
190+
```
191+
helm get values <release-name> > override_values.yaml
192+
```
193+
\<release-name> => Replace with release name. The default release name used while installing through `OCI Logging Analytics Connect Cluster` is `oci-kubernetes-monitoring`.
194+
195+
##### 5.c (Optional) Import Dashboards
136196
137197
Dashboards needs to be imported manually. Below is an example for importing Dashboards using OCI CLI.
138198
139199
1. Download and configure [OCI CLI](https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm) or open cloud-shell where OCI CLI is pre-installed. Alternative methods like REST API, SDK, Terraform etc can also be used.
140200
2. Find the **OCID** of the compartment, where the dashboards need to be imported.
141201
3. Download the dashboard JSONs from [here](terraform/modules/dashboards/dashboards_json/).
142202
4. **Replace** all the instances of the keyword - "`${compartment_ocid}`" in the JSONs with the **Compartment OCID** identified in previous step.
143-
* Following command is for quick reference that can be used in a linux/cloud-shell envirnment :
203+
* Following command is for quick reference that can be used in a linux/cloud-shell environment :
144204
145205
```
146206
sed -i "s/\${compartment_ocid}/<Replace-with-Compartment-OCID>/g" *.json
@@ -156,7 +216,7 @@ Dashboards needs to be imported manually. Below is an example for importing Dash
156216
oci management-dashboard dashboard import --from-json file://service-type-lb.json
157217
```
158218
159-
##### 4 Uninstall
219+
##### Uninstall
160220
161221
Use the following `helm uninstall` command to uninstall the chart. Provide the release name used when creating the chart.
162222
```
@@ -191,25 +251,34 @@ Launch OCI Resource Manager Stack in OCI Tenancy and Region of the OKE Cluster,
191251
192252
* Workstation or OCI Cloud Shell with access configured to the target k8s cluster.
193253
* Helm ([Installation instructions](https://helm.sh/docs/intro/install/)).
194-
* Kubectl ([Installation instructions](https://kubernetes.io/docs/tasks/tools/#kubectl)).
254+
* Kubectl ([Installation instructions](https://kubernetes.io/docs/tasks/tools/#kubectl)).
255+
* [OCI CLI](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cliconcepts.htm)
256+
257+
##### 1 Create Logging Analytics Entity of type Kubernetes Cluster
258+
259+
Refer [here](1-create-logging-analytics-entity-of-type-kubernetes-cluster)
260+
261+
##### 2 Create Logging Analytics LogGroup
262+
263+
Refer [here](2-create-logging-analytics-loggroup)
195264
196-
##### 1 Download helm chart
265+
##### 3 Download helm chart
197266
198-
Refer [here](#1-download-helm-chart).
267+
Refer [here](#3-download-helm-chart).
199268
200-
##### 2 Update values.yaml
269+
##### 4 Update values.yaml
201270
202-
Refer [here](#2-update-valuesyaml).
271+
Refer [here](#4-update-valuesyaml).
203272
204-
##### 3.a Generate yamls
273+
##### 5.a Generate yamls
205274
206-
Use the following `helm template` command to generate the resource yaml files. Provide path to override_values.yaml, path to helm chart and path to a dir where the yaml files to be generated.
275+
Use the following `helm template` command to generate the resource yaml files. Provide path to override_values.yaml, path to helm chart (oci-onm chart) and path to a dir where the yaml files to be generated.
207276
```
208277
helm template --values <path-to-override-values.yaml> <path-to-helm-chart> --output-dir <path-to-dir-to-store-the-yamls>
209278
```
210279
Refer [this](https://helm.sh/docs/helm/helm_template/) for further details on `helm template`.
211280
212-
##### 3.b Install
281+
##### 5.b Install
213282
214283
Use `kubectl` tool to apply the yaml files generated in the previous step in the following order.
215284
@@ -237,7 +306,7 @@ Use `kubectl` tool to apply the yaml files generated in the previous step in the
237306
kubectl apply -f metric_server.yaml
238307
```
239308
240-
##### 3.c Import Dashboards
309+
##### 5.c (Optional) Import Dashboards
241310
242311
Refer [here](#3c-import-dashboards).
243312
@@ -283,7 +352,7 @@ We recommend you to uninstall the release created using 2.x chart and follow the
283352
284353
If you have modified values.yaml provided in helm chart directly, we recommend you to identify all the changes and move them to override_values.yaml and follow the instructions provided in install or upgrade sections under [this](#helm). We recommend you to use override_values.yaml for updating values for any variables or to incorporate any customisations on top of existing values.yaml.
285354
286-
If you are already using a separate values.yaml for your customisations, you still need to compare 2.x vs 3.x variable heirarchy and make the necessary changes accordingly.
355+
If you are already using a separate values.yaml for your customisations, you still need to compare 2.x vs 3.x variable hierarchy and make the necessary changes accordingly.
287356
288357
<details>
289358
<summary>Examples</summary>

logan/images/cluster-view.png

428 KB
Loading

logan/images/list-clusters.png

807 KB
Loading

0 commit comments

Comments
 (0)