Skip to content

Commit

Permalink
Merge pull request #70 from catenax-ng/fix/non-base-images
Browse files Browse the repository at this point in the history
fix(provisioning|remoting): address some updates in the case of non-standard base images
  • Loading branch information
carslen authored Feb 5, 2024
2 parents 8b54681 + 8753311 commit b4ee7fe
Show file tree
Hide file tree
Showing 24 changed files with 368 additions and 297 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
# Create SemVer or ref tags dependent of trigger event
- name: Docker Meta Conforming
id: meta-conf
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c # v5.1.5
with:
images: |
${{ steps.set-docker-repo.outputs.REPO }}/conforming-agent
Expand All @@ -137,12 +137,12 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=1.10.15-SNAPSHOT,enable=${{ github.event.inputs.deploy_docker == 'true' || github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=1.11.16-SNAPSHOT,enable=${{ github.event.inputs.deploy_docker == 'true' || github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
# build in any case, but push only main and version tag settings
- name: Conforming Container Build and Push
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
with:
context: conforming/.
file: conforming/src/main/docker/Dockerfile
Expand All @@ -164,7 +164,7 @@ jobs:
# Create SemVer or ref tags dependent of trigger event
- name: Docker Meta Remoting
id: meta-remote
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c # v5.1.5
with:
images: |
${{ steps.set-docker-repo.outputs.REPO }}/remoting-agent
Expand All @@ -176,12 +176,12 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=1.10.15-SNAPSHOT,enable=${{ github.event.inputs.deploy_docker == 'true' || github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=1.11.16-SNAPSHOT,enable=${{ github.event.inputs.deploy_docker == 'true' || github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
# build in any case, but push only main and version tag settings
- name: Remoting Container Build and Push
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
with:
context: remoting/.
file: remoting/src/main/docker/Dockerfile
Expand All @@ -203,7 +203,7 @@ jobs:
# Create SemVer or ref tags dependent of trigger event
- name: Docker Meta Provisioning
id: meta-prov
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c # v5.1.5
with:
images: |
${{ steps.set-docker-repo.outputs.REPO }}/provisioning-agent
Expand All @@ -215,12 +215,12 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=1.10.15-SNAPSHOT,enable=${{ github.event.inputs.deploy_docker == 'true' || github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=1.11.16-SNAPSHOT,enable=${{ github.event.inputs.deploy_docker == 'true' || github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
# build in any case, but push only main and version tag settings
- name: Provisioning Container Build and Push
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
with:
context: provisioning/.
file: provisioning/src/main/docker/Dockerfile
Expand Down
262 changes: 125 additions & 137 deletions DEPENDENCIES

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions charts/conforming-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ home: https://github.com/eclipse-tractusx/knowledge-agents/
sources:
- https://github.com/eclipse-tractusx/knowledge-agents/tree/main/conforming
type: application
appVersion: "1.10.15-SNAPSHOT"
version: 1.10.15-SNAPSHOT
appVersion: "1.11.16-SNAPSHOT"
version: 1.11.16-SNAPSHOT
maintainers:
- name: 'Tractus-X Knowledge Agents Team'
4 changes: 2 additions & 2 deletions charts/conforming-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# conforming-agent

![Version: 1.10.15-SNAPSHOT](https://img.shields.io/badge/Version-1.10.2--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.10.15-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.10.2--SNAPSHOT-informational?style=flat-square)
![Version: 1.11.16-SNAPSHOT](https://img.shields.io/badge/Version-1.10.2--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.11.16-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.10.2--SNAPSHOT-informational?style=flat-square)

A Helm chart for the Tractus-X Conforming Agent which is a container to assess the conformity of all other parts of the Agent-Enabled Dataspace.

Expand All @@ -31,7 +31,7 @@ This chart has no prerequisites.
## TL;DR
```shell
$ helm repo add eclipse-tractusx https://eclipse-tractusx.github.io/charts/dev
$ helm install my-release eclipse-tractusx/conforming-agent --version 1.10.15-SNAPSHOT
$ helm install my-release eclipse-tractusx/conforming-agent --version 1.11.16-SNAPSHOT
```

## Maintainers
Expand Down
4 changes: 3 additions & 1 deletion charts/conforming-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ securityContext:
# -- Requires the container to run without root privileges
runAsNonRoot: true
# -- The container's process will run with the specified uid
runAsUser: 10100
runAsUser: 10001
# -- Processes within a pod will belong to this guid
runAsGroup: 30000
# -- The owner for volumes and any files created within volumes will belong to this guid
fsGroup: 30000

livenessProbe:
# -- Whether to enable kubernetes [liveness-probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
Expand Down
4 changes: 2 additions & 2 deletions charts/provisioning-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ home: https://github.com/eclipse-tractusx/knowledge-agents/
sources:
- https://github.com/eclipse-tractusx/knowledge-agents/tree/main/provisioning
type: application
appVersion: "1.10.15-SNAPSHOT"
version: 1.10.15-SNAPSHOT
appVersion: "1.11.16-SNAPSHOT"
version: 1.11.16-SNAPSHOT
maintainers:
- name: 'Tractus-X Knowledge Agents Team'
4 changes: 2 additions & 2 deletions charts/provisioning-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# provisioning-agent

![Version: 1.10.15-SNAPSHOT](https://img.shields.io/badge/Version-1.10.2--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.10.15-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.10.2--SNAPSHOT-informational?style=flat-square)
![Version: 1.11.16-SNAPSHOT](https://img.shields.io/badge/Version-1.10.2--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.11.16-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.10.2--SNAPSHOT-informational?style=flat-square)

A Helm chart for the Tractus-X Provisioning Agent which is a container to Bridge Agent-Enabled Connector and Relational Data Sources.

Expand All @@ -31,7 +31,7 @@ This chart has no prerequisites.
## TL;DR
```shell
$ helm repo add eclipse-tractusx https://eclipse-tractusx.github.io/charts/dev
$ helm install my-release eclipse-tractusx/provisioning-agent --version 1.10.15-SNAPSHOT
$ helm install my-release eclipse-tractusx/provisioning-agent --version 1.11.16-SNAPSHOT
```

## Maintainers
Expand Down
6 changes: 3 additions & 3 deletions charts/provisioning-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ podSecurityContext:
# -- Restrict a Container's Syscalls with seccomp
type: RuntimeDefault
# -- Runs all processes within a pod with a special uid
runAsUser: 999
runAsUser: 10001
# -- Processes within a pod will belong to this guid
runAsGroup: 999
runAsGroup: 30000
# -- The owner for volumes and any files created within volumes will belong to this guid
fsGroup: 999
fsGroup: 30000

# The [container security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) defines privilege and access control settings for a Container within a pod
securityContext:
Expand Down
4 changes: 2 additions & 2 deletions charts/remoting-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ home: https://github.com/eclipse-tractusx/knowledge-agents/
sources:
- https://github.com/eclipse-tractusx/knowledge-agents/tree/main/remoting
type: application
appVersion: "1.10.15-SNAPSHOT"
version: 1.10.15-SNAPSHOT
appVersion: "1.11.16-SNAPSHOT"
version: 1.11.16-SNAPSHOT
maintainers:
- name: 'Tractus-X Knowledge Agents Team'
4 changes: 2 additions & 2 deletions charts/remoting-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
-->
# remoting-agent

![Version: 1.10.15-SNAPSHOT](https://img.shields.io/badge/Version-1.10.2--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.10.15-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.10.2--SNAPSHOT-informational?style=flat-square)
![Version: 1.11.16-SNAPSHOT](https://img.shields.io/badge/Version-1.10.2--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.11.16-SNAPSHOT](https://img.shields.io/badge/AppVersion-1.10.2--SNAPSHOT-informational?style=flat-square)

A Helm chart for the Tractus-X Remoting Agent which is a container to Bridge Agent-Enabled Connector and REST APIs.

Expand All @@ -30,7 +30,7 @@ This chart has no prerequisites.
## TL;DR
```shell
$ helm repo add eclipse-tractusx https://eclipse-tractusx.github.io/charts/dev
$ helm install my-release eclipse-tractusx/remoting-agent --version 1.10.15-SNAPSHOT
$ helm install my-release eclipse-tractusx/remoting-agent --version 1.11.16-SNAPSHOT
```

## Maintainers
Expand Down
8 changes: 4 additions & 4 deletions charts/remoting-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@ spec:
subPath: logback.xml
readOnly: true
- name: logs
mountPath: /usr/local/tomcat/logs
mountPath: /opt/tomcat/logs
readOnly: false
- name: work
mountPath: /usr/local/tomcat/work/Catalina/localhost
mountPath: /opt/tomcat/work/Catalina/localhost
readOnly: false
- name: conf
mountPath: /usr/local/tomcat/conf/Catalina/localhost
mountPath: /opt/tomcat/conf/Catalina/localhost
readOnly: false
- name: tmp
mountPath: /usr/local/tomcat/temp
mountPath: /opt/tomcat/temp
readOnly: false
- name: rdf4jlogs
mountPath: /var/rdf4j/server/logs
Expand Down
16 changes: 8 additions & 8 deletions conforming/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ mvn package

This will generate

- a [plugin jar](target/original-conforming-agent-1.10.15-SNAPSHOT.jar) containing all necessary components to be dropped into a Jakarta-Compatible Web Server.
- a [standalone jar](target/conforming-agent-1.10.15-SNAPSHOT.jar) including the Jakarta-Reference Implementation (Glassfish).
- a [plugin jar](target/original-conforming-agent-1.11.16-SNAPSHOT.jar) containing all necessary components to be dropped into a Jakarta-Compatible Web Server.
- a [standalone jar](target/conforming-agent-1.11.16-SNAPSHOT.jar) including the Jakarta-Reference Implementation (Glassfish).

### Run Locally

The [standalone jar](target/conforming-agent-1.10.15-SNAPSHOT.jar) may be started as follows
The [standalone jar](target/conforming-agent-1.11.16-SNAPSHOT.jar) may be started as follows

```console
java -cp target/conforming-agent-1.10.15-SNAPSHOT.jar org.eclipse.tractusx.agents.conforming.Bootstrap"
java -cp target/conforming-agent-1.11.16-SNAPSHOT.jar org.eclipse.tractusx.agents.conforming.Bootstrap"
```

### Containerizing
Expand All @@ -76,7 +76,7 @@ mvn install -Pwith-docker-image
or invoke the following docker command after a successful package run

```console
docker build -t tractusx/conforming-agent:1.10.15-SNAPSHOT -f src/main/docker/Dockerfile .
docker build -t tractusx/conforming-agent:1.11.16-SNAPSHOT -f src/main/docker/Dockerfile .
```

This will create a docker image based on a minimal java environment for running the Glassfish-based standalone jar.
Expand All @@ -85,7 +85,7 @@ To run the docker image, you could invoke this command

```console
docker run -p 8080:8080 \
tractusx/conforming-agent:1.10.15-SNAPSHOT
tractusx/conforming-agent:1.11.16-SNAPSHOT
````

Afterwards, you should be able to access the [local SparQL endpoint](http://localhost:8080/) via
Expand Down Expand Up @@ -124,7 +124,7 @@ Eclipse Tractus-X product(s) installed within the image:

**Used base image**

- [eclipse-temurin:17-jre-alpine](https://github.com/adoptium/containers)
- [eclipse-temurin:21-jre-alpine](https://github.com/adoptium/containers)
- Official Eclipse Temurin DockerHub page: https://hub.docker.com/_/eclipse-temurin
- Eclipse Temurin Project: https://projects.eclipse.org/projects/adoptium.temurin
- Additional information about the Eclipse Temurin images: https://github.com/docker-library/repo-info/tree/master/repos/eclipse-temurin
Expand All @@ -143,7 +143,7 @@ It can be added to your umbrella chart.yaml by the following snippet
dependencies:
- name: conforming-agent
repository: https://eclipse-tractusx.github.io/charts/dev
version: 1.10.15-SNAPSHOT
version: 1.11.16-SNAPSHOT
alias: my-conforming-agent
```

Expand Down
4 changes: 2 additions & 2 deletions conforming/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>org.eclipse.tractusx</groupId>
<artifactId>agents</artifactId>
<version>1.10.15-SNAPSHOT</version>
<version>1.11.16-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -53,7 +53,7 @@
<swagger-core-version>2.2.12</swagger-core-version>
<jersey2-version>2.40</jersey2-version>
<junit-version>4.13.1</junit-version>
<logback-version>1.4.8</logback-version>
<logback-version>1.4.12</logback-version>
<servlet-api-version>2.5</servlet-api-version>
<beanvalidation-version>2.0.1.Final</beanvalidation-version>
</properties>
Expand Down
4 changes: 2 additions & 2 deletions conforming/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
#
# SPDX-License-Identifier: Apache-2.0

FROM eclipse-temurin:17-jre-alpine
FROM eclipse-temurin:21-jre-alpine
ARG JAR
ARG LIB

ARG APP_USER=agent
ARG APP_UID=10100
ARG APP_UID=10001
ARG APP_GID=30000

RUN addgroup --gid "$APP_GID" --system "$APP_USER"
Expand Down
29 changes: 15 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.tractusx</groupId>
<artifactId>agents</artifactId>
<version>1.10.15-SNAPSHOT</version>
<version>1.11.16-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Tractus-X Knowledge Agents Reference Implementations</name>
<description>Provides Reference Implementations and Artifacts to Realize Semantic Dataspace Backends</description>
Expand All @@ -37,26 +37,27 @@
<maven.compiler.target>11</maven.compiler.target>
<skipTests>false</skipTests>

<junit.version>5.9.0</junit.version>
<junit.version>5.9.2</junit.version>
<mockito.version>4.6.1</mockito.version>
<failsafe.version>3.2.4</failsafe.version>
<okhttp.version>4.9.3</okhttp.version>
<rdf4j.version>4.3.3</rdf4j.version>
<rdf4j.version>4.3.8</rdf4j.version>
<slf4j.version>2.0.7</slf4j.version>
<httpcomponents.version>4.5.14</httpcomponents.version>
<commons.logging.version>1.2</commons.logging.version>
<logback.version>1.2.13</logback.version>
<jackson.version>2.15.2</jackson.version>
<jackson.databind.version>2.15.2</jackson.databind.version>
<jackson.annotation.version>2.13.5</jackson.annotation.version>
<jaxb.version>2.3.0</jaxb.version>
<ontop.version>5.1.0</ontop.version>
<jaxb.version>2.3.1</jaxb.version>
<ontop.version>5.1.2</ontop.version>
<!-- Source characteristics -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<servlet.version>3.1.0</servlet.version>
<spring.version>5.3.28</spring.version>
<spring.boot.version>2.7.13</spring.boot.version>
<guava.version>32.0.1-jre</guava.version>
<tomcat.version>9.0.81</tomcat.version>
<spring.version>5.3.31</spring.version>
<spring.boot.version>2.7.18</spring.boot.version>
<guava.version>32.1.2-jre</guava.version>
<tomcat.version>9.0.83</tomcat.version>
<netty.version>4.1.94.Final</netty.version>
<jetty.version>9.4.53.v20231009</jetty.version>
<org.yaml.snakeyaml.version>2.0</org.yaml.snakeyaml.version>
Expand Down Expand Up @@ -99,7 +100,7 @@
<plugin>
<groupId>org.eclipse.dash</groupId>
<artifactId>license-tool-plugin</artifactId>
<version>1.0.3-SNAPSHOT</version>
<version>1.1.1-SNAPSHOT</version>
<configuration>
<projectId>automotive.tractusx</projectId>
<summary>DEPENDENCIES</summary>
Expand All @@ -117,7 +118,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.5</version>
<!-- unfortunately you have to repeat that in all relevant sub-modules -->
<configuration>
<groups>!online</groups>
Expand Down Expand Up @@ -202,7 +203,7 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.37.0</version>
<version>2.42.0</version>
<executions>
<execution>
<id>format</id>
Expand All @@ -219,9 +220,9 @@
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<configLocation>${session.executionRootDirectory}/resources/tx-checkstyle-config.xml</configLocation>
<configLocation>${project.basedir}/../resources/tx-checkstyle-config.xml</configLocation>
<propertyExpansion>
config_loc=${session.executionRootDirectory}/resources
config_loc=${project.basedir}/../resources
</propertyExpansion>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
Expand Down
Loading

0 comments on commit b4ee7fe

Please sign in to comment.