ONAP on ServiceMesh setup guide
Background
After the SM PoC (Guilin) we are focussing in deploying SM in Kohn using Istio as SM framework in ONAP.
Target picture is described in SECCOM page:
ONAP Next Generation Security & Logging Architecture
Cluster Preparation
During the setup of the K8S Cluster the Istio resources need to be dinstalled.
As basis in Kohn we use the following platform versions:
helm_release: v3.8.2
kubernetes_release: v1.23.8
istio_release: 1.17.0
Cert-Manager: 1.5.4
Strimzi-Operator: 0.30.0
More information
Istio Best Practices:
https://docs.solo.io/gloo-mesh-enterprise/latest/setup/prod/namespaces/
Install Istio
Source: https://istio.io/latest/docs/setup/install/helm/
Istio basics
Configure the Helm repository:
$ helm repo add istio https://istio-release.storage.googleapis.com/charts $ helm repo update
Create a namespace for "mesh-level" configurations
$ kubectl create namespace istio-config
Create a namespace istio-system for Istio components:
$ kubectl create namespace istio-system
Install the Istio Base chart which contains cluster-wide resources used by the Istio control plane:
Install the Istio Discovery chart which deploys the istiod service:
(enable the variable to enforce the (sidecar) proxy startup before the container start)
Create a values-override.yaml file to override settings (required for oauth2-proxy):
Install Istio Discovery using the override file
Add an EnvoyFilter for HTTP header case
When handling HTTP/1.1, Envoy will normalize the header keys to be all lowercase.
While this is compliant with the HTTP/1.1 spec, in practice this can result in issues when migrating existing systems that might rely on specific header casing.
In our case a problem was detected in the SDC client implementation, thich relies on uppercase header values.
To solve this problem in general
we add a EnvoyFilter to keep the uppercase header in the istio-config namespace to apply for all namespaces.
but set the context to SIDECAR_INBOUND and SIDECAR_OUTBOUND to avoid problems in the connection between Istio-Gateway and Services
Create a EnvoyFilter file (e.g. envoyfilter-case.yaml)
Apply the change to Istio
Istio Ingress Gateway
Create a namespace istio-ingress for the Istio Ingress gateway and enable istio-injection:
Install the Istio Gateway chart:
(Addon required for
Install Jaeger/Kiali
Kiali Installation
see: https://kiali.io/docs/installation/installation-guide/example-install/
Create kiali-operator Namespace
Install Kiali Operator
Create Kiali CR file (e.g. kiali.yaml)
kiali.yaml
Install Kiali
Create Ingress gateway entry for the Kiali web interface
kiali-Ingress.yaml
Add the Ingress entry for Kiali
Configure ONAP charts
Global settings
Global values used for ServiceMesh and Ingress setup can be found in
The following variable settings are used for enabling ServiceMesh as well as Istio Ingress:
ServiceMesh settings:
enabled: true → enables ServiceMesh functionality in the ONAP Namespace (Istio: enables Sidecar deployment)
tls: true → enables mTLS encryption in Sidecar communication
engine: istio → sets the SM engine (currently only Istio is supported)
aafEnabled: false → disables AAF usage for TLS interfaces
tlsEnabled: false → disables creation of TLS in component services
cmpv2Enabled: false → disable cmpv2 feature
msbEnabled: false → MSB is not used in Istio setup (Open, if all components are MSB independend)
Ingress settings:
enabled: true → enables Ingress using: Nginx (when SM disabled), Istio IngressGateway (when SM enabled)
virtualhost.baseurl: "simpledemo.onap.org" → sets globally the URL for all Interfaces set by the components, resulting in e.g. "aai-api.simpledemo.onap.org"
config.ssl: redirect → sets in the Ingress globally the redirection of all Interfaces from http (port 80) to https (port 443)
config.tls.secret: "..." → (optional) overrides the default selfsigned SSL certificate with a certificate stored in the specified secret
namespace: istio-ingress → (optional) overrides the namespace of the ingress gateway which is used for the created SSL certificate
Install ONAP
Clone OOM repository from ONAP
Create an ServiceMesh override file (here ~/onap-overides.yaml) with the following example content (including a workarround for DMAAP AAF issue)
The Ingress configuration can be found in ~/oom/kubernetes/onap/resources/overrides/onap-all-ingress-istio.yamlInstall Helm Plugins
Install ChartMuseum as Helm Registry, start it and add local repository
Compile ONAP helm charts (here with 4 parallel threads)
Create ONAP namespace and label it for Istio sidecar injection:
Deploy ONAP:
Re-deploy or upgrade a single components (here platform)
Access ONAP APIs/UIs
In the ServiceMesh deployment the Istio IngressGateway is the only accesspoint for ONAP component interfaces.
Usually the Ingress is accessed via a LoadBalancer IP (<ingress-IP>, which is used as central address.
All APIs/UIs are provided via separate URLs which are routed to the component service.
To use these URLs they need to be resolvable via DNS or via /etc/hosts, here is the example: