Skip to content

Commit

Permalink
Add controlplane-postgres flavor (eclipse-tractusx#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
denisneuling authored Apr 6, 2022
1 parent d21fcfa commit 27fb1a4
Show file tree
Hide file tree
Showing 24 changed files with 971 additions and 14 deletions.
38 changes: 37 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ jobs:
run: |-
[ ! -d "edc" ] && git submodule add https://github.com/eclipse-dataspaceconnector/DataSpaceConnector.git edc
git submodule update --init
git -C edc checkout 3305340d6a19ba919540d28a731b3cab6d23857a
git -C edc fetch --all
git -C edc checkout febacc631b4c07aaec2e76ff8a81e8564a99090d
-
name: Set up JDK 11
uses: actions/setup-java@v2
Expand Down Expand Up @@ -121,6 +122,41 @@ jobs:
tags: ${{ steps.edc_controlplane_cosmosdb_meta.outputs.tags }}
labels: ${{ steps.edc_controlplane_cosmosdb_meta.outputs.labels }}

#################################
### edc-controlplane-postgresql ###
#################################
-
name: Build edc-controlplane-postgresql
run: |-
./mvnw -s settings.xml -B -pl .,edc-controlplane/edc-controlplane-postgresql -am verify
env:
GITHUB_PACKAGE_USERNAME: ${{ github.actor }}
GITHUB_PACKAGE_PASSWORD: ${{ secrets.CXNG_GHCR_PAT }}
-
name: edc-controlplane-postgresql Docker Metadata
id: edc_controlplane_postgresql_meta
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/catenax-ng/catena-x-edc/edc-controlplane-postgresql
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{raw}}
type=match,pattern=\d.\d.\d
type=sha
-
name: Build edc-controlplane-postgresql Docker Image
uses: docker/build-push-action@v2
with:
context: .
file: edc-controlplane/edc-controlplane-postgresql/src/main/docker/Dockerfile
build-args: |
JAR=edc-controlplane/edc-controlplane-postgresql/target/edc-controlplane-postgresql.jar
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.edc_controlplane_postgresql_meta.outputs.tags }}
labels: ${{ steps.edc_controlplane_postgresql_meta.outputs.labels }}

#####################
### edc-dataplane ###
#####################
Expand Down
17 changes: 16 additions & 1 deletion deployment/helm/edc-controlplane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,22 @@ configuration:
edc_dataplane_queue_capacity: ""
edc_dataplane_wait: ""
edc_dataplane_workers: ""
edc_datasource_contractdefinition_name: ""
edc_datasource_asset_name: "default"
edc_datasource_contractdefinition_name: "default"
edc_datasource_contractnegotiation_name: "default"
edc_datasource_policy_name: "default"
edc_datasource_transferprocess_name: "default"
edc_datasource_default_pool_maxIdleConnections: ""
edc_datasource_default_pool_maxTotalConnections: ""
edc_datasource_default_pool_minIdleConnections: ""
edc_datasource_default_pool_testConnectionOnBorrow: ""
edc_datasource_default_pool_testConnectionOnCreate: ""
edc_datasource_default_pool_testConnectionOnReturn: ""
edc_datasource_default_pool_testConnectionWhileIdle: ""
edc_datasource_default_pool_testQuery: ""
edc_datasource_default_url: ""
edc_datasource_default_user: ""
edc_datasource_default_password: ""
edc_dpf_selector_url: ""
edc_events_topic_endpoint: ""
edc_events_topic_name: ""
Expand Down
17 changes: 16 additions & 1 deletion deployment/helm/edc-dataplane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,22 @@ configuration:
edc_dataplane_queue_capacity: ""
edc_dataplane_wait: ""
edc_dataplane_workers: ""
edc_datasource_contractdefinition_name: ""
edc_datasource_asset_name: "default"
edc_datasource_contractdefinition_name: "default"
edc_datasource_contractnegotiation_name: "default"
edc_datasource_policy_name: "default"
edc_datasource_transferprocess_name: "default"
edc_datasource_default_pool_maxIdleConnections: ""
edc_datasource_default_pool_maxTotalConnections: ""
edc_datasource_default_pool_minIdleConnections: ""
edc_datasource_default_pool_testConnectionOnBorrow: ""
edc_datasource_default_pool_testConnectionOnCreate: ""
edc_datasource_default_pool_testConnectionOnReturn: ""
edc_datasource_default_pool_testConnectionWhileIdle: ""
edc_datasource_default_pool_testQuery: ""
edc_datasource_default_url: ""
edc_datasource_default_user: ""
edc_datasource_default_password: ""
edc_dpf_selector_url: ""
edc_events_topic_endpoint: ""
edc_events_topic_name: ""
Expand Down
2 changes: 1 addition & 1 deletion edc
Submodule edc updated from 330534 to febacc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.14 as otel
FROM alpine:3.15.4 as otel

