riotkit-org / tunman

Comprehensive solution for SSH tunnels - respawning, healthchecking/monitoring
48 stars 4 forks source link

Wish to refactor the path to configuration file, TUNMAN_CONFIG + '/conf.d/' to 'TUNMAN_CONFIG' #6

Closed tobiashochguertel closed 4 years ago

tobiashochguertel commented 4 years ago

https://github.com/riotkit-org/tunman/blob/8324d129abd23570bcdfd23e175f160b619f7022/tunman/tunman/factory.py#L20

I think to make it easier to use and configure tunman, it would be good when we not add an prefix directory to the value of TUNMAN_CONFIG.

I run tunman via systemd service file:

/etc/systemd/system/tunman.service

[Unit]
Description=Tunman Service
Documentation=https://github.com/riotkit-org/tunman
After=network.target

[Service]
Type=simple
EnvironmentFile=/etc/sysconfig/tunman
User=root
ExecStart=/usr/local/bin/tunman start
Restart=on-abort

[Install]
WantedBy=multi-user.target

/etc/sysconfig/tunman

TUNMAN_CONFIG="/etc/tunman.d/"
CONFIG_PATH=""
TUNMAN_SECRET_PREFIX=""
TUNMAN_ENV="prod"
TUNMAN_PORT="8015"
TUNMAN_LISTEN="0.0.0.0"

and I was expecting to place the configuration files in /etc/tunman.d/, so I have files like:

blackandred commented 4 years ago

Hi, I understand your need. I wonder how we can introduce this change as a non-breaking change.

I do not see other way than loading from both directories (optionally from conf.d) to keep compatibility. Here is the proposition: https://github.com/riotkit-org/tunman/commit/5dd10849a76c23cc1e263dbd1b919dd49538ce7d

If we would just delete conf.d suffix we would need to release a next major version I think :wink:

tobiashochguertel commented 4 years ago

Hey, yes that's a good point with the next major release, maybe we tag this issue to be done for the next major release?

at the moment I'm fine since I learned that I can put all config files into the conf.d directory. sure would be more clean when we don't have to think on that tunman will need a additional directory in the config path which we provided via env or command-line arguments..

I like tunman ;) great tool, helps me a lot with my tunnels. :))

blackandred commented 4 years ago

I'm happy you appreciate the application. The TunMan development is not regular, it's considered stable and no any releases are planned until we will have some feature/bug list collected. So next major version have no release date yet, but I created a milestone for it and attached this issue to it - so we will remember about this task.

The conf.d directory is a relic of the first TunMan version written in Bash :wink:

blackandred commented 4 years ago

Any news on it? Do you still need it?

tobiashochguertel commented 4 years ago

At the moment I don't use tunman - but I think this was an issue which is maybe useful.

blackandred commented 4 years ago

Sure. Thanks. No need - no feature. So closing this.