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

Development: Add docker compose files for new test servers #6572

Merged
merged 10 commits into from
May 23, 2023

Conversation

Hialus
Copy link
Member

@Hialus Hialus commented May 12, 2023

Checklist

General

Motivation and Context

We want to have all docker compose files in the main Artemis repository. All config should be purely done via environment variables.

Description

This PR restructures the existing docker compose files slightly to support two new files specifically for the test servers. These new files take in a bunch of environment variables for configuration, but also offer defaults for local execution (if you so desire).
These changes are heavily related to ls1intum/artemis-ansible-collection#34.

Steps for Testing

Not much you can do unless you want to setup a VM with ansible. Though I tested it on one of the new test servers and it works fine.

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

@Hialus Hialus self-assigned this May 12, 2023
@artemis-bot artemis-bot added this to In progress in Artemis Development May 12, 2023
…gid-build-option' into feature/add-docker-compose-test-server-files
@Hialus Hialus marked this pull request as ready for review May 12, 2023 16:20
@Hialus Hialus requested a review from a team as a code owner May 12, 2023 16:20
@artemis-bot artemis-bot moved this from In progress to Ready for review in Artemis Development May 12, 2023
Copy link
Contributor

@4ludwig4 4ludwig4 left a comment

Choose a reason for hiding this comment

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

Code lgtm.
I readded and modified the comment about the system environment usage for configuration overrides in containerized artemis setups.
Concerning the UID/GID change inside the Artemis image I hope this is alright for people already using our Artemis Image (see review comment).

mysql:
condition: service_healthy
pull_policy: always
restart: always
Copy link
Contributor

Choose a reason for hiding this comment

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

See the discussion here from the docker compose PR. Might it be better to just keep the limited approach inherited?!

Copy link
Member Author

Choose a reason for hiding this comment

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

With the early versions of your new docker compose files, I had some problems with failure:3, which is why I changed it on the test servers. Should be fine to be changed back now. WIll test it out asap.

@@ -54,6 +54,9 @@ FROM docker.io/library/eclipse-temurin:17-jdk as runtime

#default path of the built .war files
ARG WAR_FILE_PATH="/opt/artemis/build/libs"
#default UID/GID of the artemis user
ARG UID=1337
ARG GID=1337
Copy link
Contributor

Choose a reason for hiding this comment

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

@dfuchss and @b-fein I hope this doesn't mess up your docker compose setups? Otherwise, there would also be the option to override the UID and GID inside the docker compose files with the user key as @Hialus did for mysql.

Copy link
Contributor

@b-fein b-fein May 14, 2023

Choose a reason for hiding this comment

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

That would indeed break our system without additional changes to the file permissions as I use podman with system user subuid/subgid mappings.

Thanks for the heads-up.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you not simply default to 1000? This is the default uid/gid for the existing installations (at least that would be the ids I would expect.

Copy link
Member Author

Choose a reason for hiding this comment

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

Using UID/GID 1000 is sadly not an option for us. These are already taken by another user on every VM that we afaik cannot simply change.
All existing Artemis instances use 1337 instead, which is also the default in the artemis-ansible-collection. So we also thought we would use it as the default here as well.

While we could default to 1000 in the Dockerfile, we would then build the image using 1337. So in any case to use 1000 you would have to build a separate image.

@codecov-commenter
Copy link

Codecov Report

Merging #6572 (8ac4dd2) into develop (930b704) will not change coverage.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #6572   +/-   ##
==========================================
  Coverage      80.51%   80.51%           
+ Complexity     13293    13292    -1     
==========================================
  Files           2362     2362           
  Lines          90526    90526           
  Branches       13355    13355           
==========================================
  Hits           72885    72885           
+ Misses          9710     9709    -1     
- Partials        7931     7932    +1     

see 2 files with indirect coverage changes

Flag Coverage Δ
client 76.51% <ø> (ø)
server 84.97% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 930b704...8ac4dd2. Read the comment docs.

@Hialus Hialus mentioned this pull request May 19, 2023
8 tasks
.dockerignore Show resolved Hide resolved
@bassner bassner added this to the 6.1.8 milestone May 23, 2023
@bassner bassner merged commit edad506 into develop May 23, 2023
19 of 23 checks passed
@bassner bassner deleted the feature/add-docker-compose-test-server-files branch May 23, 2023 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Artemis Development
  
Ready for review
Development

Successfully merging this pull request may close these issues.

None yet

7 participants