Merge "[AAI] Add model-loader tracing config"
[oom.git] / docs / sections / guides / deployment_guides / oom_customize_overrides.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 .. _helm deploy: https://github.com/onap/oom/blob/master/kubernetes/helm/plugins/deploy/deploy.sh
8
9 .. _oom_customize_overrides:
10
11 OOM Custom Overrides
12 ####################
13
14 The OOM `helm deploy`_ plugin requires deployment configuration as input, usually in the form of override yaml files.
15 These input files determine what ONAP components get deployed, and the configuration of the OOM deployment.
16
17 Other helm config options like `--set log.enabled=true|false` are available.
18
19 See the `helm deploy`_ plugin usage section for more detail, or it the plugin has already been installed, execute the following::
20
21     > helm deploy --help
22
23 Users can customize the override files to suit their required deployment.
24
25 .. note::
26   Standard and example override files (e.g. `onap-all.yaml`, `onap-all-ingress-gatewayapi.yaml`)
27   can be found in the `oom/kubernetes/onap/resources/overrides/` directory.
28
29  * Users can selectively enable or disable ONAP components by changing the ``enabled: true/false`` flags.
30
31  * Add to the command line a value for the global master password (ie. --set global.masterPassword=My_superPassw0rd).
32
33
34 Enabling/Disabling Components
35 =============================
36
37 Here is an example of the nominal entries that need to be provided.
38 Different values files are available for different contexts.
39
40 .. collapse:: Default ONAP values.yaml
41
42     .. include:: ../../../../kubernetes/onap/values.yaml
43        :code: yaml
44
45 |
46
47 ONAP "Production" Setup
48 =======================
49
50 The production setup deploys ONAP components exposing its external services
51 via Ingress with TLS termination.
52 Internal traffic encryption will be ensured by using Istio ServiceMesh.
53
54 For external access we start to establish Authentication via Oauth2-proxy
55 and Keycloak, which will be completed in the coming release.
56
57 To enable both "ServiceMesh" and "Ingress" configuration entries need
58 to be set before deployment.
59
60 Service Mesh and Ingress configuration
61 --------------------------------------
62
63 Global settings relevant for ServiceMesh and Ingress:
64
65 .. code-block:: yaml
66
67   global:
68     ingress:
69       # generally enable ingress for ONAP components
70       enabled: true
71       # enable all component's Ingress interfaces
72       enable_all: false
73
74       # Provider: ingress, istio, gw-api
75       provider: gw-api
76       # Ingress class (only for provider "ingress"): e.g. nginx, traefik
77       ingressClass:
78       # Ingress Selector (only for provider "istio") to match with the
79       # ingress pod label "istio=ingress"
80       ingressSelector: ingress
81       # optional: common used Gateway (for Istio, GW-API) and listener names
82       commonGateway:
83         name: ""
84         httpListener: ""
85         httpsListener: ""
86
87       # default Ingress base URL
88       # All http requests via ingress will be redirected
89       virtualhost:
90         # Default Ingress base URL
91         # can be overwritten in component by setting ingress.baseurlOverride
92         baseurl: "simpledemo.onap.org"
93         # prefix for baseaddr
94         # can be overwritten in component by setting ingress.preaddrOverride
95         preaddr: ""
96         # postfix for baseaddr
97         # can be overwritten in component by setting ingress.postaddrOverride
98         postaddr: ""
99       # All http requests via ingress will be redirected on Ingress controller
100       # only valid for Istio Gateway (ServiceMesh enabled)
101       config:
102         ssl: "redirect"
103       # you can set an own Secret containing a certificate
104       # only valid for Istio Gateway (ServiceMesh enabled)
105       #  tls:
106       #    secret: 'my-ingress-cert'
107       # optional: Namespace of the Istio IngressGateway
108       # only valid for Istio Gateway (ServiceMesh enabled)
109       namespace: istio-ingress
110   ...
111     serviceMesh:
112       enabled: true
113       tls: true
114       # be aware that linkerd is not well tested
115       engine: "istio" # valid value: istio or linkerd
116   ...
117     aafEnabled: false
118     cmpv2Enabled: false
119     tlsEnabled: false
120     msbEnabled: false
121
122 ServiceMesh settings:
123
124 - enabled: true → enables ServiceMesh functionality in the ONAP Namespace (Istio: enables Sidecar deployment)
125 - tls: true → enables mTLS encryption in Sidecar communication
126 - engine: istio → sets the SM engine (currently only Istio is supported)
127 - aafEnabled: false → disables AAF usage for TLS interfaces
128 - tlsEnabled: false → disables creation of TLS in component services
129 - cmpv2Enabled: false → disable cmpv2 feature
130 - msbEnabled: false → MSB is not used in Istio setup (Open, if all components are MSB independend)
131
132 Ingress settings:
133
134 - enabled: true → enables Ingress using: Nginx (when SM disabled), Istio IngressGateway (when SM enabled)
135 - enable_all: true → enables Ingress configuration in each component
136 - provider: "..." → sets the Ingress provider (ingress, istio, gw-api)
137 - ingressClass: "" → Ingress class (only for provider "ingress"): e.g. nginx, traefik
138 - ingressSelector: "" → Selector (only for provider "istio") to match with the ingress pod label "istio=ingress"
139 - commonGateway: "" → optional: common used Gateway (for Istio, GW-API) and http(s) listener names
140 - virtualhost.baseurl: "simpledemo.onap.org" → sets globally the URL for all Interfaces set by the components,
141     resulting in e.g. "aai-api.simpledemo.onap.org", can be overwritten in the component via: ingress.baseurlOverride
142 - virtualhost.preaddr: "pre-" → sets globally a prefix for the Application name for all Interfaces set by the components,
143     resulting in e.g. "pre-aai-api.simpledemo.onap.org", can be overwritten in the component via: ingress.preaddrOverride
144 - virtualhost.postaddr: "-post" → sets globally a postfix for the Application name for all Interfaces set by the components,
145     resulting in e.g. "aai-api-post.simpledemo.onap.org", can be overwritten in the component via: ingress.postaddrOverride
146 - config.ssl: redirect → sets in the Ingress globally the redirection of all Interfaces from http (port 80) to https (port 443)
147 - config.tls.secret: "..." → (optional) overrides the default selfsigned SSL certificate with a certificate stored in the specified secret
148 - namespace: istio-ingress → (optional) overrides the namespace of the ingress gateway which is used for the created SSL certificate
149
150 .. note::
151   For the Ingress setup example override files (`onap-all-ingress-istio.yaml`, `onap-all-ingress-gatewayapi.yaml`)
152   can be found in the `oom/kubernetes/onap/resources/overrides/` directory.
153
154 External Authentication configuration
155 -------------------------------------
156
157 For enabling of external authentication via Oauth2-Proxy and Keycloak
158 the following settings have to be done in the ONAP values override.
159 It will enable the deployment of the ONAP Realm to Keycloak and
160 installation and integration of the Oauth2-Proxy as external Auth-Provider.
161
162 .. code-block:: yaml
163
164   platform:
165     enabled: true
166     cmpv2-cert-service:
167       enabled: false
168     keycloak-init:
169       enabled: true
170     oauth2-proxy:
171       enabled: true