Skip to content

Intergrate conf snippets in include_sections from migrid PR244. #105

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

Conversation

jonasbardino
Copy link
Contributor

Reuse the strategy from external-certificates folder for the new MiGserver.conf include_sections support. Copies any files in the external-conf-sections folder into the resulting container /home/mig/mig/server/MiGserver.d/ folder where they will be included by default.

…erver.conf

`include_sections` support. Copies any files in the `external-conf-sections`
folder into the resulting container `/home/mig/mig/server/MiGserver.d/` folder
where they will be included by default.
@jonasbardino jonasbardino self-assigned this May 26, 2025
@jonasbardino jonasbardino changed the title Intergrate conf snipptes in include_sections from migrid PR244. Intergrate conf snippets in include_sections from migrid PR244. May 26, 2025
@jonasbardino jonasbardino added the enhancement New feature or request label May 30, 2025
@jonasbardino
Copy link
Contributor Author

Tested to work in practical deployment, so mainly left as a decision if this is indeed the way we want to support configuration snippets or if a bind mounted volume with snippets is better, as we briefly discussed off-list. Rebuilding is of course tedious but updates are supposedly rare and typically will require at least service restarts, anyway.
In short, I'm slightly undecided so input is very welcome.

@jonasbardino jonasbardino marked this pull request as ready for review May 30, 2025 16:31
@jonasbardino jonasbardino requested a review from a team May 30, 2025 16:31
@Martin-Rehr
Copy link
Contributor

Tested to work in practical deployment, so mainly left as a decision if this is indeed the way we want to support configuration snippets or if a bind mounted volume with snippets is better, as we briefly discussed off-list. Rebuilding is of course tedious but updates are supposedly rare and typically will require at least service restarts, anyway. In short, I'm slightly undecided so input is very welcome.

I foresee that we will be generating the configuration snippets as a part of the build process such as the global conf ?

That is, I don't think neither the volume bind nor the cert-like copy will suit us?

@jonasbardino
Copy link
Contributor Author

jonasbardino commented Jun 2, 2025

Tested to work in practical deployment, so mainly left as a decision if this is indeed the way we want to support configuration snippets or if a bind mounted volume with snippets is better, as we briefly discussed off-list. Rebuilding is of course tedious but updates are supposedly rare and typically will require at least service restarts, anyway. In short, I'm slightly undecided so input is very welcome.

I foresee that we will be generating the configuration snippets as a part of the build process such as the global conf ?

That is, I don't think neither the volume bind nor the cert-like copy will suit us?

We will not be generating e.g. the cloud conf as pulling that out of the generator loop was the main motivation for introducing conf snippet support.
I believe we will want to push 'static' overrides to SITE and GLOBAL conf snippets for a number of required options not supported in generateconfs and/or exposed in docker-migrid. Please refer to my recent follow-up in PR ucphhpc/migrid-sync#249 for details on that idea. We can still e.g. do that with ansible combined with either copy or volume.

@Martin-Rehr
Copy link
Contributor

Tested to work in practical deployment, so mainly left as a decision if this is indeed the way we want to support configuration snippets or if a bind mounted volume with snippets is better, as we briefly discussed off-list. Rebuilding is of course tedious but updates are supposedly rare and typically will require at least service restarts, anyway. In short, I'm slightly undecided so input is very welcome.

I foresee that we will be generating the configuration snippets as a part of the build process such as the global conf ?
That is, I don't think neither the volume bind nor the cert-like copy will suit us?

We will not be generating e.g. the cloud conf as pulling that out of the generator loop was the main motivation for introducing conf snippet support. I believe we will want to push 'static' overrides to SITE and GLOBAL conf snippets for a number of required options not supported in generateconfs and/or exposed in docker-migrid. Please refer to my recent follow-up in PR ucphhpc/migrid-sync#249 for details on that idea. We can still e.g. do that with ansible combined with either copy or volume.

Fine with pulling the non-core functionality out of generateconfs but I think that eg. the CLOUD confs should be build/generated as a part of the image like the rest of our external dependencies.

@jonasbardino
Copy link
Contributor Author

We will not be generating e.g. the cloud conf as pulling that out of the generator loop was the main motivation for introducing conf snippet support. I believe we will want to push 'static' overrides to SITE and GLOBAL conf snippets for a number of required options not supported in generateconfs and/or exposed in docker-migrid. Please refer to my recent follow-up in PR ucphhpc/migrid-sync#249 for details on that idea. We can still e.g. do that with ansible combined with either copy or volume.

Fine with pulling the non-core functionality out of generateconfs but I think that eg. the CLOUD confs should be build/generated as a part of the image like the rest of our external dependencies.

Well, the COPY method implemented here will insert any available conf snippets including CLOUD into the image during build.
In particular the numerous user specific parts of the CLOUD conf (instance limits, image maps, etc.) are ill-suited for generation (as in generateconf). Even docker-migrid rebuild/redeploy on each such change is inconvenient, but at least that step can be skipped with a one-liner manual injection of the updated conf snippet. That will just leave the change volatile until next rebuild in contrast to the alternative bind-mount solution.

@Martin-Rehr
Copy link
Contributor

Martin-Rehr commented Jun 2, 2025

We will not be generating e.g. the cloud conf as pulling that out of the generator loop was the main motivation for introducing conf snippet support. I believe we will want to push 'static' overrides to SITE and GLOBAL conf snippets for a number of required options not supported in generateconfs and/or exposed in docker-migrid. Please refer to my recent follow-up in PR ucphhpc/migrid-sync#249 for details on that idea. We can still e.g. do that with ansible combined with either copy or volume.

Fine with pulling the non-core functionality out of generateconfs but I think that eg. the CLOUD confs should be build/generated as a part of the image like the rest of our external dependencies.

Well, the COPY method implemented here will insert any available conf snippets including CLOUD into the image during build. In particular the numerous user specific parts of the CLOUD conf (instance limits, image maps, etc.) are ill-suited for generation (as in generateconf). Even docker-migrid rebuild/redeploy on each such change is inconvenient, but at least that step can be skipped with a one-liner manual injection of the updated conf snippet. That will just leave the change volatile until next rebuild in contrast to the alternative bind-mount solution.

Then I would prefer MiGserver.d as a bind mounted volume.

@jonasbardino
Copy link
Contributor Author

jonasbardino commented Jun 2, 2025

...

Well, the COPY method implemented here will insert any available conf snippets including CLOUD into the image during build. In particular the numerous user specific parts of the CLOUD conf (instance limits, image maps, etc.) are ill-suited for generation (as in generateconf). Even docker-migrid rebuild/redeploy on each such change is inconvenient, but at least that step can be skipped with a one-liner manual injection of the updated conf snippet. That will just leave the change volatile until next rebuild in contrast to the alternative bind-mount solution.

Then I would prefer MiGserver.d as a bind mounted volume.

Alright, thanks for the input both of you (partially off-list). I'll take a look at a bind mount solution.

jonasbardino added a commit that referenced this pull request Jun 3, 2025
…s like PR105 using bind mount (#106)

An alternative integration of the mig server config extension snippets
like PR #105 but using a bind mounted volume in `PERSISTENT_ROOT` for
the config snippets instead as agreed in the PR discussion. This will
enable easy adjustment of e.g. the `CLOUD_X` sections where user access
and such may need more frequent updates than what is feasible to handle
with rebuild/redeploy every time.
@jonasbardino
Copy link
Contributor Author

Obsoleted by PR #106 .

@jonasbardino jonasbardino deleted the add/external-conf-sections-folder-for-MiGserver-conf-include-sections branch June 3, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants