diff --git a/kubernetes/helm/README.md b/kubernetes/helm/README.md index d1f1ca1a545e5d76c6b94a1e46cb6673bd5c15c3..89fbcbbdb2c053cd2bbf4748713c3a486f5b4270 100644 --- a/kubernetes/helm/README.md +++ b/kubernetes/helm/README.md @@ -1,12 +1,4 @@ -# OpenSlice Installation Guide with Helm - -## Pre-requisites - -### Required Software - -- A Kubernetes cluster up and running with enough disk to allocate about 12GB of PV storage. (Storage requirements can be changed in the respective PV/PVC templates) -- Helm installed for managing Kubernetes packages. - + +# OpenSlice Installation Guide with Kubernetes + +## Requirements + +### Hardware requirements: + +| **Minimum Hardware Requirements** | **Recomended Hardware Requirements** | +| --------------------------------- | ------------------------------------ | +| 4 CPU cores | 8 CPU cores | +| 8 GB RAM | 16 GB RAM | +| 20 GB storage | 40 GB storage | + +### Software Requirements: + +* **git:** For cloning the project repository. +* **Kubernetes:** A running cluster where OpenSlice will be deployed. +* **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`. + +## 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 kubernetes/helm/openslice/ +``` + +### 3. Deploy the Helm Chart + +Before deploying the Helm chart, ensure you have configured the necessary components as detailed in the [Configure Helm Chart Services](#configure-helm-chart-services) section. By default, the `main` branch is selected for deployment. + +We recommend using: +- The **main** branch for the most stable experience. +- The **develop** branch for access to the latest features. For the develop branch installation, it's strongly advisable to follow the [develop documentation](https://osl.etsi.org/documentation/develop/deployment/). + +Deploy OpenSlice with Helm: + +```bash +helm install myopenslice . --namespace openslice --create-namespace +``` + +## 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: "keycloakadminpass" + 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: "keycloakadminpass" +``` + +#### 4. Application and Logging Configuration + +Application-specific configurations, such as OAuth client secrets and logging levels, can be set in the `spring` section: + +```yaml +spring: + oauthClientSecret: "secret" + loglevel: "INFO" +``` + +#### 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` edit the `config.js.default` configuration file with your configuration. + + ``` +{ + TITLE: "Openslice demo", + WIKI: "{{ .Values.rooturl }}", + BUGZILLA: "{{ .Values.rooturl }}/bugzilla/", + STATUS: "{{ .Values.rooturl }}/", + APIURL: "{{ .Values.rooturl }}", + WEBURL: "{{ .Values.rooturl }}/nfvportal", + APIOAUTHURL: "{{ .Values.rooturl }}/auth/realms/openslice", + APITMFURL: "{{ .Values.rooturl }}/tmf-api/serviceCatalogManagement/v4" +} +``` + +Rename `config.js.default` to `config.js`. This is **mandatory** for the configuration file to be discoverable. + +## 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.json (Basic information + API configuration) +* theming.scss (CSS color palette theming) +* config.theming.json (HTML configuration - Logo, Favicon, Footer) + + +The first 2 files above (i.e. config.prod.json, theming.scss) are essential for the successful deployment of OpenSlice. +Therefore, ensure that you check the `config.prod.json` and `theming.scss` files and readjust to your deployment if needed. +Default versions of such files exist in this path, which must be renamed to not include the `.default` suffix, before deploying OpenSlice. + +E.g. 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":"2024-Q2 1.0.0-SNAPSHOT", + "WIKI": "https://osl.etsi.org/documentation", + "BUGZILLA": "{BASEURL}/bugzilla/", + "STATUS": "http://status.localhost/", + "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 io.openslice.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 +``` +#This seems irrelevant now. +> ***IMPORTANT NOTE:*** +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 mandatory to also apply these changes to the `org.etsi.osl.tmf.web/src/assets/config` for persistancy, 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. + +### 3. Deploy the Helm Chart + +After configuring the services, and editing the docker compose file accordingly, the docker compose instantiation 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. + + +## 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. + +### 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 -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 +bugzilla-client-7dd7cb47cb-8qb8m 1/1 Running 0 100s 192.168.12.114 kc-3 +centrallog-95bbf7867-k8fpt 1/1 Running 0 100s 192.168.12.107 kc-3 +consul-b5dd76b76-64dzk 1/1 Running 0 107s 192.168.43.90 kc-2 +keycloak-7c5b6bbc95-k2qfl 1/1 Running 0 105s 192.168.12.106 kc-3 +manoclient-95f68f4c9-c9t6r 1/1 Running 0 104s 192.168.12.113 kc-3 +mysql-portal-0 1/1 Running 0 107s 192.168.43.99 kc-2 +osom-6d548cf555-q8ptj 1/1 Running 0 104s 192.168.43.93 kc-2 +osportalapi-5fff744db8-5g4zs 1/1 Running 0 103s 192.168.43.98 kc-2 +osscapi-6d68b54d97-jn8tz 0/1 Running 0 102s 192.168.12.104 kc-3 +portalweb-8469d57df4-94tfj 1/1 Running 0 101s 192.168.48.44 kc-nfs +tmfweb-868f7bb9c5-x4lfh 1/1 Running 0 102s 192.168.48.43 kc-nfs +``` +```bash +kubectl get deployments -n 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 +``` +```bash +kubectl get services -n openslice -o wide + +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR +activemq ClusterIP 10.111.160.120 8161/TCP,61616/TCP 2m22s org.etsi.osl.service=activemq +bugzilla-client ClusterIP 10.101.43.28 13010/TCP 2m14s org.etsi.osl.service=bugzilla-client +centrallog ClusterIP 10.109.15.151 13013/TCP 2m14s org.etsi.osl.service=centrallog +consul ClusterIP 10.101.103.240 8500/TCP,8600/TCP 2m21s org.etsi.osl.service=consul +keycloak ClusterIP 10.110.216.62 8080/TCP,8443/TCP 2m19s org.etsi.osl.service=keycloak +manoclient ClusterIP 10.108.112.84 13011/TCP 2m18s org.etsi.osl.service=manoclient +mysql-portal ClusterIP None 3306/TCP 2m19s org.etsi.osl.service=mysql-portal +osom ClusterIP 10.105.173.85 13100/TCP 2m18s org.etsi.osl.service=osom +osportalapi ClusterIP 10.104.121.164 13000/TCP 2m17s org.etsi.osl.service=osportalapi +osscapi ClusterIP 10.108.6.161 13082/TCP 2m16s org.etsi.osl.service=osscapi +portalweb ClusterIP 10.97.126.98 80/TCP 2m15s org.etsi.osl.service=portalweb +tmfweb ClusterIP 10.98.56.82 80/TCP 2m15s org.etsi.osl.service=tmfweb +``` + +### Accessing Logs for Troubleshooting + +If a pod is not in the expected state, you can access its logs for troubleshooting: + +```bash +kubectl logs -n openslice +``` + +### 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:///auth. + +- Navigate to http:///auth/ or https:///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: KEYCLOAK_PASSWORD + +> if you are running in HTTP you will get a message: HTTPS required. + +To resolve this issue when running in HTTP: + +- 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 redirects + +Navigate to realm Openslice > client > osapiWebClientId and change the Root URL to your domain. + +Also, insert your domain, e.g. http://example.org/*, at: +* Valid Redirect URIs +* Web Origins + +#### 2. Configure email + +Keycloak allows new users to register. Subsequently, this will also allow new users to register to the OpenSlice portal. + +On Tab Login > check User registration, Verify email, Forgot password etc. + +Also, enter the details on Realm > Email > Enable Authentication. + +#### 3. 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 manage/users and add an OpenSlice admin user, e.g. username=admin. +- Set a password +- Navigate to Role Mappings and add ADMIN and MENTOR to Assigned Roles. + +> That user is different from the Keycloak admin user. It is required 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. + +***IMPORTANT: The following is not currently supported in Kubernetes installation.** +### Keycloak at localhost + +> **This is an important step if you run Keycloak on localhost!** + +1 - Edit your Hosts File, adding the line below + +```127.0.0.1 keycloak``` + +Hosts File Location: + + - In Linux/Unix, the file's location is at /etc/hosts + + - In Windows, its location is at c:\Windows\System32\Drivers\etc\hosts + +2 - Replace http://localhost/auth/ with http://keycloak:8080/auth/ in your Keycloak config for AngularJS and Angular (see examples below). + + +> Explanation + +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 acquiring the token from http://keycloak:8080 (internally) and the Front-end is getting verified by an issuer at the same URL, as well. + + + +2.1 - For the Angular configuration (TMF portal UI), navigate to org.etsi.osl.tmf.web/src/assets/config and edit config.prod.json + +```bash +# Starting from the root project directory +cd org.etsi.osl.tmf.web/src/assets/config +``` + +```bash +nano config.prod.json +``` + +After editing it should look like the example bellow: + +```yaml +{ + "TITLE": "OpenSlice by ETSI", + "PORTALVERSION":"2023-Q3 1.2.0-SNAPSHOT", + "WIKI": "https://openslice.readthedocs.io/en/stable/", + "BUGZILLA": "{BASEURL}/bugzilla/", + "STATUS": "http://status.localhost/", + "WEBURL": "{BASEURL}", + "PORTAL_REPO_APIURL": "{BASEURL}/osapi", + "ASSURANCE_SERVICE_MGMT_APIURL": "{BASEURL}/oas-api", + "APITMFURL": "{BASEURL}/tmf-api", + "OAUTH_CONFIG" : { + "issuer": "http://keycloak:8080/auth/realms/openslice", + "loginUrl": "http://keycloak:8080/auth/realms/openslice/protocol/openid-connect/auth", + "tokenEndpoint": "http://keycloak:8080/auth/realms/openslice/protocol/openid-connect/token", + "userinfoEndpoint": "http://keycloak:8080/auth/realms/openslice/protocol/openid-connect/userinfo", + "redirectUri": "{BASEURL}/redirect", + "logoutUrl": "http://keycloak:8080/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 + } +} +``` + +> Note the difference in changing {BASEURL} -> http://keycloak:8080 + +> 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 + +2.2 - For the AngularJS configuration (NVF portal UI), navigate to org.etsi.osl.portal.web/src/js and edit config.js + +```bash +# Starting from the root project directory +cd org.etsi.osl.portal.web/src/js +``` + +```bash +nano config.js +``` + +after editing it should look like the example bellow: + +``` +var appConfig = angular.module('portalwebapp.config',[]); + + +appConfig.factory('APIEndPointService', function() { + return { + TITLE: "OpenSlice by ETSI", + WIKI: "https://openslice.readthedocs.io/en/stable/", + BUGZILLA: "ROOTURL/bugzilla/", + STATUS: "ROOTURL/status/", + APIURL: "http://localost:13000", + WEBURL: "ROOTURL/nfvportal", + APIOAUTHURL: "ROOTURL/auth/realms/openslice", + APITMFURL: "ROOTURL/tmf-api/serviceCatalogManagement/v4" + }; +}); +``` + +> Note the difference in "APIOAUTHURL" property + + +### 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). diff --git a/kubernetes/helm/openslice/Chart.yaml b/kubernetes/helm/openslice/Chart.yaml index 94370f18f5ef97a636407410d7c71a10684d57e6..4b6899eee6a1e5038d31bb3ed30f656b7d146700 100644 --- a/kubernetes/helm/openslice/Chart.yaml +++ b/kubernetes/helm/openslice/Chart.yaml @@ -20,4 +20,4 @@ version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 1.16.0 +appVersion: 1.0.0-SNAPSHOT diff --git a/kubernetes/helm/openslice/files/realm-export.json b/kubernetes/helm/openslice/files/keycloak-init/realm-export.json similarity index 100% rename from kubernetes/helm/openslice/files/realm-export.json rename to kubernetes/helm/openslice/files/keycloak-init/realm-export.json diff --git a/kubernetes/helm/openslice/files/mysql-init/01-databases.sql b/kubernetes/helm/openslice/files/mysql-init/01-databases.sql new file mode 100644 index 0000000000000000000000000000000000000000..aa16eecb933a0d47f811532a7fd8c7185800482c --- /dev/null +++ b/kubernetes/helm/openslice/files/mysql-init/01-databases.sql @@ -0,0 +1,11 @@ +# create databases +CREATE DATABASE IF NOT EXISTS `{{ .Values.oscreds.mysql.openslicedb | default "osdb" }}`; +CREATE DATABASE IF NOT EXISTS `{{ .Values.oscreds.mysql.keycloak.database | default "keycloak" }}`; + +# create portal user and grant rights +CREATE USER '{{ .Values.oscreds.mysql.portal.username | default "portaluser" }}'@'localhost' IDENTIFIED BY '{{ .Values.oscreds.mysql.portal.password | default "12345" }}'; +GRANT ALL PRIVILEGES ON *.* TO '{{ .Values.oscreds.mysql.portal.username | default "portaluser" }}'@'%' IDENTIFIED BY '{{ .Values.oscreds.mysql.portal.password | default "12345" }}'; + +# create keycloak user and grant rights +CREATE USER '{{ .Values.oscreds.mysql.keycloak.username | default "keycloak" }}'@'localhost' IDENTIFIED BY '{{ .Values.oscreds.mysql.keycloak.password | default "password" }}'; +GRANT ALL PRIVILEGES ON *.* TO '{{ .Values.oscreds.mysql.keycloak.username | default "keycloak" }}'@'%' IDENTIFIED BY '{{ .Values.oscreds.mysql.keycloak.password | default "password" }}'; diff --git a/kubernetes/helm/openslice/files/org.etsi.osl.cridge/kubeconfig.yaml b/kubernetes/helm/openslice/files/org.etsi.osl.cridge/kubeconfig.yaml new file mode 100644 index 0000000000000000000000000000000000000000..11764038afa4e39de82cc537994a03903690cde2 --- /dev/null +++ b/kubernetes/helm/openslice/files/org.etsi.osl.cridge/kubeconfig.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Config +clusters: +- name: development-cluster + cluster: + certificate-authority: path/to/ca.crt # Path to certificate authority file + server: https://123.45.67.89:6443 # Cluster API server address +contexts: +- name: dev-user@development-cluster + context: + cluster: development-cluster + namespace: development # Default namespace + user: dev-user +current-context: dev-user@development-cluster +users: +- name: dev-user + user: + client-certificate: path/to/cert.crt # Path to the client certificate + client-key: path/to/key.key # Path to the client key diff --git a/kubernetes/helm/openslice/files/org.etsi.osl.portal.web/src/js/config.js.default b/kubernetes/helm/openslice/files/org.etsi.osl.portal.web/src/js/config.js.default new file mode 100644 index 0000000000000000000000000000000000000000..1bb2f0f973ac6c7701c3e381c4750cdeea4c6dfa --- /dev/null +++ b/kubernetes/helm/openslice/files/org.etsi.osl.portal.web/src/js/config.js.default @@ -0,0 +1,14 @@ +var appConfig = angular.module('portalwebapp.config',[]); + +appConfig.factory('APIEndPointService', function() { + return { + TITLE: "Openslice demo", + WIKI: "{{ .Values.rooturl }}", + BUGZILLA: "{{ .Values.rooturl }}/bugzilla/", + STATUS: "{{ .Values.rooturl }}/", + APIURL: "{{ .Values.rooturl }}", + WEBURL: "{{ .Values.rooturl }}/nfvportal", + APIOAUTHURL: "{{ .Values.rooturl }}/auth/realms/openslice", + APITMFURL: "{{ .Values.rooturl }}/tmf-api/serviceCatalogManagement/v4" + }; +}); diff --git a/kubernetes/helm/openslice/files/org.etsi.osl.tmf.web/src/assets/config/config.prod.default.json b/kubernetes/helm/openslice/files/org.etsi.osl.tmf.web/src/assets/config/config.prod.default.json new file mode 100644 index 0000000000000000000000000000000000000000..4ef84f6695bfc035cd2fb5d850cf12d76305415f --- /dev/null +++ b/kubernetes/helm/openslice/files/org.etsi.osl.tmf.web/src/assets/config/config.prod.default.json @@ -0,0 +1,30 @@ +{ + "TITLE": "Openslice demo", + "PORTALVERSION":"2023-Q3 1.0.0-SNAPSHOT", + "WIKI": "https://openslice.readthedocs.io/en/stable/", + "BUGZILLA": "{BASEURL}/bugzilla/", + "STATUS": "{BASEURL}/", + "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", + "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 + } +} diff --git a/kubernetes/helm/openslice/files/org.etsi.osl.tmf.web/src/assets/config/config.theming.default.json b/kubernetes/helm/openslice/files/org.etsi.osl.tmf.web/src/assets/config/config.theming.default.json new file mode 100644 index 0000000000000000000000000000000000000000..99ecd967db377f1f78dc3bba51753a605e775159 --- /dev/null +++ b/kubernetes/helm/openslice/files/org.etsi.osl.tmf.web/src/assets/config/config.theming.default.json @@ -0,0 +1,9 @@ +{ +"THEME_ID":"default", +"DEPLOYMENT_LOGO_PATH":"assets/images/logo_clear.png", +"DEFAULT_SERVICE_LOGO_PATH":"assets/images/logo_icon_original.png", +"FAVICON_PATH":"favicon.ico", +"WHO_WE_ARE_HTML":"
openslice.io project | openslice.io
openslice.io an opensource OSS
Openslice demo | http://portal.openslice.io
A portal that allows 5G experimenters to deploy experiment descriptors towards the infrastructure.
Openslice demo wiki | https://openslice.readthedocs.io/en/stable/
A wiki containing project documentation.
Openslice demo Report Issues | http://portal.openslice.io/bugzilla/
Our issue tracking system.
", +"CONNECT_WITH_US_HTML":"", +"FOOTER_HTML":"
openslice.io has received funding from
5GinFIRE | https://5ginfire.eu/ project from the European Horizon 2020 Programme for research, technological development and demonstration under grant agreement number 732497.
5G-VINNI project | https://5g-vinni.eu/ 5G-VINNI project has received funding from the European Horizon 2020 Programme for research, technological development and demonstration under grant agreement number 815279
Openslice demo running openslice.io version 1.1.0-SNAPSHOT| Data Protection Declaration | © 2019-2021 on behalf of openslice.io
" +} diff --git a/kubernetes/helm/openslice/files/org.etsi.osl.tmf.web/src/assets/config/config.theming.default.scss b/kubernetes/helm/openslice/files/org.etsi.osl.tmf.web/src/assets/config/config.theming.default.scss new file mode 100644 index 0000000000000000000000000000000000000000..54839f3b7f6ddf66c56ecfac1de0d715e776fb40 --- /dev/null +++ b/kubernetes/helm/openslice/files/org.etsi.osl.tmf.web/src/assets/config/config.theming.default.scss @@ -0,0 +1,149 @@ +/* You can add global styles to this file, and also import other style files */ + +// @import "@angular/material/prebuilt-themes/indigo-pink.css"; + +@import "~@danielmoncada/angular-datetime-picker/assets/style/picker.min.css"; + +/* override bootstrap's 4 blue color */ +$primary: #428bca; +$secondary: #6c6c6c; + +@import "src/assets/config/theming.scss"; + +@import "~bootstrap/scss/bootstrap"; + +// .mat-chip-list-wrapper { +// flex-wrap: nowrap !important; +// } + +.mat-chip { + overflow: unset !important; + white-space: nowrap !important; +} + +* { + font-family: 'Open Sans', sans-serif; + font-weight: 300; +} + +h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 { + font-weight: 300 !important; +} + +.btn { + font-weight: 300 !important; +} + +.shadowed { + text-shadow: 4px 4px 6px #aaa; +} + +.shadowed-dark{ + text-shadow: 4px 4px 6px #513838; +} + +.universal-tooltip { + font-size: .9rem; + // width: 450px; +} + +mat-form-field.white-background .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-outline { + background-color: #fff; + border-radius: 5px +} + +mat-form-field { + width: 100%; +} + +.jumbotron.jumbotron-small.jumbotron-list-container { + min-height: 345px; +} + + +.card.card-paper { + border-radius: 12px; + box-shadow: 0 6px 10px -4px rgba(0,0,0,.15); + background-color: #fff; + color: #252422; + margin-bottom: 20px; + position: relative; + border: 0; + transition: box-shadow .2s ease,-webkit-transform .3s cubic-bezier(.34,2,.6,1); + transition: transform .3s cubic-bezier(.34,2,.6,1),box-shadow .2s ease; + transition: transform .3s cubic-bezier(.34,2,.6,1),box-shadow .2s ease,-webkit-transform .3s cubic-bezier(.34,2,.6,1); +} + +.card.card-paper .card-header { + // padding: 15px 15px 0; + padding: 15px; + // border: 0; +} + +.card.card-paper .card-body { + padding: 15px 15px 0px; +} + +.card.card-paper .card-footer { + padding: 0px 15px 15px; + border: 0; + background: transparent; +} + +.card-stats { + font-size: .9rem; +} + +.card-stats i { + font-size: .8em; +} + +.filter-container mat-form-field.mat-form-field-appearance-outline .mat-form-field-wrapper { + padding: 0; +} + +.table.table-generic { + margin-bottom: 0; + // border: 1px solid #ddd; + // font-family:inherit; +} + +.table.table-generic th { + padding: .5rem; + font-weight: 600; + font-size: 0.9rem; +} + +.table.table-generic td { + vertical-align: middle; + padding: .5rem +} + +.mat-paginator { + font-weight: 600; +} + +mat-panel-title { + font-weight: bold; +} + +.nav-link.active mat-checkbox .mat-checkbox-layout .mat-checkbox-inner-container .mat-checkbox-frame { + border-color:#fff +} + +.nav-link mat-checkbox label { + margin-bottom: 0 ; +} + +.minh-30vh { + min-height: 30vh; +} + +html, body { height: 100%; } +body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; } + +@media screen and (min-width: 576px) { + .jumbotron.jumbotron-small { + padding: 2rem; + } + } \ No newline at end of file diff --git a/kubernetes/helm/openslice/templates/artemis.yaml b/kubernetes/helm/openslice/templates/artemis.yaml index 74c4800b1946b065839abad8a06410616c721ffb..87c75ea00d59459c65d068fce3d7f8eb62fa71bc 100644 --- a/kubernetes/helm/openslice/templates/artemis.yaml +++ b/kubernetes/helm/openslice/templates/artemis.yaml @@ -26,6 +26,7 @@ spec: spec: containers: - image: "{{ .Values.image.artemis.repository }}:{{ .Values.image.artemis.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.artemis.pullPolicy | default "Always" }} name: {{ include "openslice.fullname" . }}-artemis resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/kubernetes/helm/openslice/templates/blockdiag.yaml b/kubernetes/helm/openslice/templates/blockdiag.yaml index fbd5e7ae90c52c52e21ca95771174db2b226595c..30b2025c27637392e801158d5ea496c11c8a03b2 100644 --- a/kubernetes/helm/openslice/templates/blockdiag.yaml +++ b/kubernetes/helm/openslice/templates/blockdiag.yaml @@ -26,6 +26,7 @@ spec: spec: containers: - image: "{{ .Values.image.blockdiag.repository }}:{{ .Values.image.blockdiag.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.blockdiag.pullPolicy | default "Always" }} name: {{ include "openslice.fullname" . }}-blockdiag resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/kubernetes/helm/openslice/templates/bugzilla.yaml b/kubernetes/helm/openslice/templates/bugzilla.yaml index 640225776ec891c031d180b7f1d68bb508d9a849..d759a2554c42af2abf6e209f2207b92cfc9ef7cb 100644 --- a/kubernetes/helm/openslice/templates/bugzilla.yaml +++ b/kubernetes/helm/openslice/templates/bugzilla.yaml @@ -26,6 +26,7 @@ spec: spec: containers: - image: "{{ .Values.image.bugzilla.repository }}:{{ .Values.image.bugzilla.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.bugzilla.pullPolicy | default "Always" }} name: {{ include "openslice.fullname" . }}-bugzilla env: - name: SPRING_APPLICATION_JSON diff --git a/kubernetes/helm/openslice/templates/centrallog.yaml b/kubernetes/helm/openslice/templates/centrallog.yaml index a43e810552eff7c0d1a95f2d78947e671e512bbf..b8143fcd9f39869242c7192e96b1a55a08e94246 100644 --- a/kubernetes/helm/openslice/templates/centrallog.yaml +++ b/kubernetes/helm/openslice/templates/centrallog.yaml @@ -26,6 +26,7 @@ spec: spec: containers: - image: "{{ .Values.image.centrallog.repository }}:{{ .Values.image.centrallog.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.centrallog.pullPolicy | default "Always" }} name: {{ include "openslice.fullname" . }}-centrallog env: - name: SPRING_APPLICATION_JSON diff --git a/kubernetes/helm/openslice/templates/cridge-config.yaml b/kubernetes/helm/openslice/templates/cridge-config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..a08ebd4510247017626150e9f5b5553d9417bbfc --- /dev/null +++ b/kubernetes/helm/openslice/templates/cridge-config.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ .Release.Namespace }} + labels: + app: {{ include "openslice.fullname" . }} + org.etsi.osl.service: cridge + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- include "openslice.labels" . | nindent 4 }} + name: {{ include "openslice.fullname" . }}-cridge-kubeconfig +data: + config: |- + {{- .Files.Get "files/org.etsi.osl.cridge/kubeconfig.yaml" | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/cridge.yaml b/kubernetes/helm/openslice/templates/cridge.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3b90404a5f87cce2bc5151ad8fb72393f8cc8405 --- /dev/null +++ b/kubernetes/helm/openslice/templates/cridge.yaml @@ -0,0 +1,55 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + namespace: {{ .Release.Namespace }} + labels: + app: {{ include "openslice.fullname" . }} + org.etsi.osl.service: cridge + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + {{- include "openslice.labels" . | nindent 4 }} + name: {{ include "openslice.fullname" . }}-cridge +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + app: {{ include "openslice.fullname" . }} + org.etsi.osl.service: cridge + {{- include "openslice.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + app: {{ include "openslice.fullname" . }} + org.etsi.osl.service: cridge + {{- include "openslice.selectorLabels" . | nindent 8 }} + spec: + initContainers: + - name: init-osscapi + image: busybox:1.28 + command: ['sh', '-c', "until nslookup {{ include "openslice.fullname" . }}-osscapi; do echo waiting for osscapi; sleep 2; done"] + containers: + - image: "{{ .Values.image.cridge.repository }}:{{ .Values.image.cridge.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.cridge.pullPolicy | default "Always" }} + name: {{ include "openslice.fullname" . }}-cridge + env: + - name: SPRING_APPLICATION_JSON + value: >- + { + "spring.activemq.brokerUrl": "tcp://{{ include "openslice.fullname" . }}-artemis:61616?jms.watchTopicAdvisories=false", + "spring.activemq.user": "{{ .Values.oscreds.activemq.user }}", + "spring.activemq.password": "{{ .Values.oscreds.activemq.password }}", + "logging.level.org.springframework" : "{{ .Values.spring.logLevel | default "INFO" }}", + "org.etsi.osl.cridge" : "{{ .Values.cridge.mode | default "DEBUG" }}" + } + resources: + {{- toYaml .Values.resources | nindent 12 }} + volumeMounts: + - name: cridge-kubeconfig + readOnly: true + mountPath: /root/.kube + restartPolicy: Always + volumes: + - name: cridge-kubeconfig + configMap: + name: {{ include "openslice.fullname" . }}-cridge-kubeconfig diff --git a/kubernetes/helm/openslice/templates/keycloak-config.yaml b/kubernetes/helm/openslice/templates/keycloak-config.yaml index 5172af32e6227e37bea9042b2c355bbd29136e26..748008bbe0010d28024a746eeed9e485c8b5d3b5 100644 --- a/kubernetes/helm/openslice/templates/keycloak-config.yaml +++ b/kubernetes/helm/openslice/templates/keycloak-config.yaml @@ -10,4 +10,4 @@ metadata: namespace: {{ .Release.Namespace }} data: realm-export.json: | - {{- tpl (.Files.Get "files/realm-export.json") . | nindent 4 }} + {{- tpl (.Files.Get "files/keycloak-init/realm-export.json") . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/keycloak.yaml b/kubernetes/helm/openslice/templates/keycloak.yaml index 1b697565a8116436074791fe09518368ce8a0f9b..fca2bdbe8782e30adda9e4a54e3b0aa455f5a573 100644 --- a/kubernetes/helm/openslice/templates/keycloak.yaml +++ b/kubernetes/helm/openslice/templates/keycloak.yaml @@ -31,6 +31,7 @@ spec: hostNetwork: {{ .Values.hostNetwork }} containers: - image: "{{ .Values.image.keycloak.repository }}:{{ .Values.image.keycloak.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.keycloak.pullPolicy | default "Always" }} name: {{ include "openslice.fullname" . }}-keycloak env: - name: DB_VENDOR diff --git a/kubernetes/helm/openslice/templates/kroki.yaml b/kubernetes/helm/openslice/templates/kroki.yaml index c6b6f71ba2d290421912ef305928122da48cc7d4..3139d11f6a3c164693ec045c753586ec917ad651 100644 --- a/kubernetes/helm/openslice/templates/kroki.yaml +++ b/kubernetes/helm/openslice/templates/kroki.yaml @@ -26,6 +26,7 @@ spec: spec: containers: - image: "{{ .Values.image.kroki.repository }}:{{ .Values.image.kroki.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.kroki.pullPolicy | default "Always" }} name: {{ include "openslice.fullname" . }}-kroki resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/kubernetes/helm/openslice/templates/manoclient.yaml b/kubernetes/helm/openslice/templates/manoclient.yaml index 8d35e9ded7288791d677cbf04c379f4a7f9bb14b..88fd7131a43fb6ea2a7ecf30084a872063294ca2 100644 --- a/kubernetes/helm/openslice/templates/manoclient.yaml +++ b/kubernetes/helm/openslice/templates/manoclient.yaml @@ -26,6 +26,7 @@ spec: spec: containers: - image: "{{ .Values.image.manoclient.repository }}:{{ .Values.image.manoclient.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.manoclient.pullPolicy | default "Always" }} name: {{ include "openslice.fullname" . }}-manoclient env: - name: SPRING_APPLICATION_JSON @@ -34,7 +35,7 @@ spec: "spring.activemq.brokerUrl": "tcp://{{ include "openslice.fullname" . }}-artemis:61616?jms.watchTopicAdvisories=false", "spring.activemq.user": "{{ .Values.oscreds.activemq.user }}", "spring.activemq.password": "{{ .Values.oscreds.activemq.password }}", - "logging.level.org.springframework" : "INFO" + "logging.level.org.springframework" : "{{ .Values.spring.logLevel | default "INFO" }}" } resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/kubernetes/helm/openslice/templates/mysql-config.yaml b/kubernetes/helm/openslice/templates/mysql-config.yaml index ee346b24989f11defb8e7d6f6e72f092c3cafdf9..0de0e5277807c43e82193fa44c53a07e386b9470 100644 --- a/kubernetes/helm/openslice/templates/mysql-config.yaml +++ b/kubernetes/helm/openslice/templates/mysql-config.yaml @@ -10,14 +10,4 @@ metadata: name: {{ include "openslice.fullname" . }}-mysql-initdb-config data: 01-databases.sql: | - # create databases - CREATE DATABASE IF NOT EXISTS `{{ .Values.oscreds.mysql.openslicedb | default "osdb" }}`; - CREATE DATABASE IF NOT EXISTS `{{ .Values.oscreds.mysql.keycloak.database | default "keycloak" }}`; - - # create portal user and grant rights - CREATE USER '{{ .Values.oscreds.mysql.portal.username | default "portaluser" }}'@'localhost' IDENTIFIED BY '{{ .Values.oscreds.mysql.portal.password | default "12345" }}'; - GRANT ALL PRIVILEGES ON *.* TO '{{ .Values.oscreds.mysql.portal.username | default "portaluser" }}'@'%' IDENTIFIED BY '{{ .Values.oscreds.mysql.portal.password | default "12345" }}'; - - # create keycloak user and grant rights - CREATE USER '{{ .Values.oscreds.mysql.keycloak.username | default "keycloak" }}'@'localhost' IDENTIFIED BY '{{ .Values.oscreds.mysql.keycloak.password | default "password" }}'; - GRANT ALL PRIVILEGES ON *.* TO '{{ .Values.oscreds.mysql.keycloak.username | default "keycloak" }}'@'%' IDENTIFIED BY '{{ .Values.oscreds.mysql.keycloak.password | default "password" }}'; + {{- tpl (.Files.Get "files/mysql-init/01-databases.sql") . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/mysql.yaml b/kubernetes/helm/openslice/templates/mysql.yaml index 6aa246a2e5cd655ff7c51c1538ab4be1b9ad619a..b69a3f1e8cd3ecf222ed5aaa21f44feb52d2d950 100644 --- a/kubernetes/helm/openslice/templates/mysql.yaml +++ b/kubernetes/helm/openslice/templates/mysql.yaml @@ -27,6 +27,7 @@ spec: spec: containers: - image: "{{ .Values.image.mysql.repository }}:{{ .Values.image.mysql.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.mysql.pullPolicy | default "Always" }} name: {{ include "openslice.fullname" . }}-mysql args: - "--ignore-db-dir=lost+found" diff --git a/kubernetes/helm/openslice/templates/oasapi.yaml b/kubernetes/helm/openslice/templates/oasapi.yaml index 5bb458d59ae12df5cd53bcb1382ef235f43dc665..c73b3df7afde260c8e74fafd0a8825a3d455e8d7 100644 --- a/kubernetes/helm/openslice/templates/oasapi.yaml +++ b/kubernetes/helm/openslice/templates/oasapi.yaml @@ -34,6 +34,7 @@ spec: hostNetwork: {{ .Values.hostNetwork }} containers: - image: "{{ .Values.image.oasapi.repository }}:{{ .Values.image.oasapi.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.oasapi.pullPolicy | default "Always" }} name: {{ .Release.Name }}-oasapi env: - name: SPRING_APPLICATION_JSON @@ -54,7 +55,7 @@ spec: "spring.activemq.brokerUrl": "tcp://{{ include "openslice.fullname" . }}-artemis:61616?jms.watchTopicAdvisories=false", "spring.activemq.user": "{{ .Values.oscreds.activemq.user }}", "spring.activemq.password": "{{ .Values.oscreds.activemq.password }}", - "logging.level.org.springframework" : "INFO" + "logging.level.org.springframework" : "{{ .Values.spring.logLevel | default "INFO" }}" } resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/kubernetes/helm/openslice/templates/openslice-ingress.yaml b/kubernetes/helm/openslice/templates/openslice-ingress.yaml index e7eaa3a28069c89ba40abaeaa46b5108d2bb10eb..a2c4b575a06fd55db1ad7e31cc047e1dd5c20c39 100644 --- a/kubernetes/helm/openslice/templates/openslice-ingress.yaml +++ b/kubernetes/helm/openslice/templates/openslice-ingress.yaml @@ -1,56 +1,26 @@ apiVersion: networking.k8s.io/v1 kind: Ingress -metadata: +metadata: namespace: {{ .Release.Namespace }} labels: app: {{ include "openslice.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} + annotations: + {{- toYaml .Values.ingress.annotations | nindent 4 }} name: {{ include "openslice.fullname" . }}-openslice-ingress spec: ingressClassName: nginx rules: - http: paths: + {{- $root := . }} # Preserve the root context + {{- range .Values.ingress.paths }} - pathType: Prefix - path: "/tmf-api" + path: "{{ .path }}" backend: service: - name: {{ include "openslice.fullname" . }}-osscapi + name: {{ include "openslice.fullname" $root }}-{{ .service }} port: - number: 13082 - - pathType: Prefix - path: "/oas-api" - backend: - service: - name: {{ include "openslice.fullname" . }}-oasapi - port: - number: 13101 - - pathType: Prefix - path: "/auth" - backend: - service: - name: {{ include "openslice.fullname" . }}-keycloak - port: - number: 8080 - - pathType: Prefix - path: "/osapi" - backend: - service: - name: {{ include "openslice.fullname" . }}-osportalapi - port: - number: 13000 - - pathType: Prefix - path: "/nfvportal" - backend: - service: - name: {{ include "openslice.fullname" . }}-portalweb - port: - number: 80 - - pathType: Prefix - path: "/" - backend: - service: - name: {{ include "openslice.fullname" . }}-tmfweb - port: - number: 80 + number: {{ .port }} + {{- end }} diff --git a/kubernetes/helm/openslice/templates/osom.yaml b/kubernetes/helm/openslice/templates/osom.yaml index d5ce50a47700697f259a997ebd9bfefff38d3b6f..12edc14626ad446a6114fec67e38954cd46e8bac 100644 --- a/kubernetes/helm/openslice/templates/osom.yaml +++ b/kubernetes/helm/openslice/templates/osom.yaml @@ -26,6 +26,7 @@ spec: spec: containers: - image: "{{ .Values.image.osom.repository }}:{{ .Values.image.osom.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.osom.pullPolicy | default "Always" }} name: {{ include "openslice.fullname" . }}-osom env: - name: SPRING_APPLICATION_JSON @@ -34,7 +35,7 @@ spec: "spring.activemq.brokerUrl": "tcp://{{ include "openslice.fullname" . }}-artemis:61616?jms.watchTopicAdvisories=false", "spring.activemq.user": "{{ .Values.oscreds.activemq.user }}", "spring.activemq.password": "{{ .Values.oscreds.activemq.password }}", - "logging.level.org.springframework" : "INFO" + "logging.level.org.springframework" : "{{ .Values.spring.logLevel | default "INFO" }}" } resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/kubernetes/helm/openslice/templates/osportalapi.yaml b/kubernetes/helm/openslice/templates/osportalapi.yaml index f22073dff4af8ee5a346846226611b68d3296cb5..c84ee91f0b44ef930b1d4c510a9ce12a2b8b7556 100644 --- a/kubernetes/helm/openslice/templates/osportalapi.yaml +++ b/kubernetes/helm/openslice/templates/osportalapi.yaml @@ -35,6 +35,7 @@ spec: command: ['sh', '-c', "until nslookup {{ include "openslice.fullname" . }}-mysql; do echo waiting for mysql; sleep 2; done"] containers: - image: "{{ .Values.image.portalapi.repository }}:{{ .Values.image.portalapi.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.portalapi.pullPolicy | default "Always" }} name: {{ include "openslice.fullname" . }}-osportalapi env: - name: SPRING_APPLICATION_JSON @@ -55,7 +56,7 @@ spec: "spring.activemq.brokerUrl": "tcp://{{ include "openslice.fullname" . }}-artemis:61616?jms.watchTopicAdvisories=false", "spring.activemq.user": "{{ .Values.oscreds.activemq.user }}", "spring.activemq.password": "{{ .Values.oscreds.activemq.password }}", - "logging.level.org.springframework" : "INFO" + "logging.level.org.springframework" : "{{ .Values.spring.logLevel | default "INFO" }}" } resources: {{- toYaml .Values.resources | nindent 12 }} diff --git a/kubernetes/helm/openslice/templates/osscapi.yaml b/kubernetes/helm/openslice/templates/osscapi.yaml index 81f7f65ca9299afb904c723a80db432b9d2240f4..e52a6b32f69513b09de3169b0780b39fdc7b56bf 100644 --- a/kubernetes/helm/openslice/templates/osscapi.yaml +++ b/kubernetes/helm/openslice/templates/osscapi.yaml @@ -34,6 +34,7 @@ spec: command: ['sh', '-c', "until nslookup {{ include "openslice.fullname" . }}-mysql; do echo waiting for mysql; sleep 2; done"] containers: - image: "{{ .Values.image.osscapi.repository }}:{{ .Values.image.osscapi.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.osscapi.pullPolicy | default "Always" }} name: {{ include "openslice.fullname" . }}-osscapi env: - name: SPRING_APPLICATION_JSON @@ -55,7 +56,7 @@ spec: "spring.activemq.brokerUrl": "tcp://{{ include "openslice.fullname" . }}-artemis:61616?jms.watchTopicAdvisories=false", "spring.activemq.user": "{{ .Values.oscreds.activemq.user }}", "spring.activemq.password": "{{ .Values.oscreds.activemq.password }}", - "logging.level.org.springframework":"INFO", + "logging.level.org.springframework": "{{ .Values.spring.logLevel | default "INFO" }}", "kroki.serverurl":"{{ .Values.rooturl }}/kroki" } resources: diff --git a/kubernetes/helm/openslice/templates/portalweb-config-nginx.yaml b/kubernetes/helm/openslice/templates/portalweb-config-nginx.yaml deleted file mode 100644 index 5616103c90b3c2109f26f1c09011132f14d312ab..0000000000000000000000000000000000000000 --- a/kubernetes/helm/openslice/templates/portalweb-config-nginx.yaml +++ /dev/null @@ -1,36 +0,0 @@ -kind: ConfigMap -apiVersion: v1 -metadata: - name: {{ include "openslice.fullname" . }}-portalweb-config-nginx - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "openslice.fullname" . }} - org.etsi.osl.service: portalweb - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- include "openslice.labels" . | nindent 4 }} -data: - default.conf: |+ - # Expires map - map $sent_http_content_type $expires { - default off; - text/html epoch; - text/css max; - application/json max; - application/javascript max; - ~image/ max; - } - - server { - listen 80; - include /etc/nginx/mime.types; - - server_name {{ .Values.rooturl }}; - location / { - root /usr/share/nginx/html/; - index index.html index.htm; - try_files $uri $uri/ /index.html =404; - } - - expires $expires; - gzip on; - } diff --git a/kubernetes/helm/openslice/templates/portalweb-config.yaml b/kubernetes/helm/openslice/templates/portalweb-config.yaml index c4a8a727753c8c6eaca34fe1f3d1c2bc6eba52fd..35e9c505477b945c3aef7f422b769140cd9525b5 100644 --- a/kubernetes/helm/openslice/templates/portalweb-config.yaml +++ b/kubernetes/helm/openslice/templates/portalweb-config.yaml @@ -9,5 +9,6 @@ metadata: chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} data: - config.js: "var appConfig = angular.module('portalwebapp.config',[]);\n\n\nappConfig.factory('APIEndPointService', function() {\n\t return {\t \n\t\tTITLE: \"Openslice demo\",\n\t\tWIKI: \"{{ .Values.rooturl }}\",\n\t\tBUGZILLA: \"{{ .Values.rooturl }}/bugzilla/\",\n\t\tSTATUS: \"{{ .Values.rooturl }}/\",\n\t\tAPIURL: \"{{ .Values.rooturl }}\",\n\t\tWEBURL: \"{{ .Values.rooturl }}/nfvportal\",\n\t\tAPIOAUTHURL: \"{{ .Values.rooturl }}/auth/realms/openslice\",\n\t\tAPITMFURL: \"{{ .Values.rooturl }}/tmf-api/serviceCatalogManagement/v4\"\n\t\t\n\t };\n});\n\n\n" - + config.js: | + {{- tpl (.Files.Get "files/org.etsi.osl.portal.web/src/js/config.js") . | nindent 4 }} + \ No newline at end of file diff --git a/kubernetes/helm/openslice/templates/portalweb.yaml b/kubernetes/helm/openslice/templates/portalweb.yaml index b97736c8b7b5012ab47e3613d0be4547e167c4ed..c2b22a10b01c00f22a850b9e951189c86e849fb4 100644 --- a/kubernetes/helm/openslice/templates/portalweb.yaml +++ b/kubernetes/helm/openslice/templates/portalweb.yaml @@ -27,6 +27,7 @@ spec: hostNetwork: {{ .Values.hostNetwork }} containers: - image: "{{ .Values.image.portalweb.repository }}:{{ .Values.image.portalweb.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.portalweb.pullPolicy | default "Always" }} name: {{ include "openslice.fullname" . }}-portalweb resources: {{- toYaml .Values.resources | nindent 12 }} @@ -36,17 +37,15 @@ spec: - name: portalweb-configuration mountPath: /usr/share/nginx/html/nfvportal/js/config.js subPath: config.js - - name: portalweb-configuration-nginx - readOnly: true - mountPath: "/etc/nginx/conf.d" + readinessProbe: + httpGet: + path: /tmf-api/serviceCatalogManagement/v4 + port: 80 volumes: - name: portalweb-configuration configMap: name: {{ include "openslice.fullname" . }}-portalweb-config defaultMode: 420 - - name: portalweb-configuration-nginx - configMap: - name: {{ include "openslice.fullname" . }}-portalweb-config-nginx restartPolicy: Always --- apiVersion: v1 diff --git a/kubernetes/helm/openslice/templates/tmfweb-config-nginx.yaml b/kubernetes/helm/openslice/templates/tmfweb-config-nginx.yaml deleted file mode 100644 index 501df79ef5eb3f697132ab78d61aa81737ea8b28..0000000000000000000000000000000000000000 --- a/kubernetes/helm/openslice/templates/tmfweb-config-nginx.yaml +++ /dev/null @@ -1,36 +0,0 @@ -kind: ConfigMap -apiVersion: v1 -metadata: - namespace: {{ .Release.Namespace }} - labels: - app: {{ include "openslice.fullname" . }} - org.etsi.osl.service: tmfweb - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - {{- include "openslice.labels" . | nindent 4 }} - name: {{ include "openslice.fullname" . }}-tmfweb-config-nginx -data: - default.conf: |+ - # Expires map - map $sent_http_content_type $expires { - default off; - text/html epoch; - text/css max; - application/json max; - application/javascript max; - ~image/ max; - } - - server { - listen 80; - include /etc/nginx/mime.types; - - server_name {{ .Values.rooturl }}; - location / { - root /usr/share/nginx/html/services; - index index.html index.htm; - try_files $uri $uri/ /index.html =404; - } - - expires $expires; - gzip on; - } diff --git a/kubernetes/helm/openslice/templates/tmfweb-config.yaml b/kubernetes/helm/openslice/templates/tmfweb-config.yaml index c33ccf115a5c3809f9a26550e19f2946bf31dbff..89a772799a3aa727afd0f51538c3e1617996c774 100644 --- a/kubernetes/helm/openslice/templates/tmfweb-config.yaml +++ b/kubernetes/helm/openslice/templates/tmfweb-config.yaml @@ -9,44 +9,9 @@ metadata: {{- include "openslice.labels" . | nindent 4 }} name: {{ include "openslice.fullname" . }}-tmfweb-config data: - config.prod.json: |+ - { - "TITLE": "Openslice demo", - "PORTALVERSION":"2023-Q3 1.2.0-SNAPSHOT", - "WIKI": "https://openslice.readthedocs.io/en/stable/", - "BUGZILLA": "{BASEURL}/bugzilla/", - "STATUS": "{{ .Values.rooturl }}/", - "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", - "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 - } - } - config.theming.json: |+ - { - "THEME_ID":"default", - "DEPLOYMENT_LOGO_PATH":"assets/images/logo_clear.png", - "DEFAULT_SERVICE_LOGO_PATH":"assets/images/logo_icon_original.png", - "FAVICON_PATH":"favicon.ico", - "WHO_WE_ARE_HTML":"
openslice.io project | openslice.io
openslice.io an opensource OSS
Openslice demo | http://portal.openslice.io
A portal that allows 5G experimenters to deploy experiment descriptors towards the infrastructure.
Openslice demo wiki | https://openslice.readthedocs.io/en/stable/
A wiki containing project documentation.
Openslice demo Report Issues | http://portal.openslice.io/bugzilla/
Our issue tracking system.
", - "CONNECT_WITH_US_HTML":"", - "FOOTER_HTML":"
openslice.io has received funding from
5GinFIRE | https://5ginfire.eu/ project from the European Horizon 2020 Programme for research, technological development and demonstration under grant agreement number 732497.
5G-VINNI project | https://5g-vinni.eu/ 5G-VINNI project has received funding from the European Horizon 2020 Programme for research, technological development and demonstration under grant agreement number 815279
Openslice demo running openslice.io version 1.1.0-SNAPSHOT| Data Protection Declaration | © 2019-2021 on behalf of openslice.io
" - } + config.prod.json: | + {{- .Files.Get "files/org.etsi.osl.tmf.web/src/assets/config/config.prod.json" | nindent 4 }} + config.theming.json: | + {{- .Files.Get "files/org.etsi.osl.tmf.web/src/assets/config/config.theming.json" | nindent 4 }} + config.theming.scss: | + {{- .Files.Get "files/org.etsi.osl.tmf.web/src/assets/config/config.theming.scss" | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/tmfweb.yaml b/kubernetes/helm/openslice/templates/tmfweb.yaml index 81bff658ba409da57dada059462b1731d9b973a7..2d324ec79f2f34379c10d8b12ae10d3ad1cd493f 100644 --- a/kubernetes/helm/openslice/templates/tmfweb.yaml +++ b/kubernetes/helm/openslice/templates/tmfweb.yaml @@ -27,6 +27,7 @@ spec: hostNetwork: {{ .Values.hostNetwork }} containers: - image: "{{ .Values.image.tmfweb.repository }}:{{ .Values.image.tmfweb.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.tmfweb.pullPolicy | default "Always" }} name: {{ include "openslice.fullname" . }}-tmfweb resources: {{- toYaml .Values.resources | nindent 12 }} @@ -36,16 +37,10 @@ spec: - name: "tmfweb-configuration" readOnly: true mountPath: "/usr/share/nginx/html/services/assets/config" - - name: "tmfweb-configuration-nginx" - readOnly: true - mountPath: "/etc/nginx/conf.d" volumes: - name: "tmfweb-configuration" configMap: name: {{ include "openslice.fullname" . }}-tmfweb-config - - name: "tmfweb-configuration-nginx" - configMap: - name: {{ include "openslice.fullname" . }}-tmfweb-config-nginx restartPolicy: Always --- apiVersion: v1 diff --git a/kubernetes/helm/openslice/values.yaml b/kubernetes/helm/openslice/values.yaml index 7ec3d058b9c96626ff9e799983bc86a6cec28238..2f6cccaa56be85aaecd3fa3e7a233e03a00f9a46 100644 --- a/kubernetes/helm/openslice/values.yaml +++ b/kubernetes/helm/openslice/values.yaml @@ -7,72 +7,77 @@ replicaCount: 1 image: artemis: repository: apache/activemq-artemis - pullPolicy: IfNotPresent + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: "2.30.0" blockdiag: repository: yuzutech/kroki-blockdiag - pullPolicy: IfNotPresent + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: "latest" bugzilla: repository: labs.etsi.org:5050/osl/code/org.etsi.osl.bugzilla - pullPolicy: IfNotPresent + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: "develop" centrallog: repository: labs.etsi.org:5050/osl/code/org.etsi.osl.centrallog.service - pullPolicy: IfNotPresent + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: "develop" keycloak: - repository: jboss/keycloak - pullPolicy: IfNotPresent + repository: quay.io/keycloak/keycloak + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: "16.1.1" kroki: repository: yuzutech/kroki - pullPolicy: IfNotPresent + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: "latest" manoclient: repository: labs.etsi.org:5050/osl/code/org.etsi.osl.mano - pullPolicy: IfNotPresent + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: "develop" osom: repository: labs.etsi.org:5050/osl/code/org.etsi.osl.osom - pullPolicy: IfNotPresent + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: "develop" portalapi: repository: labs.etsi.org:5050/osl/code/org.etsi.osl.portal.api - pullPolicy: IfNotPresent + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: "develop" osscapi: repository: labs.etsi.org:5050/osl/code/org.etsi.osl.tmf.api - pullPolicy: IfNotPresent + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: "develop" mysql: repository: mysql - pullPolicy: IfNotPresent + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: "5.7.43" oasapi: repository: labs.etsi.org:5050/osl/code/org.etsi.osl.oas - pullPolicy: IfNotPresent + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: "develop" portalweb: repository: labs.etsi.org:5050/osl/code/org.etsi.osl.portal.web - pullPolicy: IfNotPresent + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: "develop" tmfweb: repository: labs.etsi.org:5050/osl/code/org.etsi.osl.tmf.web - pullPolicy: IfNotPresent + pullPolicy: Always + # Overrides the image tag whose default is the chart appVersion. + tag: "develop" + cridge: + repository: labs.etsi.org:5050/osl/code/org.etsi.osl.cridge + pullPolicy: Always # Overrides the image tag whose default is the chart appVersion. tag: "develop" @@ -102,10 +107,14 @@ oscreds: spring: oauthClientSecret: secret + loglevel: INFO mysql: storage: 10Gi +cridge: + mode: "DEBUG" + # Storage class to be used for provisioning. Default is manual # storageClass: ~ @@ -142,8 +151,25 @@ service: port: 80 ingress: - host: chart-example.local - enabled: false + paths: + - path: "/tmf-api" + service: "osscapi" + port: 13082 + - path: "/oas-api" + service: "oasapi" + port: 13101 + - path: "/auth" + service: "keycloak" + port: 8080 + - path: "/osapi" + service: "osportalapi" + port: 13000 + - path: "/nfvportal" + service: "portalweb" + port: 80 + - path: "/" + service: "tmfweb" + port: 80 annotations: {}