forked from boschresearch/catena-x-edc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add edc-controlplane-memory-hashicorp-vault
Signed-off-by: Denis Neuling <[email protected]>
- Loading branch information
1 parent
3defbc0
commit 8afc4cd
Showing
8 changed files
with
251 additions
and
5 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
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
174 changes: 174 additions & 0 deletions
174
edc-controlplane/edc-controlplane-memory-hashicorp-vault/pom.xml
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,174 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2022 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 | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>edc-controlplane</artifactId> | ||
<groupId>org.eclipse.tractusx.edc</groupId> | ||
<version>0.1.3-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>edc-controlplane-memory-hashicorp-vault</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<properties> | ||
<sonar.moduleKey>${project.groupId}_${project.artifactId}</sonar.moduleKey> | ||
</properties> | ||
|
||
<build> | ||
<finalName>${project.artifactId}</finalName> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
<includes> | ||
<include>**/*</include> | ||
</includes> | ||
</resource> | ||
<resource> | ||
<directory>../../</directory> | ||
<targetPath>META-INF</targetPath> | ||
<includes> | ||
<include>NOTICE.md</include> | ||
<include>LICENSE</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<addClasspath>true</addClasspath> | ||
<classpathPrefix>lib/</classpathPrefix> | ||
<mainClass>org.eclipse.dataspaceconnector.boot.system.runtime.BaseRuntime</mainClass> | ||
<useUniqueVersions>false</useUniqueVersions> | ||
</manifest> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>copy-dependencies</goal> | ||
</goals> | ||
<configuration> | ||
<outputDirectory>${project.build.directory}/lib</outputDirectory> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
|
||
<dependencies> | ||
<!-- Base Control-Plane --> | ||
<dependency> | ||
<groupId>org.eclipse.tractusx.edc</groupId> | ||
<artifactId>edc-controlplane-base</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.eclipse.dataspaceconnector</groupId> | ||
<artifactId>control-plane-core</artifactId> | ||
</dependency> | ||
|
||
<!-- Vault --> | ||
<dependency> | ||
<groupId>org.eclipse.tractusx.edc.extensions</groupId> | ||
<artifactId>hashicorp-vault</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.eclipse.dataspaceconnector</groupId> | ||
<artifactId>data-plane-transfer-client</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<profiles> | ||
<profile> | ||
<!-- | ||
mvn package -Pwith-docker-image | ||
--> | ||
<id>with-docker-image</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<executions> | ||
<!-- | ||
NOTE: To build and tag docker images the `docker` executable needs to | ||
be on the PATH to be used by the exec-maven-plugin plugin | ||
--> | ||
<execution> | ||
<id>docker-build-${project.artifactId}:${project.version}</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<executable>docker</executable> | ||
<workingDirectory>${project.basedir}</workingDirectory> | ||
<arguments> | ||
<argument>build</argument> | ||
<argument>-f</argument> | ||
<argument>src/main/docker/Dockerfile</argument> | ||
<argument>--build-arg</argument> | ||
<argument>JAR=target/${project.artifactId}.jar</argument> | ||
<argument>--build-arg</argument> | ||
<argument>LIB=target/lib</argument> | ||
<argument>-t</argument> | ||
<argument>${project.artifactId}:${project.version}</argument> | ||
<argument>.</argument> | ||
</arguments> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>docker-tag-${project.artifactId}:latest</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<executable>docker</executable> | ||
<workingDirectory>${project.basedir}</workingDirectory> | ||
<arguments> | ||
<argument>tag</argument> | ||
<argument>${project.artifactId}:${project.version}</argument> | ||
<argument>${project.artifactId}:latest</argument> | ||
</arguments> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
</project> |
69 changes: 69 additions & 0 deletions
69
edc-controlplane/edc-controlplane-memory-hashicorp-vault/src/main/docker/Dockerfile
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,69 @@ | ||
# | ||
# Copyright (c) 2022 Mercedes-Benz Tech Innovation GmbH | ||
# Copyright (c) 2021,2022 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 | ||
# | ||
FROM alpine:3.17.0 as otel | ||
|
||
ENV OTEL_AGENT_LOCATION "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.12.1/opentelemetry-javaagent.jar" | ||
|
||
HEALTHCHECK NONE | ||
|
||
RUN wget ${OTEL_AGENT_LOCATION} -O /tmp/opentelemetry-javaagent.jar | ||
|
||
FROM alpine:3.17.0 | ||
|
||
ARG JAR | ||
ARG LIB | ||
|
||
ARG APP_USER=docker | ||
ARG APP_UID=10100 | ||
|
||
RUN apk update && \ | ||
apk add openjdk11-jre-headless=11.0.17_p8-r3 --no-cache && \ | ||
rm -rf /var/cache/apk/* | ||
|
||
RUN addgroup --system "$APP_USER" | ||
|
||
RUN adduser \ | ||
--shell /sbin/nologin \ | ||
--disabled-password \ | ||
--gecos "" \ | ||
--ingroup "$APP_USER" \ | ||
--no-create-home \ | ||
--uid "$APP_UID" \ | ||
"$APP_USER" | ||
|
||
USER "$APP_USER" | ||
WORKDIR /app | ||
|
||
COPY --from=otel /tmp/opentelemetry-javaagent.jar . | ||
COPY ${JAR} edc-controlplane.jar | ||
COPY ${LIB} ./lib/ | ||
|
||
HEALTHCHECK NONE | ||
|
||
CMD ["java", \ | ||
"-javaagent:/app/opentelemetry-javaagent.jar", \ | ||
"-Dedc.fs.config=/app/configuration.properties", \ | ||
"-Djava.util.logging.config.file=/app/logging.properties", \ | ||
"-Dotel.javaagent.configuration-file=/app/opentelemetry.properties", \ | ||
"-Dotel.metrics.exporter=prometheus", \ | ||
"-Dotel.exporter.prometheus.port=9090", \ | ||
"-Djava.security.edg=file:/dev/.urandom", \ | ||
"-jar", \ | ||
"edc-controlplane.jar"] |
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