1 .. This work is licensed under a Creative Commons Attribution 4.0
2 .. International License.
3 .. http://creativecommons.org/licenses/by/4.0
4 .. Copyright (C) 2022 Nordix Foundation
7 .. _Prometheus stack README: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack#readme
8 .. _ONAP Next Generation Security & Logging Structure: https://wiki.onap.org/pages/viewpage.action?pageId=103417456
9 .. _Istio best practices: https://docs.solo.io/gloo-mesh-enterprise/latest/setup/prod/namespaces/
10 .. _Istio setup guide: https://istio.io/latest/docs/setup/install/helm/
11 .. _Kiali setup guide: https://kiali.io/docs/installation/installation-guide/example-install/
13 .. _oom_base_optional_addons:
18 The following optional applications can be added to your kubernetes environment.
20 Install Prometheus Stack
21 ************************
23 Prometheus is an open-source systems monitoring and alerting toolkit with
26 Kube Prometheus Stack is a collection of Kubernetes manifests, Grafana
27 dashboards, and Prometheus rules combined with documentation and scripts to
28 provide easy to operate end-to-end Kubernetes cluster monitoring with
29 Prometheus using the Prometheus Operator. As it includes both Prometheus
30 Operator and Grafana dashboards, there is no need to set up them separately.
31 See the `Prometheus stack README`_ for more information.
33 To install the prometheus stack, execute the following:
35 - Add the prometheus-community Helm repository::
37 > helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
39 - Update your local Helm chart repository cache::
43 - To install prometheus, execute the following, replacing the <recommended-pm-version> with the version defined in the :ref:`versions_table` table::
45 > helm install prometheus prometheus-community/kube-prometheus-stack --namespace=prometheus --create-namespace --version=<recommended-pm-version>
51 "ONAP on Service Mesh" is not fully supported in "Kohn". Full support is
52 planned for London release to support the
53 `ONAP Next Generation Security & Logging Structure`_
55 .. figure:: ../../resources/images/servicemesh/ServiceMesh.png
58 ONAP is currenty planned to support Istio as default ServiceMesh platform.
59 Therefor the following instructions describe the setup of Istio and required tools.
60 Used `Istio best practices`_ and `Istio setup guide`_
62 Istio Platform Installation
63 ===========================
65 Install Istio Basic Platform
66 ----------------------------
68 - Configure the Helm repository::
70 > helm repo add istio https://istio-release.storage.googleapis.com/charts
74 - Create a namespace for "mesh-level" configurations::
76 > kubectl create namespace istio-config
78 - Create a namespace istio-system for Istio components::
80 > kubectl create namespace istio-system
82 - Install the Istio Base chart which contains cluster-wide resources used by the
83 Istio control plane, replacing the <recommended-istio-version> with the version
84 defined in the :ref:`versions_table` table::
86 > helm upgrade -i istio-base istio/base -n istio-system --version <recommended-istio-version>
88 - Install the Istio Base Istio Discovery chart which deploys the istiod service, replacing the
89 <recommended-istio-version> with the version defined in the :ref:`versions_table` table
90 (enable the variable to enforce the (sidecar) proxy startup before the container start)::
92 > helm upgrade -i istiod istio/istiod -n istio-system --version <recommended-istio-version>
93 --wait --set global.proxy.holdApplicationUntilProxyStarts=true --set meshConfig.rootNamespace=istio-config
95 Add an EnvoyFilter for HTTP header case
96 ---------------------------------------
98 When handling HTTP/1.1, Envoy will normalize the header keys to be all lowercase.
99 While this is compliant with the HTTP/1.1 spec, in practice this can result in issues
100 when migrating existing systems that might rely on specific header casing.
101 In our case a problem was detected in the SDC client implementation, which relies on
102 uppercase header values. To solve this problem in general we add a EnvoyFilter to keep
103 the uppercase header in the istio-config namespace to apply for all namespaces, but
104 set the context to SIDECAR_INBOUND to avoid problems in the connection between Istio-Gateway and Services
106 - Create a EnvoyFilter file (e.g. envoyfilter-case.yaml)
108 .. collapse:: envoyfilter-case.yaml
110 .. include:: ../../resources/yaml/envoyfilter-case.yaml
113 - Apply the change to Istio::
115 > kubectl apply -f envoyfilter-case.yaml
117 Install Istio Gateway
118 ---------------------
120 - Create a namespace istio-ingress for the Istio Ingress gateway
121 and enable istio-injection::
123 > kubectl create namespace istio-ingress
125 > kubectl label namespace istio-ingress istio-injection=enabled
127 - Install the Istio Gateway chart,replacing the
128 <recommended-istio-version> with the version defined in
129 the :ref:`versions_table` table::
131 > helm upgrade -i istio-ingressgateway istio/gateway -n istio-ingress
132 --version <recommended-istio-version> --wait
137 Kiali is used to visualize the Network traffic in a ServiceMesh enabled cluster
138 For setup the kiali operator is used, see `Kiali setup guide`_
140 - Install kiali-operator namespace::
142 > kubectl create namespace kiali-operator
144 > kubectl label namespace kiali-operator istio-injection=enabled
146 - Install the kiali-operator::
148 > helm repo add kiali https://kiali.org/helm-charts
150 > helm repo update kiali
152 > helm install --namespace kiali-operator kiali/kiali-operator
154 - Create Kiali CR file (e.g. kiali.yaml)
156 .. collapse:: kiali.yaml
158 .. include:: ../../resources/yaml/kiali.yaml
163 > kubectl apply -f kiali.yaml
165 - Create Ingress gateway entry for the kiali web interface
166 using the configured Ingress <base-url> (here "simpledemo.onap.org")
167 as described in :ref:`oom_customize_overrides`
169 .. collapse:: kiali-ingress.yaml
171 .. include:: ../../resources/yaml/kiali-ingress.yaml
174 - Add the Ingress entry for Kiali::
176 > kubectl -n istio-system apply -f kiali-ingress.yaml