ENV OTEL_AGENT_LOCATION "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.12.1/opentelemetry-javaagent.jar"

Expand Down
272 changes: 272 additions & 0 deletions edc-controlplane/edc-controlplane-postgresql/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,272 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>net.catenax.edc</groupId>
<version>0.0.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>edc-controlplane-postgresql</artifactId>
<packaging>jar</packaging>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>${project.artifactId}</finalName>
<shadedArtifactAttached>true</shadedArtifactAttached>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.eclipse.dataspaceconnector.boot.system.runtime.BaseRuntime
</mainClass>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>
META-INF/services/org.eclipse.dataspaceconnector.spi.system.ServiceExtension
</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>
META-INF/services/org.eclipse.dataspaceconnector.spi.system.VaultExtension
</resource>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>
META-INF/services/org.eclipse.dataspaceconnector.spi.system.ConfigurationExtension
</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<!-- AAS Controller -->
<dependency>
<groupId>net.catenax.edc.extensions</groupId>
<artifactId>aas-controller</artifactId>
</dependency>

<!-- Postgresql Migration -->
<dependency>
<groupId>net.catenax.edc.extensions</groupId>
<artifactId>postgresql-migration</artifactId>
</dependency>

<!-- Config -->
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>filesystem-configuration</artifactId>
</dependency>

<!-- Vault -->
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>azure-vault</artifactId>
</dependency>

<!-- APIs -->
<dependency> <!-- Once org.eclipse.dataspaceconnector:data-management-api is ready this will go away -->
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>control-api</artifactId>
</dependency>
<!--
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>data-management-api</artifactId>
</dependency>
-->
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>observability-api</artifactId>
</dependency>

<!-- IDS -->
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>ids-api-configuration</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>ids-api-multipart-dispatcher-v1</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>ids-api-multipart-endpoint-v1</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>ids-api-transform-v1</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>ids-core</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>ids-spi</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>ids-token-validation</artifactId>
</dependency>

<!-- Stores -->
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>sql-asset-index</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>sql-contractdefinition-store</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>sql-contractnegotiation-store</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>sql-transferprocess-store</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>sql-policy-store</artifactId>
</dependency>

<!-- Core -->
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>core-base</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>core-boot</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>transfer</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>contract</artifactId>
</dependency>

<!-- IAM -->
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>iam-mock</artifactId>
</dependency>

<!-- Telemetry -->
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>core-micrometer</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>jersey-micrometer</artifactId>
<version>${org.eclipse.dataspaceconnector.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>jetty-micrometer</artifactId>
<version>${org.eclipse.dataspaceconnector.version}</version>
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>jdk-logger-monitor</artifactId>
</dependency>

<!-- Supportive -->
<dependency> <!-- includes jetty and jersey -->
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>http</artifactId>
</dependency>

<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>sql-pool-apache-commons-pool</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>transaction-local</artifactId>
</dependency>

<dependency> <!-- http-posts EndpointDataReference to configured external service -->
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>http-receiver</artifactId>
</dependency>

<!-- Other -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
</dependency>
</dependencies>

<profiles>
<profile>
<id>with-docker-image</id>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<executions>
<execution>
<id>default</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<contextDirectory>.</contextDirectory>
<dockerfile>src/main/docker/Dockerfile</dockerfile>
<repository>${project.artifactId}</repository>
<tag>${project.version}</tag>
<buildArgs>
<JAR>target/${project.artifactId}.jar</JAR>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading

0 comments on commit 27fb1a4

Please sign in to comment.