-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from FraunhoferISST/ci/docker
Ci/docker
- Loading branch information
Showing
14 changed files
with
286 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,60 @@ | ||
## Project Installation | ||
|
||
The first steps are always the same: | ||
1. Clone the project | ||
2. Make sure the tractusx-edc is running with all its components (control plane, data plane, ...) | ||
2. Make sure the PURIS backend and the tractusx-edc is running with all its components | ||
|
||
Depending on your needs of deployment, follow the following steps | ||
|
||
### Running using mvn (local develpment) | ||
3. Change the `src/main/resources/application.properties` or the respective environment | ||
variables to configure the port, the URL of the EDC control plane, backend application etc. | ||
4. Run the application: | ||
- (Java) Use `mvn install` to build the project and run the generated `.jar` file | ||
- (Docker) Run `docker build .` and `docker run -d -p 8081:8081 CONTAINERID` | ||
- (Kubernetes) Run `helm install puris-backend` | ||
4a. Run the application with role specific settings: | ||
- Use `mvn spring-boot:run -Dspring-boot.run.arguments=--spring.profiles.active=customer` to start with customer setup | ||
or | ||
- Use `mvn spring-boot:run -Dspring-boot.run.arguments=--spring.profiles.active=supplier`to start with supplier setup | ||
```shell | ||
# build and run the generated .jar file | ||
mvn install | ||
|
||
# run for demo or development puroposes | ||
# customer role | ||
mvn spring-boot:run -Dspring-boot.run.arguments=--spring.profiles.active=customer | ||
# supplier role | ||
mvn spring-boot:run -Dspring-boot.run.arguments=--spring.profiles.active=supplier | ||
``` | ||
5. Done! The Swagger UI should be available at | ||
- (Java & Docker) `http://YOURIP:8081/catena/swagger-ui/index.html` | ||
- (Kubernetes) `http://CLUSTERIP:30001/catena/swagger-ui/index.html` | ||
6. It is highly suggested to install and run the PURIS frontend afterward | ||
|
||
### Running using docker (deployment) | ||
3. Optional (one can set properties via environment variables to docker): Change the `src/main/resources/application.properties` or the respective environment | ||
variables to configure the port, the URL of the EDC control plane, backend application etc. | ||
4. Run the application: | ||
```shell | ||
cd backend | ||
|
||
docker build -t puris-backend:dev . | ||
|
||
# A use docker | ||
docker run -d --rm -p 8081:8081 --name backend -e server.port=8082 puris-backend:dev CONTAINERID | ||
|
||
# B use docker-compose | ||
docker-compose up | ||
``` | ||
5. Done! The Swagger UI should be available at | ||
- (Java & Docker) `http://YOURIP:8081/catena/swagger-ui/index.html` | ||
- (Kubernetes) `http://CLUSTERIP:30001/catena/swagger-ui/index.html` | ||
6. It is highly suggested to install and run the PURIS frontend afterward | ||
|
||
### Running using helm (deployment) | ||
Change the `src/main/resources/application.properties` or the respective environment | ||
variables to configure the port, the URL of the EDC control plane, backend application etc. | ||
4. Run the application: | ||
```shell | ||
cd backend/charts | ||
|
||
helm install puris-backend | ||
``` | ||
5. Done! The Swagger UI should be available at | ||
- (Java & Docker) `http://YOURIP:8081/catena/swagger-ui/index.html` | ||
- (Kubernetes) `http://CLUSTERIP:30001/catena/swagger-ui/index.html` | ||
6. It is highly suggested to install and run the PURIS frontend afterward |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# | ||
# Copyright (c) 2023 Volkswagen AG | ||
# Copyright (c) 2023 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. (represented by Fraunhofer ISST) | ||
# Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
# | ||
# 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 governing permissions and limitations | ||
# under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
version: '1' | ||
services: | ||
puris-backend: | ||
Check warning on line 23 in backend/docker-compose.yaml GitHub Actions / Analyze[MEDIUM] Healthcheck Not Set
Check warning on line 23 in backend/docker-compose.yaml GitHub Actions / Analyze[MEDIUM] Host Namespace is Shared
Check warning on line 23 in backend/docker-compose.yaml GitHub Actions / Analyze[MEDIUM] Memory Not Limited
|
||
image: puris-backend:dev | ||
container_name: backend | ||
ports: | ||
- 8081:8081 | ||
environment: | ||
- server.port=8081 | ||
- puris.demonstrator.role= #customer/supplier | ||
- edc.controlplane.host=172.17.0.2 | ||
- edc.controlplane.data.port=31605 | ||
- edc.dataplane.public.port=31503 | ||
- edc.idsUrl=http://plato-controlplane:8084/api/v1/ids | ||
- own.bpnl= #BPNL4444444444XX | ||
- own.bpns= #BPNS4444444444XX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VITE_APP_NAME=\$APP_NAME | ||
VITE_BACKEND_BASE_URL=\$BACKEND_BASE_URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.