[STRIMZI] Correction for external Access via Ingress
[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 .. _Kserve setup guide: https://kserve.github.io/website/0.10/admin/kubernetes_deployment/
13
14 .. _oom_base_optional_addons:
15
16 OOM Optional Addons
17 ###################
18
19 The following optional applications can be added to your kubernetes environment.
20
21 Install Prometheus Stack
22 ************************
23
24 Prometheus is an open-source systems monitoring and alerting toolkit with
25 an active ecosystem.
26
27 Kube Prometheus Stack is a collection of Kubernetes manifests, Grafana
28 dashboards, and Prometheus rules combined with documentation and scripts to
29 provide easy to operate end-to-end Kubernetes cluster monitoring with
30 Prometheus using the Prometheus Operator. As it includes both Prometheus
31 Operator and Grafana dashboards, there is no need to set up them separately.
32 See the `Prometheus stack README`_ for more information.
33
34 To install the prometheus stack, execute the following:
35
36 - Add the prometheus-community Helm repository::
37
38     > helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
39
40 - Update your local Helm chart repository cache::
41
42     > helm repo update
43
44 - To install prometheus, execute the following, replacing the <recommended-pm-version> with the version defined in the :ref:`versions_table` table::
45
46     > helm install prometheus prometheus-community/kube-prometheus-stack --namespace=prometheus --create-namespace --version=<recommended-pm-version>
47
48 ONAP on Service Mesh
49 ********************
50
51 .. warning::
52     "ONAP on Service Mesh" is not fully supported in "Kohn". Full support is
53     planned for London release to support the
54     `ONAP Next Generation Security & Logging Structure`_
55
56 .. figure:: ../../resources/images/servicemesh/ServiceMesh.png
57    :align: center
58
59 ONAP is currenty planned to support Istio as default ServiceMesh platform.
60 Therefor the following instructions describe the setup of Istio and required tools.
61 Used `Istio best practices`_ and `Istio setup guide`_
62
63 .. _oom_base_optional_addons_istio_installation:
64
65 Istio Platform Installation
66 ===========================
67
68 Install Istio Basic Platform
69 ----------------------------
70
71 - Configure the Helm repository::
72
73     > helm repo add istio https://istio-release.storage.googleapis.com/charts
74
75     > helm repo update
76
77 - Create a namespace for "mesh-level" configurations::
78
79     > kubectl create namespace istio-config
80
81 - Create a namespace istio-system for Istio components::
82
83     > kubectl create namespace istio-system
84
85 - Install the Istio Base chart which contains cluster-wide resources used by the
86   Istio control plane, replacing the <recommended-istio-version> with the version
87   defined in the :ref:`versions_table` table::
88
89     > helm upgrade -i istio-base istio/base -n istio-system --version <recommended-istio-version>
90
91 - Install the Istio Base Istio Discovery chart which deploys the istiod service, replacing the
92   <recommended-istio-version> with the version defined in the :ref:`versions_table` table
93   (enable the variable to enforce the (sidecar) proxy startup before the container start)::
94
95     > helm upgrade -i istiod istio/istiod -n istio-system --version <recommended-istio-version>
96     --wait --set global.proxy.holdApplicationUntilProxyStarts=true --set meshConfig.rootNamespace=istio-config
97
98 Add an EnvoyFilter for HTTP header case
99 ---------------------------------------
100
101 When handling HTTP/1.1, Envoy will normalize the header keys to be all lowercase.
102 While this is compliant with the HTTP/1.1 spec, in practice this can result in issues
103 when migrating existing systems that might rely on specific header casing.
104 In our case a problem was detected in the SDC client implementation, which relies on
105 uppercase header values. To solve this problem in general we add a EnvoyFilter to keep
106 the uppercase header in the istio-config namespace to apply for all namespaces, but
107 set the context to SIDECAR_INBOUND to avoid problems in the connection between Istio-Gateway and Services
108
109 - Create a EnvoyFilter file (e.g. envoyfilter-case.yaml)
110
111     .. collapse:: envoyfilter-case.yaml
112
113       .. include:: ../../resources/yaml/envoyfilter-case.yaml
114          :code: yaml
115
116 - Apply the change to Istio::
117
118     > kubectl apply -f envoyfilter-case.yaml
119
120 Install Istio Gateway
121 ---------------------
122
123 - Create a namespace istio-ingress for the Istio Ingress gateway
124   and enable istio-injection::
125
126     > kubectl create namespace istio-ingress
127
128     > kubectl label namespace istio-ingress istio-injection=enabled
129
130 - To expose additional ports besides HTTP/S (e.g. for external Kafka access)
131   create an override file (e.g. istio-ingress.yaml)
132
133     .. collapse:: istio-ingress.yaml
134
135       .. include:: ../../resources/yaml/istio-ingress.yaml
136          :code: yaml
137
138 - Install the Istio Gateway chart using the override file, replacing the
139   <recommended-istio-version> with the version defined in
140   the :ref:`versions_table` table::
141
142     > helm upgrade -i istio-ingress istio/gateway -n istio-ingress
143     --version <recommended-istio-version> -f ingress-istio.yaml --wait
144
145 Kiali Installation
146 ==================
147
148 Kiali is used to visualize the Network traffic in a ServiceMesh enabled cluster
149 For setup the kiali operator is used, see `Kiali setup guide`_
150
151 - Install kiali-operator namespace::
152
153     > kubectl create namespace kiali-operator
154
155     > kubectl label namespace kiali-operator istio-injection=enabled
156
157 - Install the kiali-operator::
158
159     > helm repo add kiali https://kiali.org/helm-charts
160
161     > helm repo update kiali
162
163     > helm install --namespace kiali-operator kiali/kiali-operator
164
165 - Create Kiali CR file (e.g. kiali.yaml)
166
167     .. collapse:: kiali.yaml
168
169       .. include:: ../../resources/yaml/kiali.yaml
170          :code: yaml
171
172 - Install kiali::
173
174     > kubectl apply -f kiali.yaml
175
176 - Create Ingress gateway entry for the kiali web interface
177   using the configured Ingress <base-url> (here "simpledemo.onap.org")
178   as described in :ref:`oom_customize_overrides`
179
180     .. collapse:: kiali-ingress.yaml
181
182       .. include:: ../../resources/yaml/kiali-ingress.yaml
183          :code: yaml
184
185 - Add the Ingress entry for Kiali::
186
187     > kubectl -n istio-system apply -f kiali-ingress.yaml
188
189
190 Jaeger Installation
191 ===================
192
193 To be done...
194
195
196 Kserve Installation
197 ********************
198
199 KServe is a standard Model Inference Platform on Kubernetes. It supports RawDeployment mode to enable InferenceService deployment with Kubernetes resources. Comparing to serverless deployment it unlocks Knative limitations such as mounting multiple volumes, on the other hand Scale down and from Zero is not supported in RawDeployment mode.
200
201 This installation is necessary for the ML models to be deployed as inference service. Once deployed, the inference services can be queried for the prediction.
202
203 **Kserve participant component in Policy ACM requires this installation. Kserve participant deploy/undeploy inference services in Kserve.**
204
205 Dependent component version compatibility details and installation instructions can be found at `Kserve setup guide`_
206
207 Kserve installation requires the following components:
208
209 -  Istio. Its installation instructions can be found at :ref:`oom_base_optional_addons_istio_installation`
210
211 -  Cert-Manager. Its installation instructions can be found at :ref:`oom_base_setup_cert_manager`
212
213 Installation instructions as follows,
214
215 - Create kserve namespace::
216
217     > kubectl create namespace kserve
218
219 - Install Kserve::
220
221     > kubectl apply -f https://github.com/kserve/kserve/releases/download/v<recommended-kserve-version>/kserve.yaml
222
223 - Install Kserve default serving runtimes::
224
225     > kubectl apply -f https://github.com/kserve/kserve/releases/download/v<recommended-kserve-version>/kserve-runtimes.yaml
226
227 - Patch ConfigMap inferenceservice-config as follows::
228
229     > kubectl patch configmap/inferenceservice-config -n kserve --type=strategic -p '{"data": {"deploy": "{\"defaultDeploymentMode\": \"RawDeployment\"}"}}'