openwisp / docker-openwisp

OpenWISP in docker. For production usage we recommend using the ansible-openwisp2 role.
https://openwisp.io/docs/dev/docker/
BSD 3-Clause "New" or "Revised" License
150 stars 75 forks source link

[feature] Default Topology for default VPN #99

Closed nemesifier closed 5 days ago

nemesifier commented 4 years ago

If the network topology module is active, automatically create a default topology for the management VPN and have the VPN container send the topology to the network-topology API every X minutes, defaulting to 3.

If the VPN container has no way of knowing if the topology module is active, we can enable OpenVPN to offer the status file via network calls and may get it this way, although I'm not 100% this would work out of the box without further work in netdiff and django-netjsongraph (although it would be a good feature to support).

Add a mention of this in the docs.

pandafy commented 2 weeks ago

Can we create a shared volume between the OpenVPN and the celery container which contains the OpenVPN status file. And then execute script on the celery container to send the status file to OpenWISP.

Alternatively, we can setup a light-weight webserver in the OpenVPN container which serves the OpenVPN status file. The Fetch strategy of the topology should be able to retrieve the topology from this webserver.

nemesifier commented 2 weeks ago

Can the OpenVPN module access the USE_OPENWISP_TOPOLOGY env variable? If so, we could simply send the topology data with curl if USE_OPENWISP_TOPOLOGY is True.