Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containerize in memory engine #177

Merged
merged 4 commits into from
Feb 11, 2022
Merged

Containerize in memory engine #177

merged 4 commits into from
Feb 11, 2022

Conversation

remcowesterhoud
Copy link
Contributor

@remcowesterhoud remcowesterhoud commented Feb 10, 2022

Description

  1. Made the engine executable by adding a main class which creates and starts the engine. This required giving the gRPC server a static port, otherwise we won't know how to bind the containers ports later on. I've also created a Dockerfile to build the container.
  2. Added a build step to the deploy-artifacts workflow which will build and push the container to docker hub.
  3. Made the build-test workflow reusable, this way we can just call this workflow from the deploy-artifacts workflow and run all tests on different OSs, instead of relying on the community maven release plugin for testing.

Related issues

closes #5
Next steps will be done in #7

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually

Documentation:

  • Javadoc has been written
  • The documentation is updated

@remcowesterhoud
Copy link
Contributor Author

remcowesterhoud commented Feb 10, 2022

Proof that the docker build and push works (names might differ a bit):
https://github.com/camunda-cloud/zeebe-process-test/runs/5141644386?check_suite_focus=true

@github-actions
Copy link

github-actions bot commented Feb 10, 2022

Unit Test Results

  90 files    90 suites   4m 16s ⏱️
192 tests 192 ✔️ 0 💤 0
576 runs  576 ✔️ 0 💤 0

Results for commit 9932fbe.

♻️ This comment has been updated with latest results.

Copy link
Member

@korthout korthout left a comment

Choose a reason for hiding this comment

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

Thanks @remcowesterhoud 🐳

Generally looks good, but I have some questions.

pom.xml Show resolved Hide resolved
engine/Dockerfile Outdated Show resolved Hide resolved
.github/workflows/deploy-artifact.yml Show resolved Hide resolved
.github/workflows/deploy-artifact.yml Outdated Show resolved Hide resolved
@remcowesterhoud
Copy link
Contributor Author

@korthout Thanks for you review 🙇 I've answered your questions and made some changes. Please check again when you have the time!

Copy link
Member

@korthout korthout 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 the quick changes 🎖️ LGTM

- Added a main class to make the engine executable
- Switched to a static port for the grpc server, so we always know what port we need to send the traffic to.
- Added a Dockerfile to make it possible to build a container.
Both the deploy workflow and the build/test workflow have to build and run the unit tests. By making the build/test workflow reusable we can call it in the deploy workflow.
Added a job to the deployment pipeline which will build a container from the engine, and push it to dockerhub.

The container will default to the "latest" tag. If a new release is created in GitHub the name of the tag attached to this release will be used as the image tag, unless this release is a SNAPSHOT release.
One of the dependencies (zeebe-workflow-engine) requires this dependency. Running the engine without this will result in errors:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder".
SLF4J: Defaulting to no-operation MDCAdapter implementation.
SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details.

Adding this dependency resolves this issue and fixes the logging of the engine.
@remcowesterhoud remcowesterhoud merged commit c9e06fc into main Feb 11, 2022
@remcowesterhoud remcowesterhoud deleted the 5-containerize branch February 11, 2022 14: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.

Make the engine runnable in a testcontainer
2 participants