Skip to content

refactor: add deployment script for local deployment#469

Merged
tom-rm-meyer-ISST merged 9 commits intoeclipse-tractusx:mainfrom
FraunhoferISST:refactor/local-deployment
Mar 14, 2025
Merged

refactor: add deployment script for local deployment#469
tom-rm-meyer-ISST merged 9 commits intoeclipse-tractusx:mainfrom
FraunhoferISST:refactor/local-deployment

Conversation

@tom-rm-meyer-ISST
Copy link
Copy Markdown
Contributor

@tom-rm-meyer-ISST tom-rm-meyer-ISST commented Jun 20, 2024

Description

The following changes have been made:

  • backend + chart: replace health controller by spring actuator plugin
  • updated chart probes for backend: use a startup probe with better fitting defaults
  • local deployment
    • update generate keys:
      • fixed wrong parameters for keycloak miw_client (not sure why it worked without the script but not with the script)
      • write keys to bruno environment (renamed to local)
    • add local/package.json to use the bruno cli to seed the int test data, if wanted
    • add deploy.sh which provides one-line deployments for common scenarios (full clean, only clean and create puris and direct direct dependencies, also seed int test data)
    • added container that allows to externalize service names to your dns (dns-host-resolver)
    • added healthchecks for nearly all services (needed by deploy.sh)
  • postman: add 25 seconds waiting period after mad tests so that the backend may create the submodel descriptors and tests can be run fully automated.
  • Ci changes:
    • kics should exclude the openApi and the local folder
    • trufflehog shall ignore README.md files

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

Comment thread local/docker-compose-newman.yaml Fixed
Comment thread local/docker-compose-newman.yaml Fixed
Comment thread local/docker-compose-newman.yaml Fixed
@tom-rm-meyer-ISST tom-rm-meyer-ISST marked this pull request as ready for review June 20, 2024 07:54
@tom-rm-meyer-ISST
Copy link
Copy Markdown
Contributor Author

@eschrewe please already review this PR.

I'll meanwhile will work on the worfklow in pr #450 to not enforce the update of the version as we sometimes want to bundle the chart changes for one release and not release every change directly.

@tom-rm-meyer-ISST tom-rm-meyer-ISST force-pushed the refactor/local-deployment branch from 427a3a2 to 020af38 Compare February 21, 2025 12:38
Comment thread local/docker-compose-infrastructure.yaml Fixed
Comment thread local/docker-compose-infrastructure.yaml Fixed
Comment thread local/docker-compose-infrastructure.yaml Fixed
Comment thread local/docker-compose-infrastructure.yaml Fixed
Comment thread local/docker-compose-infrastructure.yaml Fixed
Comment thread local/docker-compose-infrastructure.yaml Fixed
@tom-rm-meyer-ISST tom-rm-meyer-ISST force-pushed the refactor/local-deployment branch from 020af38 to 671534a Compare February 21, 2025 12:40
@tom-rm-meyer-ISST tom-rm-meyer-ISST removed the request for review from eschrewe February 21, 2025 12:42
@tom-rm-meyer-ISST tom-rm-meyer-ISST force-pushed the refactor/local-deployment branch 4 times, most recently from b5ccf25 to fa885eb Compare February 21, 2025 14:05
@tom-rm-meyer-ISST tom-rm-meyer-ISST force-pushed the refactor/local-deployment branch from fa885eb to c6a01e8 Compare February 21, 2025 14:09
@tom-rm-meyer-ISST
Copy link
Copy Markdown
Contributor Author

tom-rm-meyer-ISST commented Feb 21, 2025

Two things to consider:

  • 1kloc limit is not applicable to committers.
  • Helm chart fails due to version not increased (will be done during release).

Copy link
Copy Markdown
Member

@ReneSchroederLJ ReneSchroederLJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great contribution. The deployment script works really well. Mainly some suggestions for usability and documentation.

However, there is one bigger topic. I realized that all scripts in the repo are defined with the shebang for bash ( #!/bin/bash ), but being run with the regular sh shell. The regular shell doesn't support all features of bash. Currently this is not leading to compatibility issues, but we shouldn't rely on it.

This could either be remedied by changing the files to use #!/bin/sh or running them with bash instead.

Comment thread local/INSTALL.md Outdated
Comment thread local/generate-keys.sh Outdated
Comment thread local/INSTALL.md
Comment thread local/deploy.sh Outdated
@tom-rm-meyer-ISST tom-rm-meyer-ISST force-pushed the refactor/local-deployment branch from 77f87b8 to c0208e2 Compare March 12, 2025 18:05
@tom-rm-meyer-ISST
Copy link
Copy Markdown
Contributor Author

updated shebang. Version bump to be done.

This pr does a patch level change to the backend while minor to the chart due to the actuator plugin replacing the health endpoint

Copy link
Copy Markdown
Member

@ReneSchroederLJ ReneSchroederLJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thank you for your work

@tom-rm-meyer-ISST
Copy link
Copy Markdown
Contributor Author

@mhellmeier The chart is failing on purpose. I know it's > 1kloc but only I've been working on it.

Copy link
Copy Markdown
Member

@mhellmeier mhellmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please adjust the license header years to the correct years.

Comment thread local/cleanup.sh Outdated
Comment thread local/deploy.sh Outdated
Comment on lines +2 to +4
# Copyright (c) 2023,2024 Volkswagen AG
# Copyright (c) 2024 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. (represented by Fraunhofer ISST)
# Copyright (c) 2023,2024 Contributors to the Eclipse Foundation
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also adjust the years here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Co-authored-by: Malte Hellmeier <git@mhellmeier.de>
Comment thread local/docker-compose-infrastructure.yaml Outdated
Copy link
Copy Markdown
Member

@mhellmeier mhellmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating. The failed pipeline aspect was already discussed. The >1k LOC are okay for me since you are a Committer, and they are mostly related due to auto-generated files like JSON package lock files.

@tom-rm-meyer-ISST tom-rm-meyer-ISST merged commit 15fdd07 into eclipse-tractusx:main Mar 14, 2025
13 of 14 checks passed
@tom-rm-meyer-ISST tom-rm-meyer-ISST deleted the refactor/local-deployment branch March 14, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants