1. In folder `org.etsi.osl.main/compose/mysql-init` edit the file `01-databases.sql`.
1. In folder `org.etsi.osl.main/compose/mysql-init` edit the file `01-databases.sql`.
2. In the `org.etsi.osl.main/compose/docker-compose.yaml` edit the credentials of the users that services use to connect to the databases, if you wish.
2. In the `org.etsi.osl.main/compose/docker-compose.yaml` edit the credentials of the users that services use to connect to the databases, if you wish.
* portaluser (default is 12345) and
* portaluser (default is 12345) and
* keycloak (default is password)
* keycloak (default is password)
### 3. Configure keycloak container *(optional)*
### 3. Configure keycloak container *(optional)*
1. If you made changes to keycloak's mysql credentials:
1. If you made changes to keycloak's mysql credentials:
In folder `org.etsi.osl.main/compose/` edit the file `docker-compose.yaml`.
In folder `org.etsi.osl.main/compose/` edit the file `docker-compose.yaml`.
```yaml
```
DB_DATABASE: keycloak
DB_DATABASE: keycloak
DB_USER: keycloak
DB_USER: keycloak
DB_PASSWORD: password
DB_PASSWORD: password
```
```
2. If you want to change the keycloak admin password:
2. If you want to change the keycloak admin password:
In folder `org.etsi.osl.main/compose/` edit the file `docker-compose.yaml`
In folder `org.etsi.osl.main/compose/` edit the file `docker-compose.yaml`
```yaml
KEYCLOAK_PASSWORD:Pa55w0rd
```
```
KEYCLOAK_PASSWORD: Pa55w0rd
```
### 4. Configure bugzilla container *(optional)*
### 4. Configure bugzilla container *(optional)*
If you want to utilise the Bugzilla connector:
If you want to utilise the Bugzilla connector:
In folder `org.etsi.osl.main/compose/` edit the file `docker-compose.yaml`
In folder `org.etsi.osl.main/compose/` edit the file `docker-compose.yaml`
"main_operations_product":"Main Site Operations" // this is the default product to issue tickets
"main_operations_product":"Main Site Operations" // this is the default product to issue tickets
...
@@ -166,20 +170,21 @@ Change the respective fields:
...
@@ -166,20 +170,21 @@ Change the respective fields:
- If you made changes to mysql and keycloak credentials.
- If you made changes to mysql and keycloak credentials.
- If you want to change logging level (TRACE / DEBUG / INFO / WARN / ERROR).
- If you want to change logging level (TRACE / DEBUG / INFO / WARN / ERROR).
> **If you are using a non-local domain, replace everywhere the http://keycloak:8080 with the respective {{protocol://domain.name}}, as well as "spring.portal.main.domain" property.**
> ***If you are using a non-local domain, replace everywhere the http://keycloak:8080 with the respective {{protocol://domain.name}}, as well as "spring.portal.main.domain" property.***
In folder `org.etsi.osl.main/compose/` edit the file `docker-compose.yaml`
In folder `org.etsi.osl.main/compose/` edit the file `docker-compose.yaml`
If you want to apply changes to the JSON configuration files without the need to rebuild the
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 `org.etsi.osl.tmf.web/dist/io-openslice-portal-web/assets/config` directory. Although, it is <u>mandatory</u> to also apply these changes to the `org.etsi.osl.tmf.web/src/assets/config` for <u>persistancy</u>, as after any future rebuild of OpenSlice the `/dist` directory is being overwritten along with its contents. The OpenSlice team strongly recommends to always apply your changes to the TMF web UI configuration files at `org.etsi.osl.tmf.web/src/assets/config` and rebuild the application.
application, you have to apply the changes at the `org.etsi.osl.tmf.web/dist/io-openslice-portal-web/assets/config`
directory. Although, it is <u>mandatory</u> to also apply these changes to the `org.etsi.osl.tmf.web/src/assets/config`
for <u>persistancy</u>, as after any future rebuild of OpenSlice the `/dist` directory is being overwritten along with its
contents. The OpenSlice team strongly recommends to always apply your changes to the TMF web UI configuration files
at `org.etsi.osl.tmf.web/src/assets/config` and rebuild the application.
## Deploy OpenSlice via Docker Compose
## Deploy OpenSlice via Docker Compose
...
@@ -331,8 +332,8 @@ The Keycloack server is managing authentication and running on a container at po
...
@@ -331,8 +332,8 @@ The Keycloack server is managing authentication and running on a container at po
- Navigate to Administration Console
- Navigate to Administration Console
- Login with the credentials from section [Configure keycloak container](#Configure-keycloak-container). Default values are:
- Login with the credentials from section [Configure keycloak container](#Configure-keycloak-container). Default values are:
- user: admin and
- user: admin and
- password: KEYCLOAK_PASSWORD
- password: KEYCLOAK_PASSWORD
> if you are running in HTTP you will get a message: HTTPS required.
> if you are running in HTTP you will get a message: HTTPS required.
...
@@ -387,24 +388,27 @@ Hosts File Location:
...
@@ -387,24 +388,27 @@ Hosts File Location:
2 - Replace http://localhost/auth/ with http://keycloak:8080/auth/ in your Keycloak config for AngularJS and Angular (see examples below).
2 - Replace http://localhost/auth/ with http://keycloak:8080/auth/ in your Keycloak config for AngularJS and Angular (see examples below).
Explanation:
> Explanation
Nginx uses the http://keycloak:8080 URL, which is accessible via the internal docker system's network.
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.
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 acquiring the token from http://keycloak:8080 (internally) and the Front-end is getting verified by an issuer at the same URL, as well.
This way, you will not get the invalid token error, as the API is acquiring the token from http://keycloak:8080 (internally) and the Front-end is getting verified by an issuer at the same URL, as well.
- For the Angular configuration (TMF portal UI), navigate to org.etsi.osl.tmf.web/src/assets/config and edit config.prod.json
- For the Angular configuration (TMF portal UI), navigate to org.etsi.osl.tmf.web/src/assets/config and edit config.prod.json
```bash
```bash
# Starting from the root project directory
# Starting from the root project directory
cd org.etsi.osl.tmf.web/src/assets/config
cd org.etsi.osl.tmf.web/src/assets/config
```
```
```bash
```bash
nano config.prod.json
nano config.prod.json
```
```
After editing it should look like the example bellow:
After editing it should look like the example bellow:
```yaml
```yaml
{
{
"TITLE": "OpenSlice by ETSI",
"TITLE": "OpenSlice by ETSI",
...
@@ -444,16 +448,19 @@ Explanation:
...
@@ -444,16 +448,19 @@ Explanation:
> If you want the changes to take place immediately without rebuilding the project, then repeat the process for org.etsi.osl.tmf.web/dist/org.etsi.osl.tmf.web/assets/config/config.prod.json
> If you want the changes to take place immediately without rebuilding the project, then repeat the process for org.etsi.osl.tmf.web/dist/org.etsi.osl.tmf.web/assets/config/config.prod.json
- For the AngularJS configuration (NVF portal UI), navigate to org.etsi.osl.portal.web/src/js and edit config.js
- For the AngularJS configuration (NVF portal UI), navigate to org.etsi.osl.portal.web/src/js and edit config.js
```bash
```bash
# Starting from the root project directory
# Starting from the root project directory
cd org.etsi.osl.portal.web/src/js
cd org.etsi.osl.portal.web/src/js
```
```
```bash
```bash
nano config.js
nano config.js
```
```
after editing it should look like the example bellow:
after editing it should look like the example bellow:
```js
```
var appConfig = angular.module('portalwebapp.config',[]);
var appConfig = angular.module('portalwebapp.config',[]);