Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ 2° ] - Release/v1.0.0-notice-readme: Added base image references in readme and added Install file #89

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
77317f2
feature/cmp-732/create-installmd-file: created install.md file and up…
dsrparracho Jul 3, 2023
85a9d60
feat: add notice for docker images in a root README.md
saudkhan116 Jul 4, 2023
42e83f6
feat: minor changes in INSTALL.md file related to titles names
dsrparracho Jul 4, 2023
1a79c35
Merge pull request #112 from catenax-ng/main
matbmoser Jul 4, 2023
376e5ab
Merge pull request #113 from catenax-ng/main
matbmoser Jul 4, 2023
42db0f5
Merge branch 'eclipse-tractusx:main' into feature/cmp-703/add-docker-…
saudkhan116 Jul 4, 2023
eebd1b8
add resource utilization in a dpp helm chart
saudkhan116 Jul 4, 2023
5bb4a46
feat: added the base images used in the project in the main README.md…
dsrparracho Jul 5, 2023
ca44496
feat: added links to DEPENDENCIES files in NOTICE and Helm and App ve…
dsrparracho Jul 7, 2023
9ca93f3
Merge pull request #114 from catenax-ng/feature/cmp-703/add-docker-im…
saudkhan116 Jul 7, 2023
f77331b
Merge pull request #115 from catenax-ng/feature/cmp-704/add-resource-…
saudkhan116 Jul 7, 2023
6ca3c2f
Merge branch 'develop' into feature/cmp-732/create-installmd-file
matbmoser Jul 7, 2023
ed049c2
chore: updated readme app and helm versions
matbmoser Jul 7, 2023
d86bd2e
Merge branch 'develop' into feature/cmp-705/revise-legal-docs
matbmoser Jul 7, 2023
2a5da02
Merge pull request #120 from catenax-ng/feature/cmp-705/revise-legal-…
matbmoser Jul 7, 2023
1fc5c3c
Merge pull request #123 from catenax-ng/feature/cmp-710/add-base-images
matbmoser Jul 7, 2023
56aaecd
feature/cmp-732/create-installmd-file: ran helm-docs again to generat…
dsrparracho Jul 10, 2023
3cba70a
Merge branch 'eclipse-tractusx:main' into release/v1.0.0-notice-readme
saudkhan116 Jul 10, 2023
760b5a6
feature/cmp-732/create-installmd-file: updated config secrets structu…
dsrparracho Jul 11, 2023
c4e9bf0
added license header that was missing in helm-docs generated readme f…
dsrparracho Jul 17, 2023
4099035
Merge pull request #135 from catenax-ng/feature/cmp-732/create-instal…
matbmoser Jul 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!--
Catena-X - Product Passport Consumer Application

Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA

See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.

This program and the accompanying materials are made available under the
terms of the Apache License, Version 2.0 which is available at
https://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the
License for the specific language govern in permissions and limitations
under the License.

SPDX-License-Identifier: Apache-2.0
-->

# Authors

The following people have contributed to this repository:

* Braun Jochen, CGI, https://github.com/jocbra
* Muhammad Saud Khan, CGI, https://github.com/saudkhan116
* Mathias Brunkow Moser, CGI, https://github.com/matbmoser
* David Zynda, BASF, https://github.com/davidzynda
* Diogo Parracho, CGI, https://github.com/dsrparracho

Please add yourself to this list, if you contribute to the content.
189 changes: 189 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
<!--
Catena-X - Product Passport Consumer Frontend

Copyright (c) 2022, 2023 BASF SE, BMW AG, Henkel AG & Co. KGaA

See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.

This program and the accompanying materials are made available under the
terms of the Apache License, Version 2.0 which is available at
https://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the
License for the specific language govern in permissions and limitations
under the License.

SPDX-License-Identifier: Apache-2.0
-->

<h1 style="display:flex; align-items: center;"><img src="./docs/catena-x-logo.svg"/>&nbsp;&nbsp;Digital Product Pass Application</h1>

