[DEPRECATED]¶
Deprecated
This tutorial is kept for reference. It may not match the current Eclipse Tractus-X release. All tutorials
DPP Application Installation¶
This guide provides the information needed to setup the Digital product Passport (DPP) application as a data consumer. It describes how to run a local setup to leverage the DPP frontend and backend components using a container platform.
________________________Kubernetes Cluster________________________
| |
| _______________________Namespace________________________ |
| | ___________________ __________________ | |
| | | | | | | |
| | | DPP Frontend | <---> | DPP Backend | | |
| | |___________________| |__________________| | |
| |________________________________________________________| |
| |
|__________________________________________________________________|
Prerequisites¶
You must have the following tools installed and configured:
- A container platform preferrably Docker
- A local Kubernetes cluster. It could be a Minikube or other cluster runtimes such as Kind. In this tutorial we would use a single node minikube cluster.
- A Helm package manager for Kubernetes cluster to run kubernetes resources.
- MXD Setup (2 EDCS + Wallet + IAM)
- BPN Discovery Service + EDC Discovery Service + Discovery Finder
Caution
For the worksession in 16, 17 May Second Tractus-X Community Days the deployement is already provided for you! So just data consumption and provision are going to be the center of the attention. You can skip this guide!
Clone a Git repository¶
Use the following command in your terminal to clone the digital product pass git repository
Note
If you already cloned this repository, you can ignore this step
Setup a cluster¶
This step is optional for those who already have a running cluster.
# start minikube cluster
minikube start -p $USER
# enable minikube ingress addon
minikube addons enable ingress -p $USER
# create your namespace
kubectl create namespace $USER
Tip
$USER is a current user account from Operating System
The current usr can be checked using command: echo $USER or whoami
Check cluster availability¶
# check is cluster is accessible using the forrowing command
kubectl config current-context
# output - you must see your minikube as current context
# minikube
# check your namespace is accessible
kubectl get pods
# output
# No resources found in $USER namespace
Caution
Each user must follow the guide inside its user namespace
Configure the helm values¶
Go to the values.yaml file
Backend Configuration¶
The backend has the following settings to be configured:
-
Add the HOSTNAME to the backend settings
-
Add the HOSTNAME to the ingress settings
- Add the X_API_KEY, PARTICIPANT_ID and EDC_HOSTNAME to the edc settings
-
Add the HOSTNAME and set enabled flag to TRUE to the irs
-
Add the ENCRYPTION_KEY to the process
-
Add the DISCOVERY_FINDER_HOST to the discovery settings
Frontend Configuration¶
The backend has the following settings to be configured:
-
Add the HOSTNAME to the ingress settings
-
Add the HOSTNAME to the backend
-
Add the PORTAL_HOSTNAME to the portal settings
-
Add the following values to the oauth configuration: HOSTNAME, CLIENT_ID,CLIENT_SECRET, REALM, APP_ID, BPN and API_KEY
Deploy the Application¶
Use the following command to install the application as configured helm deployment:
# install helm charts -DPP
helm install digital-product-pass ./charts/digital-product-pass -f ./charts/digital-product-pass/values.yaml --namespace $USER
# you would see the similar output once the application is deployed
NAME: digital-product-pass
LAST DEPLOYED: THU May 9 16:24:00 2024
NAMESPACE: dpp01
STATUS: deployed
REVISION: 1
# wait until all the pods are ready
kubectl wait --namespace $USER \
--for=condition=ready pod all \
--timeout=90s
NOTE: This command will deploy the complete application. However, it would take some minutes until all the pods are up and in running state. You can check the pod state repeatedly by the following command.
Expose the application¶
# enable port forwarding to expose the frontend as a service to outside world
kubectl port-forward service/dpp-frontend --namespace $USER <EXTERNAL_PORT>:8080 --address 0.0.0.0
# enable port forwarding to expose the backend application as a service to outside world
kubectl port-forward service/dpp-backend --namespace $USER <EXTERNAL_PORT>:8888 --address 0.0.0.0
# access the application through your browser and your mobile device
http://<PUBLIC_IP>:<EXTERNAL_PORT>
Undeploy the Application¶
# in case of any issue, redeploy the application
# uninstall the existing helm chart
helm uninstall digital-product-pass --namespace $USER
# output of the above command
release "digital-product-pass" uninstalled
Install the helm charts again
# install helm charts - DPP
helm install digital-product-pass ./charts/digital-product-pass -f ./charts/digital-product-pass/values.yaml --namespace $USER
If everything works fine, then you have reached at the end of deployment guide.
Congratulations, you have successfully setup the data consumer Digital Product Passport application. It is now available and ready to exchange data in the dataspace.
NOTICE¶
This work is licensed under the CC-BY-4.0.
- SPDX-License-Identifier: CC-BY-4.0
- SPDX-FileCopyrightText: 2024 BMW AG
- SPDX-FileCopyrightText: 2024 CGI Deutschland B.V. & Co. KG
- SPDX-FileCopyrightText: 2024 Contributors to the Eclipse Foundation
- Source URL: https://github.com/eclipse-tractusx/digital-product-pass