Re: Pattern for multiple subservices and dynamic discovery i.e. VPN

2022-08-18 Thread Davor Ocelic
On Thu, Aug 18, 2022 at 02:39:36PM +0200, Oliver Schad wrote: > > - It creates the appropriate service directory for this particular > > VPN config (possibly based on a template) > > - It calls s6-svlink or the like to register the new service, which > > automatically also notifies s6-svscan

Re: Pattern for multiple subservices and dynamic discovery i.e. VPN

2022-08-18 Thread Laurent Bercot
That would just move 3 components to another level but they are still needed: scanning existing service directories, diffing between desired and current state and applying - so creating or removing directories. So, diffing between desired and current state, and applying the modifications

Re: Pattern for multiple subservices and dynamic discovery i.e. VPN

2022-08-18 Thread Oliver Schad
On Thu, 18 Aug 2022 06:04:25 -0400 Davor Ocelic wrote: > On Thu, Aug 18, 2022 at 11:32:30AM +0200, Oliver Schad wrote: > How about an approach that would be more tightly integrated > with s6? For example: > > > - we need an scanning component for the desired state of running > > instances

Re: Pattern for multiple subservices and dynamic discovery i.e. VPN

2022-08-18 Thread Laurent Bercot
- we need an scanning component for the desired state of running instances (something like 'find /etc/openvpn -name "*conf"') - we need an scanning component for the current state in process list - we need a diffing component - we need a state applier component That sounds very much like what

Re: Pattern for multiple subservices and dynamic discovery i.e. VPN

2022-08-18 Thread Davor Ocelic
On Thu, Aug 18, 2022 at 11:32:30AM +0200, Oliver Schad wrote: Hey, How about an approach that would be more tightly integrated with s6? For example: > - we need an scanning component for the desired state of running > instances (something like 'find /etc/openvpn -name "*conf"') Right, the

Re: Pattern for multiple subservices and dynamic discovery i.e. VPN

2022-08-18 Thread Oliver Schad
Dear Laurent, thanks a lot for your quick response. I understand, that dynamic discovery needs some thoughts to implement in an easy and flexible way. Just to understand the requirements, if we want to implement that today: - we need an scanning component for the desired state of running

Re: Pattern for multiple subservices and dynamic discovery i.e. VPN

2022-08-17 Thread Laurent Bercot
I'm looking for a pattern to solve a problem, where you have to discover dynamically the services you have to start. Examples could be VPN configurations, where you discover the configuration files and start for every file an instance of the VPN service. Hi Oliver, Dynamic instantiation is