From 7812c0be0b3d7f7a55b3db20eb925287d77704f3 Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Mon, 8 Jul 2024 17:16:17 +0200 Subject: [PATCH 1/7] chore: introduce domain mapping config into chart. upgrade version(s). --- .github/workflows/build.yml | 6 +- .github/workflows/codeql.yml | 4 +- .github/workflows/helm-chart-lint.yml | 2 +- .github/workflows/trivy.yml | 4 +- .github/workflows/veracode.yml | 93 ---- DEPENDENCIES | 52 +-- README.md | 2 +- charts/aas-bridge/Chart.yaml | 4 +- charts/aas-bridge/README.md | 4 +- charts/aas-bridge/templates/configmap.yaml | 9 +- charts/aas-bridge/templates/deployment.yaml | 53 ++- charts/aas-bridge/values.yaml | 429 +++++++++++++++++- pom.xml | 8 +- sparql-aas/README.md | 7 +- sparql-aas/pom.xml | 4 +- sparql-aas/src/main/docker/Dockerfile | 2 +- .../tractusx/agents/aasbridge/AasUtils.java | 7 +- upgrade_version.sh | 2 +- 18 files changed, 533 insertions(+), 159 deletions(-) delete mode 100644 .github/workflows/veracode.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 49b16da..314421b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -131,7 +131,7 @@ jobs: # Create SemVer or ref tags dependent of trigger event - name: Docker Meta AAS Bridge id: meta-aas - uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 + uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 with: images: | ${{ steps.set-docker-repo.outputs.REPO }}/aas-bridge @@ -143,12 +143,12 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}} type=semver,pattern={{major}}.{{minor}} - type=raw,value=0.13.6-SNAPSHOT,enable=${{ github.event.inputs.deploy_docker == 'true' || github.ref == format('refs/heads/{0}', 'main') }} + type=raw,value=1.13.7-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: AAS Bridge Container Build and Push - uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c # v6.3.0 with: context: sparql-aas/. file: sparql-aas/src/main/docker/Dockerfile diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e41df6b..d8fc7c4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -63,7 +63,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 + uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -100,4 +100,4 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 + uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11 diff --git a/.github/workflows/helm-chart-lint.yml b/.github/workflows/helm-chart-lint.yml index a053a76..cfd0707 100644 --- a/.github/workflows/helm-chart-lint.yml +++ b/.github/workflows/helm-chart-lint.yml @@ -100,7 +100,7 @@ jobs: # Preparing a kind cluster to install and test charts on - name: Create kind cluster - uses: container-tools/kind-action@0fc957b58d9a5bc9ca57a1b419324a2074c7653b # v2.0.3 + uses: container-tools/kind-action@0ad70e2299366b0e1552c7240f4e4567148f723e # v2.0.4 with: # upgrade version, default (v0.17.0) uses node image v1.21.1 and doesn't work with more recent node image versions version: v0.20.0 diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 70053b0..fb4aa70 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -67,7 +67,7 @@ jobs: output: "trivy-results-config.sarif" severity: "CRITICAL,HIGH" - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@689fdc5193eeb735ecb2e52e819e3382876f93f4 # v2.22.6 + uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11 if: always() with: sarif_file: "trivy-results-config.sarif" @@ -133,6 +133,6 @@ jobs: - name: Upload Trivy scan results to GitHub Security tab if: success() && steps.imageCheck.outcome != 'failure' - uses: github/codeql-action/upload-sarif@689fdc5193eeb735ecb2e52e819e3382876f93f4 # v2.22.6 + uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11 with: sarif_file: "trivy-results-${{ matrix.image }}.sarif" diff --git a/.github/workflows/veracode.yml b/.github/workflows/veracode.yml deleted file mode 100644 index 0a045f0..0000000 --- a/.github/workflows/veracode.yml +++ /dev/null @@ -1,93 +0,0 @@ ---- -# -# Copyright (c) 2023 SAP SE -# Copyright (c) 2023 T-Systems International GmbH -# Copyright (c) 2021, 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 -# - -name: "Veracode" - -on: - schedule: - - cron: '0 2 * * *' - workflow_dispatch: - -jobs: - secret-presence: - runs-on: ubuntu-latest - outputs: - ORG_VERACODE_API_ID: ${{ steps.secret-presence.outputs.ORG_VERACODE_API_ID }} - ORG_VERACODE_API_KEY: ${{ steps.secret-presence.outputs.ORG_VERACODE_API_KEY }} - steps: - - name: Check whether secrets exist - id: secret-presence - run: | - [ ! -z "${{ secrets.ORG_VERACODE_API_ID }}" ] && echo "ORG_VERACODE_API_ID=true" >> $GITHUB_OUTPUT - [ ! -z "${{ secrets.ORG_VERACODE_API_KEY }}" ] && echo "ORG_VERACODE_API_KEY=true" >> $GITHUB_OUTPUT - exit 0 - - verify-formatting: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3.5.2 - with: - fetch-depth: 0 - - uses: ./.github/actions/setup-java - - name: Verify proper formatting - run: ./mvnw spotless:check - - ### - # Standalone applications have all dependencies in their jar - ### - build_standalone: - runs-on: ubuntu-latest - needs: [secret-presence, verify-formatting] - permissions: - contents: read - strategy: - fail-fast: false - matrix: - variant: [ { dir: sparql-aas, name: aas-bridge } - ] - steps: - # Set-Up - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: ./.github/actions/setup-java - # Build - - name: Build ${{ matrix.variant.name }} - run: |- - ./mvnw -s settings.xml -pl ${{ matrix.variant.dir }} install - env: - GITHUB_ACTOR: ${{ github.actor }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Tar gzip files for veracode upload - run: |- - tar -czvf ${{ matrix.variant.dir }}/target/${{ matrix.variant.name }}.tar.gz ${{ matrix.variant.dir }}/target/${{ matrix.variant.name }}-*.jar - - name: Veracode Upload And Scan - uses: veracode/veracode-uploadandscan-action@c3c0b78bddb42d5f6b10d70562f692215a410d7b #v1.0 - if: | - needs.secret-presence.outputs.ORG_VERACODE_API_ID && needs.secret-presence.outputs.ORG_VERACODE_API_KEY - continue-on-error: true - with: - appname: knowledge-agents/${{ matrix.variant.name }} - createprofile: true - version: ${{ matrix.variant.name }}-${{ github.sha }} - filepath: ${{ matrix.variant.dir }}/target/${{ matrix.variant.name }}.tar.gz - vid: ${{ secrets.ORG_VERACODE_API_ID }} - vkey: ${{ secrets.ORG_VERACODE_API_KEY }} - diff --git a/DEPENDENCIES b/DEPENDENCIES index c70e258..b565680 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -1,6 +1,6 @@ maven/mavencentral/ch.qos.logback/logback-classic/1.5.3, EPL-1.0 AND LGPL-2.1-only, approved, #13282 maven/mavencentral/ch.qos.logback/logback-core/1.5.3, EPL-1.0 AND LGPL-2.1-only, approved, #13283 -maven/mavencentral/com.apicatalog/titanium-json-ld/1.4.0, Apache-2.0, approved, #13683 +maven/mavencentral/com.apicatalog/titanium-json-ld/1.4.0, Apache-2.0, approved, #15200 maven/mavencentral/com.digitalpetri.fsm/strict-machine/0.6, Apache-2.0, approved, clearlydefined maven/mavencentral/com.digitalpetri.netty/netty-channel-fsm/0.8, Apache-2.0, approved, #6168 maven/mavencentral/com.ethlo.time/itu/1.8.0, Apache-2.0, approved, #12927 @@ -8,19 +8,19 @@ maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.17.0, Apache maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.17.0, , approved, #13665 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.17.0, Apache-2.0, approved, #13671 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-xml/2.16.1, Apache-2.0, approved, #12438 -maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.3, Apache-2.0, approved, #8802 +maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.3, Apache-2.0, approved, #15207 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.17.0, Apache-2.0, approved, #14160 maven/mavencentral/com.fasterxml.woodstox/woodstox-core/6.6.2, Apache-2.0, approved, #12789 maven/mavencentral/com.github.andrewoma.dexx/collection/0.7, MIT, approved, CQ22160 maven/mavencentral/com.github.ben-manes.caffeine/caffeine/3.1.8, Apache-2.0, approved, clearlydefined maven/mavencentral/com.github.curious-odd-man/rgxgen/2.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/com.github.java-json-tools/btf/1.3, Apache-2.0 OR LGPL-3.0-or-later, approved, #2721 -maven/mavencentral/com.github.java-json-tools/jackson-coreutils/2.0, Apache-2.0 OR LGPL-3.0-or-later, approved, #2719 +maven/mavencentral/com.github.java-json-tools/btf/1.3, Apache-2.0 OR LGPL-3.0-only, approved, #15201 +maven/mavencentral/com.github.java-json-tools/jackson-coreutils/2.0, Apache-2.0 OR LGPL-3.0-or-later, approved, #15186 maven/mavencentral/com.github.java-json-tools/json-patch/1.13, Apache-2.0 OR LGPL-3.0-or-later, approved, CQ23929 -maven/mavencentral/com.github.java-json-tools/msg-simple/1.2, Apache-2.0 OR LGPL-3.0-or-later, approved, #2720 +maven/mavencentral/com.github.java-json-tools/msg-simple/1.2, Apache-2.0 OR LGPL-3.0-or-later, approved, #15239 maven/mavencentral/com.github.jsonld-java/jsonld-java/0.13.4, BSD-3-Clause, approved, CQ22136 maven/mavencentral/com.github.virtuald/curvesapi/1.08, BSD-3-Clause, approved, clearlydefined -maven/mavencentral/com.google.code.findbugs/jsr305/3.0.2, Apache-2.0, approved, #20 +maven/mavencentral/com.google.code.findbugs/jsr305/3.0.2, CC-BY-2.5, approved, #15220 maven/mavencentral/com.google.code.gson/gson/2.10.1, Apache-2.0, approved, #6159 maven/mavencentral/com.google.errorprone/error_prone_annotations/2.26.1, Apache-2.0, approved, #13657 maven/mavencentral/com.google.guava/failureaccess/1.0.2, Apache-2.0, approved, CQ22654 @@ -31,32 +31,32 @@ maven/mavencentral/com.google.protobuf/protobuf-java/4.26.1, BSD-3-Clause, appro maven/mavencentral/com.jayway.jsonpath/json-path/2.9.0, Apache-2.0, approved, clearlydefined maven/mavencentral/com.networknt/json-schema-validator/1.3.3, Apache-2.0 AND Unicode-TOU, approved, #13037 maven/mavencentral/com.squareup.okhttp3/mockwebserver/4.12.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/com.squareup.okhttp3/okhttp/4.12.0, Apache-2.0, approved, #11156 +maven/mavencentral/com.squareup.okhttp3/okhttp/4.12.0, Apache-2.0, approved, #15227 maven/mavencentral/com.squareup.okio/okio-jvm/3.6.0, Apache-2.0, approved, #11158 maven/mavencentral/com.squareup.okio/okio/3.6.0, Apache-2.0, approved, #11155 maven/mavencentral/com.sun.activation/jakarta.activation/1.2.2, EPL-2.0 OR BSD-3-Clause OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jaf -maven/mavencentral/com.sun.istack/istack-commons-runtime/4.1.2, BSD-3-Clause, approved, #2590 +maven/mavencentral/com.sun.istack/istack-commons-runtime/4.1.2, BSD-3-Clause, approved, #15290 maven/mavencentral/com.vaadin.external.google/android-json/0.0.20131108.vaadin1, Apache-2.0, approved, CQ21310 maven/mavencentral/com.zaxxer/SparseBitSet/1.3, Apache-2.0, approved, #10726 maven/mavencentral/commons-cli/commons-cli/1.6.0, Apache-2.0, approved, #11339 maven/mavencentral/commons-codec/commons-codec/1.16.1, Apache-2.0 AND (Apache-2.0 AND BSD-3-Clause), approved, #9157 maven/mavencentral/commons-fileupload/commons-fileupload/1.5, Apache-2.0, approved, #7109 maven/mavencentral/commons-io/commons-io/2.16.0, Apache-2.0, approved, #14190 -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/assetconnection-common/1.0.1, , restricted, clearlydefined -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/assetconnection-http/1.0.1, , restricted, clearlydefined -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/assetconnection-mqtt/1.0.1, , restricted, clearlydefined -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/assetconnection-opcua/1.0.1, , restricted, clearlydefined -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/core/1.0.1, , restricted, clearlydefined -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/dataformat-json/1.0.1, , restricted, clearlydefined -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/endpoint-http/1.0.1, , restricted, clearlydefined -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/endpoint-opcua/1.0.1, , restricted, clearlydefined -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/filestorage-filesystem/1.0.1, , restricted, clearlydefined -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/filestorage-memory/1.0.1, , restricted, clearlydefined -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/messagebus-internal/1.0.1, , restricted, clearlydefined -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/model/1.0.1, , restricted, clearlydefined -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/persistence-file/1.0.1, , restricted, clearlydefined -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/persistence-memory/1.0.1, , restricted, clearlydefined -maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/starter/1.0.1, , restricted, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/assetconnection-common/1.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/assetconnection-http/1.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/assetconnection-mqtt/1.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/assetconnection-opcua/1.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/core/1.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/dataformat-json/1.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/endpoint-http/1.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/endpoint-opcua/1.0.1, Apache-2.0, restricted, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/filestorage-filesystem/1.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/filestorage-memory/1.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/messagebus-internal/1.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/model/1.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/persistence-file/1.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/persistence-memory/1.0.1, Apache-2.0, approved, clearlydefined +maven/mavencentral/de.fraunhofer.iosb.ilt.faaast.service/starter/1.0.1, (Apache-2.0 AND BSD-3-Clause) OR (Apache-2.0 AND EPL-1.0 AND EPL-2.0 AND LGPL-3.0-only AND MIT), restricted, clearlydefined maven/mavencentral/info.picocli/picocli/4.7.5, Apache-2.0, approved, #4365 maven/mavencentral/io.github.classgraph/classgraph/4.8.168, MIT, approved, CQ22530 maven/mavencentral/io.netty/netty-buffer/4.1.108.Final, Apache-2.0, approved, CQ21842 @@ -86,7 +86,7 @@ maven/mavencentral/org.apache.commons/commons-text/1.10.0, Apache-2.0, approved, maven/mavencentral/org.apache.httpcomponents/fluent-hc/4.5.13, Apache-2.0, approved, clearlydefined maven/mavencentral/org.apache.httpcomponents/httpclient-cache/4.5.13, Apache-2.0, approved, CQ11714 maven/mavencentral/org.apache.httpcomponents/httpclient-osgi/4.5.13, Apache-2.0, approved, #2142 -maven/mavencentral/org.apache.httpcomponents/httpclient/4.5.13, Apache-2.0 AND LicenseRef-Public-Domain, approved, CQ23527 +maven/mavencentral/org.apache.httpcomponents/httpclient/4.5.13, Apache-2.0, approved, #15248 maven/mavencentral/org.apache.httpcomponents/httpcore-nio/4.4.14, Apache-2.0, approved, CQ13509 maven/mavencentral/org.apache.httpcomponents/httpcore-osgi/4.4.14, Apache-2.0, approved, clearlydefined maven/mavencentral/org.apache.httpcomponents/httpcore/4.4.14, Apache-2.0, approved, CQ23528 @@ -95,7 +95,7 @@ maven/mavencentral/org.apache.jena/jena-arq/5.0.0, Apache-2.0, restricted, clear maven/mavencentral/org.apache.jena/jena-base/5.0.0, Apache-2.0, restricted, clearlydefined maven/mavencentral/org.apache.jena/jena-core/5.0.0, Apache-2.0, restricted, clearlydefined maven/mavencentral/org.apache.jena/jena-iri/5.0.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/org.apache.jena/jena-shacl/5.0.0, , restricted, clearlydefined +maven/mavencentral/org.apache.jena/jena-shacl/5.0.0, Apache-2.0, restricted, clearlydefined maven/mavencentral/org.apache.logging.log4j/log4j-api/2.21.1, Apache-2.0 AND (Apache-2.0 AND LGPL-2.0-or-later), approved, #11079 maven/mavencentral/org.apache.poi/poi-ooxml-lite/5.2.5, Apache-2.0 AND BSD-3-Clause AND MIT AND Apache-2.0 AND W3C-19980720, approved, #5247 maven/mavencentral/org.apache.poi/poi-ooxml/5.2.5, Apache-2.0 AND BSD-3-Clause AND MIT AND Apache-2.0, approved, #5243 @@ -164,7 +164,7 @@ maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib/1.8.21, Apache-2.0, approv maven/mavencentral/org.jetbrains/annotations/13.0, Apache-2.0, approved, clearlydefined maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.10.2, EPL-2.0, approved, #9714 maven/mavencentral/org.junit.jupiter/junit-jupiter-engine/5.10.2, EPL-2.0, approved, #9711 -maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.9.2, EPL-2.0, approved, #3134 +maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.10.2, EPL-2.0, approved, #15250 maven/mavencentral/org.junit.platform/junit-platform-commons/1.10.2, EPL-2.0, approved, #9715 maven/mavencentral/org.junit.platform/junit-platform-engine/1.10.2, EPL-2.0, approved, #9709 maven/mavencentral/org.opentest4j/opentest4j/1.3.0, Apache-2.0, approved, #9713 diff --git a/README.md b/README.md index 7a9572f..a097218 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ kubectl wait --namespace ingress-nginx \ --selector=app.kubernetes.io/component=controller \ --timeout=90s # transfer images -kind load docker-image docker.io/tractusx/aas-bridge:0.13.6-SNAPSHOT --name ka +kind load docker-image docker.io/tractusx/aas-bridge:1.13.7-SNAPSHOT --name ka # run container test ct install --charts charts/aas-bridge ``` diff --git a/charts/aas-bridge/Chart.yaml b/charts/aas-bridge/Chart.yaml index 2e1f370..9f03efd 100644 --- a/charts/aas-bridge/Chart.yaml +++ b/charts/aas-bridge/Chart.yaml @@ -30,7 +30,7 @@ home: https://github.com/eclipse-tractusx/knowledge-agents-aas-bridge/ sources: - https://github.com/eclipse-tractusx/knowledge-agents-aas-bridge/tree/main/sparql-aas type: application -appVersion: "0.13.6-SNAPSHOT" -version: 0.13.6-SNAPSHOT +appVersion: "1.13.7-SNAPSHOT" +version: 1.13.7-SNAPSHOT maintainers: - name: 'Tractus-X Knowledge Agents Team' diff --git a/charts/aas-bridge/README.md b/charts/aas-bridge/README.md index 53fd1b9..4680ee5 100644 --- a/charts/aas-bridge/README.md +++ b/charts/aas-bridge/README.md @@ -21,7 +21,7 @@ # aas-bridge -![Version: 0.13.6-SNAPSHOT](https://img.shields.io/badge/Version-0.13.6--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.13.6-SNAPSHOT](https://img.shields.io/badge/AppVersion-0.13.6--SNAPSHOT-informational?style=flat-square) +![Version: 1.13.7-SNAPSHOT](https://img.shields.io/badge/Version-0.13.6--SNAPSHOT-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.13.7-SNAPSHOT](https://img.shields.io/badge/AppVersion-0.13.6--SNAPSHOT-informational?style=flat-square) A Helm chart for the Tractus-X Knowledge Agents AAS Bridge which is a container to provide an AAS server/registry on top of a knowledge graph/SPARQL landscape. @@ -32,7 +32,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/aas-bridge --version 0.13.6-SNAPSHOT +$ helm install my-release eclipse-tractusx/aas-bridge --version 1.13.7-SNAPSHOT ``` ## Maintainers diff --git a/charts/aas-bridge/templates/configmap.yaml b/charts/aas-bridge/templates/configmap.yaml index 66d95bb..6e7f2c0 100644 --- a/charts/aas-bridge/templates/configmap.yaml +++ b/charts/aas-bridge/templates/configmap.yaml @@ -25,5 +25,12 @@ metadata: data: opentelemetry.properties: |- {{- .Values.opentelemetry | nindent 4 }} - +{{ $scope := . }} +{{- range $domainName, $domain := .Values.domains }} +{{- range $categoryName, $category := $domain }} +{{- range $fileName, $file := $category }} + {{ $domainName }}-{{ $categoryName }}-{{ $fileName }}: {{ $file | toYaml | indent 4 }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/aas-bridge/templates/deployment.yaml b/charts/aas-bridge/templates/deployment.yaml index a782af0..1e0314c 100644 --- a/charts/aas-bridge/templates/deployment.yaml +++ b/charts/aas-bridge/templates/deployment.yaml @@ -60,30 +60,42 @@ spec: protocol: TCP {{- if .Values.livenessProbe.enabled }} livenessProbe: - httpGet: - scheme: HTTPS - path: /api/v3.0/description - port: default + exec: + command: + - wget + - --no-check-certificate + - --no-verbose + - --tries=1 + - --spider + - https://127.0.0.1:{{ .Values.aas.endpoints.default.port }}/api/v3.0/description failureThreshold: {{ .Values.livenessProbe.failureThreshold }} periodSeconds: {{ .Values.livenessProbe.periodSeconds }} timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} {{- end }} {{- if .Values.readinessProbe.enabled }} readinessProbe: - httpGet: - scheme: HTTPS - path: /api/v3.0/description - port: default + exec: + command: + - wget + - --no-check-certificate + - --no-verbose + - --tries=1 + - --spider + - https://127.0.0.1:{{ .Values.aas.endpoints.default.port }}/api/v3.0/description failureThreshold: {{ .Values.readinessProbe.failureThreshold }} periodSeconds: {{ .Values.readinessProbe.periodSeconds }} timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} {{- end }} {{- if .Values.startupProbe.enabled }} startupProbe: - httpGet: - scheme: HTTPS - path: /api/v3.0/description - port: default + exec: + command: + - wget + - --no-check-certificate + - --no-verbose + - --tries=1 + - --spider + - https://127.0.0.1:{{ .Values.aas.endpoints.default.port }}/api/v3.0/description failureThreshold: {{ .Values.startupProbe.failureThreshold }} periodSeconds: {{ .Values.startupProbe.periodSeconds }} timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }} @@ -115,6 +127,10 @@ spec: - name: "configuration" mountPath: "/app/opentelemetry.properties" subPath: "opentelemetry.properties" +{{- range $domainName, $domain := .Values.domains }} + - name: {{ $domainName }}-configuration + mountPath: /app/resources/{{ $domainName }} +{{- end }} - name: tmp mountPath: /tmp readOnly: false @@ -125,6 +141,19 @@ spec: items: - key: "opentelemetry.properties" path: "opentelemetry.properties" +{{ $scope := . }} +{{- range $domainName, $domain := .Values.domains }} + - name: {{ $domainName }}-configuration + configMap: + name: {{ include "agent.fullname" $scope }}-configmap + items: +{{- range $categoryName, $category := $domain }} +{{- range $fileName, $file := $category }} + - key: {{ $domainName }}-{{ $categoryName }}-{{ $fileName }} + path: {{ $categoryName }}-{{ $fileName }} +{{- end }} +{{- end }} +{{- end }} - name: "tmp" emptyDir: { } {{- with .Values.nodeSelector }} diff --git a/charts/aas-bridge/values.yaml b/charts/aas-bridge/values.yaml index c3a1e38..d724545 100644 --- a/charts/aas-bridge/values.yaml +++ b/charts/aas-bridge/values.yaml @@ -135,7 +135,7 @@ startupProbe: # -- Minimum consecutive failures for the probe to be considered failed after having succeeded failureThreshold: 4 # -- Number of seconds after the container has started before liveness probes are initiated. - initialDelaySeconds: 60 + initialDelaySeconds: 90 # -- Number of seconds each period lasts. periodSeconds: 30 # -- number of seconds until a timeout is assumed @@ -243,3 +243,430 @@ envSecretName: opentelemetry: |- otel.javaagent.enabled=false otel.javaagent.debug=false + +# -- Define the mapping/domains. Each domain consists of a set of mapping files () +domains: + traceability: + aas: + mapping.xslt: |- + + + + + + + / + + + + + + + + + + Instance + + + + + en + + + + + + + ExternalReference + + + Submodel + // + + + + + + + + + + + + select-all.rq: |- + PREFIX cx-common: + PREFIX cx-core: + PREFIX cx-vehicle: + PREFIX cx-bom: + PREFIX rdf: + PREFIX rdfs: + + # + # A request for obtaining all asset administration shells for serialized parts + # + + SELECT DISTINCT ?id ?name ?pasp ?psasp ?hasRecycling ?slbomap ?slusap ?mfr WHERE { + + # all parts are twins + ?id rdf:type cx-vehicle:Part; + cx-core:name ?name. + + # Part + OPTIONAL{ + ?id cx-core:id ?manufacturerPartId. + BIND( as ?pasp). + } + } + ORDER BY DESC(?id) + select-some.rq: |- + PREFIX cx-common: + PREFIX cx-core: + PREFIX cx-vehicle: + PREFIX cx-bom: + PREFIX rdf: + PREFIX rdfs: + + # + # A request for obtaining specific asset administration shells for serialized parts + # + + SELECT DISTINCT ?id ?name ?pasp ?psasp ?hasRecycling ?slbomap ?slusap ?mfr WHERE { + + VALUES(?id) { + (%s) + } + + # all parts are twins + ?id rdf:type cx-vehicle:Part; + cx-core:name ?name. + + # Part + OPTIONAL{ + ?id cx-core:id ?manufacturerPartId. + BIND( as ?pasp). + } + } + ORDER BY DESC(?id) + partAsPlanned: + mapping.xslt: |- + + + + + + + / + + + // + + + + + + + + + + + Instance + + + + + + ExternalReference + + + Submodel + + + + + + + + + + + + + Instance + + ModelReference + + + ConceptDescription + + + + + + PartAsPlanned + + + en + A Part AsPlanned represents an item in the Catena-X Bill of Material (BOM) in As-Planned lifecycle status. + + + + + Key + catenaXId + + + en + The fully anonymous Catena-X ID of the serialized part, valid for the Catena-X dataspace. + + + + + en + Catena-X Identifier + + + + ModelReference + + + ConceptDescription + urn:bamm:io.catenax.part_as_planned:1.0.1#catenaXId + + + + xs:string + + + + partTypeInformation + + + en + Encapsulation for data related to the part type + + + + + en + Part Type Information Entity + + + + + Key + manufacturerPartId + + + en + Part ID as assigned by the manufacturer of the part. The Part ID identifies the part (as designed) in the manufacturer`s dataspace. The Part ID does not reference a specific instance of a part and thus should not be confused with the serial number. + + + + + en + Manufacturer Part ID + + + + ModelReference + + + ConceptDescription + urn:bamm:io.catenax.part_as_planned:1.0.1#manufacturerPartId + + + + xs:string + + + + Value + nameAtManufacturer + + + en + Name of the part as assigned by the manufacturer. + + + + + en + Name at Manufacturer + + + + ModelReference + + + ConceptDescription + urn:bamm:io.catenax.part_as_planned:1.0.1#nameAtManufacturer + + + + xs:string + + + + Enum + classification + + + en + Classification of the part as assigned by the manufacturer. + + + + + en + Product Classification + + + + ModelReference + + + ConceptDescription + urn:bamm:io.catenax.part_as_planned:1.0.1#classification + + + + xs:string + + + + + + validityPeriod + + + en + Temporal validity period of the part. + + + + + en + validityPeriod + + + + + Time + validFrom + + + en + Start date of validity period. + + + + + en + Valid From + + + + ModelReference + + + ConceptDescription + urn:bamm:io.catenax.part_as_planned:1.0.1#validFrom + + + + xs:dateTime + + + + Time + validFrom + + + en + End date of validity period. + + + + + en + Valid To + + + + ModelReference + + + ConceptDescription + urn:bamm:io.catenax.part_as_planned:1.0.1#validTo + + + + xs:dateTime + + + + + + + + + + + + + + select-all.rq: |- + PREFIX cx-common: + PREFIX cx-core: + PREFIX cx-vehicle: + PREFIX rdf: + PREFIX rdfs: + + # Select all part information + + SELECT ?catenaXId ?validFrom ?validTo ?classification ?manufacturerPartId ?nameAtManufacturer + WHERE { + ?catenaXId rdf:type cx-vehicle:Part; + cx-core:id ?manufacturerPartId; + cx-core:name ?nameAtManufacturer; + cx-vehicle:productionPeriodStart ?validFrom; + cx-vehicle:productionPeriodEnd ?validTo. + BIND('product' AS ?classification). + } + ORDER BY DESC(?catenaXId) + select-some.rq: |- + PREFIX cx-common: + PREFIX cx-core: + PREFIX cx-vehicle: + PREFIX rdf: + PREFIX rdfs: + + # Select some part information + + SELECT ?catenaXId ?validFrom ?validTo ?classification ?manufacturerPartId ?nameAtManufacturer + WHERE { + + VALUES(?catenaXId) { + (%s) + } + + ?catenaXId rdf:type cx-vehicle:Part; + cx-core:id ?manufacturerPartId; + cx-core:name ?nameAtManufacturer; + cx-vehicle:productionPeriodStart ?validFrom; + cx-vehicle:productionPeriodEnd ?validTo. + + BIND('product' AS ?classification). + } + ORDER BY DESC(?catenaXId) \ No newline at end of file diff --git a/pom.xml b/pom.xml index 81ba4e0..0988484 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 4.0.0 org.eclipse.tractusx.agents aas - 0.13.6-SNAPSHOT + 1.13.7-SNAPSHOT pom Tractus-X Knowledge Agents AAS Bridges Provides Implementations for Bridging Knowledge Agents and AAS @@ -108,7 +108,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.5.0 + 3.5.1 org.codehaus.mojo @@ -179,7 +179,7 @@ org.apache.maven.plugins maven-jar-plugin - 2.4 + 3.3.0 com.diffplug.spotless @@ -199,7 +199,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.3.0 + 3.3.1 ${project.basedir}/../resources/tx-checkstyle-config.xml diff --git a/sparql-aas/README.md b/sparql-aas/README.md index ccf8a20..0a9ef6c 100644 --- a/sparql-aas/README.md +++ b/sparql-aas/README.md @@ -27,7 +27,8 @@ upon the FAAAST Framework and the AAS4J-Transformation-Library. ### Configuration By default, the AAS-Bridge scans for "domain" folders (see e.g. the [traceability domain](resources/traceability)) in the "resources" directory -in which the AAS-Bridge [Java Application](src/main/java/org/eclipse/tractusx/agents/aasbridge/AasBridge.java) has been started. +in which the AAS-Bridge [Java Application](src/main/java/org/eclipse/tractusx/agents/aasbridge/AasBridge.java) has been started (which is "/app" in case of +the provided docker image see below) #### Domain Folders in the Resource Directory @@ -86,7 +87,7 @@ mvn -s ../../../settings.xml install -Pwith-docker-image Alternatively, after a sucessful [build](#building) the docker image of the Sparql-To-AAS bridge is created using ```console -docker build -t tractusx/aas-bridge:0.13.6-SNAPSHOT -f src/main/docker/Dockerfile . +docker build -t tractusx/aas-bridge:1.13.7-SNAPSHOT -f src/main/docker/Dockerfile . ``` To run the docker image against a local knowledge graph, you could invoke this command @@ -96,7 +97,7 @@ docker run -p 8443:8443 \ -v $(pwd)/resources:/app/resources \ -e "PROVIDER_SPARQL_ENDPOINT=http://oem-provider-agent:8082/sparql" \ -e "PROVIDER_CREDENTIAL_BASIC=Basic Zm9vOg==" \ - tractusx/aas-bridge:0.13.6-SNAPSHOT + tractusx/aas-bridge:1.13.7-SNAPSHOT ```` Afterwards, you should be able to access the [local AAS endpoint](https://localhost:8443/) via REST diff --git a/sparql-aas/pom.xml b/sparql-aas/pom.xml index e78c6fa..25142f9 100644 --- a/sparql-aas/pom.xml +++ b/sparql-aas/pom.xml @@ -25,7 +25,7 @@ org.eclipse.tractusx.agents aas - 0.13.6-SNAPSHOT + 1.13.7-SNAPSHOT ../pom.xml @@ -157,7 +157,7 @@ org.junit.jupiter junit-jupiter-params - 5.9.2 + ${junit.version} test diff --git a/sparql-aas/src/main/docker/Dockerfile b/sparql-aas/src/main/docker/Dockerfile index c763eb4..cab7fff 100644 --- a/sparql-aas/src/main/docker/Dockerfile +++ b/sparql-aas/src/main/docker/Dockerfile @@ -18,7 +18,7 @@ # SPDX-License-Identifier: Apache-2.0 -FROM alpine:3.19.0 AS otel +FROM alpine:3.19.1 AS otel ENV OTEL_AGENT_LOCATION "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.27.0/opentelemetry-javaagent.jar" diff --git a/sparql-aas/src/main/java/org/eclipse/tractusx/agents/aasbridge/AasUtils.java b/sparql-aas/src/main/java/org/eclipse/tractusx/agents/aasbridge/AasUtils.java index 904d674..b7748f3 100644 --- a/sparql-aas/src/main/java/org/eclipse/tractusx/agents/aasbridge/AasUtils.java +++ b/sparql-aas/src/main/java/org/eclipse/tractusx/agents/aasbridge/AasUtils.java @@ -70,9 +70,12 @@ public static Map> loadConfigsFromResources() builder.addUrls(searchPath.toURL()); Configuration config = builder.setScanners(Scanners.Resources); Reflections reflections = new Reflections(config); - Set files = reflections.getResources(Pattern.compile(".*-mapping\\.xslt")); - logger.info("Scanning for *-mapping.xslt in resources folder found {}", files); + Pattern filePattern = Pattern.compile("[a-zA-Z/0-9]*-mapping\\.xslt"); + + Set files = reflections.getResources(filePattern).stream().filter(file -> filePattern.matcher(file).matches()).collect(Collectors.toSet()); + + logger.info("Scanning for {} in resources folder found {}", filePattern, files); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); final DocumentBuilder documentBuilder = dbf.newDocumentBuilder(); diff --git a/upgrade_version.sh b/upgrade_version.sh index 198613d..2adc3df 100755 --- a/upgrade_version.sh +++ b/upgrade_version.sh @@ -16,7 +16,7 @@ # # SPDX-License-Identifier: Apache-2.0 -OLD_VERSION=0.13.6-SNAPSHOT +OLD_VERSION=1.13.7-SNAPSHOT echo Upgrading from $OLD_VERSION to $1 PATTERN=s/$OLD_VERSION/$1/g LC_ALL=C From de2e0d138d6c9783c4ce9897d9324452b4e174ca Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Mon, 8 Jul 2024 17:22:08 +0200 Subject: [PATCH 2/7] fix: chart linting probs. --- charts/aas-bridge/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/aas-bridge/values.yaml b/charts/aas-bridge/values.yaml index d724545..506623a 100644 --- a/charts/aas-bridge/values.yaml +++ b/charts/aas-bridge/values.yaml @@ -245,7 +245,7 @@ opentelemetry: |- otel.javaagent.debug=false # -- Define the mapping/domains. Each domain consists of a set of mapping files () -domains: +domains: traceability: aas: mapping.xslt: |- @@ -669,4 +669,4 @@ domains: BIND('product' AS ?classification). } - ORDER BY DESC(?catenaXId) \ No newline at end of file + ORDER BY DESC(?catenaXId) From 091a07e34903577c3634d77f5702bac4530aac5b Mon Sep 17 00:00:00 2001 From: "Dr. Christoph \"Schorsch\" Jung" Date: Tue, 9 Jul 2024 13:18:47 +0200 Subject: [PATCH 3/7] chore: copyright period update. --- .gitignore | 2 +- SECURITY.md | 2 +- charts/.gitignore | 2 +- charts/aas-bridge/.helmignore | 2 +- charts/aas-bridge/README.md | 6 +++--- charts/aas-bridge/README.md.gotmpl | 6 +++--- charts/aas-bridge/templates/NOTES.txt | 2 +- charts/aas-bridge/templates/_helpers.tpl | 2 +- charts/aas-bridge/templates/configmap-env.yaml | 2 +- charts/aas-bridge/templates/configmap.yaml | 2 +- charts/aas-bridge/templates/deployment.yaml | 2 +- charts/aas-bridge/templates/hpa.yaml | 2 +- charts/aas-bridge/templates/ingress.yaml | 2 +- charts/aas-bridge/templates/service.yaml | 2 +- charts/aas-bridge/templates/serviceaccount.yaml | 2 +- resources/tx-codestyle.xml | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 40e37e8..e4a63e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# Copyright (c) 2022,2023 Contributors to the Eclipse Foundation +# Copyright (c) 2022,2024 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. diff --git a/SECURITY.md b/SECURITY.md index b2aeef6..5ea5b5b 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,5 +1,5 @@