f795a8664af0da7ac7d97590ecb8bdae75c88c77
[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 - Install the Istio Gateway chart,replacing the
131   <recommended-istio-version> with the version defined in
132   the :ref:`versions_table` table::
133
134     > helm upgrade -i istio-ingress istio/gateway -n istio-ingress
135     --version <recommended-istio-version> --wait
136
137 Kiali Installation
138 ==================
139
140 Kiali is used to visualize the Network traffic in a ServiceMesh enabled cluster
141 For setup the kiali operator is used, see `Kiali setup guide`_
142
143 - Install kiali-operator namespace::
144
145     > kubectl create namespace kiali-operator
146
147     > kubectl label namespace kiali-operator istio-injection=enabled
148
149 - Install the kiali-operator::
150
151     > helm repo add kiali https://kiali.org/helm-charts
152
153     > helm repo update kiali
154
155     > helm install --namespace kiali-operator kiali/kiali-operator
156
157 - Create Kiali CR file (e.g. kiali.yaml)
158
159     .. collapse:: kiali.yaml
160
161       .. include:: ../../resources/yaml/kiali.yaml
162          :code: yaml
163
164 - Install kiali::
165
166     > kubectl apply -f kiali.yaml
167
168 - Create Ingress gateway entry for the kiali web interface
169   using the configured Ingress <base-url> (here "simpledemo.onap.org")
170   as described in :ref:`oom_customize_overrides`
171
172     .. collapse:: kiali-ingress.yaml
173
174       .. include:: ../../resources/yaml/kiali-ingress.yaml
175          :code: yaml
176
177 - Add the Ingress entry for Kiali::
178
179     > kubectl -n istio-system apply -f kiali-ingress.yaml
180
181
182 Jaeger Installation
183 ===================
184
185 To be done...
186
187
188 Kserve Installation
189 ********************
190
191 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.
192
193 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.
194
195 **Kserve participant component in Policy ACM requires this installation. Kserve participant deploy/undeploy inference services in Kserve.**
196
197 Dependent component version compatibility details and installation instructions can be found at `Kserve setup guide`_
198
199 Kserve installation requires the following components:
200
201 -  Istio. Its installation instructions can be found at :ref:`oom_base_optional_addons_istio_installation`
202
203 -  Cert-Manager. Its installation instructions can be found at :ref:`oom_base_setup_cert_manager`
204
205 Installation instructions as follows,
206
207 - Create kserve namespace::
208
209     > kubectl create namespace kserve
210
211 - Install Kserve::
212
213     > kubectl apply -f https://github.com/kserve/kserve/releases/download/v<recommended-kserve-version>/kserve.yaml
214
215 - Install Kserve default serving runtimes::
216
217     > kubectl apply -f https://github.com/kserve/kserve/releases/download/v<recommended-kserve-version>/kserve-runtimes.yaml
218
219 - Patch ConfigMap inferenceservice-config as follows::
220
221     > kubectl patch configmap/inferenceservice-config -n kserve --type=strategic -p '{"data": {"deploy": "{\"defaultDeploymentMode\": \"RawDeployment\"}"}}'