Skip to content

Conversation

@weshinsley
Copy link
Contributor

@weshinsley weshinsley commented Nov 11, 2025

This PR puts the config and container creation code for acme, which we use in many places, into acme.py, so a typical deployment might look like

mrc-ide/packit-deploy#32

essentially calling the constellation functions
acme_cfg = config.config_acme(dat) and
acme_container = acme.acme_buddy_container(cfg, proxy, tls_volume)

It implements also the suggestions in vimc/montagu-deploy#22 regarding the different environment variables needed for different providers (HDB vs Cloudflare)

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 98.79518% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.29%. Comparing base (9973b1b) to head (4c3c523).
⚠️ Report is 25 commits behind head on master.

Files with missing lines Patch % Lines
src/constellation/config.py 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #34      +/-   ##
==========================================
+ Coverage   97.22%   97.29%   +0.06%     
==========================================
  Files          14       16       +2     
  Lines        1588     1661      +73     
  Branches       98      101       +3     
==========================================
+ Hits         1544     1616      +72     
  Misses         35       35              
- Partials        9       10       +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@weshinsley weshinsley changed the title Add acme function] Add acme-buddy support Nov 12, 2025
@weshinsley weshinsley marked this pull request as ready for review November 27, 2025 16:08
Copy link
Contributor

@EmmaLRussell EmmaLRussell left a comment

Choose a reason for hiding this comment

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

I guess the main test of this will be in the deployments that use it, as it's difficult to test without a real domain. This repo isn't really set up for integration tests. Or documentation - but I guess the test is a good example to work from..

self.port = config_integer(data, ["acme_buddy", "port"])
self.dns_provider = config_string(data, ["acme_buddy", "dns_provider"])
self.env = config_dict(data, ["acme_buddy", "env"])
if "ACME_BUDDY_STAGING" in os.environ:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this an env var and not a config value? Is the idea that this allows you to test "real" configs with a fake acme buddy set up?

Copy link
Contributor Author

@weshinsley weshinsley Dec 1, 2025

Choose a reason for hiding this comment

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

Good question - in acme buddy, either the --staging flag or existence of a non-empty ACME_BUDDY_STAGING environment var achieve the same purpose - perhaps in constellation I should accept it as optional in both the config, and the environment...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I treat the env part of the config as a block, whatever it contains, so ACME_BUDDY_STAGING can be passed in as acme_buddy: env: ACME_BUDDY_STAGING. If the environment variable is present, then that overwrites the config, which is I think the right way round.

@weshinsley weshinsley merged commit dcb34a3 into master Dec 1, 2025
9 checks passed
@plietar plietar deleted the VIMC-8716 branch December 1, 2025 15:29
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