Templates to provision multi-homed systems?

Hi folks,

The nodes in our cluster have separate provisioning and production networks. The provisioning network is on a private address space like 192.168.x.y, which has one gateway to allow access to the public OS mirrors. The public network is on a regular IPv4 routeable network.

I’ve provisioned a couple test CentOS & Ubuntu VMs, and I belive that the default provisioning templates only seem able to provision one NIC per host. If I create two NICs on a VM, for example, only one is created on the host.

What’s a good way to provision a host with two or NICs?

Our templates only configures provisioning NIC for provisioning phase, but in the end they drop configuration for all NICs:

Our templates only configures provisioning NIC for provisioning phase, but in the end they drop configuration for all NICs:

On CentOS 7, it seems to work.

For Ubuntu 18.04, Foreman places a similar configuration under /etc/network/interfaces:

But it appears that Ubuntu 18.04 is ignoring /etc/network/interfaces by default, since it uses Netplan instead.

I do see a PR to implement Netplan at https://github.com/theforeman/community-templates/pull/545 . Currently, that PR only adds a single interface. If I can find time I’ll contribute a fix.

And just to clarify (and for posterity), Ubuntu had a network configuration in Netplan already. I think this came straight from the distro itself:

root@host1:~# cat /etc/netplan/01-netcfg.yaml  
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
      dhcp4: yes
root@host1:~#
1 Like