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

RFC: local server setup #1032

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

RFC: local server setup #1032

wants to merge 9 commits into from

Conversation

efahl
Copy link
Contributor

@efahl efahl commented Oct 11, 2024

Includes the documentation for setting up a local server, and all the code changes I've made to get container volumes to work. Added .env to containers, filtering it for values that are host-only.

Addresses #1002

Preliminary documentation for setup.  Requires several subsequent
commits on this branch.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Make explicit where containers and the hosts mount their shared
volumes.  First, so it works.  Second, so it's easy to manage on
the host side.

Copy and configure '.env` to the containers, removing the mount
points where appropriate.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Added the crucial information about setting up a proper '.env'.  Minor formatting
and wording changes.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Make the CI test runs conform to the reworked container paths.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
CI and userland testing use different values for the 'container_sock', so
remove it.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.77%. Comparing base (5e65dec) to head (4b6c9a2).
Report is 151 commits behind head on main.

Files with missing lines Patch % Lines
asu/build.py 81.81% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1032       +/-   ##
===========================================
+ Coverage   80.75%   90.77%   +10.02%     
===========================================
  Files          15       14        -1     
  Lines         977     1117      +140     
===========================================
+ Hits          789     1014      +225     
+ Misses        188      103       -85     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@efahl
Copy link
Contributor Author

efahl commented Oct 16, 2024

@aparcar, I know there's a ton of stuff mashed together here, but could you take a quick look at just the podman-compose.yml and see if you have any comments? I'm specifically interested in my changes to the volume mounts, where $PUBLIC_PATH is always the host-side value, and the container-side paths are always /app/public. Does that make sense on the production server?

This was the biggest stumbling block in getting my local server running, as the mounts either failed on the host or were wrong on the containers otherwise.

Make the README track the contents of local_server documentation
and changes to config.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
.github/workflows/test.yml Show resolved Hide resolved
@@ -10,5 +10,7 @@ RUN poetry config virtualenvs.create false \
&& poetry install --only main --no-interaction --no-ansi

COPY ./asu/ ./asu/
RUN --mount=type=bind,source=./.env,target=/tmp/.env \
Copy link
Member

Choose a reason for hiding this comment

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

I'm semi excited to "hardcode" the envs into the created container.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't understand, are you currently changing them after the containers are started or something like that?

I've been setting defaults in config.py, then overriding them in .env (like ALLOW_DEFAULTS=True), then that RUN (really a COPY) sets the container up as I expect.

asu/build.py Outdated Show resolved Hide resolved
asu/build.py Outdated Show resolved Hide resolved
asu/build.py Outdated Show resolved Hide resolved
Fix abbreviations and remove string directives from f-strings.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Get rid of CONTAINER_SOCK as it's unneeded.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
Restore CONTAINER_SOCK as it's needed by the worker container when
creating builders.

Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
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.

2 participants