[DOC] ServiceMesh documentation
[oom.git] / docs / sections / guides / infra_guides / oom_base_optional_addons.rst
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
5
6 .. Links
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/
12
13 .. _oom_base_optional_addons:
14
15 OOM Optional Addons
16 ###################
17
18 The following optional applications can be added to your kubernetes environment.
19
20 Install Prometheus Stack
21 ************************
22
23 Prometheus is an open-source systems monitoring and alerting toolkit with
24 an active ecosystem.
25
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.
32
33 To install the prometheus stack, execute the following:
34
35 - Add the prometheus-community Helm repository::
36
37     > helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
38
39 - Update your local Helm chart repository cache::
40
41     > helm repo update
42
43 - To install prometheus, execute the following, replacing the <recommended-pm-version> with the version defined in the :ref:`versions_table` table::
44
45     > helm install prometheus prometheus-community/kube-prometheus-stack --namespace=prometheus --create-namespace --version=<recommended-pm-version>
46
47 ONAP on Service Mesh
48 ********************
49
50 .. warning::
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`_
54
55 .. figure:: ../../resources/images/servicemesh/ServiceMesh.png
56    :align: center
57
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`_
61
62 Istio Platform Installation
63 ===========================
64
65 Install Istio Basic Platform
66 ----------------------------
67
68 - Configure the Helm repository::
69
70     > helm repo add istio https://istio-release.storage.googleapis.com/charts
71
72     > helm repo update
73
74 - Create a namespace for "mesh-level" configurations::
75
76     > kubectl create namespace istio-config
77
78 - Create a namespace istio-system for Istio components::
79
80     > kubectl create namespace istio-system
81
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::
85
86     > helm upgrade -i istio-base istio/base -n istio-system --version <recommended-istio-version>
87
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)::
91
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
94
95 Add an EnvoyFilter for HTTP header case
96 ---------------------------------------
97
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
105
106 - Create a EnvoyFilter file (e.g. envoyfilter-case.yaml)
107
108     .. collapse:: envoyfilter-case.yaml
109
110       .. include:: ../../resources/yaml/envoyfilter-case.yaml
111          :code: yaml
112
113 - Apply the change to Istio::
114
115     > kubectl apply -f envoyfilter-case.yaml
116
117 Install Istio Gateway
118 ---------------------
119
120 - Create a namespace istio-ingress for the Istio Ingress gateway
121   and enable istio-injection::
122
123     > kubectl create namespace istio-ingress
124
125     > kubectl label namespace istio-ingress istio-injection=enabled
126
127 - Install the Istio Gateway chart,replacing the
128   <recommended-istio-version> with the version defined in
129   the :ref:`versions_table` table::
130
131     > helm upgrade -i istio-ingressgateway istio/gateway -n istio-ingress
132     --version <recommended-istio-version> --wait
133
134 Kiali Installation
135 ==================
136
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`_
139
140 - Install kiali-operator namespace::
141
142     > kubectl create namespace kiali-operator
143
144     > kubectl label namespace kiali-operator istio-injection=enabled
145
146 - Install the kiali-operator::
147
148     > helm repo add kiali https://kiali.org/helm-charts
149
150     > helm repo update kiali
151
152     > helm install --namespace kiali-operator kiali/kiali-operator
153
154 - Create Kiali CR file (e.g. kiali.yaml)
155
156     .. collapse:: kiali.yaml
157
158       .. include:: ../../resources/yaml/kiali.yaml
159          :code: yaml
160
161 - Install kiali::
162
163     > kubectl apply -f kiali.yaml
164
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`
168
169     .. collapse:: kiali-ingress.yaml
170
171       .. include:: ../../resources/yaml/kiali-ingress.yaml
172          :code: yaml
173
174 - Add the Ingress entry for Kiali::
175
176     > kubectl -n istio-system apply -f kiali-ingress.yaml
177
178
179 Jaeger Installation
180 ===================
181
182 To be done...