From a1f140c5a5eb18cb86465bc496349d093382dfef Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Wed, 14 Jun 2023 13:36:39 +0000 Subject: T775: Add service config-sync between 2 routers Service config-sync allows synchronizing a section of the configuration. As PoC allow only nat, nat66 and firewall sections Rertreive the configuration for a section from self node and send this configuration to the section of the 'secondary' node. This feature adds a symlink from helper 'vyos_config_sync.py' to '/config/scripts/commit/post-hooks.d' and config that is located in '/run/config_sync_conf.conf' It will synchronyze the config only if the setcion was changed. set service config-sync secondary address 192.0.2.11 set service config-sync secondary key xxx set service config-sync section nat set service config-sync section nat66 set service config-sync section firewall set service config-sync mode load --- interface-definitions/service-config-sync.xml.in | 104 +++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 interface-definitions/service-config-sync.xml.in (limited to 'interface-definitions') diff --git a/interface-definitions/service-config-sync.xml.in b/interface-definitions/service-config-sync.xml.in new file mode 100644 index 000000000..e804e17f7 --- /dev/null +++ b/interface-definitions/service-config-sync.xml.in @@ -0,0 +1,104 @@ + + + + + + + Configuration synchronization + + + + + Secondary server parameters + + + + + IP address + + ipv4 + IPv4 address to match + + + ipv6 + IPv6 address to match + + + hostname + FQDN address to match + + + + + + + + + + + Connection API timeout + + u32:1-300 + Connection API timeout + + + + + + 60 + + + + HTTP API key + + + + + + + Synchronization mode + + load set + + + load + Load and replace configuration section + + + set + Set configuration section + + + (load|set) + + + + + + Section for synchronization + + nat nat66 firewall + + + nat + NAT + + + nat66 + NAT66 + + + firewall + firewall + + + (nat|nat66|firewall) + + + + + + + + + -- cgit v1.2.3