Aker icon indicating copy to clipboard operation
Aker copied to clipboard

Configurable Config File

Open supertylerc opened this issue 8 years ago • 4 comments

Currently, aker.py expects to find its config file at /etc/aker.ini. I'd like to propose a location that can be specified at runtime, using one or both of the following methods:

  • an environment variable, ANKER_CONFIG_FILE (or similar name) with the path to the config file
  • a command line option, --config-file/-c, the value of which is the path to the config file

My current use case is Docker. Right now, I'm deploying Aker using Docker, and if I need or want to modify the list of hosts, I must either bind mount all of /etc (ew) or rebuild the container (also ew). If I have a configurable location for the Aker config file, I can bind mount a separate config directory and modify the config on my disk and then restart the container.

supertylerc avatar Dec 19 '16 06:12 supertylerc

Actually, I wouldn't even need to rebuild the container. I would just need to log out and log back in again.

supertylerc avatar Dec 19 '16 06:12 supertylerc

This isn't super urgent, by the way. Rebuilding the container isn't horrible (it might take 30 seconds to rebuild from scratch, and that's an extremely unoptimized build process [grabbing packages every single time]), and it's really fast to destroy the existing one and start the new one. All in, it probably takes 65-70 seconds on the worst days for me to redeploy Aker after making a changing or pulling in the latest master. Still, would be nice to have a configurable config file to reduce how frequently I'm releasing a new container.

I can work on this after #14, #15, #16, and #17 are merged or rejected. Just don't want to fill up the pull request inbox with a million things and then have to try to untangle them all if there's something you want to change.

supertylerc avatar Dec 19 '16 06:12 supertylerc

@supertylerc man thx a punch , all these stuff are helpful , I just have to organize priorities, will keep this opened for later

anazmy avatar Dec 21 '16 17:12 anazmy

Can't you just replace the configuration file with a symbolic link to a location that is outside of the container proper (e.g. bind mounted)?

mossholderm avatar Aug 27 '18 19:08 mossholderm