# Application Installation

## Pre-requisites

You must have [Helm](https://helm.sh/), [Minikube](https://minikube.sigs.k8s.io/docs/start/) and [Maven](https://maven.apache.org/) to follow this steps.


## Install

To install the application using the configured helm charts use the following command from the project root directory:

```bash
helm install digital-product-pass ./charts/digital-product-pass -f charts/digital-product-pass/values.yaml -f charts/digital-product-pass/values-int.yaml
```

> **NOTE**: This command will deploy the complete application.

## Expose the ports

Once the application is running, in order for you to access it, we need to expose the ports. Following this commands we will be able to access it.

### Get pod name
Search for the application name:

```bash
kubectl get pods -n product-material-pass --no-headers | awk '{if ($1 ~ "consumer-backend-") print $1}'
```
**Example**:

![img4.png](./consumer-backend/productpass/docs/media/img4.png)


Copy the pod name with the prefix `consumer-backend`

### Port forward

Paste the pod name after the `port-forward` parameter.
```bash
kubectl -port-forward consumer-backend-67c4c9678-nqg7p 8888:8888 -n product-material-pass
```

> **NOTE**: The default port set is `8888` however it can be changed in the configuration.

### Check if the application is running

Go to the following url to check the health status:
```
localhost:8888/health
```

# Frequently asked questions

## How to install the application and run it locally?

Use the following commands to install/compile the application:

### Compile Backend
```bash
cd consumer-backend/productpass
mvn clean install test
```

### Run the JAR file

Substitute the `<version>` variable with the current version of the Digital Product Pass Backend and run the jar:

```bash

./target/productpass-<version>-SNAPSHOT.jar

```
### Configure the secrets

Once the application is running a tmp file will be created in the following directory: `data/VaultConfig/vault.token.yml`

```yml
client:
id: <Add the Keycloak client.id here>
secret: <Add the Keycloak client.secret here>
edc:
apiKey: <Add the Keycloak edc.apiKey here>
participantId: <Add the Keycloak edc.participantId here>
```

## How to start the application locally using Spring Boot?

Use the following command using [maven](https://maven.apache.org/) to start the application

```bash
mvn clean spring-boot:run
```


# Compile Frontend Installation

### Prerequisites:

- Git
- Code editor (VS Code/ IntelliJ recommended)
- Nodejs 16 (Node Package Manager - npm)
- Vuejs
- Docker
- Git Bash (for windows operating system only)

## Installation
### Clone project repository

```bash
git clone https://github.com/eclipse-tractusx/digital-product-pass.git
```

### Install dependencies

```bash
cd digital-product-pass/
npm install --legacy-peer-deps
```

## Run Project

### Compiles and minifies for production

```bash
npm run build
```
#### Method 1: Without Docker

#### Compiles and hot-reloads for development

```bash
npm run serve
```

#### Method 2: With Docker

The following environment variables must be set in [build and deploy](./buildAndDeploy.sh) script:

- PASS_VERSION
- APP_VERSION
- APP_API_TIMEOUT
- APP_API_MAX_RETRIES
- APP_API_DELAY
- IDENTITY_PROVIDER_URL
- HOST_URL
- DATA_URL
- KEYCLOAK_CLIENTID
- KEYCLOAK_REALM
- KEYCLOAK_ONLOAD



```bash
# run script
../buildAndDeploy.sh consumer-ui
```

You can run the application in docker container with existing image `ghcr.io/eclipse-tractusx/digital-product-pass/consumer-ui:latest` from GitHub packages. You need to update the [build and deploy](./buildAndDeploy.sh) script.

The consumer frontend is available in browser at [http://localhost:8080](http://localhost:8080)

## Coding styles

### How to set up a code editor

See [VSCode configuration](https://code.visualstudio.com/docs/getstarted/settings).
2 changes: 1 addition & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The project maintains the following source code repositories in the GitHub organ

This project leverages the following third party content.

See DEPENDENCIES_BACKEND and DEPENDENCIES_FRONTEND file.
See [DEPENDENCIES_BACKEND](/DEPENDENCIES_BACKEND) and [DEPENDENCIES_FRONTEND](/DEPENDENCIES_FRONTEND) file.

## Cryptography

Expand Down
115 changes: 62 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,32 @@

<h1 style="display:flex; align-items: center;"><img src="./docs/catena-x-logo.svg"/>&nbsp;&nbsp;Digital Product Pass Application</h1>

## What is digital product passport application?
[![Contributors][contributors-shield]][contributors-url]
[![Stargazers][stars-shield]][stars-url]
[![Apache 2.0 License][license-shield]][license-url]
[![Latest Release][release-shield]][release-url]

## Description

The digital product passport application provides a consumer user interface to request a battery passport from a battery manufacturer using the standardized components and technologies in a Catena-X network. The passport will be displayed in a human-readable from any browser. The data exchange standards given by Catena-X are used to provide the battery passport to different personas (roles) in the network.

In particular, the appliction is used to access the battery passport data provided by battery manufacturer. By scanning QR-code or knowing the manufacturer and battery-ID, a user can request the passport through **Eclipse Dataspace Connectors (EDCs)** over the Catena-X network. The passport provider will provide data attributes that is only visible to a permitted signed-in user.

### Software Version
#### Helm Chart Version
<pre id="helm-version"><a href="https://github.com/eclipse-tractusx/digital-product-pass/releases/tag/digital-product-pass-1.0.0">1.0.0</a></pre>
#### Application Version
<pre id="app-version"><a href="https://github.com/eclipse-tractusx/digital-product-pass/releases/tag/v1.0.0-alpha">v1.0.0-alpha</a></pre>


## Application Preview

Here is a preview from the DPP App UI, where we visualize a test battery passport in this case.

![General Info View](./docs/arc42/GraphicBatteryPassportViewGeneralInfo.png)

> **Note**: For more information check the [documentation section](./docs/)

## Getting Started

To get started you can have a look into our documentation:
Expand All @@ -55,78 +68,74 @@ To get started you can have a look into our documentation:
| [End User Manual](./docs/user%20manual/User%20Manual%20Product%20Viewer%20App.md) | End User Manual Product Viewer App |
| [Postman Overview](./postman/README.md) | Technical guide depicts the battery pass end-to-end API calls through the postman REST client |
| [Changelog](./CHANGELOG.md) | Changelog |
| [Helm Charts](https://github.com/eclipse-tractusx/digital-product-pass/tree/main/charts/digital-product-pass) | Project's Helm Charts |

### Prerequisites:

- Git
- Code editor (VS Code/ IntelliJ recommended)
- Nodejs 16 (Node Package Manager - npm)
- Vuejs
- Docker
- Git Bash (for windows operating system only)

## Installation
### Clone project repository
## Base Images
| Language | Container Base Image |
| :------- | :------------------- |
| Java / JVM based | [Eclipse Temurin](https://hub.docker.com/_/eclipse-temurin) |
| JS frontends | [Node.JS](https://hub.docker.com/_/node) <br/> [Nginx](https://hub.docker.com/r/nginxinc/nginx-unprivileged) |


```bash
git clone https://github.com/eclipse-tractusx/digital-product-pass.git
```

### Install dependencies
## Installation
[INSTALL](./INSTALL.md)

```bash
cd digital-product-pass/
npm install --legacy-peer-deps
```
## License

## Run Project
[Apache-2.0](https://raw.githubusercontent.com/eclipse-tractusx/digital-product-pass/main/LICENSE)

### Compiles and minifies for production
## Notice for Docker images
DockerHub:

```bash
npm run build
```
#### Method 1: Without Docker
- https://hub.docker.com/r/tractusx/digital-product-pass-frontend
- https://hub.docker.com/r/tractusx/digital-product-pass-backend

#### Compiles and hot-reloads for development
Eclipse Tractus-X product(s) installed within the image:

```bash
npm run serve
```
- GitHub: https://github.com/eclipse-tractusx/digital-product-pass
- Project home: https://projects.eclipse.org/projects/automotive.tractusx
- Dockerfiles:
- Frontend: https://github.com/eclipse-tractusx/digital-product-pass/blob/main/Dockerfile
- Backend: https://github.com/eclipse-tractusx/digital-product-pass/blob/main/consumer-backend/productpass/Dockerfile
- Project License: [Apache License, Version 2.0](https://raw.githubusercontent.com/eclipse-tractusx/digital-product-pass/main/LICENSE)

#### Method 2: With Docker

The following environment variables must be set in [build and deploy](./buildAndDeploy.sh) script:
**Used base image**
- [node:lts-alpine](https://github.com/nodejs/docker-node)
- [nginxinc/nginx-unprivileged:stable-alpine](https://github.com/nginxinc/docker-nginx-unprivileged/blob/main/Dockerfile-alpine.template)
- [eclipse-temurin:19-alpine](https://github.com/adoptium/containers)
- Official DockerHub pages:
- Node: https://hub.docker.com/_/node
- Nginxinc/nginx-unprivileged: https://hub.docker.com/r/nginxinc/nginx-unprivileged
- Eclipse Temurin: https://hub.docker.com/_/eclipse-temurin
- Eclipse Temurin Project: https://projects.eclipse.org/projects/adoptium.temurin
- Additional information about images:
- Node: https://github.com/docker-library/repo-info/tree/master/repos/node
- Nginxinc/nginx-unprivileged: https://github.com/nginxinc/docker-nginx-unprivileged
- Eclipse Temurin: https://github.com/docker-library/repo-info/tree/master/repos/eclipse-temurin

- PASS_VERSION
- APP_VERSION
- APP_API_TIMEOUT
- APP_API_MAX_RETRIES
- APP_API_DELAY
- IDENTITY_PROVIDER_URL
- HOST_URL
- DATA_URL
- KEYCLOAK_CLIENTID
- KEYCLOAK_REALM
- KEYCLOAK_ONLOAD
As with all Docker images, these likely also contain other software which may be under other licenses
(such as Bash, etc. from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->

```bash
# run script
../buildAndDeploy.sh consumer-ui
```
[contributors-shield]: https://img.shields.io/github/contributors/eclipse-tractusx/digital-product-pass.svg?style=for-the-badge

You can run the application in docker container with existing image `ghcr.io/eclipse-tractusx/digital-product-pass/consumer-ui:latest` from GitHub packages. You need to update the [build and deploy](./buildAndDeploy.sh) script.
[contributors-url]: https://github.com/eclipse-tractusx/digital-product-pass/graphs/contributors

The consumer frontend is available in browser at [http://localhost:8080](http://localhost:8080)
[stars-shield]: https://img.shields.io/github/stars/eclipse-tractusx/digital-product-pass.svg?style=for-the-badge

## Coding styles
[stars-url]: https://github.com/eclipse-tractusx/digital-product-pass/stargazers

### How to set up a code editor
[license-shield]: https://img.shields.io/github/license/eclipse-tractusx/digital-product-pass.svg?style=for-the-badge

See [VSCode configuration](https://code.visualstudio.com/docs/getstarted/settings).
[license-url]: https://github.com/eclipse-tractusx/digital-product-pass/blob/main/LICENSE

## License
[release-shield]: https://img.shields.io/github/v/release/eclipse-tractusx/digital-product-pass.svg?style=for-the-badge

[Apache-2.0](https://raw.githubusercontent.com/eclipse-tractusx/digital-product-pass/digital-product-pass/main/LICENSE)
[release-url]: https://github.com/eclipse-tractusx/digital-product-pass/releases
Loading