Newer
Older
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
### Hardware requirements:
| **Minimum Hardware Requirements** | **Recommended Hardware Requirements** |
| --------------------------------- | ------------------------------------ |
| 4 CPU cores | 8 CPU cores |
| 8 GB RAM | 16 GB RAM |
| 30 GB storage | 50 GB storage |
### Software Requirements:
* **git:** For cloning the project repository.
* **Kubernetes:** A running cluster where OpenSlice will be deployed.
* **Disclaimer:** The current manual setup of Persistent Volumes using `hostPath` is designed to operate with **only a single worker node**. This setup will not support data persistence if a pod is rescheduled to another node.
* **Helm:** For managing the deployment of OpenSlice.
* **Ingress Controller:** Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules defined on the Ingress resource. An Ingress may be configured to give Services externally-reachable URLs, load balance traffic, terminate SSL / TLS, and offer name-based virtual hosting. An Ingress controller is responsible for fulfilling the Ingress, usually with a load balancer, though it may also configure your edge router or additional frontends to help handle the traffic. You must have an Ingress controller to satisfy an Ingress.
* An Nginx ingress controller is required, which can be installed using [this guide](https://docs.nginx.com/nginx-ingress-controller/installation/installing-nic/installation-with-helm/).
* If you use another type of ingress controller, you'll need to modify `[repo-root]/kubernetes/helm/openslice/templates/openslice-ingress.yaml` to conform to your ingress controller's requirements.
* **Network Load Balancer:** Required for exposing the service (e.g., GCP, AWS, Azure, MetalLB).
* **Domain/IP Address:** Necessary for accessing the application. This should be configured in `[repo-root]/kubernetes/helm/openslice/values.yaml` under `rooturl`.
### Additional Configuration
* **Storage Class:** In a production environment, specify your `storageClass` in `[repo-root]/kubernetes/helm/openslice/values.yaml` under `storageClass`. If not defined, PVs will be created and managed manually.
* **Disclaimer:** Before deploying, confirm that your storage system supports claims of one 10G and two 1G volumes.
## Preparing the environment
### 1. Setting Up A Kubernetes Cluster
Refer to the official Kubernetes documentation for setting up a cluster. Ensure your cluster meets the hardware requirements specified above.
### 2. Installing Helm
Helm must be installed on your machine to deploy OpenSlice via Helm charts. Follow the [official Helm installation guide](https://helm.sh/docs/intro/install/).
## Downloading the project
### 1. Create a new folder to download the project
```bash
mkdir openslice
cd openslice
```
### 2. Download the project code
Clone the project code from the GitLab repository.
**Note:** This process will be simplified once the charts are published in the GitLab registry, requiring only the chart to be pulled.
```bash
git clone https://labs.etsi.org/rep/osl/code/org.etsi.osl.main.git
cd org.etsi.osl.main/kubernetes/helm/openslice/
```
### 3. Prerequisites before deployment
Before deploying the Helm chart, ensure you have configured the necessary components as detailed in the following section, i.e. [Configure Helm Chart Services](#configure-helm-chart-services). By default, the `main` branch is selected for deployment.
We recommend:
* main branch for the most stable experience and
* develop branch for an experience with the latest features (for develop branch installation, it is strongly advisable that you may as well follow the [develop documentation](https://osl.etsi.org/documentation/develop/deployment/))
## Configure Helm Chart Services
When deploying OpenSlice with Helm, service configurations are handled through the `values.yaml` file. This file allows you to define all necessary configurations for your deployment, including database credentials, service URLs, and logging levels. Below are examples of how to configure your services in Helm based on your provided values.
### Configuring Services
#### 1. Database Configuration
To configure MySQL and other related services, you can directly set the values in your `values.yaml` file under the `oscreds` and `mysql` sections. For example:
```yaml
oscreds:
mysql:
username: "root"
password: "letmein"
openslicedb: "osdb"
keycloak:
database: "keycloak"
username: "keycloak"
password: "password"
adminpassword: "Pa55w0rd"
portal:
database: "osdb"
username: "portaluser"
password: "12345"
```
#### 2. External Services Configuration
For configuring external services like Bugzilla and CentralLog, specify their URLs and credentials in the `values.yaml` file:
```yaml
bugzillaurl: "example.com:443/bugzilla"
bugzillakey: "VH2Vw0iI5aYgALFFzVDWqhACwt6Hu3bXla9kSC1Z"
main_operations_product: "Main Site Operations" // this is the default product to issue tickets
centrallogurl: "http://elk_ip:elk_port/index_name/_doc"
```
Bugzilla should have the following components under the specified product:
* NSD Deployment Request: Component used to schedule deployment req
* Onboarding: Issues related to VNF/NSD Onboarding
* Operations Support: Default component for operations support
* Validation: Use to track validation processes of VNFs and NSDs
* VPN Credentials/Access: Used for requesting VPN Credentials/Access
Also in the 'Main Site Operations' product, a version named 'unspecified' must be created.
#### 3. Keycloak Configuration
Keycloak settings, including the database and admin password, are part of the `oscreds.mysql.keycloak` section. If you need to adjust Keycloak-specific settings like realms or client configurations, you'll likely need to customize your Helm chart further or manage these settings directly within Keycloak after deployment. The Keycloak realm configuration that is imported by default can be found under `kubernetes/helm/openslice/files/keycloak-init/realm-export.json`.
```yaml
oscreds:
mysql:
keycloak:
database: "keycloak"
username: "keycloak"
password: "password"
adminpassword: "Pa55w0rd"
```
#### 4. Application and Logging Configuration
Application-specific configurations, such as OAuth client secrets, can be set in the `spring` section:
```yaml
spring:
oauthClientSecret: "secret"
```
#### 5. Ingress and Root URL
To configure the ingress controller and root URL for OpenSlice, update the rooturl field with your ingress load balancer IP or domain. This setting is crucial for external access to your application:
```yaml
rooturl: "http://openslice.com" # Example domain
# or
rooturl: "http://3.15.198.35:8080" # Example IP with port
```
#### 6. Persistent Volume for MySQL
For persistent storage, especially for MySQL, define the storage size under the `mysql` section. This ensures that your database retains data across pod restarts and deployments.
```yaml
mysql:
storage: "10Gi"
```
## Configure Web UI
In folder `kubernetes/helm/openslice/files/org.etsi.osl.portal.web/src/js` you must make a copy of `config.js.default` file and rename it to `config.js`.
This is **mandatory** for the configuration file to be discoverable.
Edit the `config.js` configuration file with your static configuration, if needed.
```
{
TITLE: "OpenSlice by ETSI",
WIKI: "https://osl.etsi.org/documentation/",
BUGZILLA: "{{ .Values.rooturl }}/bugzilla",
STATUS: "{{ .Values.rooturl }}/status",
APIURL: "{{ .Values.rooturl }}",
WEBURL: "{{ .Values.rooturl }}/nfvportal",
APIOAUTHURL: "{{ .Values.rooturl }}/auth/realms/openslice",
APITMFURL: "{{ .Values.rooturl }}/tmf-api/serviceCatalogManagement/v4"
}
```
## Configure TMF Web UI
In the folder `kubernetes/helm/openslice/files/org.etsi.osl.tmf.web/src/assets/config` there are 3 files available for configuration:
* config.prod.default.json (Basic information + API configuration)
* theming.default.scss (CSS color palette theming)
* config.theming.default.json (HTML configuration - Logo, Favicon, Footer)
You must make a copy of files:
* `config.prod.default.json` and rename it to `config.prod.json`
* `theming.default.scss` and rename it to `theming.scss`
The 2 files above (i.e. config.prod.json, theming.scss) are essential for the successful deployment of OpenSlice, and executing the above steps is **mandatory** for the configuration files to be discoverable.
Ensure that you check the `config.prod.json` and `theming.scss` files and readjust to your deployment if needed.
```bash
# Starting from the root project directory
cd kubernetes/helm/openslice/files/org.etsi.osl.tmf.web/src/assets/config
```
E.g. You may edit "TITLE", "WIKI", etc properties with your domain title. Also configure TMF's API and Keycloak's location for the web application, if needed.
```
{
"TITLE": "OpenSlice by ETSI",
"PORTALVERSION":"2024Q2",
"WIKI": "https://osl.etsi.org/documentation",
"BUGZILLA": "{BASEURL}/bugzilla/",
"STATUS": "{BASEURL}/status/",
"WEBURL": "{BASEURL}",
"PORTAL_REPO_APIURL": "{BASEURL}/osapi",
"ASSURANCE_SERVICE_MGMT_APIURL": "{BASEURL}/oas-api",
"APITMFURL": "{BASEURL}/tmf-api",
"OAUTH_CONFIG" : {
"issuer": "{BASEURL}/auth/realms/openslice",
"loginUrl": "{BASEURL}/auth/realms/openslice/protocol/openid-connect/auth",
"tokenEndpoint": "{BASEURL}/auth/realms/openslice/protocol/openid-connect/token",
"userinfoEndpoint": "{BASEURL}/auth/realms/openslice/protocol/openid-connect/userinfo",
"redirectUri": "{BASEURL}/redirect",
"logoutUrl": "{BASEURL}/auth/realms/openslice/protocol/openid-connect/logout",
"postLogoutRedirectUri": "{BASEURL}",
"responseType": "code",
"oidc": false,
"clientId": "osapiWebClientId",
"dummyClientSecret": "secret",
"requireHttps": false,
"useHttpBasicAuth": true,
"clearHashAfterLogin": false,
"showDebugInformation": true
}
}
```
> The {BASEURL} placeholder in the file automatically detects the Origin (Protocol://Domain:Port) of the deployment and applies it to every respective property. E.g. If you are attempting a local deployment of OpenSlice, then {BASEURL} is automatically translated to "http://localhost". Similarly, you may use {BASEURL} to translate to a public deployment configuration, e.g. "https://portal.openslice.io".
If further customization, apart from the default provided, is needed for branding (Logo, Footer) then `config.theming.json` needs to be created in kubernetes/helm/openslice/files/org.etsi.osl.tmf.web/src/assets/config directory, as follows:
```bash
# Starting from the root project directory
cd kubernetes/helm/openslice/files/org.etsi.osl.tmf.web/src/assets/config
```
```bash
sudo cp config.theming.default.json config.theming.json
```
### 3. Deploy the Helm Chart
After configuring the services, and editing the `values.yaml` file accordingly, the helm install command can be performed.
```bash
cd kubernetes/helm/openslice/
helm install myopenslice . --namespace openslice --create-namespace
```
## Validating deployments and container monitoring
In a Kubernetes environment, you can monitor the status of your deployments and containers using `kubectl`, the Kubernetes command-line tool, which provides powerful capabilities for inspecting the state of resources in your cluster.
### Checking the Status of your application's deployment
To check the status of your deployment, use the following commands. The output should be similar:
```bash
kubectl get pods -n openslice
NAME READY UP-TO-DATE AVAILABLE AGE
myopenslice-artemis 1/1 1 1 6m28s
myopenslice-blockdiag 1/1 1 1 6m28s
myopenslice-bugzilla 1/1 1 1 6m28s
myopenslice-centrallog 1/1 1 1 6m28s
myopenslice-cridge 1/1 1 1 6m28s
myopenslice-keycloak 1/1 1 1 6m28s
myopenslice-kroki 1/1 1 1 6m28s
myopenslice-manoclient 1/1 1 1 6m28s
myopenslice-oasapi 1/1 1 1 6m28s
myopenslice-osom 1/1 1 1 6m28s
myopenslice-osportalapi 1/1 1 1 6m28s
myopenslice-osscapi 1/1 1 1 6m28s
myopenslice-portalweb 1/1 1 1 6m28s
myopenslice-tmfweb 1/1 1 1 6m28s
```
```bash
kubectl get deployments -n openslice
NAME READY UP-TO-DATE AVAILABLE AGE
myopenslice-artemis 1/1 1 1 7m17s
myopenslice-blockdiag 1/1 1 1 7m17s
myopenslice-bugzilla 1/1 1 1 7m17s
myopenslice-centrallog 1/1 1 1 7m17s
myopenslice-cridge 1/1 1 1 7m17s
myopenslice-keycloak 1/1 1 1 7m17s
myopenslice-kroki 1/1 1 1 7m17s
myopenslice-manoclient 1/1 1 1 7m17s
myopenslice-oasapi 1/1 1 1 7m17s
myopenslice-osom 1/1 1 1 7m17s
myopenslice-osportalapi 1/1 1 1 7m17s
myopenslice-osscapi 1/1 1 1 7m17s
myopenslice-portalweb 1/1 1 1 7m17s
myopenslice-tmfweb 1/1 1 1 7m17s
```
```bash
kubectl get services -n openslice
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
myopenslice-artemis ClusterIP 10.101.128.223 <none> 8161/TCP,61616/TCP,61613/TCP 7m43s
myopenslice-blockdiag ClusterIP 10.109.196.90 <none> 8001/TCP 7m43s
myopenslice-bugzilla ClusterIP 10.107.10.101 <none> 13010/TCP 7m43s
myopenslice-centrallog ClusterIP 10.109.84.33 <none> 13013/TCP 7m43s
myopenslice-keycloak ClusterIP 10.104.172.73 <none> 8080/TCP,8443/TCP 7m43s
myopenslice-kroki ClusterIP 10.106.92.111 <none> 8000/TCP 7m43s
myopenslice-manoclient ClusterIP 10.100.143.154 <none> 13011/TCP 7m43s
myopenslice-mysql ClusterIP 10.108.206.75 <none> 3306/TCP 7m43s
myopenslice-oasapi ClusterIP 10.100.107.66 <none> 13101/TCP 7m43s
myopenslice-osom ClusterIP 10.97.88.133 <none> 13100/TCP 7m43s
myopenslice-osportalapi ClusterIP 10.111.212.76 <none> 13000/TCP 7m43s
myopenslice-osscapi ClusterIP 10.101.84.220 <none> 13082/TCP 7m43s
myopenslice-portalweb ClusterIP 10.101.16.112 <none> 80/TCP 7m43s
myopenslice-tmfweb ClusterIP 10.101.157.185 <none> 80/TCP 7m43s
```
### Accessing Logs for Troubleshooting
If a pod is not in the expected state, you can access its logs for troubleshooting:
```bash
kubectl logs <pod-name> -n openslice
```
## Post installation steps
After the successful deployment of OpenSlice, to ensure the E2E user experience, **this section is mandatory**. It contains crucial configuration in regard of authentication and user creation.
### Configure Keycloak server
The Keycloack server is managing authentication and running on a container at port 8080. It is also proxied to your host via the ingress resource under http://your-domain/auth.
- Navigate to http://your-domain/auth/ or https://your-domain/auth/, (http://ipaddress:8080/auth/ or https://ipaddress:8443/auth/ which are directly accessible without proxy)
- Navigate to Administration Console
- Login with the credentials from section [Keycloak Configuration](#3-keycloak-configuration). Default values are:
- user: admin
- password: Pa55w0rd
> This applies only if you are running in HTTP and get a message: HTTPS required.
To resolve this issue <u>when running in HTTP</u>:
- Select the master realm from top left corner
- Go to login Tab and select "Require SSL": None
- Repeat for realm Openslice
> If you are running in HTTPS, then "Require SSL" can be left unchanged to external requests.
#### 1. Configure email
Keycloak allows new users to register. Subsequently, this will also allow new users to register to the OpenSlice portal.
Navigate to realm Openslice > Realm Settings > Login Tab > check User registration, Verify email, Forgot password etc.
Finally, enter the details of the mail server at the Email Tab.
> Email configuration is optional for test runs, but if not provided the above functionalities (e.g. external user registration) will not be possible.
#### 2. Add an OpenSlice admin user
This step is mandatory so as to access the OpenSlice Web UI. To add an OpenSlice admin user you must:
- Navigate to realm Openslice > Users > Add user
- Set a password
- Upon creation, navigate to Role Mappings and add ADMIN to Assigned Roles list
> That user is different from the Keycloak admin user. It is required to login and browse the OpenSlice Web UI. The Role ADMIN guarantee full access through the OpenSlice UI, thus such a user is always required.
### NFV Orchestrator Configuration
After successfully deploying and configuring OpenSlice, you may configure its environment (e.g. the NFVO) that will facilitate the deployment of NFV artifacts.
See [NFV Orchestrator Configuration](./nfvoconfig.md).