I am trying to integrate VyOS as routers in an OpenStack environment. So far I am able to boot VyOS instances and configure them manually. My end goal is to fully automatically deploy and configure a network topology with multiple routers and routing protocols operating between them.
To bypass the installation process I create an image of a finished installation and create instances based on this image. Here I meet my first problem: eth0 disappears, since the associated MAC address is no longer available (?). Interfaces are named from eth1 onwards. Now, normally to fix this I would make some edits to /etc/udev/rules.d/70-persistent-net.rules, but I am unable to locate it on VyOS. eth0 is not mentioned in the config either, so how does VyOS remember interface names?
I realise that I could create the image without interfaces and bypass this problem, but I may need to do some edits to /etc/udev/rules.d/70-persistent-net.rules for automation of configuration later, so any info is greatly appreciated.
Secondly, I need to configure routing and the interfaces’ ip addresses to enable basic network connectivity (to so use puppet for configuring the rest). I am thinking of either pre-generating the initial configuration and injecting it into the file system before boot, or adding it through a start-up script (which would need to be injected, as cloud-init is not available in Debian6).
All networks will run the DHCP service built-in in OpenStack Neutron, so the interface address configuration will be straight forward.
For the routing protocol’s configuration I need to know which interfaces on each instance correspond to which OS::Neutron::Port (or at least to which network they are connected to), so that I properly define on which interfaces to do routing information exchanges and which networks to route.
For now my theory is that I need to explicitly define MAC-addresses during creation of OS::Neutron::Ports (which correspond to interfaces on VyOS) and manually specify which eth* interface they should correspond to in /etc/udev/rules.d/70-persistent-net.rules, so that I know when I generate the config file/script which interface to configure how.
Alternatively I could generate Ports as usual, query their MAC-addresses through OpenStack and cross-reference them with the contents of /etc/udev/rules.d/70-persistent-net.rules to generate the config. This would mean that I’d have to reboot the routers at least once and somehow access the /etc/udev/rules.d/70-persistent-net.rules file on the router if I use a config file.
Is there any more simple approach that will achieve similar results?