-
Notifications
You must be signed in to change notification settings - Fork 40
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
Config Management #158
Comments
I have given this some thought, it's certainly a useful feature but I'm still not sure how to incorporate this neatly. The hard part is not the diffing but that the process is inherently something that will require manual input at some point.
We could run |
As stated in my earlier comment, i don't think it should be interactive. An interactive process would destroy the fully automated build process. I really like that idea with a I think, a visible warning about discovered changes should already do it. It's up to the user then to step in and do something. |
Indeed, the dilemma is that proper config management will require manual input at some point. For some use cases running
I don't think a notice will do, if config changed the build should at least fail. The hard part is how the further process to resolve the changes should be handled. For now I'll probably just add a helper function to improve the |
You are right that the build should fail. But i wonder if that |
Thin wrapper for sed to combat bit rot, if a sed expression no longer returns a match the build fails. Note: The script itself works with Busybox but Gnu's sed is required.
Sorry for taking so long to test your latest addition. It works nice for the first few images i've updated. Will try to modify all my images to work with this and wait for any configuration change to see the effect. I've noted 2 things: The example in build.sh template The description and example in the build.sh template might be misleading for new users. The example reads like this New options being added to config files over time The other thing is that i am wondering about changes to the files that might still get lost. For example new lines / options added to configuration files. You've mentioned on Discord that it might be a problem with dates inside the files. That makes sense. What about another command that would count the number of selected files? Put it into a file similar what you do in It could be like this |
Fair point and shall get updated. Thanks!
Again, detecting the changes is a solved problem, we can just use
|
Ok. Didn't mean to bother you with this again. I don't really see an interactive configuration as a good solution. But it might be a completely different topic anyways. I've did some further testing and the new sed-or-die function did actually find a line that was failing and stopped. I am closing this issue for now. |
No worries, how would a non-interactive solution look like to you? Inherently this process will require manual interaction to resolve, integrating |
When doing updates of a namespace, i am usually not following the process. Usually i leave it running and check back at some point. I am not in a hurry with the builds nor am i interested to spend my time and see it working for a long time. Any interactive process would simply timeout for me for the most part or slow down any update. I also wonder how I am not much of a user of The Just thought about another approach to entire things: Checksum for specific files How about a function that would allow you to compare a file with a given checksum. If it doesn't match it fails the build process and shows the checksum of the file in question. All you need to do then would be copy paste the shown checksum into the build.sh function to that file and rerun the process. You could simply use This would still require a few files to be manually updated in build.sh on each update run. |
It would timeout and then fail the build. How is this different to a hard fail if a config change was detected?
See earlier on how the process would work, you can already do this manually to get a feel for it. Yes config would have to be saved in the image directory so it can persist, which would be not much different to maintaining your changed config manually?
Me neither, however |
Maybe i don't see the bigger picture here. But assuming in a situation like you have it this image: https://github.com/edannenberg/kubler-images/blob/master/images/redis/build.sh How would you approach the idea of having a config file stored? You're not doing it right now. The file would mostly go through with On some packages with larger config files like php.ini, it might be helpful. That file is not changing on every update. But it is from time to time. I use Then there are packages like collectd. They have a new line in almost every 2nd update. Mostly i don't need those lines and ignore them other then doing etc-update for once. I am using Kubler remote to build my images on a server. I do this in order to spare me from using a powerful machine locally. I am writing the images on my local computer, push those to git and have them pulled into the namespace directories. I don't even have Kubler installed locally. For anyone having a remote Kubler setup like i do, any changes on the configuration should not mean that people have to copy past large parts of that config into the Kubler image files. Not sure if Maybe we talk about this on Discord as it might be a quicker way to talk it through. But i might not have enough time up until next week. |
There should be a way to be able to check or control changes in config files when creating containers with Kubler. It would help to prevent containers to end up in a broken state.
In Gentoo there is
etc-update
which does not work when creating containers with Kubler. It will probably not be an easy task to implement anything that would resembleetc-update
.It might be possible simplify it with a function that can be called after editing configs with
sed
infinish_rootfs_build
in order to display at least adiff
between shipped and version edited withbuild.sh
.The text was updated successfully, but these errors were encountered: