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 setup guide: https://istio.io/latest/docs/setup/install/helm/
10 .. _Kiali setup guide: https://kiali.io/docs/installation/installation-guide/example-install/
11 .. _Kserve setup guide: https://kserve.github.io/website/0.10/admin/kubernetes_deployment/
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 setup guide`_
62 .. _oom_base_optional_addons_istio_installation:
64 Istio Platform Installation
65 ===========================
67 Install Istio Basic Platform
68 ----------------------------
70 - Configure the Helm repository::
72 > helm repo add istio https://istio-release.storage.googleapis.com/charts
76 - Create a namespace for "mesh-level" configurations::
78 > kubectl create namespace istio-config
80 - Create a namespace istio-system for Istio components::
82 > kubectl create namespace istio-system
84 - Install the Istio Base chart which contains cluster-wide resources used by the
85 Istio control plane, replacing the <recommended-istio-version> with the version
86 defined in the :ref:`versions_table` table::
88 > helm upgrade -i istio-base istio/base -n istio-system --version <recommended-istio-version>
90 - Install the Istio Base Istio Discovery chart which deploys the istiod service, replacing the
91 <recommended-istio-version> with the version defined in the :ref:`versions_table` table
92 (enable the variable to enforce the (sidecar) proxy startup before the container start)::
94 > helm upgrade -i istiod istio/istiod -n istio-system --version <recommended-istio-version>
95 --wait --set global.proxy.holdApplicationUntilProxyStarts=true --set meshConfig.rootNamespace=istio-config
97 Add an EnvoyFilter for HTTP header case
98 ---------------------------------------
100 When handling HTTP/1.1, Envoy will normalize the header keys to be all lowercase.
101 While this is compliant with the HTTP/1.1 spec, in practice this can result in issues
102 when migrating existing systems that might rely on specific header casing.
103 In our case a problem was detected in the SDC client implementation, which relies on
104 uppercase header values. To solve this problem in general we add a EnvoyFilter to keep
105 the uppercase header in the istio-config namespace to apply for all namespaces, but
106 set the context to SIDECAR_INBOUND to avoid problems in the connection between Istio-Gateway and Services
108 - Create a EnvoyFilter file (e.g. envoyfilter-case.yaml)
110 .. collapse:: envoyfilter-case.yaml
112 .. include:: ../../resources/yaml/envoyfilter-case.yaml
115 - Apply the change to Istio::
117 > kubectl apply -f envoyfilter-case.yaml
119 Install Istio Gateway
120 ---------------------
122 - Create a namespace istio-ingress for the Istio Ingress gateway
123 and enable istio-injection::
125 > kubectl create namespace istio-ingress
127 > kubectl label namespace istio-ingress istio-injection=enabled
129 - To expose additional ports besides HTTP/S (e.g. for external Kafka access, SDNC-callhome)
130 create an override file (e.g. istio-ingress.yaml)
132 .. collapse:: istio-ingress.yaml
134 .. include:: ../../resources/yaml/istio-ingress.yaml
137 - Install the Istio Gateway chart using the override file, replacing the
138 <recommended-istio-version> with the version defined in
139 the :ref:`versions_table` table::
141 > helm upgrade -i istio-ingress istio/gateway -n istio-ingress
142 --version <recommended-istio-version> -f ingress-istio.yaml --wait
147 Kiali is used to visualize the Network traffic in a ServiceMesh enabled cluster
148 For setup the kiali operator is used, see `Kiali setup guide`_
150 - Install kiali-operator namespace::
152 > kubectl create namespace kiali-operator
154 > kubectl label namespace kiali-operator istio-injection=enabled
156 - Install the kiali-operator::
158 > helm repo add kiali https://kiali.org/helm-charts
160 > helm repo update kiali
162 > helm install --namespace kiali-operator kiali/kiali-operator
164 - Create Kiali CR file (e.g. kiali.yaml)
166 .. collapse:: kiali.yaml
168 .. include:: ../../resources/yaml/kiali.yaml
173 > kubectl apply -f kiali.yaml
175 - Create Ingress gateway entry for the kiali web interface
176 using the configured Ingress <base-url> (here "simpledemo.onap.org")
177 as described in :ref:`oom_customize_overrides`
179 .. collapse:: kiali-ingress.yaml
181 .. include:: ../../resources/yaml/kiali-ingress.yaml
184 - Add the Ingress entry for Kiali::
186 > kubectl -n istio-system apply -f kiali-ingress.yaml
198 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 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 **Kserve participant component in Policy ACM requires this installation. Kserve participant deploy/undeploy inference services in Kserve.**
204 Dependent component version compatibility details and installation instructions can be found at `Kserve setup guide`_
206 Kserve installation requires the following components:
208 - Istio. Its installation instructions can be found at :ref:`oom_base_optional_addons_istio_installation`
210 - Cert-Manager. Its installation instructions can be found at :ref:`oom_base_setup_cert_manager`
212 Installation instructions as follows,
214 - Create kserve namespace::
216 > kubectl create namespace kserve
220 > kubectl apply -f https://github.com/kserve/kserve/releases/download/v<recommended-kserve-version>/kserve.yaml
222 - Install Kserve default serving runtimes::
224 > kubectl apply -f https://github.com/kserve/kserve/releases/download/v<recommended-kserve-version>/kserve-runtimes.yaml
226 - Patch ConfigMap inferenceservice-config as follows::
228 > kubectl patch configmap/inferenceservice-config -n kserve --type=strategic -p '{"data": {"deploy": "{\"defaultDeploymentMode\": \"RawDeployment\"}"}}'