Newer
Older

Dimitrios Giannopoulos
committed
1
2
3
4
5
6
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
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Openslice.io">
<link rel="canonical" href="http://openslice.io/develop/deployment/">
<link rel="shortcut icon" href="../img/favicon.ico">
<title>Deployment/Installation - Openslice</title>
<link href="../css/bootstrap.min.css" rel="stylesheet">
<link href="../css/font-awesome.min.css" rel="stylesheet">
<link href="../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css">
<link href="../css/version-select.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
</head>
<body>
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="..">Openslice</a>
<!-- Expander button -->
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Expanded navigation -->
<div id="navbar-collapse" class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">Overview <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href=".." class="dropdown-item">Introduction</a>
</li>
</ul>
</li>
<li class="dropdown active">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">Getting Started <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="./" class="dropdown-item active">Deployment/Installation</a>
</li>
<li>
<a href="../nfvoconfig/" class="dropdown-item">NFV Orchestrator Configuration</a>
</li>
<li>
<a href="../catalogs/" class="dropdown-item">Service Catalogs</a>
</li>
<li>
<a href="../nfvcatalogs/" class="dropdown-item">NFV Catalogs</a>
</li>
<li>
<a href="../lcm/" class="dropdown-item">LCM Rules</a>
</li>
<li>
<a href="../architecture/consumingServicesFromExternalPartners/" class="dropdown-item">Consuming Services From External OSS</a>
</li>
<li>
<a href="../service_inventory/" class="dropdown-item">Service Inventory</a>
</li>
<li>
<a href="../alarms_actions/" class="dropdown-item">Alarms and Actions</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">Design & Architecture <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="../architecture/architecture/" class="dropdown-item">Architecture</a>
</li>
<li>
<a href="../architecture/messagebus/" class="dropdown-item">Message bus</a>
</li>
<li>
<a href="../architecture/osom/" class="dropdown-item">OSOM</a>
</li>
<li>
<a href="../architecture/oauth/" class="dropdown-item">Authentication</a>
</li>
<li>
<a href="../architecture/tmfapi/" class="dropdown-item">TMF API</a>
</li>
<li>
<a href="../architecture/nfvapi/" class="dropdown-item">NFV API</a>
</li>
<li>
<a href="../architecture/tmfweb/" class="dropdown-item">TMF WEB</a>
</li>
<li>
<a href="../architecture/nfvweb/" class="dropdown-item">NFV WEB</a>
</li>
<li>
<a href="../architecture/issuemgt/" class="dropdown-item">Issue management</a>
</li>
<li>
<a href="../architecture/centrallog/" class="dropdown-item">Central logging</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">Contributing <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="../contributing/developing/" class="dropdown-item">Developing</a>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li class="nav-item">
<a rel="prev" href=".." class="nav-link">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li class="nav-item">
<a rel="next" href="../nfvoconfig/" class="nav-link">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
<li class="nav-item">
<a href="https://github.com/openslice" class="nav-link">openslice</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
<div class="navbar-header">
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
<span class="fa fa-angle-down"></span>
</button>
</div>
<div id="toc-collapse" class="navbar-collapse collapse card bg-secondary">
<ul class="nav flex-column">
<li class="nav-item" data-level="1"><a href="#preparing-the-environment" class="nav-link">Preparing the environment</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="1"><a href="#configure-docker-compose-services" class="nav-link">Configure docker-compose services</a>
<ul class="nav flex-column">
<li class="nav-item" data-level="2"><a href="#1-mysql-portal-container" class="nav-link">1. mysql-portal container</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#2keycloak-container" class="nav-link">2.keycloak container</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#3osportalapi-container-nfv-services" class="nav-link">3.osportalapi container (NFV services)</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#4bugzilla-container" class="nav-link">4.bugzilla container</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#5osscapi-container-tmf-api-service" class="nav-link">5.osscapi container (TMF-API service)</a>
<ul class="nav flex-column">
</ul>
</li>
</ul>
</li>
<li class="nav-item" data-level="1"><a href="#configure-nginx" class="nav-link">Configure nginx</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="1"><a href="#configure-web-ui" class="nav-link">Configure Web UI</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="1"><a href="#configure-tmf-web-ui" class="nav-link">Configure TMF Web UI</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="1"><a href="#deploying-docker-compose" class="nav-link">Deploying docker compose</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="1"><a href="#validating-deployments-and-container-monitoring" class="nav-link">Validating deployments and container monitoring</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="1"><a href="#kubernetes-installation" class="nav-link">Kubernetes installation</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="1"><a href="#post-installation-steps" class="nav-link">Post installation steps</a>
<ul class="nav flex-column">
<li class="nav-item" data-level="2"><a href="#configure-keycloak-server" class="nav-link">Configure Keycloak server</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#keycloak-at-localhost" class="nav-link">Keycloak at localhost</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#nfv-portal-landing-page" class="nav-link">NFV Portal Landing page</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#nfv-orchestrator-configuration" class="nav-link">NFV Orchestrator Configuration</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#important-note" class="nav-link">Important Note</a>
<ul class="nav flex-column">
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div></div>
<div class="col-md-9" role="main">
<h1 id="preparing-the-environment">Preparing the environment</h1>
<p>Note: See the Kubernetes section, if you would like to deploy Openslice in a Kubernetes cluster</p>
<p><br></p>
<p>1 - Backup your previous database if necessary:</p>
<pre><code>sudo docker exec amysql /usr/bin/mysqldump -u root --password=letmein ostmfdb > backup_ostmfdb.sql
</code></pre>
<p>2 - Install docker</p>
<p><em>NOTE:</em> Since July 2023 Docker Compose V1 stopped receiving updates. Openslice fully reverted to Compose V2, which is integrated in the Docker installation.</p>
<p>3 - Download environment preparation script</p>
<pre><code>wget https://raw.githubusercontent.com/openslice/org.etsi.osl.main/master/compose/deploy.sh
</code></pre>
<p>4 - Work with main/master branch:</p>
<pre><code>sudo ./deploy.sh
</code></pre>
<p>Alternatively, work with develop or any other branch:</p>
<pre><code>sudo ./deploy.sh develop [or replace develop with other branch name]
</code></pre>
<p>5 - Create configuration specific docker compose file</p>
<pre><code>cd org.etsi.osl.main/compose/
sudo cp docker-compose.yaml.configure docker-compose.yaml
</code></pre>
<p>6 - Configure containers to properly resolve the DNS of your domain</p>
<p>edit /etc/docker/daemon.json and add:</p>
<pre><code>{
"dns": ["8.8.8.8", "8.8.4.4"]
}
</code></pre>
<p>and restart docker daemon.</p>
<p><br></p>
<h1 id="configure-docker-compose-services">Configure docker-compose services</h1>
<p>Edit your configuration specific docker-compose.yaml that is previously created:</p>
<p><br></p>
<h2 id="1-mysql-portal-container">1. mysql-portal container</h2>
<p>In folder mysql-init edit the file 01-databases.sql. Edit the credentials that services connect to the database (if you wish) of portaluser (default is 12345) and keycloak (default is password).</p>
<p>delete the exposed ports</p>
<h2 id="2keycloak-container">2.keycloak container</h2>
<p>2.1 Edit the following if you changed mysql credentials </p>
<pre><code>DB_DATABASE: keycloak
DB_USER: keycloak
DB_PASSWORD: password
</code></pre>
<p>2.2 Change the keycloak admin password</p>
<pre><code>KEYCLOAK_PASSWORD: Pa55w0rd
</code></pre>
<h2 id="3osportalapi-container-nfv-services">3.osportalapi container (NFV services)</h2>
<p>Edit the following if you changed mysql and keycloak credentials and adjust properly the domain (if you are using a non-local domain, replace everywhere the http://keycloak:8080)</p>
<pre><code>SPRING_APPLICATION_JSON: '{
"spring.datasource.url": "jdbc:mysql://amysql/osdb?createDatabaseIfNotExist=true",
"spring.datasource.username":"root",
"spring.datasource.password":"letmein",
"spring-addons.issuers[0].uri": "http://portal.openslice.io/auth/realms/openslice",
"spring-addons.issuers[0].username-json-path":"$.preferred_username",
"spring-addons.issuers[0].claims[0].jsonPath":"$.realm_access.roles",
"spring-addons.issuers[0].claims[1].jsonPath":"$.resource_access.*.roles",
"spring.security.oauth2.resourceserver.jwt.issuer-uri": "http://portal.openslice.io/auth/realms/openslice",
"springdoc.oAuthFlow.authorizationUrl": "http://portal.openslice.io/auth/realms/openslice/protocol/openid-connect/auth",
"springdoc.oAuthFlow.tokenUrl": "http://portal.openslice.io/auth/realms/openslice/protocol/openid-connect/token",
"springdoc.oauth.client-id" : "osapiWebClientId",
"springdoc.oauth.clientsecret" : "secret",
"spring.activemq.brokerUrl": "tcp://anartemis:61616?jms.watchTopicAdvisories=false",
"spring.activemq.user": "artemis",
"spring.activemq.password": "artemis",
"logging.level.org.springframework" : "INFO"
</code></pre>
<h2 id="4bugzilla-container">4.bugzilla container</h2>
<p>If you would like to use the Bugzilla connector</p>
<pre><code>"bugzillaurl":"bugzillaurl.xx:443/bugzilla/",
"bugzillakey":"exampleKeyeqNNwxBlgxZgMEIne0Oeq0Bz",
"main_operations_product":"Main Site Operations" //this is the default product to issue tickets
</code></pre>
<p>Bugzilla under this product should have components:<br />
- NSD Deployment Request: Component used to schedule deployment req<br />
- Onboarding: Issues related to VNF/NSD Onboarding<br />
- Operations Support: Default component for operations support<br />
- Validation: Use to track validation processes of VNFs and NSDs<br />
- VPN Credentials/Access: Used for requesting VPN Credentials/Access </p>
<p>Also in the 'Main Site Operations' product, please create a version named 'unspecified'</p>
<h2 id="5osscapi-container-tmf-api-service">5.osscapi container (TMF-API service)</h2>
<p>Edit the following if you changed mysql and keycloak credentials</p>
<pre><code>"spring.datasource.username":"xx",
"spring.datasource.password":"xx",
"keycloak-admin-password": "Pa55w0rd",
Edit properly with your domain "swagger.authserver" : "http://localhost/auth/realms/openslice",
</code></pre>
<p>Delete the exposed ports in other services like activemq</p>
<p><br></p>
<h1 id="configure-nginx">Configure nginx</h1>
<pre><code>cd nginx
sudo cp nginx.conf.default nginx.conf
</code></pre>
<p>Edit server_name</p>
<p><br></p>
<h1 id="configure-web-ui">Configure Web UI</h1>
<pre><code>cd org.etsi.osl.portal.web/src/js/
cp config.js.default config.js
</code></pre>
<p>Edit config.js with your domain</p>
<pre><code>TITLE: "Openslice demo",
WIKI: "http://localhost",
BUGZILLA: "https://localhost/bugzilla/",
STATUS: "http://status.localhost/",
APIURL: "http://localhost",
WEBURL: "http://localhost",
APIOAUTHURL: "http://localhost/auth/realms/openslice",
APITMFURL: "http://localhost/tmf-api/serviceCatalogManagement/v4"
</code></pre>
<p><br></p>
<h1 id="configure-tmf-web-ui">Configure TMF Web UI</h1>
<p>There are 3 files available for configuration:</p>
<ul>
<li>config.prod.json (Basic information + API configuration)</li>
<li>theming.scss (CSS color palette theming)</li>
<li>config.theming.json (HTML configuration - Logo, Favicon, Footer)</li>
</ul>
<p>The first 2 files above (i.e. config.prod.json, theming.scss) are essential for the successful deployment of Openslice, thus created automatically during the initial deployment at <strong>org.etsi.osl.tmf.web/src/assets/config</strong> directory as a copy of the default ones from the remote repository.</p>
<p><br></p>
<p>Ensure that you check the <strong>config.prod.json</strong> file and readjust to your deployment if needed. </p>
<pre><code>cd org.etsi.osl.tmf.web/src/assets/config
</code></pre>
<p>and edit config.prod.json</p>
<p>E.g. Edit "TITLE" or "WIKI" property with your domain title </p>
<pre><code>TITLE: 'Openslice',
WIKI: 'https://openslice.io',
</code></pre>
<p><em>NOTE:</em> 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".</p>
<p><br></p>
<p>If further customization, apart from the default provided, is needed for branding (Logo, Footer) then <strong>config.theming.json</strong> needs to be created in <strong>org.etsi.osl.tmf.web/src/assets/config</strong> directory, as follows:</p>
<pre><code>cd org.etsi.osl.tmf.web/src/assets/config
sudo cp config.theming.default.json config.theming.json
</code></pre>
<p><br></p>
<blockquote>
<p><strong><em>IMPORTANT NOTE:</em></strong> If you want to apply changes to the JSON configuration files without the need to rebuild the application, you have to apply the changes at the <strong>org.etsi.osl.tmf.web/dist/io-openslice-portal-web/assets/config</strong> directory. Although, it is <u>mandatory</u> to also apply these changes to the <strong>org.etsi.osl.tmf.web/src/assets/config</strong> for <u>persistancy</u>, as after any future rebuild of Openslice the <strong>/dist</strong> directory is being ovewritten along with its contents. The Openslice team strongly recommends to always apply your changes to the TMF web UI configuration files at <strong>org.etsi.osl.tmf.web/src/assets/config</strong> and rebuild the application.</p>
</blockquote>
<p><br></p>
<h1 id="deploying-docker-compose">Deploying docker compose</h1>
<p>Go to compose directory and issue:</p>
<pre><code>sudo docker compose --profile prod down;sudo docker compose --profile prod up -d --build
</code></pre>
<p>Note: Depending on your machine, this process might take time. </p>
<p><br></p>
<h1 id="validating-deployments-and-container-monitoring">Validating deployments and container monitoring</h1>
<p>You can monitor containers status with portainer at port 9000 (http://your-ip:9000)</p>
<p>Initially, you may monitor the local machine at portainer.</p>
<p>Please check that all containers are in running state.</p>
<p><br></p>
<h1 id="kubernetes-installation">Kubernetes installation</h1>
<p>Openslice can be installed in a Kubernetes cluster. (This is a work in progress)</p>
<p>The related scripts are inside the kubernetes folder. Follow these steps along the lines. You need to configure the ingress properly depending on how you want to expose Openslice. </p>
<p>1) Create an openslice namespace</p>
<pre><code>kubectl create namespace openslice
</code></pre>
<p>2) Apply or create an ingress. 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.
You may need to deploy an Ingress controller such as ingress-nginx.</p>
<p>You can also adapt it to connect to public cloud load balancers depending on your needs.</p>
<p>The following will expose an ingress resource from one of your a k8s nodes on port 80</p>
<pre><code> kubectl apply -f openslice-ingress.yaml
</code></pre>
<p>Finding the ingress IP:</p>
<pre><code>
kubectl describe -f openslice-ingress.yaml
Name: openslice-ingress
Namespace: openslice
Address: 10.10.10.35
Default backend: default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
Rules:
Host Path Backends
---- ---- --------
*
/services tmfweb:80 (<error: endpoints "tmfweb" not found>)
/tmf-api osscapi:13082 (<error: endpoints "osscapi" not found>)
/auth keycloak:8080 (<error: endpoints "keycloak" not found>)
/osapi osportalapi:13000 (<error: endpoints "osportalapi" not found>)
/ portalweb:80 (<error: endpoints "portalweb" not found>)
Annotations: kubernetes.io/ingress.class: nginx
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Sync 9m29s (x2 over 9m58s) nginx-ingress-controller Scheduled for sync
</code></pre>
<p>From the above example, our exposed ingress is at Address: 10.10.10.35</p>
<p>3) We need to configure the expose address and deploy openslice (IP or URL e.g. http://myopenslice.xxx)</p>
<pre><code>./k8sdeploy.sh 10.10.10.35
</code></pre>
<p>4) Check the status of Openslice in the cluster. Should be similar to the following:</p>
<pre><code>
kubectl get pods --namespace=openslice -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
activemq-59d4bfdb4b-bvjqr 1/1 Running 0 109s 192.168.43.97 kc-2 <none> <none>
bugzilla-client-7dd7cb47cb-8qb8m 1/1 Running 0 100s 192.168.12.114 kc-3 <none> <none>
centrallog-95bbf7867-k8fpt 1/1 Running 0 100s 192.168.12.107 kc-3 <none> <none>
consul-b5dd76b76-64dzk 1/1 Running 0 107s 192.168.43.90 kc-2 <none> <none>
keycloak-7c5b6bbc95-k2qfl 1/1 Running 0 105s 192.168.12.106 kc-3 <none> <none>
manoclient-95f68f4c9-c9t6r 1/1 Running 0 104s 192.168.12.113 kc-3 <none> <none>
mysql-portal-0 1/1 Running 0 107s 192.168.43.99 kc-2 <none> <none>
osom-6d548cf555-q8ptj 1/1 Running 0 104s 192.168.43.93 kc-2 <none> <none>
osportalapi-5fff744db8-5g4zs 1/1 Running 0 103s 192.168.43.98 kc-2 <none> <none>
osscapi-6d68b54d97-jn8tz 0/1 Running 0 102s 192.168.12.104 kc-3 <none> <none>
portalweb-8469d57df4-94tfj 1/1 Running 0 101s 192.168.48.44 kc-nfs <none> <none>
tmfweb-868f7bb9c5-x4lfh 1/1 Running 0 102s 192.168.48.43 kc-nfs <none> <none>
kubectl get deployments --namespace=openslice -o wide
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
activemq 1/1 1 1 2m15s anactivemq webcenter/activemq:5.14.3 org.etsi.osl.service=activemq
bugzilla-client 1/1 1 1 2m6s bugzilla-client openslice/org.etsi.osl.bugzilla:latest org.etsi.osl.service=bugzilla-client
centrallog 1/1 1 1 2m6s centrallog openslice/org.etsi.osl.centrallog.service org.etsi.osl.service=centrallog
consul 1/1 1 1 2m13s aconsul consul org.etsi.osl.service=consul
keycloak 1/1 1 1 2m11s keycloak quay.io/keycloak/keycloak:11.0.3 org.etsi.osl.service=keycloak
manoclient 1/1 1 1 2m10s manoclient openslice/org.etsi.osl.mano:latest org.etsi.osl.service=manoclient
osom 1/1 1 1 2m10s openslice-osom openslice/org.etsi.osl.osom:latest org.etsi.osl.service=osom
osportalapi 1/1 1 1 2m9s openslice-portalapi openslice/org.etsi.osl.portal.api:latest org.etsi.osl.service=osportalapi
osscapi 1/1 1 1 2m8s openslice-scapi openslice/org.etsi.osl.tmf.api:latest org.etsi.osl.service=osscapi
portalweb 1/1 1 1 2m7s openslice-portalweb openslice/org.etsi.osl.portal.web:latest org.etsi.osl.service=portalweb
tmfweb 1/1 1 1 2m8s openslice-tmfweb openslice/org.etsi.osl.tmf.web:latest org.etsi.osl.service=tmfweb
kubectl get services --namespace=openslice -o wide
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
activemq ClusterIP 10.111.160.120 <none> 8161/TCP,61616/TCP 2m22s org.etsi.osl.service=activemq
bugzilla-client ClusterIP 10.101.43.28 <none> 13010/TCP 2m14s org.etsi.osl.service=bugzilla-client
centrallog ClusterIP 10.109.15.151 <none> 13013/TCP 2m14s org.etsi.osl.service=centrallog
consul ClusterIP 10.101.103.240 <none> 8500/TCP,8600/TCP 2m21s org.etsi.osl.service=consul
keycloak ClusterIP 10.110.216.62 <none> 8080/TCP,8443/TCP 2m19s org.etsi.osl.service=keycloak
manoclient ClusterIP 10.108.112.84 <none> 13011/TCP 2m18s org.etsi.osl.service=manoclient
mysql-portal ClusterIP None <none> 3306/TCP 2m19s org.etsi.osl.service=mysql-portal
osom ClusterIP 10.105.173.85 <none> 13100/TCP 2m18s org.etsi.osl.service=osom
osportalapi ClusterIP 10.104.121.164 <none> 13000/TCP 2m17s org.etsi.osl.service=osportalapi
osscapi ClusterIP 10.108.6.161 <none> 13082/TCP 2m16s org.etsi.osl.service=osscapi
portalweb ClusterIP 10.97.126.98 <none> 80/TCP 2m15s org.etsi.osl.service=portalweb
tmfweb ClusterIP 10.98.56.82 <none> 80/TCP 2m15s org.etsi.osl.service=tmfweb
</code></pre>
<p><br></p>
<h1 id="post-installation-steps">Post installation steps</h1>
<p><br></p>
<h2 id="configure-keycloak-server">Configure Keycloak server</h2>
<p>Keycloack server is managing authentication and running on a container at port 8080. It is proxied to your host via nginx under http://localhost/auth.</p>
<ul>
<li>
<p>Go to http://domain.com/auth/ or https://domain.com/auth/ , (http://ipaddress:8080/auth/ or https://ipaddress:8443/auth/ are direct with no proxy) </p>
</li>
<li>
<p>Navigate to Administration Console </p>
</li>
</ul>
<blockquote>
<p>NOTE: if you are running in HTTP you will get a message: HTTPS required</p>
</blockquote>
<p>Go to https://ipaddress:8443/auth/</p>
<p>Login with the credentials from section 2.2</p>
<p>user admin and your KEYCLOAK_PASSWORD</p>
<p>Select the master realm from top left corner, go to login Tab and select "Require SSL": None</p>
<p>Do the same for realm Openslice</p>
<blockquote>
<p>NOTE: If you are running in HTTPS, then leave Require SSL to external requests</p>
</blockquote>
<p><br></p>
<h3 id="configure-redirects">Configure redirects</h3>
<p>Go to realm Openslice, client, osapiWebClientId and change Root URL to your domain. </p>
<p>Also, insert your domain, e.g. http://example.org/*, at:
* Valid Redirect URIs
* Web Origins</p>
<p><br></p>
<h3 id="configure-email-in-keycloak">Configure email in Keycloak</h3>
<p>Keycloak also allows new users to register. </p>
<p>On Tab Login -> check User registration, Verify email, Forgot password etc.</p>
<p>Also, enter the details on Realm -> Email -> Enable Authentication</p>
<p><br></p>
<h3 id="add-an-openslice-admin-user">Add an Openslice admin user</h3>
<p>Go to manage/users and add an Openslice admin user, e.g. username=admin. Set a password and go also to Role Mappings and add to Assigned Roles ADMIN and MENTOR.</p>
<blockquote>
<p>Note: That user is different from the Keycloak admin user. It is used to login and browse the OpenSlice Web UI. The Roles ADMIN and MENTOR guarantee full access through the Openslice UI, thus such a user is always required.</p>
</blockquote>
<p><br></p>
<h2 id="keycloak-at-localhost">Keycloak at localhost</h2>
<blockquote>
<p><strong>This is an important step if you run Keycloak on localhost</strong></p>
</blockquote>
<p>1 - Edit your hosts file, adding the line below</p>
<p><code>127.0.0.1 keycloak</code></p>
<p>2 - Replace http://localhost/auth/ with http://keycloak:8080/auth/ in your Keycloak config for TypeScript/Angular (see examples below).</p>
<p>Hosts File Location:</p>
<ul>
<li>
<p>In Linux/Unix, the file's location is at /etc/hosts </p>
</li>
<li>
<p>In Windows, its location is at c:\Windows\System32\Drivers\etc\hosts</p>
</li>
</ul>
<p>Explanation:</p>
<pre><code>Nginx uses the http://keycloak:8080 URL, which is accessible via the internal docker system's network.
The Front-end (TS/Angular) shall also use the http://keycloak:8080.
This way, you will not get the invalid token error, as the API is getting the token from http://keycloak:8080 (internally) and the Front-end is getting verified with the same URL, as well.
</code></pre>
<p>Nginx serves the Front-end from the project org.etsi.osl.tmf.web.</p>
<p>If you would like to use the Front-end to test your backend, then:</p>
<ol>
<li>config.prod.json (org.etsi.osl.tmf.web project) should look similar to the following example:</li>
</ol>
<pre><code>{
"TITLE": "Openslice demo",
"PORTALVERSION":"1.1.0-SNAPSHOT",
"WIKI": "http://wiki.localhost",
"BUGZILLA": "{BASEURL}/bugzilla/",
"STATUS": "http://status.localhost/",
"WEBURL": "{BASEURL}",
"PORTAL_REPO_APIURL": "{BASEURL}/osapi",
"ASSURANCE_SERVICE_MGMT_APIURL": "{BASEURL}/oas-api",
"APITMFURL": "http://localhost:13082/tmf-api",
"OAUTH_CONFIG" : {
"issuer": "http://keycloak:8080/auth/realms/openslice/protocol/openid-connect/auth",
"loginUrl": "http://keycloak:8080/auth/realms/openslice/protocol/openid-connect/auth",
"tokenEndpoint": "http://keycloak:8080/auth/realms/openslice/protocol/openid-connect/token",
"redirectUri": "{BASEURL}/redirect",
"logoutUrl": "http://keycloak:8080/auth/realms/openslice/protocol/openid-connect/logout",
"postLogoutRedirectUri": "{BASEURL}/services/services_marketplace",
"responseType": "code",
"oidc": false,
"clientId": "osapiWebClientId",
"dummyClientSecret": "secret",
"requireHttps": false,
"useHttpBasicAuth": true,
"clearHashAfterLogin": false,
"showDebugInformation": true
}
}
</code></pre>
<blockquote>
<p>Note the difference in changing {BASEURL} -> http://keycloak:8080</p>
</blockquote>
<ol>
<li>config.js (org.etsi.osl.portal.web) should look similar to the following example:</li>
</ol>
<pre><code>var appConfig = angular.module('portalwebapp.config',[]);
appConfig.factory('APIEndPointService', function() {
return {
TITLE: "Openslice",
WIKI: "ROOTURL",
BUGZILLA: "ROOTURL/bugzilla/",
STATUS: "ROOTURL/status/",
APIURL: "http://localhost:13000",
WEBURL: "ROOTURL/nfvportal",
APIOAUTHURL: "http://keycloak:8080/auth/realms/openslice",
APITMFURL: "http://localhost:13082/tmf-api/serviceCatalogManagement/v4"
};
});
</code></pre>
<blockquote>
<p>Note the difference in "APIOAUTHURL" property</p>
</blockquote>
<p><br></p>
<h2 id="nfv-portal-landing-page">NFV Portal Landing page</h2>
<p>You may configure the landing page for the NFV Portal at</p>
<pre><code>org.etsi.osl.portal.web/src/openslicehome/index.html
</code></pre>
<p><br></p>
<h2 id="nfv-orchestrator-configuration">NFV Orchestrator Configuration</h2>
<p>See <a href="../nfvoconfig/">NFV Orchestrator Configuration</a>.</p>
<p><br></p>
<h2 id="important-note">Important Note</h2>
<p>There is a case where the first time the services fail to start due to failed mysql connections. Please just issue again:</p>
<p><code>sudo docker compose --profile prod down;sudo docker compose --profile prod up -d --build</code></p></div>
</div>
</div>
<footer class="col-md-12">
<hr>
<p>Copyright © 2019-2023 Openslice Project</p>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script src="../js/jquery-3.6.0.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script>
var base_url = "..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../js/base.js"></script>
<script src="../js/version-select.js"></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="searchModalLabel">Search</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<p>From here you can search these documents. Enter your search terms below.</p>
<form>
<div class="form-group">
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results" data-no-results-text="No results found"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>