From 57bf654deb00c7ce208debc4cd0bdabcbd8fdb0d Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Wed, 28 Feb 2024 15:38:52 +0100 Subject: [PATCH 01/32] chore: add submodelservers chart --- charts/submodelservers/.helmignore | 47 ++++++ charts/submodelservers/Chart.yaml | 44 ++++++ charts/submodelservers/templates/NOTES.txt | 22 +++ charts/submodelservers/templates/_helpers.tpl | 83 +++++++++++ .../submodelservers/templates/deployment.yaml | 76 ++++++++++ charts/submodelservers/templates/hpa.yaml | 48 ++++++ charts/submodelservers/templates/ingress.yaml | 81 ++++++++++ charts/submodelservers/templates/service.yaml | 35 +++++ .../templates/serviceaccount.yaml | 32 ++++ .../templates/tests/test-connection.yaml | 35 +++++ charts/submodelservers/values.yaml | 138 ++++++++++++++++++ 11 files changed, 641 insertions(+) create mode 100644 charts/submodelservers/.helmignore create mode 100644 charts/submodelservers/Chart.yaml create mode 100644 charts/submodelservers/templates/NOTES.txt create mode 100644 charts/submodelservers/templates/_helpers.tpl create mode 100644 charts/submodelservers/templates/deployment.yaml create mode 100644 charts/submodelservers/templates/hpa.yaml create mode 100644 charts/submodelservers/templates/ingress.yaml create mode 100644 charts/submodelservers/templates/service.yaml create mode 100644 charts/submodelservers/templates/serviceaccount.yaml create mode 100644 charts/submodelservers/templates/tests/test-connection.yaml create mode 100644 charts/submodelservers/values.yaml diff --git a/charts/submodelservers/.helmignore b/charts/submodelservers/.helmignore new file mode 100644 index 00000000..c89dfd08 --- /dev/null +++ b/charts/submodelservers/.helmignore @@ -0,0 +1,47 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# + +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ + +# Ignore ENV specific values at release +values?*.yaml +values?*.yml diff --git a/charts/submodelservers/Chart.yaml b/charts/submodelservers/Chart.yaml new file mode 100644 index 00000000..3ad9e71b --- /dev/null +++ b/charts/submodelservers/Chart.yaml @@ -0,0 +1,44 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# +--- +apiVersion: v2 +name: submodelservers +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "0.0.1" diff --git a/charts/submodelservers/templates/NOTES.txt b/charts/submodelservers/templates/NOTES.txt new file mode 100644 index 00000000..eeb89089 --- /dev/null +++ b/charts/submodelservers/templates/NOTES.txt @@ -0,0 +1,22 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "submodelservers.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "submodelservers.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "submodelservers.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "submodelservers.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/charts/submodelservers/templates/_helpers.tpl b/charts/submodelservers/templates/_helpers.tpl new file mode 100644 index 00000000..163300c8 --- /dev/null +++ b/charts/submodelservers/templates/_helpers.tpl @@ -0,0 +1,83 @@ +{{/* +******************************************************************************* + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,2024 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 + ******************************************************************************* + */}} + {{/* +Expand the name of the chart. +*/}} +{{- define "submodelservers.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "submodelservers.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "submodelservers.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "submodelservers.labels" -}} +helm.sh/chart: {{ include "submodelservers.chart" . }} +{{ include "submodelservers.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "submodelservers.selectorLabels" -}} +app.kubernetes.io/name: {{ include "submodelservers.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "submodelservers.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "submodelservers.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/submodelservers/templates/deployment.yaml b/charts/submodelservers/templates/deployment.yaml new file mode 100644 index 00000000..6f36bcac --- /dev/null +++ b/charts/submodelservers/templates/deployment.yaml @@ -0,0 +1,76 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "submodelservers.fullname" . }} + labels: + {{- include "submodelservers.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "submodelservers.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "submodelservers.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "submodelservers.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: default + containerPort: {{ .Values.backend.endpoint.default.port }} + protocol: TCP + - name: metrics + containerPort: 8090 + protocol: TCP + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/submodelservers/templates/hpa.yaml b/charts/submodelservers/templates/hpa.yaml new file mode 100644 index 00000000..3120ac3a --- /dev/null +++ b/charts/submodelservers/templates/hpa.yaml @@ -0,0 +1,48 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# +--- +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "submodelservers.fullname" . }} + labels: + {{- include "submodelservers.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "submodelservers.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/charts/submodelservers/templates/ingress.yaml b/charts/submodelservers/templates/ingress.yaml new file mode 100644 index 00000000..888f0f7d --- /dev/null +++ b/charts/submodelservers/templates/ingress.yaml @@ -0,0 +1,81 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# +--- +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "submodelservers.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "submodelservers.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/submodelservers/templates/service.yaml b/charts/submodelservers/templates/service.yaml new file mode 100644 index 00000000..e4d81355 --- /dev/null +++ b/charts/submodelservers/templates/service.yaml @@ -0,0 +1,35 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ include "submodelservers.fullname" . }} + labels: + {{- include "submodelservers.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: default + protocol: TCP + name: http + selector: + {{- include "submodelservers.selectorLabels" . | nindent 4 }} diff --git a/charts/submodelservers/templates/serviceaccount.yaml b/charts/submodelservers/templates/serviceaccount.yaml new file mode 100644 index 00000000..495dbbd6 --- /dev/null +++ b/charts/submodelservers/templates/serviceaccount.yaml @@ -0,0 +1,32 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# +--- +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "submodelservers.serviceAccountName" . }} + labels: + {{- include "submodelservers.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/submodelservers/templates/tests/test-connection.yaml b/charts/submodelservers/templates/tests/test-connection.yaml new file mode 100644 index 00000000..d064112d --- /dev/null +++ b/charts/submodelservers/templates/tests/test-connection.yaml @@ -0,0 +1,35 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# +--- +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "submodelservers.fullname" . }}-test-connection" + labels: + {{- include "submodelservers.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "submodelservers.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/charts/submodelservers/values.yaml b/charts/submodelservers/values.yaml new file mode 100644 index 00000000..865db381 --- /dev/null +++ b/charts/submodelservers/values.yaml @@ -0,0 +1,138 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# + +# Default values for submodelservers. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +nameOverride: +fullnameOverride: + +image: + repository: ghcr.io/catenax-ng/catenax-at-home/provider-backend-service + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: [ ] + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: { } + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: { } + +podSecurityContext: { } +# fsGroup: 2000 + +# Following Catena-X Helm Best Practices @url: https://catenax-ng.github.io/docs/kubernetes-basics/helm +# @url: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod +securityContext: + allowPrivilegeEscalation: false + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 3000 + +service: + type: ClusterIP + port: 8080 + +ingress: + enabled: true + className: "nginx" + annotations: + nginx.ingress.kubernetes.io/ssl-passthrough: "false" + nginx.ingress.kubernetes.io/backend-protocol: "HTTP" + nginx.ingress.kubernetes.io/force-ssl-redirect: "false" + hosts: + - host: "irs-submodel-server.dev.demo.catena-x.net" + paths: + - path: / + pathType: ImplementationSpecific + tls: + - hosts: + - "irs-submodel-server.dev.demo.catena-x.net" + # Default secret for certificate creation already provided to your namespace + secretName: tls-secret + +# Following Catena-X Helm Best Practices @url: https://catenax-ng.github.io/docs/kubernetes-basics/helm +# @url: https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-resource-requests-and-limits +resources: + limits: + cpu: 250m + memory: 512Mi + requests: + cpu: 50m + memory: 512Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: { } + +tolerations: [ ] + +# Following Catena-X Helm Best Practices @url: https://catenax-ng.github.io/docs/kubernetes-basics/helm +# @url: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity +affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app.kubernetes.io/name + operator: DoesNotExist + topologyKey: kubernetes.io/hostname + +# Following Catena-X Helm Best Practices @url: https://catenax-ng.github.io/docs/kubernetes-basics/helm +# @url: https://github.com/helm/charts/blob/master/stable/nginx-ingress/values.yaml#L210 +livenessProbe: + failureThreshold: 6 + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 +readinessProbe: + failureThreshold: 3 + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + +backend: + endpoint: + default: + port: 8080 + path: / + ingress: true + + From 9530866032022cfc2da62ab41c8ff9f23bd2a98d Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Wed, 28 Feb 2024 15:52:07 +0100 Subject: [PATCH 02/32] chore: add dataprovider chart with testdata seeding --- charts/tx-data-provider/.helmignore | 47 + charts/tx-data-provider/Chart.yaml | 45 + charts/tx-data-provider/README.md | 46 + .../Testdata_AsBuilt-combustion.json | 3893 +++++++++++++++++ .../resources/requirements.txt | 1 + .../resources/transform-and-upload.py | 719 +++ .../tx-data-provider/resources/upload-data.sh | 38 + .../tx-data-provider/templates/_helpers.tpl | 85 + .../templates/post-install-configmap.yaml | 34 + .../post-install-job-upload-testdata.yaml | 70 + charts/tx-data-provider/values.yaml | 176 + 11 files changed, 5154 insertions(+) create mode 100644 charts/tx-data-provider/.helmignore create mode 100644 charts/tx-data-provider/Chart.yaml create mode 100644 charts/tx-data-provider/README.md create mode 100644 charts/tx-data-provider/resources/Testdata_AsBuilt-combustion.json create mode 100644 charts/tx-data-provider/resources/requirements.txt create mode 100644 charts/tx-data-provider/resources/transform-and-upload.py create mode 100644 charts/tx-data-provider/resources/upload-data.sh create mode 100644 charts/tx-data-provider/templates/_helpers.tpl create mode 100644 charts/tx-data-provider/templates/post-install-configmap.yaml create mode 100644 charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml create mode 100644 charts/tx-data-provider/values.yaml diff --git a/charts/tx-data-provider/.helmignore b/charts/tx-data-provider/.helmignore new file mode 100644 index 00000000..c89dfd08 --- /dev/null +++ b/charts/tx-data-provider/.helmignore @@ -0,0 +1,47 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# + +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ + +# Ignore ENV specific values at release +values?*.yaml +values?*.yml diff --git a/charts/tx-data-provider/Chart.yaml b/charts/tx-data-provider/Chart.yaml new file mode 100644 index 00000000..dd5f25a5 --- /dev/null +++ b/charts/tx-data-provider/Chart.yaml @@ -0,0 +1,45 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# +--- +apiVersion: v2 +name: tx-data-provider +description: A Helm chart for Kubernetes + +type: application +version: 0.0.1 +appVersion: 0.0.1 + +dependencies: + - name: digital-twin-registry + version: 0.4.5 + repository: https://eclipse-tractusx.github.io/charts/dev + condition: digital-twin-registry.enabled + - name: submodelservers + repository: file://../submodelservers # TODO switch to released chart + version: 0.1.0 + condition: submodelservers.enabled + - name: tractusx-connector + repository: https://eclipse-tractusx.github.io/charts/dev + version: 0.5.3 + condition: tractusx-connector.enabled + - name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 12.12.10 + condition: postgresql.enabled diff --git a/charts/tx-data-provider/README.md b/charts/tx-data-provider/README.md new file mode 100644 index 00000000..8e2b1053 --- /dev/null +++ b/charts/tx-data-provider/README.md @@ -0,0 +1,46 @@ +# Dataprovider Helm Chart + +This chart includes EDC, Digital Twin Registry and a Submodel Server. +The Submodel Server images is based on an older Catena-X demo (catenax at home) since this is what we were using in our +testing environments. + +## Prerequisites + +- Running Kubernetes cluster +- Helm is installed + +Example for local usage: + +- [Minikube](https://minikube.sigs.k8s.io/docs/start/) +- [Minikube ingress addon](https://minikube.sigs.k8s.io/docs/handbook/addons/ingress-dns/) + +## Installing + +Run the Chart with + +```shell +helm dependency update +helm install dataprovider . --timeout 10m0s +``` + +Remove the chart by running + +```shell +helm uninstall dataprovider +``` +## Configuration + +For Configuration of digital twin registry see [sldt-digital-twin-registry/tree/main/charts/registry](https://github.com/eclipse-tractusx/sldt-digital-twin-registry/tree/main/charts/registry) + +Configuration of EDC see [tractusx-edc/tree/main/charts/tractusx-connecto](https://github.com/eclipse-tractusx/tractusx-edc/tree/main/charts/tractusx-connector) + +EDC requires connection to HashiCorp Vault and Manage Identity Wallet. These have to be configured for the dataprovider to be operative. + +The Chart can be used as dataprovider by setting `submodelservers.enabled`, `digital-twin-registry.enabled` and `seedTestdata` to `false`. + +## Testdata seeding + +After the installation, a Post-Install Helm Hook will be started which initiates the seeding of testdata. The Hook executes a python script which uploads a provided test dataset to the dataprovider. Documentation to the python script can be found here [README](https://github.com/eclipse-tractusx/item-relationship-service/blob/main/local/testing/testdata/README.md) + +Test data set and upload script are stored in [resources/](resources) and provided to the hook as config map. +A custom config map can be used to provided e.g. `testdataConfigMap: my-custom-testdata-configmap`. \ No newline at end of file diff --git a/charts/tx-data-provider/resources/Testdata_AsBuilt-combustion.json b/charts/tx-data-provider/resources/Testdata_AsBuilt-combustion.json new file mode 100644 index 00000000..82dbd833 --- /dev/null +++ b/charts/tx-data-provider/resources/Testdata_AsBuilt-combustion.json @@ -0,0 +1,3893 @@ +{ + "policies": { + "ID 3.0 Trace": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@type": "PolicyDefinitionRequestDto", + "@id": "id-3.0-trace", + "policy": { + "@type": "Policy", + "odrl:permission": [ + { + "odrl:action": "USE", + "odrl:constraint": { + "@type": "AtomicConstraint", + "odrl:or": [ + { + "@type": "Constraint", + "odrl:leftOperand": "PURPOSE", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "ID 3.0 Trace" + } + ] + } + } + ] + } + } + }, + "https://catenax.io/schema/TestDataContainer/1.0.0": [ + { + "catenaXId": "urn:uuid:77a75e30-9733-4f54-9cf6-43b41b8dc780", + "bpnl": "null", + "PlainObject": [ + { + "BPN_OEM_C": "BPNL00000003AZQP", + "BPN_OEM_A": "BPNL00000003AYRE", + "BPN_OEM_B": "BPNL00000003AVTH", + "BPN_IRS_TEST": "BPNL00000003AWSS", + "BPN_N_TIER_A": "BPNL00000003B0Q0", + "BATCH_SEALANT_1": "urn:uuid:e3b2f5e2-5be5-4ea6-98f0-6876de0fca4f", + "BATCH_SEALANT_2": "urn:uuid:533543fb-5d09-4270-b4d5-0323de239d9a", + "AUTHOR": "T-Systems", + "BATCH_GLUE_2": "urn:uuid:8e08eaba-cd33-49ae-bde7-2cd64e88f30b", + "BATCH_GLUE_1": "urn:uuid:14dcdfbd-73ba-43e9-8b5c-547e19271213", + "BPN_TRACEX_A_SITE_A": "BPNS0000000008ZZ", + "BPN_TRACEX_B": "BPNL00000003CNKC", + "BPN_DISMANTLER": "BPNL00000003B6LU", + "BPN_TRACEX_A": "BPNL00000003CML1", + "BPN_TRACEX_B_SITE_A": "BPNS00000008BDFH", + "BPN_TIER_A": "BPNL00000003B2OM", + "BPN_TIER_C": "BPNL00000003CSGV", + "SPT_MPO_LINK": "urn:uuid:029cff7f-2abe-4033-bece-62b55f17fbc4", + "BPN_TIER_B": "BPNL00000003B5MJ", + "BPN_SUB_TIER_B": "BPNL00000003AXS3", + "BPN_SUB_TIER_A": "BPNL00000003B3NX", + "BATCH_CATHODE_1": "urn:uuid:98a8a7e9-b265-479c-a11e-77219f94d659", + "BATCH_CATHODE_2": "urn:uuid:e3754252-85e0-4b50-98a0-b4010565fa07", + "BPN_SUB_TIER_C": "BPNL00000000BJTL", + "CREATION_DATE": "2023-09-29T10:20:58.926Z", + "BATCH_POLYAMID_1": "urn:uuid:6b54b8a3-d7e7-43ab-8e31-59e852af6a11", + "BATCH_POLYAMID_2": "urn:uuid:943b225b-47b9-429f-a00c-e5034749220d" + } + ] + }, + { + "urn:bamm:io.catenax.vehicle.product_description:1.0.0#ProductDescription": [ + { + "bodyVariant": "Limousine", + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "engine": { + "size": 2998, + "power": 143 + }, + "emptyWeight": 1.73, + "fuel": "Benzin", + "vehicleModel": "Vehicle Combustion", + "productionDateGMT": "2010-01-01", + "equipmentVariants": [ + { + "code": "S763C", + "description": "sport package", + "group": "special equipment" + }, + { + "code": "S378B", + "description": "integrated child seats", + "group": "special equipment" + }, + { + "code": "A458D", + "description": "parking assistance ", + "group": "special equipment" + }, + { + "code": "C247R", + "description": "trailer hitch", + "group": "special equipment" + } + ], + "anonymisedIdentifier": "sOMtThyhVNDWUZNRcBaQXXI", + "mileage": [ + { + "mileagePhase": "as maintained by workshop", + "mileageTimestamp": "2015-01-11", + "mileageDistance": 120000 + } + ] + } + ], + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "JJ-55", + "key": "manufacturerPartId" + }, + { + "value": "OMCVKQBVDJLYRWLAX", + "key": "partInstanceId" + }, + { + "value": "OMCVKQBVDJLYRWLAX", + "key": "van" + } + ], + "manufacturingInformation": { + "date": "2018-12-16T18:41:02.000Z", + "country": "DEU" + }, + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "partTypeInformation": { + "manufacturerPartId": "JJ-55", + "classification": "product", + "nameAtManufacturer": "Vehicle Combustion" + } + } + ], + "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + { + "component": [ + { + "materialName": "Iron", + "recycledContent": 80, + "materialClass": "1.1", + "quantity": { + "unit": "unit:kilogram", + "value": 327.6 + }, + "aggregateState": "solid", + "materialAbbreviation": "IR334" + }, + { + "materialName": "Polyethylen", + "recycledContent": 24, + "materialClass": "5.5.1", + "quantity": { + "unit": "unit:kilogram", + "value": 163.8 + }, + "aggregateState": "solid", + "materialAbbreviation": "PE221" + }, + { + "materialName": "Polyamid6", + "recycledContent": 0, + "materialClass": "5.5.1", + "quantity": { + "unit": "unit:kilogram", + "value": 40.95 + }, + "aggregateState": "solid", + "materialAbbreviation": "POL6" + }, + { + "materialName": "Aluminium", + "recycledContent": 1, + "materialClass": "2.1", + "quantity": { + "unit": "unit:kilogram", + "value": 286.65 + }, + "aggregateState": "solid", + "materialAbbreviation": "ALU331" + }, + { + "materialName": "Kerosene waxes and hydrocarbon waxes, oxidized, lithium salts", + "recycledContent": 25, + "materialClass": "0.7", + "quantity": { + "unit": "unit:kilogram", + "value": 109.2 + }, + "aggregateState": "solid", + "materialAbbreviation": "W123" + }, + { + "materialName": "Glue", + "recycledContent": 0, + "materialClass": "6.2", + "quantity": { + "unit": "unit:kilogram", + "value": 54.6 + }, + "aggregateState": "solid", + "materialAbbreviation": "GL338" + }, + { + "materialName": "Carbon Steel", + "recycledContent": 4, + "materialClass": "1.1.2", + "quantity": { + "unit": "unit:kilogram", + "value": 382.2 + }, + "aggregateState": "solid", + "materialAbbreviation": "CS2" + }, + { + "materialName": "Cooper", + "recycledContent": 6, + "materialClass": "3.1", + "quantity": { + "unit": "unit:kilogram", + "value": 250.2 + }, + "aggregateState": "solid", + "materialAbbreviation": "CO7" + }, + { + "materialName": "Rubber", + "recycledContent": 0, + "materialClass": "5.3", + "quantity": { + "unit": "unit:kilogram", + "value": 7.8 + }, + "aggregateState": "solid", + "materialAbbreviation": "R22" + }, + { + "materialName": "Textiles", + "recycledContent": 22, + "materialClass": "5.5.2", + "quantity": { + "unit": "unit:kilogram", + "value": 5.12 + }, + "aggregateState": "solid", + "materialAbbreviation": "TEX1" + } + ] + } + ], + "urn:bamm:io.catenax.certificate_of_destruction:1.0.1#CertificateOfDestruction": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "dismantlerProperties": { + "expiryDate": "2023-03-14", + "governmentAddress": { + "zip": "68161/12", + "country": "UR", + "street": "Bernstraße", + "houseNumber": "45", + "name": "VLhpfQGTMDYpsBZxvfBoeygjb", + "location": "Mannheim" + }, + "dismantlerAuditorContact": { + "phone": "+908 0984", + "fax": "2118145186333995599 4455362573 92903453" + }, + "receiverAuditorAddress": { + "zip": "68161/12", + "country": "AR", + "street": "Bernstraße", + "houseNumber": "45", + "name": "UMaAIKKIkknjWEXJUfPxxQHeWKEJ", + "location": "Mannheim" + }, + "dismantlerContact": { + "phone": " 0437170 59659481408170668550001606181190496817797071900 16680 7 6926221384 05844893247741871 583", + "fax": "29 013 2258035667 5403" + }, + "dismantlerAuditorAddress": { + "zip": "68161/12", + "country": "GI", + "street": "Bernstraße", + "houseNumber": "45", + "name": "dpHYZGhtgdntugzvvKAXLhM", + "location": "Mannheim" + }, + "dismantlerAddress": { + "zip": "68161/12", + "country": "KQ", + "street": "Bernstraße", + "houseNumber": "45", + "name": "RYtGKbgicZaHCBRQDSx", + "location": "Mannheim" + }, + "issueDate": "2023-03-14", + "isVehicleWithdrawnFromService": false + }, + "serialNumber": "LRP1087432", + "companyNumber": "S30A00065", + "vehicleProperties": { + "licenseAbbreviation": "HAL", + "isVehicleInformationComplete": false, + "licensePlate": "HAL-UI123", + "identification": "WBAAY711X0KC28153", + "emptyWeight": -17, + "model": "318 I", + "brand": "BMW", + "class": "01", + "firstRegistration": "19.12.2014" + }, + "returnPointProperties": { + "expiryDate": "2023-03-14", + "receiverAddress": { + "zip": "68161/12", + "country": "RV", + "street": "Bernstraße", + "houseNumber": "45", + "name": "JxkyvRnL", + "location": "Mannheim" + }, + "receiverAuditorAddress": { + "zip": "68161/12", + "country": "ZE", + "street": "Bernstraße", + "houseNumber": "45", + "name": "yedUsFwdkelQbxeTeQOvaScfqIOOmaa", + "location": "Mannheim" + }, + "receiverAuditorContact": { + "phone": "331526303180940 34307479 92660 38225647 520855838909 01 8 72520515310573752386", + "fax": "60298704457507 9 8577 76" + }, + "receiverContact": { + "phone": "+5585 6 2026 20021538 2747306418525503392771787 089739266209007778 279967117", + "fax": "4270096015 4309445925080622016597027979396859783 08514571099764 9" + }, + "issueDate": "2023-03-14", + "isVehicleWithdrawnFromService": true + }, + "vehicleOwnerProperties": { + "isVehicleOwnerInformationComplete": true, + "vehicleOwnerAddress": { + "zip": "68161/12", + "country": "DI", + "street": "Bernstraße", + "houseNumber": "45", + "name": "eOMtThyhVNLWUZNRcBaQKxI", + "location": "Mannheim" + }, + "citizenship": "DE" + }, + "dismantlingDate": "2023-03-14" + } + ], + "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "childItems": [ + { + "catenaXId": "urn:uuid:775cdc89-a51d-42da-baf9-b410b1719e04", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:43640ccc-cd15-40dd-8226-9215a676ff92", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:08cdcd57-42ca-4e16-a073-aa97ce2c7a22", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:7e1a30b9-6ccf-4cc6-a5f0-cef6843e8385", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:ef06964f-feb1-40d6-b7eb-5e746b1fd036", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003CSGV", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:bc9dd9fb-daac-4be7-ad3b-d679feb4dfdc", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003CSGV", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:bbb951e6-a629-42af-9d79-c0950ae43254", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:065e9010-a183-4bf0-ba3a-e889d4636781", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:f39fc85f-f19b-4d9a-875d-85d02931b1c0", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:3edb0b4e-45d1-4dc3-af79-f573cf4a5ea9", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:a2b83f8f-609f-4742-a51d-e5a70416b7e4", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:b9e5457b-f8c3-4a81-a328-caa294c4199c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:3d1236b1-6b85-4627-a5c8-588bc5525000", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:47e3b7c1-8cdb-44ff-8235-0ea1f172d0c3", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:f8986f8f-74f0-4866-8b81-8a0c9ac41dec", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:34a4aea4-c7d6-4b23-82d8-bd1fcd95e12e", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:eb470e60-0134-4105-9e91-19c24eb80590", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:7f897caf-95e1-4b65-ba96-a758cfdac3b2", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:7dd8c8ea-8cd1-4286-a5fb-f078ec07107a", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:4c1862d5-838e-4883-9921-b627e7fede21", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:18b4c8c6-a698-4c9c-9450-7a4baf950123", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:9c6623be-3b07-467f-9b8f-58c3f62e372b", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:70bcae9c-14fd-42c3-8203-507bb26c59cb", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:f0635ee2-88a6-4885-bc77-97b4c0bb7d05", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:89419518-5938-45f3-8ad8-55bceae0da10", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:154de940-9ec4-43e2-8fb3-cbfdf7e0bc7a", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:dc041c0a-394e-4946-892b-43e29d659f39", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:aab8b4bc-57b8-4d56-bfed-5c287678ca8d", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:4350270d-2db4-4340-9783-c93faa00fa98", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:a1f3a254-5cf3-4936-9083-3f5adbb32fcc", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:70242019-68c8-4cfb-9203-33046918def5", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:5d4ff886-b41b-42ef-a50b-6c750190437f", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003B2OM", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003B5MJ", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:775cdc89-a51d-42da-baf9-b410b1719e04", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:775cdc89-a51d-42da-baf9-b410b1719e04", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "10030939-59", + "key": "manufacturerPartId" + }, + { + "value": "NO-275684310225530314522056", + "key": "partInstanceId" + }, + { + "value": "Company 7", + "key": "company" + }, + { + "value": "Brand 7", + "key": "brand" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:775cdc89-a51d-42da-baf9-b410b1719e04", + "partTypeInformation": { + "manufacturerPartId": "10030939-59", + "customerPartId": "10030939-59", + "classification": "component", + "nameAtManufacturer": "Engine", + "nameAtCustomer": "Engine" + } + } + ], + "urn:bamm:io.catenax.physical_dimension:1.0.0#PhysicalDimension": [ + { + "physicalDimensionsProperty": { + "diameter": 560, + "width": 762, + "length": 843, + "weight": 180, + "height": 711 + } + } + ] + }, + { + "catenaXId": "urn:uuid:43640ccc-cd15-40dd-8226-9215a676ff92", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:43640ccc-cd15-40dd-8226-9215a676ff92", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "32494586-73", + "key": "manufacturerPartId" + }, + { + "value": "NO-515270742220251370796035", + "key": "partInstanceId" + }, + { + "value": "Company 8", + "key": "company" + }, + { + "value": "Brand 8", + "key": "brand" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:43640ccc-cd15-40dd-8226-9215a676ff92", + "partTypeInformation": { + "manufacturerPartId": "32494586-73", + "customerPartId": "32494586-73", + "classification": "component", + "nameAtManufacturer": "Differential Gear", + "nameAtCustomer": "Differential Gear" + } + } + ] + }, + { + "catenaXId": "urn:uuid:08cdcd57-42ca-4e16-a073-aa97ce2c7a22", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:08cdcd57-42ca-4e16-a073-aa97ce2c7a22", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "67034319-44", + "key": "manufacturerPartId" + }, + { + "value": "NO-448221504414610593223919", + "key": "partInstanceId" + }, + { + "value": "Company 9", + "key": "company" + }, + { + "value": "Brand 9", + "key": "brand" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:08cdcd57-42ca-4e16-a073-aa97ce2c7a22", + "partTypeInformation": { + "manufacturerPartId": "67034319-44", + "customerPartId": "67034319-44", + "classification": "component", + "nameAtManufacturer": "Turbocharger", + "nameAtCustomer": "Turbocharger" + } + } + ] + }, + { + "catenaXId": "urn:uuid:7e1a30b9-6ccf-4cc6-a5f0-cef6843e8385", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:7e1a30b9-6ccf-4cc6-a5f0-cef6843e8385", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "73849201-61", + "key": "manufacturerPartId" + }, + { + "value": "NO-116958314159454152228810", + "key": "partInstanceId" + }, + { + "value": "Company 10", + "key": "company" + }, + { + "value": "Brand 10", + "key": "brand" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:7e1a30b9-6ccf-4cc6-a5f0-cef6843e8385", + "partTypeInformation": { + "manufacturerPartId": "73849201-61", + "customerPartId": "73849201-61", + "classification": "component", + "nameAtManufacturer": "Catalysator", + "nameAtCustomer": "Catalysator" + } + } + ] + }, + { + "catenaXId": "urn:uuid:ef06964f-feb1-40d6-b7eb-5e746b1fd036", + "bpnl": "BPNL00000003CSGV", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:ef06964f-feb1-40d6-b7eb-5e746b1fd036", + "customers": [ + { + "businessPartner": "BPNL00000003CSGV", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003CSGV", + "key": "manufacturerId" + }, + { + "value": "22782277-50", + "key": "manufacturerPartId" + }, + { + "value": "NO-206024867128775731562781", + "key": "partInstanceId" + }, + { + "value": "Company 3", + "key": "company" + }, + { + "value": "Brand 3", + "key": "brand" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:ef06964f-feb1-40d6-b7eb-5e746b1fd036", + "partTypeInformation": { + "manufacturerPartId": "22782277-50", + "customerPartId": "22782277-50", + "classification": "component", + "nameAtManufacturer": "Door f-l", + "nameAtCustomer": "Door front-left" + } + } + ], + "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + { + "catenaXId": "urn:uuid:ef06964f-feb1-40d6-b7eb-5e746b1fd036", + "childItems": [ + { + "catenaXId": "urn:uuid:8d4dcbf2-2dff-4431-8404-d21d2055c0bc", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000000BJTL", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:8d4dcbf2-2dff-4431-8404-d21d2055c0bc", + "bpnl": "BPNL00000000BJTL", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:8d4dcbf2-2dff-4431-8404-d21d2055c0bc", + "customers": [ + { + "businessPartner": "BPNL00000000BJTL", + "parentItems": [ + { + "catenaXId": "urn:uuid:ef06964f-feb1-40d6-b7eb-5e746b1fd036", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000000BJTL", + "key": "manufacturerId" + }, + { + "value": "95657762-59", + "key": "manufacturerPartId" + }, + { + "value": "NO-446352534067160209016439", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:8d4dcbf2-2dff-4431-8404-d21d2055c0bc", + "partTypeInformation": { + "manufacturerPartId": "95657762-59", + "customerPartId": "95657762-59", + "classification": "component", + "nameAtManufacturer": "Door Key", + "nameAtCustomer": "Door Key" + } + } + ], + "urn:bamm:io.catenax.just_in_sequence_part:1.0.0#JustInSequencePart": [ + { + "localIdentifiers": [ + { + "value": "17925839YFR", + "key": "jisNumber" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "HUR" + }, + "catenaXId": "urn:uuid:8d4dcbf2-2dff-4431-8404-d21d2055c0bc", + "partTypeInformation": { + "manufacturerPartId": "123-0.740-3434-A", + "customerPartId": "PRT-12345", + "classification": "product", + "nameAtManufacturer": "Door Key", + "nameAtCustomer": "Door Key" + } + } + ] + }, + { + "catenaXId": "urn:uuid:bc9dd9fb-daac-4be7-ad3b-d679feb4dfdc", + "bpnl": "BPNL00000003CSGV", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:bc9dd9fb-daac-4be7-ad3b-d679feb4dfdc", + "customers": [ + { + "businessPartner": "BPNL00000003CSGV", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003CSGV", + "key": "manufacturerId" + }, + { + "value": "95657362-64", + "key": "manufacturerPartId" + }, + { + "value": "NO-676290347398436286477412", + "key": "partInstanceId" + }, + { + "value": "Company 4", + "key": "company" + }, + { + "value": "Brand 4", + "key": "brand" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:bc9dd9fb-daac-4be7-ad3b-d679feb4dfdc", + "partTypeInformation": { + "manufacturerPartId": "33740332-54", + "customerPartId": "33740332-54", + "classification": "component", + "nameAtManufacturer": "Door f-r", + "nameAtCustomer": "Door front-right" + } + } + ], + "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + { + "catenaXId": "urn:uuid:bc9dd9fb-daac-4be7-ad3b-d679feb4dfdc", + "childItems": [ + { + "catenaXId": "urn:uuid:901adc1a-0562-4aa3-8000-3163373af3b7", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000000BJTL", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:901adc1a-0562-4aa3-8000-3163373af3b7", + "bpnl": "BPNL00000000BJTL", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:901adc1a-0562-4aa3-8000-3163373af3b7", + "customers": [ + { + "businessPartner": "BPNL00000000BJTL", + "parentItems": [ + { + "catenaXId": "urn:uuid:bc9dd9fb-daac-4be7-ad3b-d679feb4dfdc", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000000BJTL", + "key": "manufacturerId" + }, + { + "value": "95657762-59", + "key": "manufacturerPartId" + }, + { + "value": "NO-528984516096177057567388", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:901adc1a-0562-4aa3-8000-3163373af3b7", + "partTypeInformation": { + "manufacturerPartId": "95657762-59", + "customerPartId": "95657762-59", + "classification": "component", + "nameAtManufacturer": "Door Key", + "nameAtCustomer": "Door Key" + } + } + ], + "urn:bamm:io.catenax.just_in_sequence_part:1.0.0#JustInSequencePart": [ + { + "localIdentifiers": [ + { + "value": "90650930JPZ", + "key": "jisNumber" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "HUR" + }, + "catenaXId": "urn:uuid:901adc1a-0562-4aa3-8000-3163373af3b7", + "partTypeInformation": { + "manufacturerPartId": "123-0.740-3434-A", + "customerPartId": "PRT-12345", + "classification": "product", + "nameAtManufacturer": "Door Key", + "nameAtCustomer": "Door Key" + } + } + ] + }, + { + "catenaXId": "urn:uuid:bbb951e6-a629-42af-9d79-c0950ae43254", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:bbb951e6-a629-42af-9d79-c0950ae43254", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "15635759-16", + "key": "manufacturerPartId" + }, + { + "value": "NO-242909721414993818510983", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:bbb951e6-a629-42af-9d79-c0950ae43254", + "partTypeInformation": { + "manufacturerPartId": "15635759-16", + "customerPartId": "15635759-16", + "classification": "component", + "nameAtManufacturer": "Door r-l", + "nameAtCustomer": "Door rear-left" + } + } + ] + }, + { + "catenaXId": "urn:uuid:065e9010-a183-4bf0-ba3a-e889d4636781", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:065e9010-a183-4bf0-ba3a-e889d4636781", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "28673126-98", + "key": "manufacturerPartId" + }, + { + "value": "NO-261677081035679006839137", + "key": "partInstanceId" + }, + { + "value": "Company 5", + "key": "company" + }, + { + "value": "Brand 5", + "key": "brand" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:065e9010-a183-4bf0-ba3a-e889d4636781", + "partTypeInformation": { + "manufacturerPartId": "28673126-98", + "customerPartId": "28673126-98", + "classification": "component", + "nameAtManufacturer": "Door r-r", + "nameAtCustomer": "Door rear-right" + } + } + ] + }, + { + "catenaXId": "urn:uuid:f39fc85f-f19b-4d9a-875d-85d02931b1c0", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:f39fc85f-f19b-4d9a-875d-85d02931b1c0", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "94421589-82", + "key": "manufacturerPartId" + }, + { + "value": "NO-795008552585468489429670", + "key": "partInstanceId" + }, + { + "value": "Company 6", + "key": "company" + }, + { + "value": "Brand 6", + "key": "brand" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:f39fc85f-f19b-4d9a-875d-85d02931b1c0", + "partTypeInformation": { + "manufacturerPartId": "94421589-82", + "customerPartId": "94421589-82", + "classification": "component", + "nameAtManufacturer": "Engine hood", + "nameAtCustomer": "Engine hood" + } + } + ] + }, + { + "catenaXId": "urn:uuid:3edb0b4e-45d1-4dc3-af79-f573cf4a5ea9", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:3edb0b4e-45d1-4dc3-af79-f573cf4a5ea9", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "85023955-75", + "key": "manufacturerPartId" + }, + { + "value": "NO-165793486598711243587281", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:3edb0b4e-45d1-4dc3-af79-f573cf4a5ea9", + "partTypeInformation": { + "manufacturerPartId": "85023955-75", + "customerPartId": "85023955-75", + "classification": "component", + "nameAtManufacturer": "Tailgate", + "nameAtCustomer": "Tailgate" + } + } + ] + }, + { + "catenaXId": "urn:uuid:a2b83f8f-609f-4742-a51d-e5a70416b7e4", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:a2b83f8f-609f-4742-a51d-e5a70416b7e4", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "13769860-47", + "key": "manufacturerPartId" + }, + { + "value": "NO-982199117979996230327452", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:a2b83f8f-609f-4742-a51d-e5a70416b7e4", + "partTypeInformation": { + "manufacturerPartId": "13769860-47", + "customerPartId": "13769860-47", + "classification": "component", + "nameAtManufacturer": "Fender left", + "nameAtCustomer": "Fender right" + } + } + ] + }, + { + "catenaXId": "urn:uuid:b9e5457b-f8c3-4a81-a328-caa294c4199c", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:b9e5457b-f8c3-4a81-a328-caa294c4199c", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "36643162-35", + "key": "manufacturerPartId" + }, + { + "value": "NO-606833663331752158305255", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:b9e5457b-f8c3-4a81-a328-caa294c4199c", + "partTypeInformation": { + "manufacturerPartId": "36643162-35", + "customerPartId": "36643162-35", + "classification": "component", + "nameAtManufacturer": "Fender right", + "nameAtCustomer": "Fender right" + } + } + ] + }, + { + "catenaXId": "urn:uuid:3d1236b1-6b85-4627-a5c8-588bc5525000", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:3d1236b1-6b85-4627-a5c8-588bc5525000", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "54165444-59", + "key": "manufacturerPartId" + }, + { + "value": "NO-787119127783260984229027", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:3d1236b1-6b85-4627-a5c8-588bc5525000", + "partTypeInformation": { + "manufacturerPartId": "54165444-59", + "customerPartId": "54165444-59", + "classification": "component", + "nameAtManufacturer": "Bumper front", + "nameAtCustomer": "Bumper front" + } + } + ] + }, + { + "catenaXId": "urn:uuid:47e3b7c1-8cdb-44ff-8235-0ea1f172d0c3", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:47e3b7c1-8cdb-44ff-8235-0ea1f172d0c3", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "22768257-25", + "key": "manufacturerPartId" + }, + { + "value": "NO-219590668820517992402373", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:47e3b7c1-8cdb-44ff-8235-0ea1f172d0c3", + "partTypeInformation": { + "manufacturerPartId": "22768257-25", + "customerPartId": "22768257-25", + "classification": "component", + "nameAtManufacturer": "Bumper rear", + "nameAtCustomer": "Bumper rear" + } + } + ] + }, + { + "catenaXId": "urn:uuid:f8986f8f-74f0-4866-8b81-8a0c9ac41dec", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:f8986f8f-74f0-4866-8b81-8a0c9ac41dec", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "65529521-37", + "key": "manufacturerPartId" + }, + { + "value": "NO-080856994342155146459955", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:f8986f8f-74f0-4866-8b81-8a0c9ac41dec", + "partTypeInformation": { + "manufacturerPartId": "65529521-37", + "customerPartId": "65529521-37", + "classification": "component", + "nameAtManufacturer": "Exterior mirror left", + "nameAtCustomer": "Exterior mirror left" + } + } + ] + }, + { + "catenaXId": "urn:uuid:34a4aea4-c7d6-4b23-82d8-bd1fcd95e12e", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:34a4aea4-c7d6-4b23-82d8-bd1fcd95e12e", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "58471477-24", + "key": "manufacturerPartId" + }, + { + "value": "NO-921583641616934362117013", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:34a4aea4-c7d6-4b23-82d8-bd1fcd95e12e", + "partTypeInformation": { + "manufacturerPartId": "58471477-24", + "customerPartId": "58471477-24", + "classification": "component", + "nameAtManufacturer": "Exterior mirror right", + "nameAtCustomer": "Exterior mirror right" + } + } + ] + }, + { + "catenaXId": "urn:uuid:eb470e60-0134-4105-9e91-19c24eb80590", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:eb470e60-0134-4105-9e91-19c24eb80590", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "09002013-68", + "key": "manufacturerPartId" + }, + { + "value": "NO-435589892033159670017872", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:eb470e60-0134-4105-9e91-19c24eb80590", + "partTypeInformation": { + "manufacturerPartId": "09002013-68", + "customerPartId": "09002013-68", + "classification": "component", + "nameAtManufacturer": "Trailer coupling", + "nameAtCustomer": "Tailer coupling" + } + } + ] + }, + { + "catenaXId": "urn:uuid:7f897caf-95e1-4b65-ba96-a758cfdac3b2", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:7f897caf-95e1-4b65-ba96-a758cfdac3b2", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "43501996-98", + "key": "manufacturerPartId" + }, + { + "value": "NO-281781484624391664041885", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:7f897caf-95e1-4b65-ba96-a758cfdac3b2", + "partTypeInformation": { + "manufacturerPartId": "43501996-98", + "customerPartId": "43501996-98", + "classification": "component", + "nameAtManufacturer": "Dashboard", + "nameAtCustomer": "Dashboard" + } + } + ] + }, + { + "catenaXId": "urn:uuid:7dd8c8ea-8cd1-4286-a5fb-f078ec07107a", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:7dd8c8ea-8cd1-4286-a5fb-f078ec07107a", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "77795937-13", + "key": "manufacturerPartId" + }, + { + "value": "NO-790020640607494459054030", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:7dd8c8ea-8cd1-4286-a5fb-f078ec07107a", + "partTypeInformation": { + "manufacturerPartId": "77795937-13", + "customerPartId": "77795937-13", + "classification": "component", + "nameAtManufacturer": "Steering wheel", + "nameAtCustomer": "Steering wheel" + } + } + ] + }, + { + "catenaXId": "urn:uuid:4c1862d5-838e-4883-9921-b627e7fede21", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:4c1862d5-838e-4883-9921-b627e7fede21", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "20125432-59", + "key": "manufacturerPartId" + }, + { + "value": "NO-612757303690674683293505", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:4c1862d5-838e-4883-9921-b627e7fede21", + "partTypeInformation": { + "manufacturerPartId": "20125432-59", + "customerPartId": "20125432-59", + "classification": "component", + "nameAtManufacturer": "Indicator left", + "nameAtCustomer": "Indicator left" + } + } + ] + }, + { + "catenaXId": "urn:uuid:18b4c8c6-a698-4c9c-9450-7a4baf950123", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:18b4c8c6-a698-4c9c-9450-7a4baf950123", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "19073706-76", + "key": "manufacturerPartId" + }, + { + "value": "NO-698844808749514107477154", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:18b4c8c6-a698-4c9c-9450-7a4baf950123", + "partTypeInformation": { + "manufacturerPartId": "19073706-76", + "customerPartId": "19073706-76", + "classification": "component", + "nameAtManufacturer": "Indicator right", + "nameAtCustomer": "Indicator right" + } + } + ] + }, + { + "catenaXId": "urn:uuid:9c6623be-3b07-467f-9b8f-58c3f62e372b", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:9c6623be-3b07-467f-9b8f-58c3f62e372b", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "45415162-57", + "key": "manufacturerPartId" + }, + { + "value": "NO-807517859774734082276121", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:9c6623be-3b07-467f-9b8f-58c3f62e372b", + "partTypeInformation": { + "manufacturerPartId": "45415162-57", + "customerPartId": "45415162-57", + "classification": "component", + "nameAtManufacturer": "Led headlight", + "nameAtCustomer": "Led headlight" + } + } + ] + }, + { + "catenaXId": "urn:uuid:70bcae9c-14fd-42c3-8203-507bb26c59cb", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:70bcae9c-14fd-42c3-8203-507bb26c59cb", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "78141846-87", + "key": "manufacturerPartId" + }, + { + "value": "NO-546190351306016257569238", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:70bcae9c-14fd-42c3-8203-507bb26c59cb", + "partTypeInformation": { + "manufacturerPartId": "78141846-87", + "customerPartId": "78141846-87", + "classification": "component", + "nameAtManufacturer": "Starter motor", + "nameAtCustomer": "Starter motor" + } + } + ] + }, + { + "catenaXId": "urn:uuid:f0635ee2-88a6-4885-bc77-97b4c0bb7d05", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:f0635ee2-88a6-4885-bc77-97b4c0bb7d05", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "81324139-23", + "key": "manufacturerPartId" + }, + { + "value": "NO-610920127647230312791184", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:f0635ee2-88a6-4885-bc77-97b4c0bb7d05", + "partTypeInformation": { + "manufacturerPartId": "81324139-23", + "customerPartId": "81324139-23", + "classification": "component", + "nameAtManufacturer": "Alternator", + "nameAtCustomer": "Alternator" + } + } + ] + }, + { + "catenaXId": "urn:uuid:89419518-5938-45f3-8ad8-55bceae0da10", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:89419518-5938-45f3-8ad8-55bceae0da10", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "57929013-09", + "key": "manufacturerPartId" + }, + { + "value": "NO-115336662399039736434130", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:89419518-5938-45f3-8ad8-55bceae0da10", + "partTypeInformation": { + "manufacturerPartId": "57929013-09", + "customerPartId": "57929013-09", + "classification": "component", + "nameAtManufacturer": "AC compressor", + "nameAtCustomer": "Air conditioning compressor" + } + } + ] + }, + { + "catenaXId": "urn:uuid:154de940-9ec4-43e2-8fb3-cbfdf7e0bc7a", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:154de940-9ec4-43e2-8fb3-cbfdf7e0bc7a", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "61184040-23", + "key": "manufacturerPartId" + }, + { + "value": "NO-568588696862751854401234", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:154de940-9ec4-43e2-8fb3-cbfdf7e0bc7a", + "partTypeInformation": { + "manufacturerPartId": "61184040-23", + "customerPartId": "61184040-23", + "classification": "component", + "nameAtManufacturer": "Taillight rear", + "nameAtCustomer": "Taillight rear" + } + } + ] + }, + { + "catenaXId": "urn:uuid:dc041c0a-394e-4946-892b-43e29d659f39", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:dc041c0a-394e-4946-892b-43e29d659f39", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "78744126-74", + "key": "manufacturerPartId" + }, + { + "value": "NO-726002968006933131248348", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:dc041c0a-394e-4946-892b-43e29d659f39", + "partTypeInformation": { + "manufacturerPartId": "78744126-74", + "customerPartId": "78744126-74", + "classification": "component", + "nameAtManufacturer": "Taillight front", + "nameAtCustomer": "Taillight front" + } + } + ] + }, + { + "catenaXId": "urn:uuid:aab8b4bc-57b8-4d56-bfed-5c287678ca8d", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:aab8b4bc-57b8-4d56-bfed-5c287678ca8d", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "12093297-03", + "key": "manufacturerPartId" + }, + { + "value": "NO-135350386724457955812246", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:aab8b4bc-57b8-4d56-bfed-5c287678ca8d", + "partTypeInformation": { + "manufacturerPartId": "12093297-03", + "customerPartId": "12093297-03", + "classification": "component", + "nameAtManufacturer": "Axle part front", + "nameAtCustomer": "Axle part front" + } + } + ] + }, + { + "catenaXId": "urn:uuid:4350270d-2db4-4340-9783-c93faa00fa98", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:4350270d-2db4-4340-9783-c93faa00fa98", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "88111709-49", + "key": "manufacturerPartId" + }, + { + "value": "NO-984494209791826774942811", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:4350270d-2db4-4340-9783-c93faa00fa98", + "partTypeInformation": { + "manufacturerPartId": "88111709-49", + "customerPartId": "88111709-49", + "classification": "component", + "nameAtManufacturer": "Axle part rear", + "nameAtCustomer": "Axle part rear" + } + } + ] + }, + { + "catenaXId": "urn:uuid:a1f3a254-5cf3-4936-9083-3f5adbb32fcc", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:a1f3a254-5cf3-4936-9083-3f5adbb32fcc", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "00871379-44", + "key": "manufacturerPartId" + }, + { + "value": "NO-579353443505911048559341", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:a1f3a254-5cf3-4936-9083-3f5adbb32fcc", + "partTypeInformation": { + "manufacturerPartId": "00871379-44", + "customerPartId": "00871379-44", + "classification": "component", + "nameAtManufacturer": "Chassis", + "nameAtCustomer": "Chassis" + } + } + ] + }, + { + "catenaXId": "urn:uuid:70242019-68c8-4cfb-9203-33046918def5", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:70242019-68c8-4cfb-9203-33046918def5", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "08901347-87", + "key": "manufacturerPartId" + }, + { + "value": "NO-373037462671625079929352", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:70242019-68c8-4cfb-9203-33046918def5", + "partTypeInformation": { + "manufacturerPartId": "08901347-87", + "customerPartId": "08901347-87", + "classification": "component", + "nameAtManufacturer": "Rims", + "nameAtCustomer": "Rims" + } + } + ] + }, + { + "catenaXId": "urn:uuid:5d4ff886-b41b-42ef-a50b-6c750190437f", + "bpnl": "BPNL00000003AZQP", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:5d4ff886-b41b-42ef-a50b-6c750190437f", + "customers": [ + { + "businessPartner": "BPNL00000003AZQP", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AZQP", + "key": "manufacturerId" + }, + { + "value": "45863316-60", + "key": "manufacturerPartId" + }, + { + "value": "NO-510364947223819435158870", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:5d4ff886-b41b-42ef-a50b-6c750190437f", + "partTypeInformation": { + "manufacturerPartId": "45863316-60", + "customerPartId": "45863316-60", + "classification": "component", + "nameAtManufacturer": "Tires", + "nameAtCustomer": "Tires" + } + } + ] + }, + { + "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", + "bpnl": "BPNL00000003B2OM", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", + "customers": [ + { + "businessPartner": "BPNL00000003B2OM", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003B2OM", + "key": "manufacturerId" + }, + { + "value": "1O222E8-43", + "key": "manufacturerPartId" + }, + { + "value": "NO-494650065213380782911627", + "key": "partInstanceId" + }, + { + "value": "Company 2", + "key": "company" + }, + { + "value": "Brand 2", + "key": "brand" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", + "partTypeInformation": { + "manufacturerPartId": "1O222E8-43", + "customerPartId": "1O222E8-43", + "classification": "component", + "nameAtManufacturer": "Transmission", + "nameAtCustomer": "Transmission" + } + } + ], + "urn:bamm:io.catenax.transmission_pass:1.0.0#TransmissionPass": [ + { + "productSpecificParameters": { + "torqueConverter": [ + "RYtGKbgicZaHCBRQDSx" + ], + "driveType": "combustion engine", + "oilType": "Lifeguard Hybrid 2", + "spreading": 6.79, + "torque": 500, + "power": 300, + "standardGearRatio": { + "gear": "1", + "ratio": 4.1567 + }, + "oilCapacity": 8.9, + "electricPerformance": [ + "VLhpfQGTMDYpsBZxvfBoeygjb" + ], + "speedResistance": { + "speed": 7800, + "gear": "1" + } + }, + "instructions": { + "packagingInstructions": [ + { + "documentLink": "https://www.xxx.pdf", + "documentTitle": "Title A" + } + ], + "transportationInstructions": [ + { + "documentLink": "https://www.xxx.pdf", + "documentTitle": "Title A" + } + ], + "dismantlingProcedure": [ + { + "documentLink": "https://www.xxx.pdf", + "documentTitle": "Title A" + } + ], + "vehicleDismantlingProcedure": [ + { + "documentLink": "https://www.xxx.pdf", + "documentTitle": "Title A" + } + ], + "safetyMeasures": [ + { + "documentLink": "https://www.xxx.pdf", + "documentTitle": "Title A" + } + ] + }, + "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", + "identification": { + "localIdentifiers": [ + { + "value": "NO-494650065213380782911627", + "key": "PartInstanceID" + } + ], + "dataMatrixCode": "UMaAIKKIkknjWEXJUfPxxQHeWKEJ", + "manufacturerId": "BPNL00000003B2OM" + }, + "sparePartSupplier": [ + { + "supplierId": "BPNL1234567890ZZ", + "supplierContact": { + "website": "https://www.samsung.com", + "phoneNumber": "+49 89 1234567890", + "faxNumber": "+49 89 0987654321", + "email": "test.mail@example.com" + }, + "sparePartName": "torque converter" + } + ], + "stateOfHealth": { + "serviceHistory": [ + "2023-05-22T13:16:47.239+02:00" + ], + "remanufacturing": { + "productStatusValue": "first life", + "remanufacturingDate": "2023-05-22T13:16:47.239+02:00" + }, + "expectedLifespan": 500000 + }, + "generalInformation": { + "additionalInformation": "JxkyvRnL", + "physicalDimensionsProperty": { + "diameter": 0.03, + "width": 1000, + "length": 20000.1, + "weight": 100.7, + "height": 0.1 + }, + "warrantyPeriod": 60, + "productDescription": "manual transmission", + "productType": "8HP60MH" + }, + "sustainability": { + "carbonFootprint": { + "productOrSectorSpecificRules": [ + { + "otherOperatorName": "NSF", + "ruleNames": [ + "ABC 2021" + ], + "operator": "PEF" + } + ], + "crossSectoralStandardsUsed": [ + { + "crossSectoralStandard": "GHG Protocol Product standard" + } + ], + "co2FootprintTotal": -1.7976931348623157E308 + }, + "substancesOfConcern": [ + "yedUsFwdkelQbxeTeQOvaScfqIOOmaa" + ], + "responsibleSourcingDocument": [ + { + "documentLink": "https://www.xxx.pdf", + "documentTitle": "Title A" + } + ], + "recyclateContent": { + "nickel": -1.7976931348623157E308, + "lithium": -1.7976931348623157E308, + "cobalt": -1.7976931348623157E308, + "otherSubstance": [ + { + "substanceName": "Lead", + "substancePercentage": 8 + } + ] + }, + "criticalRawMaterials": [ + "eOMtThyhVNLWUZNRcBaQKxI" + ] + } + } + ], + "urn:bamm:io.catenax.physical_dimension:1.0.0#PhysicalDimension": [ + { + "physicalDimensionsProperty": { + "diameter": 380, + "width": 590, + "length": 810, + "weight": 85, + "height": 610 + } + } + ], + "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + { + "component": [ + { + "materialName": "Carbon Steel", + "recycledContent": 86, + "materialClass": "1.1.2", + "quantity": { + "unit": "unit:kilogram", + "value": 72.843 + }, + "aggregateState": "solid", + "materialAbbreviation": "CS2" + }, + { + "materialName": "Oil", + "recycledContent": 5, + "materialClass": "9.2", + "quantity": { + "unit": "unit:kilogram", + "value": 6.9 + }, + "aggregateState": "liquid", + "materialAbbreviation": "SAE40" + }, + { + "materialName": "Copper", + "recycledContent": 5, + "materialClass": "3.1", + "quantity": { + "unit": "unit:kilogram", + "value": 1.2 + }, + "aggregateState": "solid", + "materialAbbreviation": "CO7" + } + ] + } + ], + "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + { + "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", + "childItems": [ + { + "catenaXId": "urn:uuid:cc2d7229-fd38-49c2-a0ea-4e0537964dd0", + "quantity": { + "quantityNumber": 0.2014, + "measurementUnit": "unit:kilogram" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AYRE", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:2f80229d-5153-4227-a4c6-879a4d457d06", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003B3NX", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:1448a9ca-4faa-44b6-a018-b2d148d65ed1", + "quantity": { + "quantityNumber": 0.2341, + "measurementUnit": "unit:kilogram" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AZQP", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:cc2d7229-fd38-49c2-a0ea-4e0537964dd0", + "urn:bamm:io.catenax.batch:2.0.0#Batch": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003B0Q0", + "key": "manufacturerId" + }, + { + "value": "BID12345678", + "key": "batchId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "HUR" + }, + "catenaXId": "urn:uuid:cc2d7229-fd38-49c2-a0ea-4e0537964dd0", + "partTypeInformation": { + "manufacturerPartId": "123-0.740-3434-A", + "classification": "product", + "nameAtManufacturer": "Engineering Plasticst" + } + } + ], + "bpnl": "BPNL00000003B0Q0", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:cc2d7229-fd38-49c2-a0ea-4e0537964dd0", + "customers": [ + { + "businessPartner": "BPNL00000003B0Q0", + "parentItems": [ + { + "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + { + "materialName": "Engineering Plastics", + "materialClass": "5.1", + "component": [ + { + "materialName": "PA66", + "recycledContent": 72, + "materialClass": "5.1", + "quantity": { + "unit": "unit:percent", + "value": 70 + }, + "aggregateState": "solid", + "materialAbbreviation": "PA66" + }, + { + "materialName": "GF-Faser", + "recycledContent": 43, + "materialClass": "5.1", + "quantity": { + "unit": "unit:percent", + "value": 30 + }, + "aggregateState": "solid", + "materialAbbreviation": "GF30" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:2f80229d-5153-4227-a4c6-879a4d457d06", + "bpnl": "BPNL00000003B3NX", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:2f80229d-5153-4227-a4c6-879a4d457d06", + "customers": [ + { + "businessPartner": "BPNL00000003B3NX", + "parentItems": [ + { + "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003B3NX", + "key": "manufacturerId" + }, + { + "value": "60127V1-28", + "key": "manufacturerPartId" + }, + { + "value": "NO-842145548662602762555246", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:2f80229d-5153-4227-a4c6-879a4d457d06", + "partTypeInformation": { + "manufacturerPartId": "60127V1-28", + "customerPartId": "60127V1-28", + "classification": "component", + "nameAtManufacturer": "Sensor", + "nameAtCustomer": "Sensor" + } + } + ], + "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + { + "catenaXId": "urn:uuid:2f80229d-5153-4227-a4c6-879a4d457d06", + "childItems": [ + { + "catenaXId": "urn:uuid:0afaff8e-28c7-4788-b7a4-071ef85dee19", + "quantity": { + "quantityNumber": 0.1908, + "measurementUnit": "unit:kilogram" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003B0Q0", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:0afaff8e-28c7-4788-b7a4-071ef85dee19", + "urn:bamm:io.catenax.batch:2.0.0#Batch": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003B0Q0", + "key": "manufacturerId" + }, + { + "value": "BID12345678", + "key": "batchId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "HUR" + }, + "catenaXId": "urn:uuid:0afaff8e-28c7-4788-b7a4-071ef85dee19", + "partTypeInformation": { + "manufacturerPartId": "123-0.740-3434-A", + "classification": "product", + "nameAtManufacturer": "NTIER Product" + } + } + ], + "bpnl": "BPNL00000003B0Q0", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:0afaff8e-28c7-4788-b7a4-071ef85dee19", + "customers": [ + { + "businessPartner": "BPNL00000003B0Q0", + "parentItems": [ + { + "catenaXId": "urn:uuid:2f80229d-5153-4227-a4c6-879a4d457d06", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + { + "materialName": "NTIER Product", + "materialClass": "5.5", + "component": [ + { + "materialName": "Aluminium oxide", + "recycledContent": 28, + "materialClass": "5.5.1", + "quantity": { + "unit": "unit:percent", + "value": 60 + }, + "aggregateState": "solid", + "materialAbbreviation": "" + }, + { + "materialName": "Other", + "recycledContent": 28, + "materialClass": "5.5.2", + "quantity": { + "unit": "unit:percent", + "value": 40 + }, + "aggregateState": "solid", + "materialAbbreviation": "" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:1448a9ca-4faa-44b6-a018-b2d148d65ed1", + "urn:bamm:io.catenax.batch:2.0.0#Batch": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AXS3", + "key": "manufacturerId" + }, + { + "value": "BID12345678", + "key": "batchId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "HUR" + }, + "catenaXId": "urn:uuid:1448a9ca-4faa-44b6-a018-b2d148d65ed1", + "partTypeInformation": { + "manufacturerPartId": "123-0.740-3434-A", + "classification": "product", + "nameAtManufacturer": "Glue" + } + } + ], + "bpnl": "BPNL00000003AXS3", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:1448a9ca-4faa-44b6-a018-b2d148d65ed1", + "customers": [ + { + "businessPartner": "BPNL00000003AXS3", + "parentItems": [ + { + "catenaXId": "urn:uuid:68ad3047-56fb-45a3-af97-6dae591df030", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + { + "component": [ + { + "materialName": "Glue", + "materialClass": "6.2", + "quantity": { + "unit": "unit:kilogram", + "value": 2.5 + }, + "weight": "0.2341", + "materialAbbreviation": "GL338" + } + ] + } + ], + "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + { + "catenaXId": "urn:uuid:1448a9ca-4faa-44b6-a018-b2d148d65ed1", + "childItems": [] + } + ] + }, + { + "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", + "bpnl": "BPNL00000003B5MJ", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", + "customers": [ + { + "businessPartner": "BPNL00000003B5MJ", + "parentItems": [ + { + "catenaXId": "urn:uuid:a2c4c533-f0e5-4b6e-a4fc-7f9cdcbbd50c", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003B5MJ", + "key": "manufacturerId" + }, + { + "value": "21382K0-70", + "key": "manufacturerPartId" + }, + { + "value": "NO-403391011317149599047195", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", + "partTypeInformation": { + "manufacturerPartId": "21382K0-70", + "customerPartId": "21382K0-70", + "classification": "component", + "nameAtManufacturer": "ECU", + "nameAtCustomer": "ECU" + } + } + ], + "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + { + "component": [ + { + "materialName": "Glue", + "recycledContent": 60, + "materialClass": "6.2", + "quantity": { + "unit": "unit:kilogram", + "value": 0.3301 + }, + "aggregateState": "solid", + "materialAbbreviation": "GL338" + } + ] + } + ], + "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + { + "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", + "childItems": [ + { + "catenaXId": "urn:uuid:a635b2a8-df46-4ede-b690-3f02ea959652", + "quantity": { + "quantityNumber": 0.3301, + "measurementUnit": "unit:kilogram" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003AXS3", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:80162eb9-a7bc-4b47-aad2-5d9a6a340173", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003B3NX", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:01d35109-49b7-41a5-b9c0-d69e4117314f", + "quantity": { + "quantityNumber": 0.2001, + "measurementUnit": "unit:kilogram" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003B0Q0", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:a635b2a8-df46-4ede-b690-3f02ea959652", + "urn:bamm:io.catenax.batch:2.0.0#Batch": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003AXS3", + "key": "manufacturerId" + }, + { + "value": "BID12345678", + "key": "batchId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "HUR" + }, + "catenaXId": "urn:uuid:a635b2a8-df46-4ede-b690-3f02ea959652", + "partTypeInformation": { + "manufacturerPartId": "123-0.740-3434-A", + "classification": "product", + "nameAtManufacturer": "Glue" + } + } + ], + "bpnl": "BPNL00000003AXS3", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:a635b2a8-df46-4ede-b690-3f02ea959652", + "customers": [ + { + "businessPartner": "BPNL00000003AXS3", + "parentItems": [ + { + "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + { + "materialName": "Glue", + "materialClass": "5.5", + "component": [ + { + "materialName": "Aluminium oxide", + "recycledContent": 88, + "materialClass": "5.5.1", + "quantity": { + "unit": "unit:percent", + "value": 70 + }, + "aggregateState": "solid", + "materialAbbreviation": "AL7" + }, + { + "materialName": "Other", + "recycledContent": 8, + "materialClass": "5.5.2", + "quantity": { + "unit": "unit:percent", + "value": 70 + }, + "aggregateState": "solid", + "materialAbbreviation": "" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:80162eb9-a7bc-4b47-aad2-5d9a6a340173", + "bpnl": "BPNL00000003B3NX", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:80162eb9-a7bc-4b47-aad2-5d9a6a340173", + "customers": [ + { + "businessPartner": "BPNL00000003B3NX", + "parentItems": [ + { + "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003B3NX", + "key": "manufacturerId" + }, + { + "value": "73659L0-23", + "key": "manufacturerPartId" + }, + { + "value": "NO-381537621115986645948548", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:80162eb9-a7bc-4b47-aad2-5d9a6a340173", + "partTypeInformation": { + "manufacturerPartId": "73659L0-23", + "customerPartId": "73659L0-23", + "classification": "component", + "nameAtManufacturer": "Sensor", + "nameAtCustomer": "Sensor" + } + } + ], + "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ + { + "catenaXId": "urn:uuid:80162eb9-a7bc-4b47-aad2-5d9a6a340173", + "childItems": [ + { + "catenaXId": "urn:uuid:d087f660-6595-467b-8138-ce040f1c49eb", + "quantity": { + "quantityNumber": 0.1908, + "measurementUnit": "unit:kilogram" + }, + "hasAlternatives": true, + "businessPartner": "BPNL00000003B0Q0", + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:d087f660-6595-467b-8138-ce040f1c49eb", + "urn:bamm:io.catenax.batch:2.0.0#Batch": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003B0Q0", + "key": "manufacturerId" + }, + { + "value": "BID12345678", + "key": "batchId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "HUR" + }, + "catenaXId": "urn:uuid:d087f660-6595-467b-8138-ce040f1c49eb", + "partTypeInformation": { + "manufacturerPartId": "123-0.740-3434-A", + "classification": "product", + "nameAtManufacturer": "Engineering Plasticst" + } + } + ], + "bpnl": "BPNL00000003B0Q0", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:d087f660-6595-467b-8138-ce040f1c49eb", + "customers": [ + { + "businessPartner": "BPNL00000003B0Q0", + "parentItems": [ + { + "catenaXId": "urn:uuid:80162eb9-a7bc-4b47-aad2-5d9a6a340173", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + { + "materialName": "Engineering Plastics", + "materialClass": "5.1", + "component": [ + { + "materialName": "PA66", + "recycledContent": 41, + "materialClass": "5.1", + "quantity": { + "unit": "unit:percent", + "value": 70 + }, + "aggregateState": "solid", + "materialAbbreviation": "PA66" + }, + { + "materialName": "GF-Faser", + "recycledContent": 33, + "materialClass": "5.1", + "quantity": { + "unit": "unit:percent", + "value": 30 + }, + "aggregateState": "solid", + "materialAbbreviation": "GF30" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:01d35109-49b7-41a5-b9c0-d69e4117314f", + "bpnl": "BPNL00000003B0Q0", + "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:01d35109-49b7-41a5-b9c0-d69e4117314f", + "customers": [ + { + "businessPartner": "BPNL00000003B0Q0", + "parentItems": [ + { + "catenaXId": "urn:uuid:56294f57-52b3-4a07-b834-a74a9ac7a7c5", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:bamm:io.catenax.serial_part:1.0.1#SerialPart": [ + { + "localIdentifiers": [ + { + "value": "BPNL00000003B0Q0", + "key": "manufacturerId" + }, + { + "value": "98178I1-06", + "key": "manufacturerPartId" + }, + { + "value": "NO-669886195043160397054338", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2022-02-04T14:48:54", + "country": "DEU" + }, + "catenaXId": "urn:uuid:01d35109-49b7-41a5-b9c0-d69e4117314f", + "partTypeInformation": { + "manufacturerPartId": "98178I1-06", + "customerPartId": "98178I1-06", + "classification": "component", + "nameAtManufacturer": "Engineering Plastics", + "nameAtCustomer": "Engineering Plastics" + } + } + ], + "urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling": [ + { + "materialName": "Engineering Plastics", + "materialClass": "5.1", + "component": [ + { + "materialName": "PA66", + "recycledContent": 6, + "materialClass": "5.1", + "quantity": { + "unit": "unit:percent", + "value": 70 + }, + "aggregateState": "solid", + "materialAbbreviation": "PA66" + }, + { + "materialName": "GF-Faser", + "recycledContent": 11, + "materialClass": "5.1", + "quantity": { + "unit": "unit:percent", + "value": 30 + }, + "aggregateState": "solid", + "materialAbbreviation": "GF30" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/charts/tx-data-provider/resources/requirements.txt b/charts/tx-data-provider/resources/requirements.txt new file mode 100644 index 00000000..78235c35 --- /dev/null +++ b/charts/tx-data-provider/resources/requirements.txt @@ -0,0 +1 @@ +requests~=2.27.1 \ No newline at end of file diff --git a/charts/tx-data-provider/resources/transform-and-upload.py b/charts/tx-data-provider/resources/transform-and-upload.py new file mode 100644 index 00000000..89ebbf88 --- /dev/null +++ b/charts/tx-data-provider/resources/transform-and-upload.py @@ -0,0 +1,719 @@ +#!/usr/bin/python + +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# + +import argparse +import json +import math +import requests +import time +import uuid +from copy import copy +from requests.adapters import HTTPAdapter, Retry + + +def create_submodel_payload(json_payload): + return json.dumps(json_payload) + + +def create_edc_asset_payload(submodel_url_, asset_id_): + return json.dumps({ + "@context": {}, + "asset": { + "@type": "Asset", + "@id": f"{asset_id_}", + "properties": { + "description": "IRS EDC Test Asset" + } + }, + "dataAddress": { + "@type": "DataAddress", + "type": "HttpData", + "baseUrl": f"{submodel_url_}", + "proxyPath": "true", + "proxyBody": "false", + "proxyMethod": "false", + "proxyQueryParams": "false" + } + }) + + +def create_edc_registry_asset_payload(registry_url_, asset_prop_id_): + return json.dumps({ + "@context": {}, + "asset": { + "@type": "Asset", + "@id": f"{asset_prop_id_}", # DTR-EDC-instance-unique-ID + "properties": { + "type": "data.core.digitalTwinRegistry", + "description": "Digital Twin Registry Endpoint of IRS DEV" + } + }, + "dataAddress": { + "@type": "DataAddress", + "type": "HttpData", + "baseUrl": f"{registry_url_}", + "proxyPath": "true", + "proxyBody": "true", + "proxyMethod": "true", + "proxyQueryParams": "true" + } + }) + + +def create_edc_notification_asset_payload(ess_url_, asset_id_, notification_type_): + return json.dumps({ + "@context": {}, + "asset": { + "@id": f"{asset_id_}", + "properties": { + "description": "ESS notification endpoint", + "contenttype": "application/json", + "notificationtype": f"{notification_type_}", + "notificationmethod": "receive" + } + }, + "dataAddress": { + "baseUrl": f"{ess_url_}", + "type": "HttpData", + "proxyBody": "true", + "proxyMethod": "true" + } + }) + + +def create_esr_edc_asset_payload(esr_url_, asset_prop_id_, digital_twin_id_): + return json.dumps({ + "asset": { + "properties": { + "asset:prop:id": asset_prop_id_, + "asset:prop:description": "product description", + "asset:prop:contenttype": "application/json" + } + }, + "dataAddress": { + "properties": { + "baseUrl": f"{esr_url_}/{digital_twin_id_}/asBuilt/ISO14001/submodel", + "type": "HttpData", + "proxyBody": True, + "proxyMethod": True + } + } + }) + + +def create_edc_contract_definition_payload(edc_policy_id_, asset_prop_id_): + return json.dumps({ + "@context": {}, + "@type": "ContractDefinition", + "accessPolicyId": f"{edc_policy_id_}", + "contractPolicyId": f"{edc_policy_id_}", + "assetsSelector": { + "@type": "CriterionDto", + "operandLeft": "https://w3id.org/edc/v0.0.1/ns/id", + "operator": "=", + "operandRight": f"{asset_prop_id_}" + } + } + ) + + +def create_aas_shell(global_asset_id_, id_short_, identification_, specific_asset_id_, submodel_descriptors_): + return json.dumps({ + "description": [], + "globalAssetId": { + "value": [ + global_asset_id_ + ] + }, + "idShort": id_short_, + "identification": identification_, + "specificAssetIds": specific_asset_id_, + "submodelDescriptors": submodel_descriptors_ + }) + + +def create_submodel_descriptor(id_short_, identification_, semantic_id_, endpoint_address_): + return json.dumps( + { + "description": [], + "idShort": id_short_, + "identification": identification_, + "semanticId": { + "value": [ + semantic_id_ + ] + }, + "endpoints": [ + { + "interface": "HTTP", + "protocolInformation": { + "endpointAddress": endpoint_address_, + "endpointProtocol": "AAS/IDS", + "endpointProtocolVersion": "0.1", + "subprotocol": "IDS", + "subprotocolBody": "TDB", + "subprotocolBodyEncoding": "plain" + } + } + ] + } + ) + + +def create_aas_shell_3_0(global_asset_id_, id_short_, identification_, specific_asset_id_, submodel_descriptors_): + return json.dumps({ + "description": [], + "globalAssetId": global_asset_id_, + "idShort": id_short_, + "id": identification_, + "specificAssetIds": specific_asset_id_, + "submodelDescriptors": submodel_descriptors_ + }) + + +def create_submodel_descriptor_3_0(id_short_, identification_, semantic_id_, dataplane_asset_address_, asset_id_, + endpoint_): + return json.dumps( + { + "description": [], + "idShort": id_short_, + "id": identification_, + "semanticId": { + "type": "ExternalReference", + "keys": [ + { + "type": "GlobalReference", + "value": semantic_id_ + } + ] + }, + "endpoints": [ + { + "interface": "SUBMODEL-3.0", + "protocolInformation": { + "href": dataplane_asset_address_, + "endpointProtocol": "HTTP", + "endpointProtocolVersion": ["1.1"], + "subprotocol": "DSP", + "subprotocolBody": f"id={asset_id_};dspEndpoint={endpoint_}", + "subprotocolBodyEncoding": "plain", + "securityAttributes": [ + { + "type": "NONE", + "key": "NONE", + "value": "NONE" + } + ] + } + } + ] + } + ) + + +def print_response(response_): + print(response_) + if response_.status_code > 205: + print(response_.text) + if response_.status_code in [404, 401] or response_.status_code >= 500: + raise Exception("Failed to call service") + + +def check_url_args(submodel_server_upload_urls_, submodel_server_urls_, edc_upload_urls_, edc_urls_, dataplane_urls_): + nr_of_submodel_server_upload_urls = len(submodel_server_upload_urls_) + nr_of_submodel_server_urls = len(submodel_server_urls_) + if nr_of_submodel_server_upload_urls != nr_of_submodel_server_urls: + raise ArgumentException( + f"Number and order of submodelserver upload URLs '{submodel_server_upload_urls_}' " + f"has to match number and order Number and order of submodelserver URLs '{submodel_server_urls_}'") + nr_of_edc_upload_urls = len(edc_upload_urls_) + nr_of_edc_urls = len(edc_urls_) + if nr_of_edc_upload_urls != nr_of_edc_urls: + raise ArgumentException( + f"Number and order of edc upload URLs '{edc_upload_urls_}' has to match number and order of edc URLs " + f"'{edc_urls_}'") + if nr_of_submodel_server_urls != nr_of_edc_urls: + raise ArgumentException( + f"Number and order of edc URLs '{edc_urls_}' has to match number and order of submodelserver URLS " + f"'{submodel_server_urls_}'") + nr_of_dataplane_urls = len(dataplane_urls_) + if nr_of_dataplane_urls != nr_of_edc_urls: + raise ArgumentException( + f"Number and order of edc controlplane URLs '{edc_urls_}' has to match number and order of edc dataplane " + f"URLS'{submodel_server_urls_}'") + + +class ArgumentException(Exception): + def __init__(self, *args, **kwargs): # real signature unknown + pass + + @staticmethod # known case of __new__ + def __new__(*args, **kwargs): # real signature unknown + """ Create and return a new object. See help(type) for accurate signature. """ + pass + + +def create_policy(policy_, edc_upload_url_, edc_policy_path_, headers_, session_): + url_ = edc_upload_url_ + edc_policy_path_ + print(f"Create policy {policy_['@id']} on EDC {url_}") + response_ = session_.request(method="GET", url=f"{url_}/{policy_['@id']}", headers=headers_) + if response_.status_code == 200 and response_.json(): + print(f"Policy {policy_['@id']} already exists. Skipping creation.") + else: + response_ = session_.request(method="POST", url=url_, headers=headers_, data=json.dumps(policy_)) + print(response_) + if response_.status_code > 205: + print(response_.text) + else: + print(f"Successfully created policy {response_.json()['@id']}.") + + +def create_registry_asset(edc_upload_urls_, edc_asset_path_, edc_contract_definition_path_, catalog_path_, header_, + session_, edc_urls_, policy_, registry_asset_id_, aas_url_): + for edc_upload_url_ in edc_upload_urls_: + index = edc_upload_urls_.index(edc_upload_url_) + edc_url_ = edc_urls_[index] + print(edc_url_) + print(edc_upload_url_) + + catalog_url_ = edc_upload_url_ + catalog_path_ + payload_ = { + "@context": edc_context(), + "edc:protocol": "dataspace-protocol-http", + "edc:providerUrl": f"{edc_url_}/api/v1/dsp", + "edc:querySpec": { + "edc:filterExpression": { + "@type": "edc:Criterion", + "edc:operandLeft": "https://w3id.org/edc/v0.0.1/ns/type", + "edc:operator": "=", + "edc:operandRight": "data.core.digitalTwinRegistry" + } + } + } + print(f"Query Catalog for registry asset {catalog_url_}") + response_ = session_.request(method="POST", url=catalog_url_, headers=header_, data=json.dumps(payload_)) + + asset_url_ = edc_upload_url_ + edc_asset_path_ + print(response_.status_code) + catalog_response_ = response_.json() + if response_.status_code == 200 and len(catalog_response_['dcat:dataset']) >= 1: + first_offer_ = catalog_response_['dcat:dataset'] + print( + f"Offer with type {first_offer_['edc:type']} already exists. Skipping creation.") + else: + payload_ = create_edc_registry_asset_payload(aas_url_, registry_asset_id_) + response_ = session_.request(method="POST", url=asset_url_, + headers=header_, + data=payload_) + print(response_) + if response_.status_code > 205: + print(response_.text) + else: + print(f"Successfully created registry asset {response_.json()['@id']}.") + + print("Create registry edc contract definition") + payload_ = create_edc_contract_definition_payload(policy_, registry_asset_id_) + response_ = session_.request(method="POST", url=edc_upload_url_ + edc_contract_definition_path_, + headers=header_, + data=payload_) + print_response(response_) + + +def edc_context(): + return { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dcat": "https://www.w3.org/ns/dcat/", + "dspace": "https://w3id.org/dspace/v0.8/"} + + +def create_notification_assets(edc_upload_urls_, edc_asset_path_, edc_contract_definition_path_, edc_catalog_path_, + edc_public_path_, header_, session_, edc_urls_, policy_, ess_base_url_): + for edc_upload_url_ in edc_upload_urls_: + index = edc_upload_urls_.index(edc_upload_url_) + edc_url_ = edc_urls_[index] + edc_public_path_ + print(edc_url_) + print(edc_upload_url_) + + notifications_ = [ + { + "id": "ess-response-asset", + "type": "ess-supplier-response", + "path": "/ess/notification/receive" + }, + { + "id": "notify-request-asset", + "type": "ess-supplier-request", + "path": "/ess/mock/notification/receive" + }, + { + "id": "notify-request-asset-recursive", + "type": "ess-supplier-request", + "path": "/ess/notification/receive-recursive" + } + ] + + for notification_ in notifications_: + notification_id = notification_['id'] + notification_type = notification_['type'] + ess_url = f"{ess_base_url_}{notification_['path']}" + response_ = search_for_asset_in_catalog(edc_catalog_path_, edc_upload_url_, edc_url_, header_, session_, + notification_id) + asset_url_ = edc_upload_url_ + edc_asset_path_ + print(response_.status_code) + catalog_response_ = response_.json() + if response_.status_code == 200 and len(catalog_response_['dcat:dataset']) >= 1: + print( + f"Offer with id {notification_id} already exists. Skipping creation.") + else: + payload_ = create_edc_notification_asset_payload(ess_url, notification_id, notification_type) + response_ = session_.request(method="POST", url=asset_url_, headers=header_, data=payload_) + print(response_) + if response_.status_code > 205: + print(response_.text) + else: + print(f"Successfully created notification asset {response_.json()['@id']}.") + + print("Create registry edc contract definition") + payload_ = create_edc_contract_definition_payload(policy_, notification_id) + response_ = session_.request(method="POST", url=edc_upload_url_ + edc_contract_definition_path_, + headers=header_, + data=payload_) + print_response(response_) + + +def search_for_asset_in_catalog(edc_catalog_path_, edc_upload_url_, edc_url_, headers_, session_, asset_id_): + catalog_url_ = edc_upload_url_ + edc_catalog_path_ + payload_ = { + "@context": edc_context(), + "edc:protocol": "dataspace-protocol-http", + "edc:providerUrl": f"{edc_url_}", + "edc:querySpec": { + "edc:filterExpression": { + "@type": "edc:Criterion", + "edc:operandLeft": "https://w3id.org/edc/v0.0.1/ns/id", + "edc:operator": "=", + "edc:operandRight": f"{asset_id_}" + } + } + } + print(f"Query Catalog for notification assets {catalog_url_}") + return session_.request(method="POST", url=catalog_url_, headers=headers_, data=json.dumps(payload_)) + + +if __name__ == "__main__": + timestamp_start = time.time() + parser = argparse.ArgumentParser(description="Script to upload testdata into CX-Network.", + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser.add_argument("-f", "--file", type=str, help="Test data file location", required=True) + parser.add_argument("-s", "--submodel", type=str, nargs="*", help="Submodel server display URLs", required=True) + parser.add_argument("-su", "--submodelupload", type=str, nargs="*", help="Submodel server upload URLs", + required=False) + parser.add_argument("-a", "--aas", type=str, help="aas url", required=True) + parser.add_argument("-au", "--aasupload", type=str, help="aas url", required=False) + parser.add_argument("-edc", "--edc", type=str, nargs="*", help="EDC provider control plane display URLs", + required=True) + parser.add_argument("-eu", "--edcupload", type=str, nargs="*", help="EDC provider control plane upload URLs", + required=False) + parser.add_argument("-k", "--apikey", type=str, help="EDC provider api key", required=True) + parser.add_argument("-e", "--esr", type=str, help="ESR URL", required=False) + parser.add_argument("--ess", help="Enable ESS data creation with invalid EDC URL", action='store_true', + required=False) + parser.add_argument("--bpn", help="Faulty BPN which will create a non existing EDC endpoint", required=False) + parser.add_argument("-p", "--policy", help="Default Policy which should be used for EDC contract definitions", + required=False) + parser.add_argument("-bpns", "--bpns", type=str, nargs="*", help="Filter upload to upload only specific BPNs", + required=False) + parser.add_argument("--aas3", help="Create AAS assets in version 3.0", action='store_true', required=False) + parser.add_argument("-d", "--dataplane", type=str, nargs="*", help="EDC provider data plane display URLs", + required=False) + parser.add_argument("--allowedBPNs", type=str, nargs="*", + help="The allowed BPNs for digital twin registration in the registry.", required=False) + parser.add_argument("--essURL", type=str, help="The base URL of the ESS Service API", required=False) + + args = parser.parse_args() + config = vars(args) + + filepath = config.get("file") + submodel_server_urls = config.get("submodel") + submodel_server_upload_urls = config.get("submodelupload") + aas_url = config.get("aas") + aas_upload_url = config.get("aasupload") + edc_urls = config.get("edc") + edc_upload_urls = config.get("edcupload") + edc_api_key = config.get("apikey") + esr_url = config.get("esr") + is_ess = config.get("ess") + ess_base_url = config.get("essURL") + bpnl_fail = config.get("bpn") + default_policy = config.get("policy") + bpns_list = config.get("bpns") + is_aas3 = config.get("aas3") + dataplane_urls = config.get("dataplane") + allowedBPNs = config.get("allowedBPNs") + + if is_aas3 and dataplane_urls is None: + raise ArgumentException("Dataplane URLs have to be specified with -d or --dataplane if --aas flag is set!") + if is_ess and ess_base_url is None: + raise ArgumentException("ESS base URL has to be specified with --essURL if --ess flag is set!") + + if submodel_server_upload_urls is None: + submodel_server_upload_urls = submodel_server_urls + if edc_upload_urls is None: + edc_upload_urls = edc_urls + + if default_policy is None: + default_policy = "default-policy" + + if aas_upload_url is None: + aas_upload_url = aas_url + + if allowedBPNs is None: + allowedBPNs = [] + + registry_path = "/registry/shell-descriptors" + if is_aas3: + registry_path = "/shell-descriptors" + + check_url_args(submodel_server_upload_urls, submodel_server_urls, edc_upload_urls, edc_urls, dataplane_urls) + + edc_asset_path = "/management/v2/assets" + edc_policy_path = "/management/v2/policydefinitions" + edc_contract_definition_path = "/management/v2/contractdefinitions" + edc_catalog_path = "/management/v2/catalog/request" + dataplane_public_path = "/api/public" + controlplane_public_path = "/api/v1/dsp" + + registry_asset_id = "registry-asset" + + headers = { + 'Content-Type': 'application/json' + } + + headers_with_api_key = { + 'X-Api-Key': edc_api_key, + 'Content-Type': 'application/json' + } + + default_policy_definition = { + "default": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@type": "PolicyDefinitionRequestDto", + "@id": "default-policy", + "policy": { + "@type": "Policy", + "odrl:permission": [] + } + } + } + + # Opening JSON file + f = open(filepath) + data = json.load(f) + f.close() + testdata = data["https://catenax.io/schema/TestDataContainer/1.0.0"] + policies = default_policy_definition + if "policies" in data.keys(): + policies.update(data["policies"]) + + contract_number = 1 + + retries = Retry(total=5, + backoff_factor=0.1) + session = requests.Session() + session.mount('https://', HTTPAdapter(max_retries=retries)) + session.verify = False + + if policies: + for policy in policies.keys(): + for url in edc_upload_urls: + create_policy(policies[policy], url, edc_policy_path, headers_with_api_key, session) + + create_registry_asset(edc_upload_urls, edc_asset_path, edc_contract_definition_path, edc_catalog_path, + headers_with_api_key, session, edc_urls, default_policy, registry_asset_id, aas_url) + + if is_ess: + create_notification_assets(edc_upload_urls, edc_asset_path, edc_contract_definition_path, edc_catalog_path, + controlplane_public_path, headers_with_api_key, session, edc_urls, default_policy, + ess_base_url) + + edc_asset_ids = [] + for url in dataplane_urls: + edc_asset_ids.append(uuid.uuid4().urn) + print(edc_asset_ids) + + esr = "urn:bamm:io.catenax.esr_certificates.esr_certificate_state_statistic:1.0.1#EsrCertificateStateStatistic" + apr = "urn:bamm:io.catenax.single_level_bom_as_built:1.0.0#SingleLevelBomAsBuilt" + for tmp_data in testdata: + if bpns_list is None or tmp_data["bpnl"] in bpns_list or not bpns_list: + catenax_id = tmp_data["catenaXId"] + identification = uuid.uuid4().urn + tmp_keys = tmp_data.keys() + + specific_asset_ids = [] + + submodel_descriptors = [] + + name_at_manufacturer = "" + specific_asset_ids_temp = [] + for tmp_key in tmp_keys: + if "Batch" in tmp_key or "SerialPart" in tmp_key: + specific_asset_ids_temp = copy(tmp_data[tmp_key][0]["localIdentifiers"]) + name_at_manufacturer = tmp_data[tmp_key][0]["partTypeInformation"]["nameAtManufacturer"].replace( + " ", + "") + if "PartAsPlanned" in tmp_key: + name_at_manufacturer = tmp_data[tmp_key][0]["partTypeInformation"]["nameAtManufacturer"].replace( + " ", + "") + specific_asset_ids_temp.append({ + "value": tmp_data[tmp_key][0]["partTypeInformation"]["manufacturerPartId"], + "key": "manufacturerPartId" + }) + print(name_at_manufacturer) + + manufacturerId = { + "key": "manufacturerId", + "value": tmp_data["bpnl"] + } + if manufacturerId not in specific_asset_ids_temp: + specific_asset_ids_temp.append(manufacturerId) + if is_aas3: + keys = [{ + "type": "GlobalReference", + "value": "PUBLIC_READABLE" + }] + for bpn in allowedBPNs: + keys.append({ + "type": "GlobalReference", + "value": bpn + }) + externalSubjectId = { + "type": "ExternalReference", + "keys": keys + } + for asset in specific_asset_ids_temp: + specific_asset_ids.append({ + "name": asset.get("key"), + "value": asset.get("value"), + "externalSubjectId": externalSubjectId + }) + else: + specific_asset_ids = specific_asset_ids_temp + + if esr_url and apr in tmp_keys and "childItems" in tmp_data[apr][0] and tmp_data[apr][0]["childItems"]: + tmp_data.update({esr: ""}) + + policy_id = default_policy + if "policy" in tmp_keys: + policy_id = tmp_data["policy"] + print(f"Policy: {policy_id}") + + for tmp_key in tmp_keys: + if "PlainObject" not in tmp_key and "catenaXId" not in tmp_key and "bpn" not in tmp_key \ + and "policy" not in tmp_key and "urn:bamm:io.catenax.aas:1.0.0#AAS" not in tmp_key: + # Prepare submodel endpoint address + submodel_url = submodel_server_urls[contract_number % len(submodel_server_urls)] + submodel_upload_url = submodel_server_upload_urls[ + contract_number % len(submodel_server_upload_urls)] + edc_url = edc_urls[contract_number % len(edc_urls)] + edc_upload_url = edc_upload_urls[contract_number % len(edc_upload_urls)] + dataplane_url = dataplane_urls[contract_number % len(dataplane_urls)] + edc_asset_id = edc_asset_ids[contract_number % len(edc_asset_ids)] + + submodel_name = tmp_key[tmp_key.index("#") + 1: len(tmp_key)] + submodel_identification = uuid.uuid4().urn + semantic_id = tmp_key + if is_ess and tmp_data["bpnl"] in bpnl_fail: + endpoint_address = f"http://idonotexist/{catenax_id}-{submodel_identification}/submodel?content=value&extent=withBlobValue" + elif submodel_name == "EsrCertificateStateStatistic" and esr_url is not None: + endpoint_address = f"{esr_url}/{catenax_id}/asBuilt/ISO14001/submodel" + else: + endpoint_address = f"{edc_url}/{catenax_id}-{submodel_identification}/submodel?content=value&extent=withBlobValue" + + if is_aas3: + endpoint_address = f"{dataplane_url}{dataplane_public_path}/data/{submodel_identification}" + if is_ess and tmp_data["bpnl"] in bpnl_fail: + endpoint_address = f"http://idonotexist/{dataplane_public_path}/data/{submodel_identification}" + descriptor = create_submodel_descriptor_3_0(submodel_name, submodel_identification, semantic_id, + endpoint_address, + edc_asset_id, + edc_url) + submodel_descriptors.append(json.loads(descriptor)) + else: + descriptor = create_submodel_descriptor(submodel_name, submodel_identification, semantic_id, + endpoint_address) + submodel_descriptors.append(json.loads(descriptor)) + + if is_aas3: + asset_prop_id = edc_asset_id + else: + asset_prop_id = f"{catenax_id}-{submodel_identification}" + + print("Create submodel on submodel server") + if tmp_data[tmp_key] != "": + payload = create_submodel_payload(tmp_data[tmp_key][0]) + response = session.request(method="POST", + url=f"{submodel_upload_url}/data/{submodel_identification}", + headers=headers, data=payload) + print_response(response) + + asset_path = edc_upload_url + edc_asset_path + print(f"Create edc asset on EDC {asset_path}") + if submodel_name == "EsrCertificateStateStatistic" and esr_url is not None: + payload = create_esr_edc_asset_payload(esr_url, asset_prop_id, catenax_id) + else: + payload = create_edc_asset_payload(submodel_url, asset_prop_id) + response = session.request(method="POST", url=asset_path, headers=headers_with_api_key, + data=payload) + print_response(response) + if response.status_code > 205: + print("Asset creation failed. Skipping creation of contract definition.") + else: + print("Create edc contract definition") + payload = create_edc_contract_definition_payload(policy_id, asset_prop_id) + response = session.request(method="POST", url=edc_upload_url + edc_contract_definition_path, + headers=headers_with_api_key, + data=payload) + print_response(response) + contract_number = contract_number + 1 + + if submodel_descriptors: + print("Create aas shell") + if is_aas3: + payload = create_aas_shell_3_0(catenax_id, name_at_manufacturer, identification, specific_asset_ids, + submodel_descriptors) + else: + payload = create_aas_shell(catenax_id, name_at_manufacturer, identification, specific_asset_ids, + submodel_descriptors) + response = session.request(method="POST", url=f"{aas_upload_url}{registry_path}", + headers=headers, + data=payload) + print_response(response) + + timestamp_end = time.time() + duration = timestamp_end - timestamp_start + print(f"Test data upload completed in {math.ceil(duration)} Seconds") diff --git a/charts/tx-data-provider/resources/upload-data.sh b/charts/tx-data-provider/resources/upload-data.sh new file mode 100644 index 00000000..3d82e302 --- /dev/null +++ b/charts/tx-data-provider/resources/upload-data.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# + +SUBMODELURL=$1 +REGISTRYURL=$2 +CONTROLPLANEURL=$3 +DATAPLANEURL=$4 +EDCKEY=$5 +ALLOWEDBPNS=$6 + +echo "Submodel: $SUBMODELURL" +echo "Registry: $REGISTRYURL" +echo "Controlplane: $CONTROLPLANEURL" +echo "Dataplane: $DATAPLANEURL" +echo "EDC Key: $EDCKEY" +echo "Allowed BPNs: $ALLOWEDBPNS" + +pip install -r /opt/scripts/requirements.txt +python /opt/scripts/upload.py -f /opt/scripts/testdata.json -s "$SUBMODELURL" -a "$REGISTRYURL" -edc "$CONTROLPLANEURL" -d "$DATAPLANEURL" -k "$EDCKEY" -p id-3.0-trace --allowedBPNs "$ALLOWEDBPNS" --aas3 \ No newline at end of file diff --git a/charts/tx-data-provider/templates/_helpers.tpl b/charts/tx-data-provider/templates/_helpers.tpl new file mode 100644 index 00000000..cb56926e --- /dev/null +++ b/charts/tx-data-provider/templates/_helpers.tpl @@ -0,0 +1,85 @@ +{{/* +******************************************************************************* + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,2024 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 + ******************************************************************************* + */}} +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "dataprovider.fullname" -}} + {{- if .Values.fullnameOverride }} + {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} + {{- else }} + {{- $name := default .Chart.Name .Values.nameOverride }} + {{- if contains $name .Release.Name }} + {{- .Release.Name | trunc 63 | trimSuffix "-" }} + {{- else }} + {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} + {{- end }} + {{- end }} +{{- end }} + +{{/* +Submodel URL helpers +*/}} +{{- define "submodelservers.host" -}} + {{- if .Values.submodelservers.ingress.enabled }} + {{- with (first .Values.submodelservers.ingress.hosts) }} + {{- printf "https://%s" .host }} + {{- end }} + {{- else }} + {{- print "http://test" }} + {{- end }} +{{- end }} + +{{/* +Registry URL helpers +*/}} +{{- define "registry.host" -}} + {{- printf "https://%s" (index .Values "digital-twin-registry" "registry" "host") }} +{{- end }} +{{- define "registry.path" -}} + {{- index .Values "digital-twin-registry" "registry" "ingress" "urlPrefix" }} +{{- end }} +{{- define "registry.url" -}} + {{- printf "%s%s%s" (include "registry.host" .) (include "registry.path" .) "/api/v3.0" }} +{{- end }} + +{{/* +EDC URL helpers +*/}} +{{- define "edc.controlplane.host" -}} + {{- with (first (index .Values "tractusx-connector" "controlplane" "ingresses")) }} + {{- printf "https://%s" .hostname }} + {{- end }} +{{- end }} +{{- define "edc.dataplane.host" -}} + {{- with (first (index .Values "tractusx-connector" "dataplane" "ingresses")) }} + {{- printf "https://%s" .hostname }} + {{- end }} +{{- end }} +{{- define "edc.key" -}} + {{- index .Values "tractusx-connector" "controlplane" "endpoints" "management" "authKey" }} +{{- end }} +{{- define "edc.bpn" -}} + {{- index .Values "tractusx-connector" "participant" "id" }} +{{- end }} + diff --git a/charts/tx-data-provider/templates/post-install-configmap.yaml b/charts/tx-data-provider/templates/post-install-configmap.yaml new file mode 100644 index 00000000..01664dfb --- /dev/null +++ b/charts/tx-data-provider/templates/post-install-configmap.yaml @@ -0,0 +1,34 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# +--- +{{- $fullName := include "dataprovider.fullname" . -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ $fullName }}-postinstall-configmap +data: + requirements.txt: |- +{{ .Files.Get "resources/requirements.txt" | indent 4}} + upload.py: |- +{{ .Files.Get "resources/transform-and-upload.py" | indent 4}} + testdata.json: |- +{{ .Files.Get "resources/Testdata_AsBuilt-combustion.json" | indent 4}} + upload-data.sh: |- +{{ .Files.Get "resources/upload-data.sh" | indent 4}} \ No newline at end of file diff --git a/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml b/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml new file mode 100644 index 00000000..d1469982 --- /dev/null +++ b/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml @@ -0,0 +1,70 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# +--- +{{- $fullName := include "dataprovider.fullname" . -}} +{{- if .Values.seedTestdata }} +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ $fullName }}-post-install-testdata + labels: + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + annotations: + # This is what defines this resource as a hook. Without this line, the + # job is considered part of the release. + "helm.sh/hook": post-install + "helm.sh/hook-weight": "-4" + "helm.sh/hook-delete-policy": before-hook-creation #,hook-succeeded +spec: + template: + metadata: + name: "{{ $fullName }}" + labels: + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io/instance: {{ .Release.Name | quote }} + helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + spec: + restartPolicy: Never + containers: + - name: post-install-job + image: "python:3.11" + command: + - "/bin/sh" + - "-c" + args: + - "{{- cat "/opt/scripts/upload-data.sh" (include "submodelservers.host" .) (include "registry.url" .) (include "edc.controlplane.host" .) (include "edc.dataplane.host" .) (include "edc.key" .) (include "edc.bpn" .) }}" + volumeMounts: + - name: config-volume + mountPath: /opt/scripts + volumes: + - name: config-volume + {{- if .Values.testdataConfigMap }} + configMap: + name: {{ .Values.testdataConfigMap }} + defaultMode: 0777 + {{- else }} + configMap: + name: {{ $fullName }}-postinstall-configmap + defaultMode: 0777 + {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/tx-data-provider/values.yaml b/charts/tx-data-provider/values.yaml new file mode 100644 index 00000000..819e8cb1 --- /dev/null +++ b/charts/tx-data-provider/values.yaml @@ -0,0 +1,176 @@ +# ############################################################################# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 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 +# ############################################################################# + +configuration: + postgresuser: &postgresuser testuser + postgrespass: &postgrespass testpass + edcKey: &edcKey TEST + +nameOverride: "" +fullnameOverride: "" +seedTestdata: true # Toggle seeding of testdata. Can be disabled when e.g. only edc is used as consumer. Default true. +testdataConfigMap: "" # Provide a custom configmap for post-install-job-upload-testdata.yaml. + +tractusx-connector: + enabled: true + install: + postgresql: false + vault: false + participant: + id: + controlplane: + ssi: + miw: + url: + authorityId: + oauth: + tokenurl: + client: + id: + secretAlias: + ingresses: + - enabled: true + hostname: "controlplane.test" + annotations: + nginx.ingress.kubernetes.io/ssl-passthrough: "false" + nginx.ingress.kubernetes.io/backend-protocol: "HTTP" + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + endpoints: + - protocol + - management + tls: + enabled: true + secretName: tls-secret + endpoints: + management: + authKey: *edcKey + securityContext: + readOnlyRootFilesystem: false + + dataplane: + ingresses: + - enabled: true + hostname: "dataplane.test" + annotations: + nginx.ingress.kubernetes.io/ssl-passthrough: "false" + nginx.ingress.kubernetes.io/backend-protocol: "HTTP" + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + endpoints: + - public + className: "nginx" + tls: + enabled: true + secretName: tls-secret + + backendService: + httpProxyTokenReceiverUrl: "https://submodelserver.test/data/endpoint-data-reference-provider1" + vault: + hashicorp: + url: + token: + paths: + secret: + health: + secretNames: + transferProxyTokenSignerPrivateKey: + transferProxyTokenSignerPublicKey: + transferProxyTokenEncryptionAesKey: + + postgresql: + enabled: true + auth: + database: "edc" + username: *postgresuser + password: *postgrespass + username: *postgresuser + password: *postgrespass + jdbcUrl: "jdbc:postgresql://edc-postgresql:5432/edc" + +postgresql: + fullnameOverride: edc-postgresql + nameOverride: edc-postgresql + enabled: true + primary: + persistence: + enabled: false + size: 1Gi + readReplicas: + persistence: + enabled: false + auth: + database: edc + username: *postgresuser + postgresPassword: *postgrespass + password: *postgrespass + +digital-twin-registry: + enabled: true + enableKeycloak: false + + postgresql: + auth: + existingSecret: registry-db-postresinit + primary: + persistence: + enabled: false + size: 1Gi + + registry: + host: digital-twin-registry.test + ingress: + enabled: true + urlPrefix: /semantics/registry + className: nginx + tls: true + annotations: + cert-manager.io/cluster-issuer: selfsigned-cluster-issuer + nginx.ingress.kubernetes.io/rewrite-target: /$2 + nginx.ingress.kubernetes.io/use-regex: "true" + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/cors-allow-credentials: "true" + nginx.ingress.kubernetes.io/x-forwarded-prefix: /semantics/registry + authentication: false + livenessProbe: + failureThreshold: 6 + initialDelaySeconds: 200 + periodSeconds: 10 + readinessProbe: + failureThreshold: 6 + initialDelaySeconds: 200 + periodSeconds: 10 + +submodelservers: + enabled: true + ingress: + enabled: true + className: "nginx" + annotations: + nginx.ingress.kubernetes.io/ssl-passthrough: "false" + nginx.ingress.kubernetes.io/backend-protocol: "HTTP" + nginx.ingress.kubernetes.io/force-ssl-redirect: "false" + hosts: + - host: submodelserver.test + paths: + - path: / + pathType: ImplementationSpecific + tls: + - hosts: + - submodelserver.test + secretName: tls-secret From d76b25a003592cc3a62ebf3a4088075c00ec3b17 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Wed, 28 Feb 2024 15:56:30 +0100 Subject: [PATCH 03/32] chore: add tx-data-provider as provider and consumer to umbrella chart --- charts/umbrella/Chart.yaml | 12 +++ charts/umbrella/values.yaml | 188 ++++++++++++++++++++++++++++++++++++ 2 files changed, 200 insertions(+) diff --git a/charts/umbrella/Chart.yaml b/charts/umbrella/Chart.yaml index f267dd0c..a4d6902a 100644 --- a/charts/umbrella/Chart.yaml +++ b/charts/umbrella/Chart.yaml @@ -66,3 +66,15 @@ dependencies: name: bpndiscovery repository: https://eclipse-tractusx.github.io/charts/dev version: 0.2.2 + # TX Data Consumer + - name: tx-data-provider + alias: dataconsumer + version: 0.0.1 + repository: file://../tx-data-provider # TODO switch to released chart + condition: dataconsumer.enabled + # TX Data Providers + - name: tx-data-provider + alias: dataprovider + version: 0.0.1 + repository: file://../tx-data-provider # TODO switch to released chart + condition: dataprovider.enabled diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index 618adbc7..54677f55 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -186,3 +186,191 @@ discoveryfinder: initialDelaySeconds: 200 postgresql: nameOverride: "discoveryfinder-postgresql" + +dataconsumer: + enabled: true + seedTestdata: false + fullnameOverride: dataconsumer + nameOverride: dataconsumer + tractusx-connector: + fullnameOverride: dataconsumer-edc + nameOverride: dataconsumer-edc + participant: + id: + controlplane: + ssi: # TODO configure MIW once available + miw: + url: + authorityId: + oauth: + tokenurl: + client: + id: + secretAlias: + endpoints: + management: + authKey: TEST1 + ingresses: + - enabled: true + hostname: "dataconsumer-controlplane.test" + annotations: + nginx.ingress.kubernetes.io/ssl-passthrough: "false" + nginx.ingress.kubernetes.io/backend-protocol: "HTTP" + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + endpoints: + - protocol + - management + tls: + enabled: true + secretName: tls-secret + dataplane: + ingresses: + - enabled: true + hostname: "dataconsumer-dataplane.test" + annotations: + nginx.ingress.kubernetes.io/ssl-passthrough: "false" + nginx.ingress.kubernetes.io/backend-protocol: "HTTP" + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + endpoints: + - public + className: "nginx" + tls: + enabled: true + secretName: tls-secret + postgresql: + jdbcUrl: "jdbc:postgresql://dataconsumer-db:5432/edc" + vault: # TODO configure Vault once available + hashicorp: + url: + token: + paths: + secret: + health: + secretNames: + transferProxyTokenSignerPrivateKey: + transferProxyTokenSignerPublicKey: + transferProxyTokenEncryptionAesKey: + + postgresql: + fullnameOverride: dataconsumer-db + nameOverride: dataconsumer-db + + digital-twin-registry: + enabled: false + fullnameOverride: dataconsumer-digital-twin-registry + nameOverride: dataconsumer-digital-twin-registry + postgresql: + fullnameOverride: dataconsumer-digital-twin-registry-db + nameOverride: dataconsumer-digital-twin-registry-db + auth: + existingSecret: dataconsumer-secret-dtr-postgres-init + registry: + host: dataconsumer-digital-twin-registry.test + + submodelservers: + enabled: false + fullnameOverride: dataconsumer-submodelserver + nameOverride: dataconsumer-submodelserver + ingress: + enabled: true + hosts: + - host: dataconsumer-submodelserver.test + paths: + - path: / + pathType: ImplementationSpecific + tls: + - hosts: + - dataconsumer-submodelserver.test + secretName: tls-secret + +dataprovider: + enabled: true + fullnameOverride: dataprovider + nameOverride: dataprovider + tractusx-connector: + fullnameOverride: dataprovider-edc + nameOverride: dataprovider-edc + participant: + id: + controlplane: + ssi: # TODO configure MIW once available + miw: + url: + authorityId: + oauth: + tokenurl: + client: + id: + secretAlias: + endpoints: + management: + authKey: TEST2 + ingresses: + - enabled: true + hostname: "dataprovider-controlplane.test" + annotations: + nginx.ingress.kubernetes.io/ssl-passthrough: "false" + nginx.ingress.kubernetes.io/backend-protocol: "HTTP" + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + endpoints: + - protocol + - management + tls: + enabled: true + secretName: tls-secret + dataplane: + ingresses: + - enabled: true + hostname: "dataprovider-dataplane.test" + annotations: + nginx.ingress.kubernetes.io/ssl-passthrough: "false" + nginx.ingress.kubernetes.io/backend-protocol: "HTTP" + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + endpoints: + - public + className: "nginx" + tls: + enabled: true + secretName: tls-secret + postgresql: + jdbcUrl: "jdbc:postgresql://dataprovider-db:5432/edc" + vault: # TODO configure Vault once available + hashicorp: + url: + token: + paths: + secret: + health: + secretNames: + transferProxyTokenSignerPrivateKey: + transferProxyTokenSignerPublicKey: + transferProxyTokenEncryptionAesKey: + postgresql: + fullnameOverride: dataprovider-db + nameOverride: dataprovider-db + + digital-twin-registry: + fullnameOverride: dataprovider-digital-twin-registry + nameOverride: dataprovider-digital-twin-registry + postgresql: + fullnameOverride: dataprovider-digital-twin-registry-db + nameOverride: dataprovider-digital-twin-registry-db + auth: + existingSecret: dataprovider-secret-dtr-postgres-init + registry: + host: dataprovider-digital-twin-registry.test + + submodelservers: + fullnameOverride: dataprovider-submodelserver + nameOverride: dataprovider-submodelserver + ingress: + enabled: true + hosts: + - host: dataprovider-submodelserver.test + paths: + - path: / + pathType: ImplementationSpecific + tls: + - hosts: + - dataprovider-submodelserver.test + secretName: tls-secret From 42279c5c61b91e338b7819258bbef0fc3f185379 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Wed, 28 Feb 2024 16:09:29 +0100 Subject: [PATCH 04/32] chore: fix issues with chart linting --- charts/tx-data-provider/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/tx-data-provider/Chart.yaml b/charts/tx-data-provider/Chart.yaml index dd5f25a5..ad2e59ba 100644 --- a/charts/tx-data-provider/Chart.yaml +++ b/charts/tx-data-provider/Chart.yaml @@ -32,7 +32,7 @@ dependencies: repository: https://eclipse-tractusx.github.io/charts/dev condition: digital-twin-registry.enabled - name: submodelservers - repository: file://../submodelservers # TODO switch to released chart + repository: file://../submodelservers # TODO switch to released chart version: 0.1.0 condition: submodelservers.enabled - name: tractusx-connector From ea0f4a8ae6a184aaf53e41664d3986c49285c16a Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Wed, 28 Feb 2024 16:09:48 +0100 Subject: [PATCH 05/32] chore: update umbrella chart version --- charts/umbrella/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/umbrella/Chart.yaml b/charts/umbrella/Chart.yaml index a4d6902a..f90ce9e9 100644 --- a/charts/umbrella/Chart.yaml +++ b/charts/umbrella/Chart.yaml @@ -28,7 +28,7 @@ sources: - https://github.com/eclipse-tractusx/e2e-testing type: application -version: 0.4.0 +version: 0.5.0 dependencies: # # TODO: update edc components to R23.12 From 0226a097f3afbf12df111e1c2a23df4754081426 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Wed, 28 Feb 2024 17:30:25 +0100 Subject: [PATCH 06/32] chore: fix issues with chart linting --- charts/umbrella/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/umbrella/Chart.yaml b/charts/umbrella/Chart.yaml index f90ce9e9..8c2d446a 100644 --- a/charts/umbrella/Chart.yaml +++ b/charts/umbrella/Chart.yaml @@ -70,11 +70,11 @@ dependencies: - name: tx-data-provider alias: dataconsumer version: 0.0.1 - repository: file://../tx-data-provider # TODO switch to released chart + repository: file://../tx-data-provider # TODO switch to released chart condition: dataconsumer.enabled # TX Data Providers - name: tx-data-provider alias: dataprovider version: 0.0.1 - repository: file://../tx-data-provider # TODO switch to released chart + repository: file://../tx-data-provider # TODO switch to released chart condition: dataprovider.enabled From 7274844d86995152d7c1a60dddf3b7fde3c86eaa Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 29 Feb 2024 09:01:10 +0100 Subject: [PATCH 07/32] chore: fix issues with chart linting --- charts/umbrella/values.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index 54677f55..0971207a 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -198,7 +198,7 @@ dataconsumer: participant: id: controlplane: - ssi: # TODO configure MIW once available + ssi: # TODO configure MIW once available miw: url: authorityId: @@ -239,7 +239,7 @@ dataconsumer: secretName: tls-secret postgresql: jdbcUrl: "jdbc:postgresql://dataconsumer-db:5432/edc" - vault: # TODO configure Vault once available + vault: # TODO configure Vault once available hashicorp: url: token: @@ -293,7 +293,7 @@ dataprovider: participant: id: controlplane: - ssi: # TODO configure MIW once available + ssi: # TODO configure MIW once available miw: url: authorityId: @@ -334,7 +334,7 @@ dataprovider: secretName: tls-secret postgresql: jdbcUrl: "jdbc:postgresql://dataprovider-db:5432/edc" - vault: # TODO configure Vault once available + vault: # TODO configure Vault once available hashicorp: url: token: From abb3f056480fb5272de7d2cb9f1e2572fe05bc6a Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 29 Feb 2024 14:50:57 +0100 Subject: [PATCH 08/32] chore: fix issues with chart linting --- charts/submodelservers/templates/ingress.yaml | 1 - .../templates/serviceaccount.yaml | 1 - charts/submodelservers/values.yaml | 16 +++++------- .../templates/post-install-configmap.yaml | 1 - charts/tx-data-provider/values.yaml | 26 +++++++++---------- charts/umbrella/values.yaml | 22 ---------------- 6 files changed, 20 insertions(+), 47 deletions(-) diff --git a/charts/submodelservers/templates/ingress.yaml b/charts/submodelservers/templates/ingress.yaml index 888f0f7d..c17cc243 100644 --- a/charts/submodelservers/templates/ingress.yaml +++ b/charts/submodelservers/templates/ingress.yaml @@ -17,7 +17,6 @@ # # SPDX-License-Identifier: Apache-2.0 # ############################################################################# ---- {{- if .Values.ingress.enabled -}} {{- $fullName := include "submodelservers.fullname" . -}} {{- $svcPort := .Values.service.port -}} diff --git a/charts/submodelservers/templates/serviceaccount.yaml b/charts/submodelservers/templates/serviceaccount.yaml index 495dbbd6..aab4d54d 100644 --- a/charts/submodelservers/templates/serviceaccount.yaml +++ b/charts/submodelservers/templates/serviceaccount.yaml @@ -17,7 +17,6 @@ # # SPDX-License-Identifier: Apache-2.0 # ############################################################################# ---- {{- if .Values.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount diff --git a/charts/submodelservers/values.yaml b/charts/submodelservers/values.yaml index 865db381..56d1c739 100644 --- a/charts/submodelservers/values.yaml +++ b/charts/submodelservers/values.yaml @@ -33,20 +33,20 @@ image: # Overrides the image tag whose default is the chart appVersion. tag: "" -imagePullSecrets: [ ] +imagePullSecrets: [] serviceAccount: # Specifies whether a service account should be created create: true # Annotations to add to the service account - annotations: { } + annotations: {} # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template name: "" -podAnnotations: { } +podAnnotations: {} -podSecurityContext: { } +podSecurityContext: {} # fsGroup: 2000 # Following Catena-X Helm Best Practices @url: https://catenax-ng.github.io/docs/kubernetes-basics/helm @@ -96,9 +96,9 @@ autoscaling: targetCPUUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80 -nodeSelector: { } +nodeSelector: {} -tolerations: [ ] +tolerations: [] # Following Catena-X Helm Best Practices @url: https://catenax-ng.github.io/docs/kubernetes-basics/helm # @url: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity @@ -130,9 +130,7 @@ readinessProbe: backend: endpoint: - default: + default: port: 8080 path: / ingress: true - - diff --git a/charts/tx-data-provider/templates/post-install-configmap.yaml b/charts/tx-data-provider/templates/post-install-configmap.yaml index 01664dfb..dcc9bbda 100644 --- a/charts/tx-data-provider/templates/post-install-configmap.yaml +++ b/charts/tx-data-provider/templates/post-install-configmap.yaml @@ -17,7 +17,6 @@ # # SPDX-License-Identifier: Apache-2.0 # ############################################################################# ---- {{- $fullName := include "dataprovider.fullname" . -}} apiVersion: v1 kind: ConfigMap diff --git a/charts/tx-data-provider/values.yaml b/charts/tx-data-provider/values.yaml index 819e8cb1..70fce022 100644 --- a/charts/tx-data-provider/values.yaml +++ b/charts/tx-data-provider/values.yaml @@ -34,17 +34,17 @@ tractusx-connector: postgresql: false vault: false participant: - id: + id: changeme controlplane: ssi: miw: - url: - authorityId: + url: changeme + authorityId: changeme oauth: - tokenurl: + tokenurl: changeme client: - id: - secretAlias: + id: changeme + secretAlias: changeme ingresses: - enabled: true hostname: "controlplane.test" @@ -83,15 +83,15 @@ tractusx-connector: httpProxyTokenReceiverUrl: "https://submodelserver.test/data/endpoint-data-reference-provider1" vault: hashicorp: - url: - token: + url: changeme + token: changeme paths: - secret: - health: + secret: changeme + health: changeme secretNames: - transferProxyTokenSignerPrivateKey: - transferProxyTokenSignerPublicKey: - transferProxyTokenEncryptionAesKey: + transferProxyTokenSignerPrivateKey: changeme + transferProxyTokenSignerPublicKey: changeme + transferProxyTokenEncryptionAesKey: changeme postgresql: enabled: true diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index 0971207a..75bef0d3 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -257,31 +257,9 @@ dataconsumer: digital-twin-registry: enabled: false - fullnameOverride: dataconsumer-digital-twin-registry - nameOverride: dataconsumer-digital-twin-registry - postgresql: - fullnameOverride: dataconsumer-digital-twin-registry-db - nameOverride: dataconsumer-digital-twin-registry-db - auth: - existingSecret: dataconsumer-secret-dtr-postgres-init - registry: - host: dataconsumer-digital-twin-registry.test submodelservers: enabled: false - fullnameOverride: dataconsumer-submodelserver - nameOverride: dataconsumer-submodelserver - ingress: - enabled: true - hosts: - - host: dataconsumer-submodelserver.test - paths: - - path: / - pathType: ImplementationSpecific - tls: - - hosts: - - dataconsumer-submodelserver.test - secretName: tls-secret dataprovider: enabled: true From dc6e36b15b7d59de8e25395d82526271c4e9c9d1 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 7 Mar 2024 09:17:10 +0100 Subject: [PATCH 09/32] chore: minor config improvements --- charts/tx-data-provider/resources/transform-and-upload.py | 4 ++-- .../tx-data-provider/templates/post-install-configmap.yaml | 5 ++++- charts/tx-data-provider/values.yaml | 3 --- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/tx-data-provider/resources/transform-and-upload.py b/charts/tx-data-provider/resources/transform-and-upload.py index 89ebbf88..fa505dae 100644 --- a/charts/tx-data-provider/resources/transform-and-upload.py +++ b/charts/tx-data-provider/resources/transform-and-upload.py @@ -655,7 +655,7 @@ def search_for_asset_in_catalog(edc_catalog_path_, edc_upload_url_, edc_url_, he endpoint_address = f"{edc_url}/{catenax_id}-{submodel_identification}/submodel?content=value&extent=withBlobValue" if is_aas3: - endpoint_address = f"{dataplane_url}{dataplane_public_path}/data/{submodel_identification}" + endpoint_address = f"{dataplane_url}{dataplane_public_path}/{submodel_identification}" if is_ess and tmp_data["bpnl"] in bpnl_fail: endpoint_address = f"http://idonotexist/{dataplane_public_path}/data/{submodel_identification}" descriptor = create_submodel_descriptor_3_0(submodel_name, submodel_identification, semantic_id, @@ -677,7 +677,7 @@ def search_for_asset_in_catalog(edc_catalog_path_, edc_upload_url_, edc_url_, he if tmp_data[tmp_key] != "": payload = create_submodel_payload(tmp_data[tmp_key][0]) response = session.request(method="POST", - url=f"{submodel_upload_url}/data/{submodel_identification}", + url=f"{submodel_upload_url}/{submodel_identification}", headers=headers, data=payload) print_response(response) diff --git a/charts/tx-data-provider/templates/post-install-configmap.yaml b/charts/tx-data-provider/templates/post-install-configmap.yaml index dcc9bbda..a476a91a 100644 --- a/charts/tx-data-provider/templates/post-install-configmap.yaml +++ b/charts/tx-data-provider/templates/post-install-configmap.yaml @@ -17,7 +17,9 @@ # # SPDX-License-Identifier: Apache-2.0 # ############################################################################# +--- {{- $fullName := include "dataprovider.fullname" . -}} +{{- if .Values.seedTestdata }} apiVersion: v1 kind: ConfigMap metadata: @@ -30,4 +32,5 @@ data: testdata.json: |- {{ .Files.Get "resources/Testdata_AsBuilt-combustion.json" | indent 4}} upload-data.sh: |- -{{ .Files.Get "resources/upload-data.sh" | indent 4}} \ No newline at end of file +{{ .Files.Get "resources/upload-data.sh" | indent 4}} +{{- end }} \ No newline at end of file diff --git a/charts/tx-data-provider/values.yaml b/charts/tx-data-provider/values.yaml index 70fce022..8eff4e6a 100644 --- a/charts/tx-data-provider/values.yaml +++ b/charts/tx-data-provider/values.yaml @@ -85,9 +85,6 @@ tractusx-connector: hashicorp: url: changeme token: changeme - paths: - secret: changeme - health: changeme secretNames: transferProxyTokenSignerPrivateKey: changeme transferProxyTokenSignerPublicKey: changeme From 4ba8cd98c0e5a236b2d1d7df35d14f19a13a233c Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 7 Mar 2024 17:19:16 +0100 Subject: [PATCH 10/32] chore: remove submodelservers and switch to simple-data-backend --- charts/submodelservers/.helmignore | 47 ------ charts/submodelservers/Chart.yaml | 44 ------ charts/submodelservers/templates/NOTES.txt | 22 --- charts/submodelservers/templates/_helpers.tpl | 83 ----------- .../submodelservers/templates/deployment.yaml | 76 ---------- charts/submodelservers/templates/hpa.yaml | 48 ------- charts/submodelservers/templates/ingress.yaml | 80 ----------- charts/submodelservers/templates/service.yaml | 35 ----- .../templates/serviceaccount.yaml | 31 ---- .../templates/tests/test-connection.yaml | 35 ----- charts/submodelservers/values.yaml | 136 ------------------ charts/tx-data-provider/Chart.yaml | 6 +- charts/tx-data-provider/README.md | 2 +- .../tx-data-provider/templates/_helpers.tpl | 6 +- .../post-install-job-upload-testdata.yaml | 2 +- charts/tx-data-provider/values.yaml | 2 +- 16 files changed, 9 insertions(+), 646 deletions(-) delete mode 100644 charts/submodelservers/.helmignore delete mode 100644 charts/submodelservers/Chart.yaml delete mode 100644 charts/submodelservers/templates/NOTES.txt delete mode 100644 charts/submodelservers/templates/_helpers.tpl delete mode 100644 charts/submodelservers/templates/deployment.yaml delete mode 100644 charts/submodelservers/templates/hpa.yaml delete mode 100644 charts/submodelservers/templates/ingress.yaml delete mode 100644 charts/submodelservers/templates/service.yaml delete mode 100644 charts/submodelservers/templates/serviceaccount.yaml delete mode 100644 charts/submodelservers/templates/tests/test-connection.yaml delete mode 100644 charts/submodelservers/values.yaml diff --git a/charts/submodelservers/.helmignore b/charts/submodelservers/.helmignore deleted file mode 100644 index c89dfd08..00000000 --- a/charts/submodelservers/.helmignore +++ /dev/null @@ -1,47 +0,0 @@ -# ############################################################################# -# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) -# Copyright (c) 2021,2024 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 -# ############################################################################# - -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ - -# Ignore ENV specific values at release -values?*.yaml -values?*.yml diff --git a/charts/submodelservers/Chart.yaml b/charts/submodelservers/Chart.yaml deleted file mode 100644 index 3ad9e71b..00000000 --- a/charts/submodelservers/Chart.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# ############################################################################# -# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) -# Copyright (c) 2021,2024 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 -# ############################################################################# ---- -apiVersion: v2 -name: submodelservers -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "0.0.1" diff --git a/charts/submodelservers/templates/NOTES.txt b/charts/submodelservers/templates/NOTES.txt deleted file mode 100644 index eeb89089..00000000 --- a/charts/submodelservers/templates/NOTES.txt +++ /dev/null @@ -1,22 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "submodelservers.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "submodelservers.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "submodelservers.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "submodelservers.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT -{{- end }} diff --git a/charts/submodelservers/templates/_helpers.tpl b/charts/submodelservers/templates/_helpers.tpl deleted file mode 100644 index 163300c8..00000000 --- a/charts/submodelservers/templates/_helpers.tpl +++ /dev/null @@ -1,83 +0,0 @@ -{{/* -******************************************************************************* - * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2021,2024 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 - ******************************************************************************* - */}} - {{/* -Expand the name of the chart. -*/}} -{{- define "submodelservers.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "submodelservers.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "submodelservers.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "submodelservers.labels" -}} -helm.sh/chart: {{ include "submodelservers.chart" . }} -{{ include "submodelservers.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "submodelservers.selectorLabels" -}} -app.kubernetes.io/name: {{ include "submodelservers.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "submodelservers.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "submodelservers.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/charts/submodelservers/templates/deployment.yaml b/charts/submodelservers/templates/deployment.yaml deleted file mode 100644 index 6f36bcac..00000000 --- a/charts/submodelservers/templates/deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# ############################################################################# -# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) -# Copyright (c) 2021,2024 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 -# ############################################################################# ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "submodelservers.fullname" . }} - labels: - {{- include "submodelservers.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "submodelservers.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "submodelservers.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "submodelservers.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: default - containerPort: {{ .Values.backend.endpoint.default.port }} - protocol: TCP - - name: metrics - containerPort: 8090 - protocol: TCP - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/submodelservers/templates/hpa.yaml b/charts/submodelservers/templates/hpa.yaml deleted file mode 100644 index 3120ac3a..00000000 --- a/charts/submodelservers/templates/hpa.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# ############################################################################# -# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) -# Copyright (c) 2021,2024 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 -# ############################################################################# ---- -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "submodelservers.fullname" . }} - labels: - {{- include "submodelservers.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "submodelservers.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/charts/submodelservers/templates/ingress.yaml b/charts/submodelservers/templates/ingress.yaml deleted file mode 100644 index c17cc243..00000000 --- a/charts/submodelservers/templates/ingress.yaml +++ /dev/null @@ -1,80 +0,0 @@ -# ############################################################################# -# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) -# Copyright (c) 2021,2024 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 -# ############################################################################# -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "submodelservers.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "submodelservers.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/submodelservers/templates/service.yaml b/charts/submodelservers/templates/service.yaml deleted file mode 100644 index e4d81355..00000000 --- a/charts/submodelservers/templates/service.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# ############################################################################# -# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) -# Copyright (c) 2021,2024 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 -# ############################################################################# ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "submodelservers.fullname" . }} - labels: - {{- include "submodelservers.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: default - protocol: TCP - name: http - selector: - {{- include "submodelservers.selectorLabels" . | nindent 4 }} diff --git a/charts/submodelservers/templates/serviceaccount.yaml b/charts/submodelservers/templates/serviceaccount.yaml deleted file mode 100644 index aab4d54d..00000000 --- a/charts/submodelservers/templates/serviceaccount.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# ############################################################################# -# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) -# Copyright (c) 2021,2024 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 -# ############################################################################# -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "submodelservers.serviceAccountName" . }} - labels: - {{- include "submodelservers.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/submodelservers/templates/tests/test-connection.yaml b/charts/submodelservers/templates/tests/test-connection.yaml deleted file mode 100644 index d064112d..00000000 --- a/charts/submodelservers/templates/tests/test-connection.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# ############################################################################# -# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) -# Copyright (c) 2021,2024 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 -# ############################################################################# ---- -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "submodelservers.fullname" . }}-test-connection" - labels: - {{- include "submodelservers.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "submodelservers.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/charts/submodelservers/values.yaml b/charts/submodelservers/values.yaml deleted file mode 100644 index 56d1c739..00000000 --- a/charts/submodelservers/values.yaml +++ /dev/null @@ -1,136 +0,0 @@ -# ############################################################################# -# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) -# Copyright (c) 2021,2024 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 -# ############################################################################# - -# Default values for submodelservers. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -nameOverride: -fullnameOverride: - -image: - repository: ghcr.io/catenax-ng/catenax-at-home/provider-backend-service - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "" - -imagePullSecrets: [] - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: {} - -podSecurityContext: {} -# fsGroup: 2000 - -# Following Catena-X Helm Best Practices @url: https://catenax-ng.github.io/docs/kubernetes-basics/helm -# @url: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod -securityContext: - allowPrivilegeEscalation: false - runAsNonRoot: true - runAsUser: 1000 - runAsGroup: 3000 - -service: - type: ClusterIP - port: 8080 - -ingress: - enabled: true - className: "nginx" - annotations: - nginx.ingress.kubernetes.io/ssl-passthrough: "false" - nginx.ingress.kubernetes.io/backend-protocol: "HTTP" - nginx.ingress.kubernetes.io/force-ssl-redirect: "false" - hosts: - - host: "irs-submodel-server.dev.demo.catena-x.net" - paths: - - path: / - pathType: ImplementationSpecific - tls: - - hosts: - - "irs-submodel-server.dev.demo.catena-x.net" - # Default secret for certificate creation already provided to your namespace - secretName: tls-secret - -# Following Catena-X Helm Best Practices @url: https://catenax-ng.github.io/docs/kubernetes-basics/helm -# @url: https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-resource-requests-and-limits -resources: - limits: - cpu: 250m - memory: 512Mi - requests: - cpu: 50m - memory: 512Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -# Following Catena-X Helm Best Practices @url: https://catenax-ng.github.io/docs/kubernetes-basics/helm -# @url: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity -affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app.kubernetes.io/name - operator: DoesNotExist - topologyKey: kubernetes.io/hostname - -# Following Catena-X Helm Best Practices @url: https://catenax-ng.github.io/docs/kubernetes-basics/helm -# @url: https://github.com/helm/charts/blob/master/stable/nginx-ingress/values.yaml#L210 -livenessProbe: - failureThreshold: 6 - initialDelaySeconds: 30 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 -readinessProbe: - failureThreshold: 3 - initialDelaySeconds: 30 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 - -backend: - endpoint: - default: - port: 8080 - path: / - ingress: true diff --git a/charts/tx-data-provider/Chart.yaml b/charts/tx-data-provider/Chart.yaml index ad2e59ba..b6598464 100644 --- a/charts/tx-data-provider/Chart.yaml +++ b/charts/tx-data-provider/Chart.yaml @@ -31,10 +31,10 @@ dependencies: version: 0.4.5 repository: https://eclipse-tractusx.github.io/charts/dev condition: digital-twin-registry.enabled - - name: submodelservers - repository: file://../submodelservers # TODO switch to released chart + - name: simple-data-backend + repository: https://eclipse-tractusx.github.io/charts/dev version: 0.1.0 - condition: submodelservers.enabled + condition: simple-data-backend.enabled - name: tractusx-connector repository: https://eclipse-tractusx.github.io/charts/dev version: 0.5.3 diff --git a/charts/tx-data-provider/README.md b/charts/tx-data-provider/README.md index 8e2b1053..e39b49c7 100644 --- a/charts/tx-data-provider/README.md +++ b/charts/tx-data-provider/README.md @@ -36,7 +36,7 @@ Configuration of EDC see [tractusx-edc/tree/main/charts/tractusx-connecto](https EDC requires connection to HashiCorp Vault and Manage Identity Wallet. These have to be configured for the dataprovider to be operative. -The Chart can be used as dataprovider by setting `submodelservers.enabled`, `digital-twin-registry.enabled` and `seedTestdata` to `false`. +The Chart can be used as dataprovider by setting `simple-data-backend.enabled`, `digital-twin-registry.enabled` and `seedTestdata` to `false`. ## Testdata seeding diff --git a/charts/tx-data-provider/templates/_helpers.tpl b/charts/tx-data-provider/templates/_helpers.tpl index cb56926e..a1478dfe 100644 --- a/charts/tx-data-provider/templates/_helpers.tpl +++ b/charts/tx-data-provider/templates/_helpers.tpl @@ -40,9 +40,9 @@ If release name contains chart name it will be used as a full name. {{/* Submodel URL helpers */}} -{{- define "submodelservers.host" -}} - {{- if .Values.submodelservers.ingress.enabled }} - {{- with (first .Values.submodelservers.ingress.hosts) }} +{{- define "simple-data-backend.host" -}} + {{- if (index .Values "simple-data-backend" "ingress" "enabled") }} + {{- with (first (index .Values "simple-data-backend" "ingress" "hosts")) }} {{- printf "https://%s" .host }} {{- end }} {{- else }} diff --git a/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml b/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml index d1469982..554b0c01 100644 --- a/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml +++ b/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml @@ -52,7 +52,7 @@ spec: - "/bin/sh" - "-c" args: - - "{{- cat "/opt/scripts/upload-data.sh" (include "submodelservers.host" .) (include "registry.url" .) (include "edc.controlplane.host" .) (include "edc.dataplane.host" .) (include "edc.key" .) (include "edc.bpn" .) }}" + - "{{- cat "/opt/scripts/upload-data.sh" (include "simple-data-backend.host" .) (include "registry.url" .) (include "edc.controlplane.host" .) (include "edc.dataplane.host" .) (include "edc.key" .) (include "edc.bpn" .) }}" volumeMounts: - name: config-volume mountPath: /opt/scripts diff --git a/charts/tx-data-provider/values.yaml b/charts/tx-data-provider/values.yaml index 8eff4e6a..db1445e7 100644 --- a/charts/tx-data-provider/values.yaml +++ b/charts/tx-data-provider/values.yaml @@ -153,7 +153,7 @@ digital-twin-registry: initialDelaySeconds: 200 periodSeconds: 10 -submodelservers: +simple-data-backend: enabled: true ingress: enabled: true From be81cc3e33f04cf8a523deb495af783861073d30 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 7 Mar 2024 17:51:57 +0100 Subject: [PATCH 11/32] chore: remove submodelservers and switch to simple-data-backend --- charts/umbrella/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index e42a7065..e282b4cf 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -260,7 +260,7 @@ dataconsumer: digital-twin-registry: enabled: false - submodelservers: + simple-data-backend: enabled: false dataprovider: @@ -340,7 +340,7 @@ dataprovider: registry: host: dataprovider-digital-twin-registry.test - submodelservers: + simple-data-backend: fullnameOverride: dataprovider-submodelserver nameOverride: dataprovider-submodelserver ingress: From af1a9012b14c27438f746eb35f9f26bef2c302e9 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Tue, 19 Mar 2024 17:28:21 +0100 Subject: [PATCH 12/32] chore: disable ingresses --- charts/tx-data-provider/values.yaml | 54 +++-------------------------- 1 file changed, 4 insertions(+), 50 deletions(-) diff --git a/charts/tx-data-provider/values.yaml b/charts/tx-data-provider/values.yaml index db1445e7..51e010c9 100644 --- a/charts/tx-data-provider/values.yaml +++ b/charts/tx-data-provider/values.yaml @@ -46,18 +46,7 @@ tractusx-connector: id: changeme secretAlias: changeme ingresses: - - enabled: true - hostname: "controlplane.test" - annotations: - nginx.ingress.kubernetes.io/ssl-passthrough: "false" - nginx.ingress.kubernetes.io/backend-protocol: "HTTP" - nginx.ingress.kubernetes.io/force-ssl-redirect: "true" - endpoints: - - protocol - - management - tls: - enabled: true - secretName: tls-secret + - enabled: false endpoints: management: authKey: *edcKey @@ -66,18 +55,7 @@ tractusx-connector: dataplane: ingresses: - - enabled: true - hostname: "dataplane.test" - annotations: - nginx.ingress.kubernetes.io/ssl-passthrough: "false" - nginx.ingress.kubernetes.io/backend-protocol: "HTTP" - nginx.ingress.kubernetes.io/force-ssl-redirect: "true" - endpoints: - - public - className: "nginx" - tls: - enabled: true - secretName: tls-secret + - enabled: false backendService: httpProxyTokenReceiverUrl: "https://submodelserver.test/data/endpoint-data-reference-provider1" @@ -132,17 +110,7 @@ digital-twin-registry: registry: host: digital-twin-registry.test ingress: - enabled: true - urlPrefix: /semantics/registry - className: nginx - tls: true - annotations: - cert-manager.io/cluster-issuer: selfsigned-cluster-issuer - nginx.ingress.kubernetes.io/rewrite-target: /$2 - nginx.ingress.kubernetes.io/use-regex: "true" - nginx.ingress.kubernetes.io/enable-cors: "true" - nginx.ingress.kubernetes.io/cors-allow-credentials: "true" - nginx.ingress.kubernetes.io/x-forwarded-prefix: /semantics/registry + enabled: false authentication: false livenessProbe: failureThreshold: 6 @@ -156,18 +124,4 @@ digital-twin-registry: simple-data-backend: enabled: true ingress: - enabled: true - className: "nginx" - annotations: - nginx.ingress.kubernetes.io/ssl-passthrough: "false" - nginx.ingress.kubernetes.io/backend-protocol: "HTTP" - nginx.ingress.kubernetes.io/force-ssl-redirect: "false" - hosts: - - host: submodelserver.test - paths: - - path: / - pathType: ImplementationSpecific - tls: - - hosts: - - submodelserver.test - secretName: tls-secret + enabled: false From c476539460022965ca9e337639dfde73da061719 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Tue, 19 Mar 2024 17:30:22 +0100 Subject: [PATCH 13/32] chore: replace dedicated edc postgres with bundled postgres --- charts/tx-data-provider/Chart.yaml | 4 --- charts/tx-data-provider/values.yaml | 38 ++++++++++------------------- 2 files changed, 13 insertions(+), 29 deletions(-) diff --git a/charts/tx-data-provider/Chart.yaml b/charts/tx-data-provider/Chart.yaml index b6598464..6f2b20ca 100644 --- a/charts/tx-data-provider/Chart.yaml +++ b/charts/tx-data-provider/Chart.yaml @@ -39,7 +39,3 @@ dependencies: repository: https://eclipse-tractusx.github.io/charts/dev version: 0.5.3 condition: tractusx-connector.enabled - - name: postgresql - repository: https://charts.bitnami.com/bitnami - version: 12.12.10 - condition: postgresql.enabled diff --git a/charts/tx-data-provider/values.yaml b/charts/tx-data-provider/values.yaml index 51e010c9..36895968 100644 --- a/charts/tx-data-provider/values.yaml +++ b/charts/tx-data-provider/values.yaml @@ -31,7 +31,7 @@ testdataConfigMap: "" # Provide a custom configmap for post-install-job-upload- tractusx-connector: enabled: true install: - postgresql: false + postgresql: true vault: false participant: id: changeme @@ -69,31 +69,19 @@ tractusx-connector: transferProxyTokenEncryptionAesKey: changeme postgresql: - enabled: true + nameOverride: edc-postgresql + primary: + persistence: + enabled: false + size: 1Gi auth: - database: "edc" + database: edc username: *postgresuser + postgresPassword: *postgrespass password: *postgrespass username: *postgresuser password: *postgrespass - jdbcUrl: "jdbc:postgresql://edc-postgresql:5432/edc" - -postgresql: - fullnameOverride: edc-postgresql - nameOverride: edc-postgresql - enabled: true - primary: - persistence: - enabled: false - size: 1Gi - readReplicas: - persistence: - enabled: false - auth: - database: edc - username: *postgresuser - postgresPassword: *postgrespass - password: *postgrespass + jdbcUrl: "jdbc:postgresql://{{ .Release.Name }}-edc-postgresql:5432/edc" digital-twin-registry: enabled: true @@ -113,12 +101,12 @@ digital-twin-registry: enabled: false authentication: false livenessProbe: - failureThreshold: 6 - initialDelaySeconds: 200 + failureThreshold: 10 + initialDelaySeconds: 60 periodSeconds: 10 readinessProbe: - failureThreshold: 6 - initialDelaySeconds: 200 + failureThreshold: 10 + initialDelaySeconds: 60 periodSeconds: 10 simple-data-backend: From 7f1681508ba8a1c29ce2050248363c28a2dceaac Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Tue, 19 Mar 2024 17:31:26 +0100 Subject: [PATCH 14/32] chore: radd templates for internal urls --- .../tx-data-provider/resources/upload-data.sh | 9 ++- .../tx-data-provider/templates/_helpers.tpl | 70 ++++++++++++++++--- .../post-install-job-upload-testdata.yaml | 11 ++- charts/tx-data-provider/values.yaml | 5 ++ 4 files changed, 81 insertions(+), 14 deletions(-) diff --git a/charts/tx-data-provider/resources/upload-data.sh b/charts/tx-data-provider/resources/upload-data.sh index 3d82e302..e12c971b 100644 --- a/charts/tx-data-provider/resources/upload-data.sh +++ b/charts/tx-data-provider/resources/upload-data.sh @@ -26,6 +26,7 @@ CONTROLPLANEURL=$3 DATAPLANEURL=$4 EDCKEY=$5 ALLOWEDBPNS=$6 +MANAGEMENTURL=$7 echo "Submodel: $SUBMODELURL" echo "Registry: $REGISTRYURL" @@ -35,4 +36,10 @@ echo "EDC Key: $EDCKEY" echo "Allowed BPNs: $ALLOWEDBPNS" pip install -r /opt/scripts/requirements.txt -python /opt/scripts/upload.py -f /opt/scripts/testdata.json -s "$SUBMODELURL" -a "$REGISTRYURL" -edc "$CONTROLPLANEURL" -d "$DATAPLANEURL" -k "$EDCKEY" -p id-3.0-trace --allowedBPNs "$ALLOWEDBPNS" --aas3 \ No newline at end of file + +if [ -z "$MANAGEMENTURL" ]; then + python /opt/scripts/upload.py -f /opt/scripts/testdata.json -s "$SUBMODELURL" -a "$REGISTRYURL" -edc "$CONTROLPLANEURL" -d "$DATAPLANEURL" -k "$EDCKEY" -p id-3.0-trace --allowedBPNs "$ALLOWEDBPNS" --aas3 +else + echo "Management: $MANAGEMENTURL" + python /opt/scripts/upload.py -f /opt/scripts/testdata.json -s "$SUBMODELURL" -a "$REGISTRYURL" -edc "$CONTROLPLANEURL" -eu "$MANAGEMENTURL" -d "$DATAPLANEURL" -k "$EDCKEY" -p id-3.0-trace --allowedBPNs "$ALLOWEDBPNS" --aas3 +fi diff --git a/charts/tx-data-provider/templates/_helpers.tpl b/charts/tx-data-provider/templates/_helpers.tpl index a1478dfe..536a9247 100644 --- a/charts/tx-data-provider/templates/_helpers.tpl +++ b/charts/tx-data-provider/templates/_helpers.tpl @@ -41,12 +41,14 @@ If release name contains chart name it will be used as a full name. Submodel URL helpers */}} {{- define "simple-data-backend.host" -}} - {{- if (index .Values "simple-data-backend" "ingress" "enabled") }} + {{- if .Values.backendUrl }} + {{- print .Values.backendUrl }} + {{- else if (index .Values "simple-data-backend" "ingress" "enabled") }} {{- with (first (index .Values "simple-data-backend" "ingress" "hosts")) }} {{- printf "https://%s" .host }} {{- end }} {{- else }} - {{- print "http://test" }} + {{- printf "http://%s%s:8080" .Release.Name "-simple-data-backend" }} {{- end }} {{- end }} @@ -54,31 +56,77 @@ Submodel URL helpers Registry URL helpers */}} {{- define "registry.host" -}} - {{- printf "https://%s" (index .Values "digital-twin-registry" "registry" "host") }} + {{- if index .Values "digital-twin-registry" "registry" "ingress" "enabled" }} + {{- printf "https://%s" (index .Values "digital-twin-registry" "registry" "host") }} + {{- else }} + {{- printf "http://%s-%s:8080" .Release.Name "digital-twin-registry" }} + {{- end }} {{- end }} {{- define "registry.path" -}} - {{- index .Values "digital-twin-registry" "registry" "ingress" "urlPrefix" }} + {{- if index .Values "digital-twin-registry" "registry" "ingress" "enabled" }} + {{- index .Values "digital-twin-registry" "registry" "ingress" "urlPrefix" }} + {{- else }} + {{- print "" }} + {{- end }} {{- end }} {{- define "registry.url" -}} - {{- printf "%s%s%s" (include "registry.host" .) (include "registry.path" .) "/api/v3.0" }} + {{- if .Values.registryUrl }} + {{- print .Values.registryUrl }} + {{ else }} + {{- printf "%s%s%s" (include "registry.host" .) (include "registry.path" .) "/api/v3.0" }} + {{- end }} {{- end }} {{/* EDC URL helpers */}} + {{- define "edc.controlplane.host" -}} - {{- with (first (index .Values "tractusx-connector" "controlplane" "ingresses")) }} - {{- printf "https://%s" .hostname }} - {{- end }} + {{- if .Values.controlplanePublicUrl }} + {{- print .Values.controlplanePublicUrl }} + {{ else }} + {{- with (first (index .Values "tractusx-connector" "controlplane" "ingresses")) }} + {{- if .enabled }} + {{- printf "https://%s" .hostname }} + {{- else }} + {{- printf "http://%s-%s:8084" $.Release.Name "tractusx-connector-controlplane" }} + {{- end }} + {{- end }} + {{ end }} {{- end }} + +{{- define "edc.controlplane.management.host" -}} + {{- if .Values.controlplaneManagementUrl }} + {{- print .Values.controlplaneManagementUrl }} + {{ else }} + {{- with (first (index .Values "tractusx-connector" "controlplane" "ingresses")) }} + {{- if .enabled }} + {{- printf "https://%s" .hostname }} + {{- else }} + {{- printf "http://%s-%s:8081" $.Release.Name "tractusx-connector-controlplane" }} + {{- end }} + {{- end }} + {{ end }} +{{- end }} + {{- define "edc.dataplane.host" -}} - {{- with (first (index .Values "tractusx-connector" "dataplane" "ingresses")) }} - {{- printf "https://%s" .hostname }} - {{- end }} + {{- if .Values.dataplaneUrl }} + {{- print .Values.dataplaneUrl }} + {{ else }} + {{- with (first (index .Values "tractusx-connector" "dataplane" "ingresses")) }} + {{- if .enabled }} + {{- printf "https://%s" .hostname }} + {{- else }} + {{- printf "http://%s-%s:8081" $.Release.Name "tractusx-connector-dataplane" }} + {{- end }} + {{- end }} + {{ end }} {{- end }} + {{- define "edc.key" -}} {{- index .Values "tractusx-connector" "controlplane" "endpoints" "management" "authKey" }} {{- end }} + {{- define "edc.bpn" -}} {{- index .Values "tractusx-connector" "participant" "id" }} {{- end }} diff --git a/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml b/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml index 554b0c01..437bd6d4 100644 --- a/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml +++ b/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml @@ -18,8 +18,15 @@ # SPDX-License-Identifier: Apache-2.0 # ############################################################################# --- -{{- $fullName := include "dataprovider.fullname" . -}} {{- if .Values.seedTestdata }} +{{- $fullName := include "dataprovider.fullname" . -}} +{{- $submodel := include "simple-data-backend.host" . -}} +{{- $registry := include "registry.url" . -}} +{{- $controlplane := include "edc.controlplane.host" . -}} +{{- $management := include "edc.controlplane.management.host" . -}} +{{- $dataplane := include "edc.dataplane.host" . -}} +{{- $key := include "edc.key" . -}} +{{- $bpn := include "edc.bpn" . -}} apiVersion: batch/v1 kind: Job metadata: @@ -52,7 +59,7 @@ spec: - "/bin/sh" - "-c" args: - - "{{- cat "/opt/scripts/upload-data.sh" (include "simple-data-backend.host" .) (include "registry.url" .) (include "edc.controlplane.host" .) (include "edc.dataplane.host" .) (include "edc.key" .) (include "edc.bpn" .) }}" + - "{{- cat "/opt/scripts/upload-data.sh" $submodel $registry $controlplane $dataplane $key $bpn $management}}" volumeMounts: - name: config-volume mountPath: /opt/scripts diff --git a/charts/tx-data-provider/values.yaml b/charts/tx-data-provider/values.yaml index 36895968..e1c0bade 100644 --- a/charts/tx-data-provider/values.yaml +++ b/charts/tx-data-provider/values.yaml @@ -27,6 +27,11 @@ nameOverride: "" fullnameOverride: "" seedTestdata: true # Toggle seeding of testdata. Can be disabled when e.g. only edc is used as consumer. Default true. testdataConfigMap: "" # Provide a custom configmap for post-install-job-upload-testdata.yaml. +backendUrl: "" # Override the backend service url +registryUrl: "" # Override the digital twin registry url +controlplanePublicUrl: "" # Override the edc controlplane protocol url +controlplaneManagementUrl: "" # Override the edc controlplane management url +dataplaneUrl: "" # Override the edc dataplane public url tractusx-connector: enabled: true From b0d2d1619a4f09d6e68f4221b310f812f4ec72cb Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Wed, 20 Mar 2024 09:46:09 +0100 Subject: [PATCH 15/32] chore: add templating for configured urls --- charts/tx-data-provider/templates/_helpers.tpl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/tx-data-provider/templates/_helpers.tpl b/charts/tx-data-provider/templates/_helpers.tpl index 536a9247..8684b540 100644 --- a/charts/tx-data-provider/templates/_helpers.tpl +++ b/charts/tx-data-provider/templates/_helpers.tpl @@ -42,7 +42,7 @@ Submodel URL helpers */}} {{- define "simple-data-backend.host" -}} {{- if .Values.backendUrl }} - {{- print .Values.backendUrl }} + {{- tpl .Values.backendUrl . }} {{- else if (index .Values "simple-data-backend" "ingress" "enabled") }} {{- with (first (index .Values "simple-data-backend" "ingress" "hosts")) }} {{- printf "https://%s" .host }} @@ -71,7 +71,7 @@ Registry URL helpers {{- end }} {{- define "registry.url" -}} {{- if .Values.registryUrl }} - {{- print .Values.registryUrl }} + {{- tpl .Values.registryUrl . }} {{ else }} {{- printf "%s%s%s" (include "registry.host" .) (include "registry.path" .) "/api/v3.0" }} {{- end }} @@ -83,7 +83,7 @@ EDC URL helpers {{- define "edc.controlplane.host" -}} {{- if .Values.controlplanePublicUrl }} - {{- print .Values.controlplanePublicUrl }} + {{- tpl .Values.controlplanePublicUrl . }} {{ else }} {{- with (first (index .Values "tractusx-connector" "controlplane" "ingresses")) }} {{- if .enabled }} @@ -97,7 +97,7 @@ EDC URL helpers {{- define "edc.controlplane.management.host" -}} {{- if .Values.controlplaneManagementUrl }} - {{- print .Values.controlplaneManagementUrl }} + {{- tpl .Values.controlplaneManagementUrl . }} {{ else }} {{- with (first (index .Values "tractusx-connector" "controlplane" "ingresses")) }} {{- if .enabled }} @@ -111,7 +111,7 @@ EDC URL helpers {{- define "edc.dataplane.host" -}} {{- if .Values.dataplaneUrl }} - {{- print .Values.dataplaneUrl }} + {{- tpl .Values.dataplaneUrl . }} {{ else }} {{- with (first (index .Values "tractusx-connector" "dataplane" "ingresses")) }} {{- if .enabled }} From 6d460ec4c9b0de69b9655fc03104028cfc641810 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Wed, 20 Mar 2024 10:55:07 +0100 Subject: [PATCH 16/32] chore: cleanup values --- charts/umbrella/values.yaml | 89 +++++++------------------------------ 1 file changed, 16 insertions(+), 73 deletions(-) diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index e282b4cf..72cfdbf3 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -192,13 +192,11 @@ discoveryfinder: dataconsumer: enabled: true seedTestdata: false - fullnameOverride: dataconsumer nameOverride: dataconsumer tractusx-connector: - fullnameOverride: dataconsumer-edc nameOverride: dataconsumer-edc participant: - id: + id: BPNL000000000000 controlplane: ssi: # TODO configure MIW once available miw: @@ -213,32 +211,10 @@ dataconsumer: management: authKey: TEST1 ingresses: - - enabled: true - hostname: "dataconsumer-controlplane.test" - annotations: - nginx.ingress.kubernetes.io/ssl-passthrough: "false" - nginx.ingress.kubernetes.io/backend-protocol: "HTTP" - nginx.ingress.kubernetes.io/force-ssl-redirect: "true" - endpoints: - - protocol - - management - tls: - enabled: true - secretName: tls-secret + - enabled: false dataplane: ingresses: - - enabled: true - hostname: "dataconsumer-dataplane.test" - annotations: - nginx.ingress.kubernetes.io/ssl-passthrough: "false" - nginx.ingress.kubernetes.io/backend-protocol: "HTTP" - nginx.ingress.kubernetes.io/force-ssl-redirect: "true" - endpoints: - - public - className: "nginx" - tls: - enabled: true - secretName: tls-secret + - enabled: false postgresql: jdbcUrl: "jdbc:postgresql://dataconsumer-db:5432/edc" vault: # TODO configure Vault once available @@ -265,10 +241,13 @@ dataconsumer: dataprovider: enabled: true - fullnameOverride: dataprovider + backendUrl: http://{{ .Release.Name }}-dataprovider-submodelserver:8080 + registryUrl: http://{{ .Release.Name }}-dataprovider-digital-twin-registry:8080/api/v3.0 + controlplanePublicUrl: http://{{ .Release.Name }}-dataprovider-edc-controlplane:8084 + controlplaneManagementUrl: http://{{ .Release.Name }}-dataprovider-edc-controlplane:8081 + dataplaneUrl: http://{{ .Release.Name }}-dataprovider-edc-dataplane:8081 nameOverride: dataprovider tractusx-connector: - fullnameOverride: dataprovider-edc nameOverride: dataprovider-edc participant: id: @@ -286,41 +265,17 @@ dataprovider: management: authKey: TEST2 ingresses: - - enabled: true - hostname: "dataprovider-controlplane.test" - annotations: - nginx.ingress.kubernetes.io/ssl-passthrough: "false" - nginx.ingress.kubernetes.io/backend-protocol: "HTTP" - nginx.ingress.kubernetes.io/force-ssl-redirect: "true" - endpoints: - - protocol - - management - tls: - enabled: true - secretName: tls-secret + - enabled: false dataplane: ingresses: - - enabled: true - hostname: "dataprovider-dataplane.test" - annotations: - nginx.ingress.kubernetes.io/ssl-passthrough: "false" - nginx.ingress.kubernetes.io/backend-protocol: "HTTP" - nginx.ingress.kubernetes.io/force-ssl-redirect: "true" - endpoints: - - public - className: "nginx" - tls: - enabled: true - secretName: tls-secret + - enabled: false postgresql: - jdbcUrl: "jdbc:postgresql://dataprovider-db:5432/edc" - vault: # TODO configure Vault once available + nameOverride: dataprovider-db + jdbcUrl: "jdbc:postgresql://{{ .Release.Name }}-dataprovider-db:5432/edc" + vault: hashicorp: - url: - token: - paths: - secret: - health: + url: http://{{ .Release.Name }}-vault:8200 + token: *vault-token secretNames: transferProxyTokenSignerPrivateKey: transferProxyTokenSignerPublicKey: @@ -330,10 +285,8 @@ dataprovider: nameOverride: dataprovider-db digital-twin-registry: - fullnameOverride: dataprovider-digital-twin-registry nameOverride: dataprovider-digital-twin-registry postgresql: - fullnameOverride: dataprovider-digital-twin-registry-db nameOverride: dataprovider-digital-twin-registry-db auth: existingSecret: dataprovider-secret-dtr-postgres-init @@ -341,16 +294,6 @@ dataprovider: host: dataprovider-digital-twin-registry.test simple-data-backend: - fullnameOverride: dataprovider-submodelserver nameOverride: dataprovider-submodelserver ingress: - enabled: true - hosts: - - host: dataprovider-submodelserver.test - paths: - - path: / - pathType: ImplementationSpecific - tls: - - hosts: - - dataprovider-submodelserver.test - secretName: tls-secret + enabled: false From 3b81cdbdf791216e6d152904a22a3f8e15b8435c Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 4 Apr 2024 15:48:58 +0200 Subject: [PATCH 17/32] chore: fix linting --- charts/tx-data-provider/templates/post-install-configmap.yaml | 4 ++-- .../templates/post-install-job-upload-testdata.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/tx-data-provider/templates/post-install-configmap.yaml b/charts/tx-data-provider/templates/post-install-configmap.yaml index a476a91a..322b27f4 100644 --- a/charts/tx-data-provider/templates/post-install-configmap.yaml +++ b/charts/tx-data-provider/templates/post-install-configmap.yaml @@ -18,8 +18,8 @@ # SPDX-License-Identifier: Apache-2.0 # ############################################################################# --- +{{ if .Values.seedTestdata }} {{- $fullName := include "dataprovider.fullname" . -}} -{{- if .Values.seedTestdata }} apiVersion: v1 kind: ConfigMap metadata: @@ -33,4 +33,4 @@ data: {{ .Files.Get "resources/Testdata_AsBuilt-combustion.json" | indent 4}} upload-data.sh: |- {{ .Files.Get "resources/upload-data.sh" | indent 4}} -{{- end }} \ No newline at end of file +{{ end }} \ No newline at end of file diff --git a/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml b/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml index 437bd6d4..f2dc5ac7 100644 --- a/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml +++ b/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml @@ -18,7 +18,7 @@ # SPDX-License-Identifier: Apache-2.0 # ############################################################################# --- -{{- if .Values.seedTestdata }} +{{ if .Values.seedTestdata }} {{- $fullName := include "dataprovider.fullname" . -}} {{- $submodel := include "simple-data-backend.host" . -}} {{- $registry := include "registry.url" . -}} @@ -74,4 +74,4 @@ spec: name: {{ $fullName }}-postinstall-configmap defaultMode: 0777 {{- end }} -{{- end }} \ No newline at end of file +{{ end }} \ No newline at end of file From 2ad3109d7573316cca86e61844be3f314e2dc7d3 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 4 Apr 2024 15:52:08 +0200 Subject: [PATCH 18/32] chore: add generated edc secrets --- charts/umbrella/Chart.yaml | 13 +-- charts/umbrella/templates/edc-configmap.yaml | 44 ++++++++++ .../templates/post-install-vault-setup.yaml | 20 +++++ charts/umbrella/values.yaml | 81 ++++++++----------- 4 files changed, 97 insertions(+), 61 deletions(-) create mode 100644 charts/umbrella/templates/edc-configmap.yaml diff --git a/charts/umbrella/Chart.yaml b/charts/umbrella/Chart.yaml index 199b7ddd..c5b7dbb6 100644 --- a/charts/umbrella/Chart.yaml +++ b/charts/umbrella/Chart.yaml @@ -28,20 +28,9 @@ sources: - https://github.com/eclipse-tractusx/e2e-testing type: application -version: 0.6.0 +version: 0.7.0 dependencies: -# # TODO: update edc components to R23.12 -# # edc consumer -# - alias: edcconsumer -# name: tractusx-connector-legacy -# version: 0.5.0-rc1 -# repository: https://eclipse-tractusx.github.io/charts/dev -# # edc provider -# - alias: edcprovider -# name: tractusx-connector-legacy -# version: 0.5.0-rc1 -# repository: https://eclipse-tractusx.github.io/charts/dev # portal - condition: portal.enabled name: portal diff --git a/charts/umbrella/templates/edc-configmap.yaml b/charts/umbrella/templates/edc-configmap.yaml new file mode 100644 index 00000000..b00a602c --- /dev/null +++ b/charts/umbrella/templates/edc-configmap.yaml @@ -0,0 +1,44 @@ +# ############################################################################# +# Copyright (c) 2021,2024 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 +# ############################################################################# +--- +{{- $cert := genSelfSignedCert "" (list) (list) 365 }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-vault-edc-configmap +data: + cert.json: |- + { + "data": { + "content": {{ $cert.Cert | toString | quote }} + } + } + + key.json: |- + { + "data": { + "content": {{ $cert.Key | toString | quote }} + } + } + aes-secret.json: |- + { + "data": { + "content": {{ randAlphaNum 32 | b64enc | quote }} + } + } diff --git a/charts/umbrella/templates/post-install-vault-setup.yaml b/charts/umbrella/templates/post-install-vault-setup.yaml index d947c9c7..afe78b75 100644 --- a/charts/umbrella/templates/post-install-vault-setup.yaml +++ b/charts/umbrella/templates/post-install-vault-setup.yaml @@ -59,4 +59,24 @@ spec: --post-data '{"data": {"content": "{{ $value }}"}}' \ "{{ $vaultUrl }}/v1/secret/data/{{ $key }}" {{- end }} + + wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 --header 'Content-Type: application/json' \ + --header 'X-Vault-Token: {{ $vaultToken }}' --post-file=/opt/config/cert.json \ + "{{ $vaultUrl }}/v1/secret/data/{{ .Values.vault.secretNames.tokenSignerPublicKey }}" + + wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 --header 'Content-Type: application/json' \ + --header 'X-Vault-Token: {{ $vaultToken }}' --post-file=/opt/config/key.json \ + "{{ $vaultUrl }}/v1/secret/data/{{ .Values.vault.secretNames.tokenSignerPrivateKey }}" + + wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 --header 'Content-Type: application/json' \ + --header 'X-Vault-Token: {{ $vaultToken }}' --post-file=/opt/config/aes-secret.json \ + "{{ $vaultUrl }}/v1/secret/data/{{ .Values.vault.secretNames.tokenEncryptionAesKey }}" + volumeMounts: + - name: config-volume + mountPath: /opt/config + volumes: + - name: config-volume + configMap: + name: {{ .Release.Name }}-vault-edc-configmap + defaultMode: 0777 {{ end }} \ No newline at end of file diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index 46c45342..357c3d80 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -222,20 +222,11 @@ vault: token: &vault-token root url: http://{{ .Release.Name }}-vault:8200 secrets: - # TODO add test secret or secret reference. Can this be generated? - edc-test-miw-keycloak-secret: miw_private_client - # TODO add certificate or secret reference. Can Key Pairs be generated? - tokenSignerPublicKey: >- - -----BEGIN CERTIFICATE-----\n - test\n - -----END CERTIFICATE----- - # TODO add certificate or secret reference. Can Key Pairs be generated? - tokenSignerPrivateKey: >- - -----BEGIN PRIVATE KEY-----\n - test\n - -----END PRIVATE KEY----- - # TODO add test secret or secret reference. Can this be generated? - tokenEncryptionAesKey: test + edc-test-miw-keycloak-secret: miw_private_client # TODO switch to existing user + secretNames: + tokenSignerPublicKey: &tokenSignerPublicKey tokenSignerPublicKey + tokenSignerPrivateKey: &tokenSignerPrivateKey tokenSignerPrivateKey + tokenEncryptionAesKey: &tokenEncryptionAesKey tokenEncryptionAesKey injector: enabled: false server: @@ -256,8 +247,8 @@ managed-identity-wallet: host: "{{ .Release.Name }}-miw-postgres" secret: "{{ .Release.Name }}-miw-postgres" keycloak: - url: "https://centralidp.example.org" - clientId: &miw_client miw_private_client # TODO switch to existing user + url: "https://{{ .Release.Name }}-centralidp" + clientId: &miw_client CHANGEME # TODO switch to existing user postgresql: nameOverride: miw-postgres primary: @@ -280,15 +271,15 @@ dataconsumer: participant: id: BPNL000000000000 controlplane: - ssi: # TODO configure MIW once available + ssi: miw: - url: - authorityId: + url: http://miw:8080 + authorityId: *authority-bpn oauth: - tokenurl: + tokenurl: http://lab-centralidp/auth/realms/CX-Central/protocol/openid-connect/token client: - id: - secretAlias: + id: *miw_client + secretAlias: edc-test-miw-keycloak-secret endpoints: management: authKey: TEST1 @@ -298,22 +289,16 @@ dataconsumer: ingresses: - enabled: false postgresql: - jdbcUrl: "jdbc:postgresql://dataconsumer-db:5432/edc" - vault: # TODO configure Vault once available + nameOverride: dataconsumer-db + jdbcUrl: "jdbc:postgresql://{{ .Release.Name }}-dataconsumer-db:5432/edc" + vault: hashicorp: - url: - token: - paths: - secret: - health: + url: http://{{ .Release.Name }}-vault:8200 + token: *vault-token secretNames: - transferProxyTokenSignerPrivateKey: - transferProxyTokenSignerPublicKey: - transferProxyTokenEncryptionAesKey: - - postgresql: - fullnameOverride: dataconsumer-db - nameOverride: dataconsumer-db + transferProxyTokenSignerPublicKey: *tokenSignerPublicKey + transferProxyTokenSignerPrivateKey: *tokenSignerPrivateKey + transferProxyTokenEncryptionAesKey: *tokenEncryptionAesKey digital-twin-registry: enabled: false @@ -323,6 +308,7 @@ dataconsumer: dataprovider: enabled: true + seedTestdata: true backendUrl: http://{{ .Release.Name }}-dataprovider-submodelserver:8080 registryUrl: http://{{ .Release.Name }}-dataprovider-digital-twin-registry:8080/api/v3.0 controlplanePublicUrl: http://{{ .Release.Name }}-dataprovider-edc-controlplane:8084 @@ -332,17 +318,17 @@ dataprovider: tractusx-connector: nameOverride: dataprovider-edc participant: - id: + id: BPNL000000000000 controlplane: - ssi: # TODO configure MIW once available + ssi: miw: - url: - authorityId: + url: http://miw:8080 + authorityId: *authority-bpn oauth: - tokenurl: + tokenurl: http://lab-centralidp/auth/realms/CX-Central/protocol/openid-connect/token client: - id: - secretAlias: + id: *miw_client + secretAlias: edc-test-miw-keycloak-secret endpoints: management: authKey: TEST2 @@ -359,12 +345,9 @@ dataprovider: url: http://{{ .Release.Name }}-vault:8200 token: *vault-token secretNames: - transferProxyTokenSignerPrivateKey: - transferProxyTokenSignerPublicKey: - transferProxyTokenEncryptionAesKey: - postgresql: - fullnameOverride: dataprovider-db - nameOverride: dataprovider-db + transferProxyTokenSignerPublicKey: *tokenSignerPublicKey + transferProxyTokenSignerPrivateKey: *tokenSignerPrivateKey + transferProxyTokenEncryptionAesKey: *tokenEncryptionAesKey digital-twin-registry: nameOverride: dataprovider-digital-twin-registry From af6c95da3ae566c7fdb9cc6130fafafb268f2484 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 4 Apr 2024 16:24:49 +0200 Subject: [PATCH 19/32] chore: fix image name --- charts/tx-data-provider/values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/tx-data-provider/values.yaml b/charts/tx-data-provider/values.yaml index e1c0bade..ced43a13 100644 --- a/charts/tx-data-provider/values.yaml +++ b/charts/tx-data-provider/values.yaml @@ -116,5 +116,7 @@ digital-twin-registry: simple-data-backend: enabled: true + image: + tag: "main" ingress: enabled: false From 13be3b0c8d6ceb098c95a69d22fb82c39676a51b Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 4 Apr 2024 16:46:31 +0200 Subject: [PATCH 20/32] chore: reduce dtr name length --- charts/umbrella/values.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index 357c3d80..39be0460 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -310,7 +310,7 @@ dataprovider: enabled: true seedTestdata: true backendUrl: http://{{ .Release.Name }}-dataprovider-submodelserver:8080 - registryUrl: http://{{ .Release.Name }}-dataprovider-digital-twin-registry:8080/api/v3.0 + registryUrl: http://{{ .Release.Name }}-dataprovider-dtr:8080/api/v3.0 controlplanePublicUrl: http://{{ .Release.Name }}-dataprovider-edc-controlplane:8084 controlplaneManagementUrl: http://{{ .Release.Name }}-dataprovider-edc-controlplane:8081 dataplaneUrl: http://{{ .Release.Name }}-dataprovider-edc-dataplane:8081 @@ -350,13 +350,13 @@ dataprovider: transferProxyTokenEncryptionAesKey: *tokenEncryptionAesKey digital-twin-registry: - nameOverride: dataprovider-digital-twin-registry + nameOverride: dataprovider-dtr postgresql: - nameOverride: dataprovider-digital-twin-registry-db + nameOverride: dataprovider-dtr-db auth: existingSecret: dataprovider-secret-dtr-postgres-init registry: - host: dataprovider-digital-twin-registry.test + host: dataprovider-dtr.test simple-data-backend: nameOverride: dataprovider-submodelserver From 97d85b08b456fb2cfab84b3fe76e3ca213b1ecb4 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Fri, 5 Apr 2024 08:42:31 +0200 Subject: [PATCH 21/32] chore: disable provider component --- charts/umbrella/values.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index 39be0460..357bff78 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -307,7 +307,8 @@ dataconsumer: enabled: false dataprovider: - enabled: true + # TODO enable once resource availability is clarified + enabled: false seedTestdata: true backendUrl: http://{{ .Release.Name }}-dataprovider-submodelserver:8080 registryUrl: http://{{ .Release.Name }}-dataprovider-dtr:8080/api/v3.0 From 4939e2b5880cce9965180734ba31fdbd32ab4197 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Tue, 16 Apr 2024 11:00:31 +0200 Subject: [PATCH 22/32] chore: bump chart version --- charts/umbrella/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/umbrella/Chart.yaml b/charts/umbrella/Chart.yaml index e660035e..d5c0035c 100644 --- a/charts/umbrella/Chart.yaml +++ b/charts/umbrella/Chart.yaml @@ -28,7 +28,7 @@ sources: - https://github.com/eclipse-tractusx/e2e-testing type: application -version: 0.7.0 +version: 0.8.0 dependencies: # portal From 3d855766e625b3b25843f4c99367058bced3613d Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Tue, 16 Apr 2024 14:05:57 +0200 Subject: [PATCH 23/32] chore: add tx-data-provider to helm checks --- .github/workflows/helm-checks.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/helm-checks.yaml b/.github/workflows/helm-checks.yaml index 227c374b..4320b386 100644 --- a/.github/workflows/helm-checks.yaml +++ b/.github/workflows/helm-checks.yaml @@ -130,6 +130,9 @@ jobs: - name: Install chart and run tests (simple-data-backend) run: ct install --charts charts/simple-data-backend --target-branch ${{ github.event.repository.default_branch }} --helm-extra-set-args "--set image.repository=kind-registry:5000/simple-data-backend --set image.tag=testing" + - name: Install chart and run tests (tx-data-provider) + run: ct install --charts charts/tx-data-provider --target-branch ${{ github.event.repository.default_branch }} + - name: Install chart and run tests (umbrella) run: | helm install umbrella charts/umbrella --namespace install --create-namespace --debug From d97bc35e9bdc42c40674562fe714d53b3ba320a9 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 18 Apr 2024 13:36:52 +0200 Subject: [PATCH 24/32] chore: move vault to data provider chart --- charts/tx-data-provider/Chart.yaml | 4 + .../post-install-job-upload-testdata.yaml | 2 +- .../templates/post-install-vault-setup.yaml | 36 ++-- .../templates/vault-edc-configmap.yaml} | 3 +- charts/tx-data-provider/values.yaml | 30 ++- charts/umbrella/Chart.yaml | 5 - charts/umbrella/values.yaml | 171 ++---------------- 7 files changed, 63 insertions(+), 188 deletions(-) rename charts/{umbrella => tx-data-provider}/templates/post-install-vault-setup.yaml (57%) rename charts/{umbrella/templates/edc-configmap.yaml => tx-data-provider/templates/vault-edc-configmap.yaml} (93%) diff --git a/charts/tx-data-provider/Chart.yaml b/charts/tx-data-provider/Chart.yaml index 6f2b20ca..4149ebd2 100644 --- a/charts/tx-data-provider/Chart.yaml +++ b/charts/tx-data-provider/Chart.yaml @@ -39,3 +39,7 @@ dependencies: repository: https://eclipse-tractusx.github.io/charts/dev version: 0.5.3 condition: tractusx-connector.enabled + - name: vault + version: 0.20.1 + repository: https://helm.releases.hashicorp.com + condition: vault.enabled \ No newline at end of file diff --git a/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml b/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml index f2dc5ac7..9893749d 100644 --- a/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml +++ b/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml @@ -41,7 +41,7 @@ metadata: # job is considered part of the release. "helm.sh/hook": post-install "helm.sh/hook-weight": "-4" - "helm.sh/hook-delete-policy": before-hook-creation #,hook-succeeded + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded spec: template: metadata: diff --git a/charts/umbrella/templates/post-install-vault-setup.yaml b/charts/tx-data-provider/templates/post-install-vault-setup.yaml similarity index 57% rename from charts/umbrella/templates/post-install-vault-setup.yaml rename to charts/tx-data-provider/templates/post-install-vault-setup.yaml index afe78b75..a6a88ca8 100644 --- a/charts/umbrella/templates/post-install-vault-setup.yaml +++ b/charts/tx-data-provider/templates/post-install-vault-setup.yaml @@ -18,12 +18,13 @@ # ############################################################################# --- {{ if .Values.vault.enabled }} -{{- $vaultToken := .Values.vault.token -}} -{{- $vaultUrl := tpl .Values.vault.url . -}} +{{- $vaultToken := index .Values "tractusx-connector" "vault" "hashicorp" "token" -}} +{{- $vaultUrl := tpl (index .Values "tractusx-connector" "vault" "hashicorp" "url") . -}} +{{- $fullName := include "dataprovider.fullname" . -}} apiVersion: batch/v1 kind: Job metadata: - name: {{ .Release.Name }}-post-install-vault-setup + name: {{ $fullName }}-post-install-vault-setup labels: app.kubernetes.io/managed-by: {{ .Release.Service | quote }} app.kubernetes.io/instance: {{ .Release.Name | quote }} @@ -47,36 +48,31 @@ spec: restartPolicy: Never containers: - name: post-install-job - image: "ubuntu:mantic" + image: "alpine:3.19" command: - "/bin/sh" - "-c" - | - apt-get update && apt-get install -y --no-install-recommends wget - {{- range $key, $value := .Values.vault.secrets }} - wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 --header 'Content-Type: application/json' \ - --header 'X-Vault-Token: {{ $vaultToken }}' \ - --post-data '{"data": {"content": "{{ $value }}"}}' \ - "{{ $vaultUrl }}/v1/secret/data/{{ $key }}" + sleep 10 + {{- range $key, $value := .Values.secrets }} + wget --header 'Content-Type: application/json' --header 'X-Vault-Token: {{ $vaultToken }}' \ + --post-data '{"data": {"content": "{{ $value }}"}}' "{{ $vaultUrl }}/v1/secret/data/{{ $key }}" {{- end }} - wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 --header 'Content-Type: application/json' \ - --header 'X-Vault-Token: {{ $vaultToken }}' --post-file=/opt/config/cert.json \ - "{{ $vaultUrl }}/v1/secret/data/{{ .Values.vault.secretNames.tokenSignerPublicKey }}" + wget --header 'Content-Type: application/json' --header 'X-Vault-Token: {{ $vaultToken }}' \ + --post-file=/opt/config/cert.json "{{ $vaultUrl }}/v1/secret/data/tokenSignerPublicKey" - wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 --header 'Content-Type: application/json' \ - --header 'X-Vault-Token: {{ $vaultToken }}' --post-file=/opt/config/key.json \ - "{{ $vaultUrl }}/v1/secret/data/{{ .Values.vault.secretNames.tokenSignerPrivateKey }}" + wget --header 'Content-Type: application/json' --header 'X-Vault-Token: {{ $vaultToken }}' \ + --post-file=/opt/config/key.json "{{ $vaultUrl }}/v1/secret/data/tokenSignerPrivateKey" - wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 --header 'Content-Type: application/json' \ - --header 'X-Vault-Token: {{ $vaultToken }}' --post-file=/opt/config/aes-secret.json \ - "{{ $vaultUrl }}/v1/secret/data/{{ .Values.vault.secretNames.tokenEncryptionAesKey }}" + wget --header 'Content-Type: application/json' --header 'X-Vault-Token: {{ $vaultToken }}' \ + --post-file=/opt/config/aes-secret.json "{{ $vaultUrl }}/v1/secret/data/tokenEncryptionAesKey" volumeMounts: - name: config-volume mountPath: /opt/config volumes: - name: config-volume configMap: - name: {{ .Release.Name }}-vault-edc-configmap + name: {{ $fullName }}-vault-edc-configmap defaultMode: 0777 {{ end }} \ No newline at end of file diff --git a/charts/umbrella/templates/edc-configmap.yaml b/charts/tx-data-provider/templates/vault-edc-configmap.yaml similarity index 93% rename from charts/umbrella/templates/edc-configmap.yaml rename to charts/tx-data-provider/templates/vault-edc-configmap.yaml index b00a602c..b0c11bb8 100644 --- a/charts/umbrella/templates/edc-configmap.yaml +++ b/charts/tx-data-provider/templates/vault-edc-configmap.yaml @@ -18,10 +18,11 @@ # ############################################################################# --- {{- $cert := genSelfSignedCert "" (list) (list) 365 }} +{{- $fullName := include "dataprovider.fullname" . -}} apiVersion: v1 kind: ConfigMap metadata: - name: {{ .Release.Name }}-vault-edc-configmap + name: {{ $fullName }}-vault-edc-configmap data: cert.json: |- { diff --git a/charts/tx-data-provider/values.yaml b/charts/tx-data-provider/values.yaml index ced43a13..0e7a21b0 100644 --- a/charts/tx-data-provider/values.yaml +++ b/charts/tx-data-provider/values.yaml @@ -32,6 +32,8 @@ registryUrl: "" # Override the digital twin registry url controlplanePublicUrl: "" # Override the edc controlplane protocol url controlplaneManagementUrl: "" # Override the edc controlplane management url dataplaneUrl: "" # Override the edc dataplane public url +secrets: + edc-miw-keycloak-secret: changeme tractusx-connector: enabled: true @@ -43,13 +45,13 @@ tractusx-connector: controlplane: ssi: miw: - url: changeme + url: http://example.org authorityId: changeme oauth: - tokenurl: changeme + tokenurl: http://example.org client: id: changeme - secretAlias: changeme + secretAlias: edc-miw-keycloak-secret ingresses: - enabled: false endpoints: @@ -66,12 +68,12 @@ tractusx-connector: httpProxyTokenReceiverUrl: "https://submodelserver.test/data/endpoint-data-reference-provider1" vault: hashicorp: - url: changeme - token: changeme + url: http://{{ .Release.Name }}-edc-provider-vault:8200 + token: "root" secretNames: - transferProxyTokenSignerPrivateKey: changeme - transferProxyTokenSignerPublicKey: changeme - transferProxyTokenEncryptionAesKey: changeme + transferProxyTokenSignerPrivateKey: tokenSignerPrivateKey + transferProxyTokenSignerPublicKey: tokenSignerPublicKey + transferProxyTokenEncryptionAesKey: tokenEncryptionAesKey postgresql: nameOverride: edc-postgresql @@ -120,3 +122,15 @@ simple-data-backend: tag: "main" ingress: enabled: false + +vault: + enabled: true + nameOverride: edc-provider-vault + injector: + enabled: false + server: + dev: + enabled: true + devRootToken: root + ingress: + enabled: false \ No newline at end of file diff --git a/charts/umbrella/Chart.yaml b/charts/umbrella/Chart.yaml index d5c0035c..a7618abd 100644 --- a/charts/umbrella/Chart.yaml +++ b/charts/umbrella/Chart.yaml @@ -59,11 +59,6 @@ dependencies: name: sdfactory repository: https://eclipse-tractusx.github.io/charts/dev version: 2.1.12 - # vault - - name: vault - condition: vault.enabled - repository: https://helm.releases.hashicorp.com - version: 0.20.0 # miw - name: managed-identity-wallet repository: https://eclipse-tractusx.github.io/charts/dev diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index 15eb53c1..9905a00f 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -17,126 +17,6 @@ # SPDX-License-Identifier: Apache-2.0 # ############################################################################# --- -## TODO: update edc to R23.12 and adjust values -# edcconsumer: -# nameOverride: edcconsumer -# install: -# daps: true -# postgresql: true -# vault: true -# backendService: -# # TODO: what is the correct value here? -# httpProxyTokenReceiverUrl: "http://localhost" -# controlplane: -# endpoints: -# management: -# authKey: consumer-authkey -# image: -# repository: *edcCpImage -# tag: *edcImageTag -# daps: -# clientId: *edcConsumerDapsClientId -# daps: -# secret: -# clientId: *dapsClientId -# clientSecret: *dapsClientSecret -# image: -# repository: ghcr.io/fraunhofer-aisec/omejdn-server -# # podSecurityContext: -# # fsGroup: 1000 -# # runAsNonRoot: true -# # runAsUser: 1000 -# # runAsGroup: 1000 -# # persistence: -# # accessMode: "ReadWriteOnce" -# dataplane: -# image: -# repository: *edcDpImage -# tag: *edcImageTag -# networkPolicy: -# enabled: *netPolEnabled -# participant: -# id: consumer -# postgresql: -# nameOverride: consumer-postgresql -# networkPolicy: -# enabled: *netPolEnabled -# ingressRules: -# primaryAccessOnlyFrom: -# enabled: true -# podSelector: -# app.kubernetes.io/name: edcconsumer-controlplane -# app.kubernetes.io/instance: '{{ .Release.Name }}-controlplane' -# jdbcUrl: "jdbc:postgresql://{{ .Release.Name }}-consumer-postgresql:5432/edc" -# auth: -# username: psql-consumer-user -# password: psql-consumer-password -# vault: -# hashicorp: -# token: *edcVaultToken -# server: -# dev: -# devRootToken: *edcVaultToken -# networkPolicy: -# enabled: *netPolEnabled -# secretNames: -# dapsPrivateKey: *edcConsumerVaultDapsPrivateKey -# dapsPublicKey: *edcConsumerVaultDapsPublicKey -# transferProxyTokenEncryptionAesKey: *edcConsumerVaultTransferEncryptionAesKey -# transferProxyTokenSignerPrivateKey: *edcConsumerVaultTransferPrivateKey -# transferProxyTokenSignerPublicKey: *edcConsumerVaultTransferPublicKey - -# edcprovider: -# nameOverride: edcprovider -# install: -# daps: false -# postgresql: true -# vault: false -# backendService: -# # TODO: what is the correct value here? -# httpProxyTokenReceiverUrl: "http://localhost" -# controlplane: -# endpoints: -# management: -# authKey: provider-authkey -# image: -# repository: *edcCpImage -# tag: *edcImageTag -# daps: -# clientId: *edcProviderDapsClientId -# dataplane: -# image: -# repository: *edcDpImage -# tag: *edcImageTag -# participant: -# id: provider -# clientId: *edcProviderDapsClientId -# networkPolicy: -# enabled: *netPolEnabled -# postgresql: -# nameOverride: provider-postgresql -# jdbcUrl: "jdbc:postgresql://{{ .Release.Name }}-provider-postgresql:5432/edc" -# auth: -# username: psql-provider-user -# password: psql-provider-password -# networkPolicy: -# enabled: *netPolEnabled -# ingressRules: -# primaryAccessOnlyFrom: -# enabled: true -# podSelector: -# app.kubernetes.io/name: edcprovider-controlplane -# app.kubernetes.io/instance: '{{ .Release.Name }}-controlplane' -# vault: -# hashicorp: -# token: *edcVaultToken -# secretNames: -# dapsPrivateKey: *edcProviderVaultDapsPrivateKey -# dapsPublicKey: *edcProviderVaultDapsPublicKey -# transferProxyTokenEncryptionAesKey: *edcProviderVaultTransferEncryptionAesKey -# transferProxyTokenSignerPrivateKey: *edcProviderVaultTransferPrivateKey -# transferProxyTokenSignerPublicKey: *edcProviderVaultTransferPublicKey - portal: enabled: true replicaCount: 1 @@ -221,25 +101,6 @@ sdfactory: # -- Details for Clearing House Client Secret clearingHouseClientSecret: "" -vault: - enabled: true - token: &vault-token root - url: http://{{ .Release.Name }}-vault:8200 - secrets: - edc-test-miw-keycloak-secret: miw_private_client # TODO switch to existing user - secretNames: - tokenSignerPublicKey: &tokenSignerPublicKey tokenSignerPublicKey - tokenSignerPrivateKey: &tokenSignerPrivateKey tokenSignerPrivateKey - tokenEncryptionAesKey: &tokenEncryptionAesKey tokenEncryptionAesKey - injector: - enabled: false - server: - dev: - enabled: true - devRootToken: *vault-token - ingress: - enabled: false - managed-identity-wallet: nameOverride: miw fullnameOverride: miw @@ -270,6 +131,8 @@ dataconsumer: enabled: true seedTestdata: false nameOverride: dataconsumer + secrets: + edc-miw-keycloak-secret: changeme # TODO switch to existing user tractusx-connector: nameOverride: dataconsumer-edc participant: @@ -283,7 +146,7 @@ dataconsumer: tokenurl: http://lab-centralidp/auth/realms/CX-Central/protocol/openid-connect/token client: id: *miw_client - secretAlias: edc-test-miw-keycloak-secret + secretAlias: edc-miw-keycloak-secret endpoints: management: authKey: TEST1 @@ -297,12 +160,12 @@ dataconsumer: jdbcUrl: "jdbc:postgresql://{{ .Release.Name }}-dataconsumer-db:5432/edc" vault: hashicorp: - url: http://{{ .Release.Name }}-vault:8200 - token: *vault-token - secretNames: - transferProxyTokenSignerPublicKey: *tokenSignerPublicKey - transferProxyTokenSignerPrivateKey: *tokenSignerPrivateKey - transferProxyTokenEncryptionAesKey: *tokenEncryptionAesKey + url: http://edc-dataconsumer-vault:8200 + + vault: + nameOverride: edc-dataconsumer-vault + fullnameOverride: edc-dataconsumer-vault + enabled: true digital-twin-registry: enabled: false @@ -320,6 +183,8 @@ dataprovider: controlplaneManagementUrl: http://{{ .Release.Name }}-dataprovider-edc-controlplane:8081 dataplaneUrl: http://{{ .Release.Name }}-dataprovider-edc-dataplane:8081 nameOverride: dataprovider + secrets: + edc-miw-keycloak-secret: changeme # TODO switch to existing user tractusx-connector: nameOverride: dataprovider-edc participant: @@ -333,7 +198,7 @@ dataprovider: tokenurl: http://lab-centralidp/auth/realms/CX-Central/protocol/openid-connect/token client: id: *miw_client - secretAlias: edc-test-miw-keycloak-secret + secretAlias: edc-miw-keycloak-secret endpoints: management: authKey: TEST2 @@ -347,12 +212,12 @@ dataprovider: jdbcUrl: "jdbc:postgresql://{{ .Release.Name }}-dataprovider-db:5432/edc" vault: hashicorp: - url: http://{{ .Release.Name }}-vault:8200 - token: *vault-token - secretNames: - transferProxyTokenSignerPublicKey: *tokenSignerPublicKey - transferProxyTokenSignerPrivateKey: *tokenSignerPrivateKey - transferProxyTokenEncryptionAesKey: *tokenEncryptionAesKey + url: http://edc-dataprovider-vault:8200 + + vault: + nameOverride: edc-dataprovider-vault + fullnameOverride: edc-dataprovider-vault + enabled: true digital-twin-registry: nameOverride: dataprovider-dtr From fff0739f6660571f3cbc4ac3f65ee91e147659f1 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 18 Apr 2024 13:41:53 +0200 Subject: [PATCH 25/32] chore: fix chart linting --- charts/tx-data-provider/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/tx-data-provider/Chart.yaml b/charts/tx-data-provider/Chart.yaml index 4149ebd2..00d8eadb 100644 --- a/charts/tx-data-provider/Chart.yaml +++ b/charts/tx-data-provider/Chart.yaml @@ -40,6 +40,6 @@ dependencies: version: 0.5.3 condition: tractusx-connector.enabled - name: vault - version: 0.20.1 + version: 0.20.0 repository: https://helm.releases.hashicorp.com condition: vault.enabled \ No newline at end of file From 08c05e79b8905ab788cc7f2f9d3507fc2ca9050f Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 18 Apr 2024 13:48:59 +0200 Subject: [PATCH 26/32] chore: fix chart linting --- charts/tx-data-provider/templates/vault-edc-configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/tx-data-provider/templates/vault-edc-configmap.yaml b/charts/tx-data-provider/templates/vault-edc-configmap.yaml index b0c11bb8..31571948 100644 --- a/charts/tx-data-provider/templates/vault-edc-configmap.yaml +++ b/charts/tx-data-provider/templates/vault-edc-configmap.yaml @@ -17,7 +17,7 @@ # SPDX-License-Identifier: Apache-2.0 # ############################################################################# --- -{{- $cert := genSelfSignedCert "" (list) (list) 365 }} +{{ $cert := genSelfSignedCert "" (list) (list) 365 }} {{- $fullName := include "dataprovider.fullname" . -}} apiVersion: v1 kind: ConfigMap From eefb4f7080bb1e26239c09150cd4bd51e1bf29de Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 18 Apr 2024 13:54:03 +0200 Subject: [PATCH 27/32] chore: fix chart linting --- charts/tx-data-provider/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/tx-data-provider/Chart.yaml b/charts/tx-data-provider/Chart.yaml index 00d8eadb..cd903009 100644 --- a/charts/tx-data-provider/Chart.yaml +++ b/charts/tx-data-provider/Chart.yaml @@ -42,4 +42,4 @@ dependencies: - name: vault version: 0.20.0 repository: https://helm.releases.hashicorp.com - condition: vault.enabled \ No newline at end of file + condition: vault.enabled From c741ae1dbd012696b90d6f9c88c781f3649893fc Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 18 Apr 2024 14:01:34 +0200 Subject: [PATCH 28/32] chore: fix chart linting --- charts/tx-data-provider/templates/post-install-configmap.yaml | 2 +- .../templates/post-install-job-upload-testdata.yaml | 2 +- charts/tx-data-provider/templates/post-install-vault-setup.yaml | 2 +- charts/tx-data-provider/values.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/tx-data-provider/templates/post-install-configmap.yaml b/charts/tx-data-provider/templates/post-install-configmap.yaml index 322b27f4..113a4039 100644 --- a/charts/tx-data-provider/templates/post-install-configmap.yaml +++ b/charts/tx-data-provider/templates/post-install-configmap.yaml @@ -33,4 +33,4 @@ data: {{ .Files.Get "resources/Testdata_AsBuilt-combustion.json" | indent 4}} upload-data.sh: |- {{ .Files.Get "resources/upload-data.sh" | indent 4}} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml b/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml index 9893749d..11752833 100644 --- a/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml +++ b/charts/tx-data-provider/templates/post-install-job-upload-testdata.yaml @@ -74,4 +74,4 @@ spec: name: {{ $fullName }}-postinstall-configmap defaultMode: 0777 {{- end }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/charts/tx-data-provider/templates/post-install-vault-setup.yaml b/charts/tx-data-provider/templates/post-install-vault-setup.yaml index a6a88ca8..2cc620a4 100644 --- a/charts/tx-data-provider/templates/post-install-vault-setup.yaml +++ b/charts/tx-data-provider/templates/post-install-vault-setup.yaml @@ -75,4 +75,4 @@ spec: configMap: name: {{ $fullName }}-vault-edc-configmap defaultMode: 0777 -{{ end }} \ No newline at end of file +{{ end }} diff --git a/charts/tx-data-provider/values.yaml b/charts/tx-data-provider/values.yaml index 0e7a21b0..8b4e97ef 100644 --- a/charts/tx-data-provider/values.yaml +++ b/charts/tx-data-provider/values.yaml @@ -133,4 +133,4 @@ vault: enabled: true devRootToken: root ingress: - enabled: false \ No newline at end of file + enabled: false From 5a2245726f0c754c27bda16176b5af310b04cd34 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 18 Apr 2024 15:27:32 +0200 Subject: [PATCH 29/32] chore: fix vault setup --- charts/tx-data-provider/values.yaml | 17 +++++++++++++---- charts/umbrella/values.yaml | 12 ++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/charts/tx-data-provider/values.yaml b/charts/tx-data-provider/values.yaml index 8b4e97ef..86c174c0 100644 --- a/charts/tx-data-provider/values.yaml +++ b/charts/tx-data-provider/values.yaml @@ -51,7 +51,7 @@ tractusx-connector: tokenurl: http://example.org client: id: changeme - secretAlias: edc-miw-keycloak-secret + secretAlias: client-secret ingresses: - enabled: false endpoints: @@ -71,9 +71,9 @@ tractusx-connector: url: http://{{ .Release.Name }}-edc-provider-vault:8200 token: "root" secretNames: - transferProxyTokenSignerPrivateKey: tokenSignerPrivateKey - transferProxyTokenSignerPublicKey: tokenSignerPublicKey - transferProxyTokenEncryptionAesKey: tokenEncryptionAesKey + transferProxyTokenSignerPrivateKey: + transferProxyTokenSignerPublicKey: + transferProxyTokenEncryptionAesKey: aesKey postgresql: nameOverride: edc-postgresql @@ -129,6 +129,15 @@ vault: injector: enabled: false server: + postStart: + - sh + - -c + - |- + { + sleep 5 + /bin/vault kv put secret/client-secret content=kEmH7QRPWhKfy8f+x0pFMw== + /bin/vault kv put secret/aesKey content=YWVzX2VuY2tleV90ZXN0Cg== + } dev: enabled: true devRootToken: root diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index 9905a00f..66c16510 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -161,11 +161,17 @@ dataconsumer: vault: hashicorp: url: http://edc-dataconsumer-vault:8200 + secretNames: + transferProxyTokenSignerPrivateKey: tokenSignerPrivateKey + transferProxyTokenSignerPublicKey: tokenSignerPublicKey + transferProxyTokenEncryptionAesKey: tokenEncryptionAesKey vault: nameOverride: edc-dataconsumer-vault fullnameOverride: edc-dataconsumer-vault enabled: true + server: + postStart: [] digital-twin-registry: enabled: false @@ -213,11 +219,17 @@ dataprovider: vault: hashicorp: url: http://edc-dataprovider-vault:8200 + secretNames: + transferProxyTokenSignerPrivateKey: tokenSignerPrivateKey + transferProxyTokenSignerPublicKey: tokenSignerPublicKey + transferProxyTokenEncryptionAesKey: tokenEncryptionAesKey vault: nameOverride: edc-dataprovider-vault fullnameOverride: edc-dataprovider-vault enabled: true + server: + postStart: [] digital-twin-registry: nameOverride: dataprovider-dtr From b1d9c9f50dc6be9c6ac6e8a7cbeff8ff0a52b763 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 18 Apr 2024 15:31:54 +0200 Subject: [PATCH 30/32] chore: bump chart version --- charts/umbrella/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/umbrella/Chart.yaml b/charts/umbrella/Chart.yaml index a7618abd..413b7037 100644 --- a/charts/umbrella/Chart.yaml +++ b/charts/umbrella/Chart.yaml @@ -28,7 +28,7 @@ sources: - https://github.com/eclipse-tractusx/e2e-testing type: application -version: 0.8.0 +version: 0.9.0 dependencies: # portal From 30b8e2f790b5d434c4edd21b0c30ac93a7618471 Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 18 Apr 2024 15:44:02 +0200 Subject: [PATCH 31/32] chore: enable dataprovider chart --- charts/umbrella/values.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/charts/umbrella/values.yaml b/charts/umbrella/values.yaml index 432c2917..22aaee3d 100644 --- a/charts/umbrella/values.yaml +++ b/charts/umbrella/values.yaml @@ -208,8 +208,7 @@ dataconsumer: enabled: false dataprovider: - # TODO enable once resource availability is clarified - enabled: false + enabled: true seedTestdata: true backendUrl: http://{{ .Release.Name }}-dataprovider-submodelserver:8080 registryUrl: http://{{ .Release.Name }}-dataprovider-dtr:8080/api/v3.0 From c5fac710c2c96fde1f6501a28a8141fae840d89e Mon Sep 17 00:00:00 2001 From: Jaro Hartmann Date: Thu, 18 Apr 2024 16:35:55 +0200 Subject: [PATCH 32/32] chore: increase install timeout --- .github/workflows/helm-checks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/helm-checks.yaml b/.github/workflows/helm-checks.yaml index dd2a6be5..06417e79 100644 --- a/.github/workflows/helm-checks.yaml +++ b/.github/workflows/helm-checks.yaml @@ -141,7 +141,7 @@ jobs: - name: Install chart and run tests (umbrella) run: | - helm install umbrella charts/umbrella -f charts/values-test.yaml --namespace install --create-namespace --debug + helm install umbrella charts/umbrella -f charts/values-test.yaml --namespace install --create-namespace --debug --timeout 10m helm uninstall umbrella --namespace install ## Skip upgrade for now until a working chart is released