-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: create in-mem helm chart (#219)
* feature: create the tractusx-connector-memory chart * pr remarks * pr remarks * increase waiting for negotiation, sometimes takes longer then 2 seconds * Apply suggestions from code review Co-authored-by: Florian Rusch (ZF Friedrichshafen AG) <florian.rusch.external@zf.com> * pr remarks * Update charts/tractusx-connector-memory/templates/deployment-runtime.yaml Co-authored-by: Florian Rusch (ZF Friedrichshafen AG) <florian.rusch.external@zf.com> --------- Co-authored-by: Florian Rusch (ZF Friedrichshafen AG) <florian.rusch.external@zf.com>
- Loading branch information
1 parent
fd241d0
commit ec424a8
Showing
58 changed files
with
2,883 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# | ||
# Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | ||
# Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
# | ||
# See the NOTICE file(s) distributed with this work for additional | ||
# information regarding copyright ownership. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License, Version 2.0 which is available at | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
--- | ||
name: "Run Deployment Test" | ||
description: "Build and publish a Docker Image to DockerHub" | ||
inputs: | ||
imagename: | ||
required: true | ||
description: "name of the docker image, e.g. edc-runtime-memory" | ||
|
||
image_tag: | ||
required: false | ||
default: "latest" | ||
description: "docker image tag, defaults to 'latest'" | ||
|
||
helm_command: | ||
required: true | ||
description: "command which is executed to install the chart. must also include verification commands, such as 'helm test'" | ||
|
||
rootDir: | ||
required: true | ||
description: "The directory that contains the docker file, e.g. edc-controlplane/edc-runtime-memory" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.3.0 | ||
|
||
- name: Cache ContainerD Image Layers | ||
uses: actions/cache@v3 | ||
with: | ||
path: /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs | ||
key: ${{ runner.os }}-io.containerd.snapshotter.v1.overlayfs | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3.11.0 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
cache: 'gradle' | ||
|
||
- name: Build docker images | ||
shell: bash | ||
run: |- | ||
./gradlew -p ${{ inputs.rootDir }} dockerize | ||
- name: Setup Helm | ||
uses: azure/setup-helm@v3.5 | ||
with: | ||
version: v3.8.1 | ||
|
||
- name: Setup Kubectl | ||
uses: azure/setup-kubectl@v3.2 | ||
|
||
- name: Create k8s Kind Cluster | ||
uses: helm/kind-action@v1.5.0 | ||
|
||
- name: Load images into KinD | ||
shell: bash | ||
run: | | ||
kind get clusters | xargs -n1 kind load docker-image ${{ inputs.imagename }}:${{ inputs.image_tag }} --name | ||
################################################### | ||
# Install the test infrastructure | ||
################################################### | ||
- name: Install Infrastructure | ||
shell: bash | ||
run: |- | ||
helm install infra edc-tests/deployment/src/main/resources/helm/test-infrastructure \ | ||
--wait-for-jobs --timeout=30s --dependency-update | ||
- name: Install Runtime | ||
shell: bash | ||
run: ${{ inputs.helm_command }} | ||
|
||
|
||
################# | ||
### Tear Down ### | ||
################# | ||
- name: Destroy the kind cluster | ||
if: always() | ||
shell: bash | ||
run: >- | ||
kind get clusters | xargs -n1 kind delete cluster --name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
daps-key:-----BEGIN PRIVATE KEY----- | ||
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCv+NUvK7ppJPiM | ||
wZPaQQxE745T5pV38O/Mkay5m82nnd5BoMoCdhhRTy3Efy79FhvBfGruFBLLGzsQ | ||
FOEUY53Albeumo2gmpZSKjJR/M2ifK4MTaRniVOWL5mEcZSKPhsItKpxdLaiYfB6 | ||
8uzqkqNICtmAQRSclYKzLBM9xHLEtxDWCbnzYFCHoOELGi+PTNIFsUnsT3QuKaJ/ | ||
ejb47vdA/EZbwCQdtTyJ6i54jGhZUp0WMwq1Go2uhzJsygPmT2da/ZZZc7BNNEQE | ||
sUSMZSpMH807TG/TunstotrzO4ShhpV4zbJ2FV/VlxH7yuCawmnR84F/KnXs9fUc | ||
RSrQfuYBAgMBAAECggEAO+KjsjTgcG3bhBNQnMLsSP15Y0Yicbn18ZlVvaivGS7Z | ||
d14fwSytY+ZdPfTGaey/L16HCVSdfK9cr0Fbw9OO2P5ajzobnp9dLsMbctlkpbpm | ||
hNtbarzKTF8QkIkSsuUl0BWjt46vpJ1N+Jl5VO7oUFkY4dPEDvG2lAEY3zlekWDm | ||
cQeOC/YgpoW4xfRwPPS6QE0w3Q+H5NfNjfz+mSHeItTlVfTKDRliWQLPWeRZFuXh | ||
FlRFUQnTmEE/9wpIe3Hn7WXJ3fQqcYDzxU7/zwwY9I7bB15SgVHlR0ENDPAD5X8F | ||
MVZ3EcL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ADggEBAD2a5kuIdICNXfYLpSe7AIONwZVucaArYtpXBxHEy5lMJsTEJgjZzypd | ||
iIMU7onEQGVbii6yVNpWfIpJYM4e8ytVdJuk5evclVKZs/lZ2IshLyWFVj+ITh2E | ||
28X4C/Hnmt4MPBCNowQf71nMp4LEziBgXp54qFV9C+qSTEVdrherRE0PU/zKyX10 | ||
S/P5o42weTHnAO/pBN/8AmL3AymynKVgcPaW46IjjRAuc6kfZWCrYQ0M4+/7Ws5r | ||
uM55Zae/L+C82OTNNaaK324ogsCkORPeQ23OCrRD8rZJmQ9bpoOGglPminfwEOhB | ||
UHtyKgmvqCyOV3G/4G93W/xsLV0kxLA= | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# | ||
# Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH | ||
# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation | ||
# | ||
# See the NOTICE file(s) distributed with this work for additional | ||
# information regarding copyright ownership. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License, Version 2.0 which is available at | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
--- | ||
name: "Deployment Tests" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
release: | ||
types: | ||
- published | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**/*.md' | ||
branches: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deployment-test-memory: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.3.0 | ||
- uses: ./.github/actions/run-deployment-test | ||
name: "Run deployment test using KinD and Helm" | ||
with: | ||
imagename: edc-runtime-memory | ||
rootDir: edc-controlplane/edc-runtime-memory | ||
helm_command: |- | ||
helm install tx-inmem charts/tractusx-connector-memory \ | ||
-f charts/tractusx-connector-memory/example.yaml \ | ||
--set vault.secrets="$(cat ./.github/workflows/deploy-test-secrets)" \ | ||
--wait-for-jobs --timeout=120s | ||
# wait for the pod to become ready | ||
kubectl rollout status deployment tx-inmem | ||
# execute the helm test | ||
helm test tx-inmem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.