Export Networks
Export Networks
It is possible to export existing network using syntropynac export
command which will output existing network configuration to stdout in a YAML format.
This configuration can be passed to syntropynac configure {infrastructure.yaml}
to create networks and connections.
You can refer to this Wikipedia article for more information on the YAML file format.
Note, however, that if you try to export a complex topology using P2P
you may lose some endpoints since using that topology YAML configuration file cannot represent multiple connections originating from the same endpoint. P2M
topology does not have this limitation and it is the default.
Export existing network
$ syntropynac export --help
Usage: syntropynac export [OPTIONS]
Exports existing connections to configuration YAML/JSON file.
If exact topology export is required - use P2P topology.
Options:
--topology TEXT Override network topology.
-j, --json Outputs a JSON instead of YAML.
--help Show this message and exit.
Example
Let's say you have this network:
Then you run syntropynac export
and you get this output:
connections:
de-hetzner-influx01:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 449
services: []
state: present
type: endpoint
fr-ibm-baremetal01.syntropystack.com:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 381
services: []
state: present
type: endpoint
id-google-nat01-syntropystack-network:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 374
services: []
state: present
type: endpoint
uk-vpsnet-nat09.syntropystack.com:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 451
services: []
state: present
type: endpoint
us-oneprovider-nat01.syntropystack.com:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 218
services: []
state: present
type: endpoint
us-oneprovider-nat03.syntropystack.com:
connect_to:
de-hetzner-influx01:
id: 449
services: []
state: present
type: endpoint
fr-ibm-baremetal01.syntropystack.com:
id: 381
services: []
state: present
type: endpoint
id-google-nat01-syntropystack-network:
id: 374
services: []
state: present
type: endpoint
uk-vpsnet-nat09.syntropystack.com:
id: 451
services: []
state: present
type: endpoint
us-oneprovider-nat01.syntropystack.com:
id: 218
services: []
state: present
type: endpoint
us-oneprovider-nat04.syntropystack.com:
id: 269
services: []
state: present
type: endpoint
us-vultr-nat11.syntropystack.com:
id: 267
services: []
state: present
type: endpoint
us-winnervps-nat01.syntropystack.com:
id: 207
services: []
state: present
type: endpoint
us-wishosting-nat08.syntropystack.com:
id: 304
services: []
state: present
type: endpoint
us-xenspec-nat01.syntropystack.com:
id: 287
services: []
state: present
type: endpoint
us-xenspec-nat02.syntropystack.com:
id: 201
services: []
state: present
type: endpoint
v3.32969.vpscontrol.net:
id: 89
services: []
state: present
type: endpoint
v5.32969.vpscontrol.net:
id: 273
services: []
state: present
type: endpoint
vmi454696.contaboserver.net:
id: 228
services: []
state: present
type: endpoint
winvps5437:
id: 330
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
za-libracloud-nat12.syntropystack.com:
id: 338
services: []
state: present
type: endpoint
za-oneprovider-nat37.syntropystack.com:
id: 334
services: []
state: present
type: endpoint
id: 233
services: []
state: present
type: endpoint
us-oneprovider-nat04.syntropystack.com:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 269
services: []
state: present
type: endpoint
us-vultr-nat11.syntropystack.com:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 267
services: []
state: present
type: endpoint
us-winnervps-nat01.syntropystack.com:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 207
services: []
state: present
type: endpoint
us-wishosting-nat08.syntropystack.com:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 304
services: []
state: present
type: endpoint
us-xenspec-nat01.syntropystack.com:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 287
services: []
state: present
type: endpoint
us-xenspec-nat02.syntropystack.com:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 201
services: []
state: present
type: endpoint
v3.32969.vpscontrol.net:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 89
services: []
state: present
type: endpoint
v5.32969.vpscontrol.net:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 273
services: []
state: present
type: endpoint
vmi454696.contaboserver.net:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 228
services: []
state: present
type: endpoint
winvps5437:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 330
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
connect_to:
de-hetzner-influx01:
id: 449
services: []
state: present
type: endpoint
fr-ibm-baremetal01.syntropystack.com:
id: 381
services: []
state: present
type: endpoint
id-google-nat01-syntropystack-network:
id: 374
services: []
state: present
type: endpoint
uk-vpsnet-nat09.syntropystack.com:
id: 451
services: []
state: present
type: endpoint
us-oneprovider-nat01.syntropystack.com:
id: 218
services: []
state: present
type: endpoint
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
us-oneprovider-nat04.syntropystack.com:
id: 269
services: []
state: present
type: endpoint
us-vultr-nat11.syntropystack.com:
id: 267
services: []
state: present
type: endpoint
us-winnervps-nat01.syntropystack.com:
id: 207
services: []
state: present
type: endpoint
us-wishosting-nat08.syntropystack.com:
id: 304
services: []
state: present
type: endpoint
us-xenspec-nat01.syntropystack.com:
id: 287
services: []
state: present
type: endpoint
us-xenspec-nat02.syntropystack.com:
id: 201
services: []
state: present
type: endpoint
v3.32969.vpscontrol.net:
id: 89
services: []
state: present
type: endpoint
v5.32969.vpscontrol.net:
id: 273
services: []
state: present
type: endpoint
vmi454696.contaboserver.net:
id: 228
services: []
state: present
type: endpoint
winvps5437:
id: 330
services: []
state: present
type: endpoint
za-libracloud-nat12.syntropystack.com:
id: 338
services: []
state: present
type: endpoint
za-oneprovider-nat37.syntropystack.com:
id: 334
services: []
state: present
type: endpoint
id: 326
services: []
state: present
type: endpoint
za-libracloud-nat12.syntropystack.com:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 338
services: []
state: present
type: endpoint
za-oneprovider-nat37.syntropystack.com:
connect_to:
us-oneprovider-nat03.syntropystack.com:
id: 233
services: []
state: present
type: endpoint
za-azure-nat13.internal.cloudapp.net:
id: 326
services: []
state: present
type: endpoint
id: 334
services: []
state: present
type: endpoint
state: present
topology: P2M
This YAML file can then be passed to syntropynac configure
to recreate the network.
Updated over 1 year ago