I have a host (Openstack Newton data center controller) with the following services running on it:
- Maas-Rack-Controller (bridge DHCP)
- Cloudify (multi-cloud management POC)
- Juju (cant bootstrap yet...)
These are running as LXD containers on ZFS. The hardware is an Intel NUC 5i5MYHE blade with an SSD drive. The blade is fed a set of VLAN trunks with the first VLAN untagged. This untagged LVAN is our core data center network. I have a Maas-Region-Controller upstream that communicates to the rack controller and manages it.
MaaS has a DHCP reservation excluding the first 10 IP addresses on this network for these core services, and is set to assign addresses from a DHCP pool to LXD Openstack components on my other blades over the untagged VLAN when they PXE boot to the internal rack controller.
I can easily set the LXD bridge interface IP address to DHCP since I technically do not care about it, but the controller host that all of this lives on needs a static address in the reserved range.
Juju will need a DHCP assignment to be able to complete it's bootstrap process.
I am searching for something like this, although this doesn't work for obvious reasons:
# The loopback network interface auto lo iface lo inet loopback # The primary network interface iface enp0s25 inet manual address 192.168.199.5 netmask 255.255.255.0 network 192.168.199.0 broadcast 192.168.199.255 gateway 192.168.199.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 192.168.199.1 192.168.1.1 8.8.8.8 dns-search home.spyderdyne.net auto br0 iface br0 inet dhcp bridge-ifaces enp0s25 bridge-ports enp0s25 up ifconfig enp0s25 up
Any thoughts on a way to allow DHCP across the bridge with a blade having a static IP and not breaking VLANs are welcome. I am thinking about some sort of sub-interface definition maybe.
Obviously this is not covered anywhere that I can find and probably represents an odd setup, but I am trying to make the most of limited resources and space for this project.
I figured it out. Here are the steps:
Step 1. Enable DHCP on your network somehow. For this I changed my router from a DHCP forwarder to a DHCP server.
Step 2. Set up a bridge device on the "controller" server with your manual (static) address in /etc/network/interfaces.
Step 3. Record the hardware/MAC address of your new bridge device:
Step 4. Configure your DHCP server to assign that correct static IP address you want to assign to the bridge device:
Step 5. Install LXD:
Step 6. Edit you default LXD profile network config to include the bridge:
Step 7. Launch a new container instance:
Step 8. Set the new container's network settings to the desired static address:
Step 9. Install maas-rack-controller:
Step 10. Add the new Rack controller to your region controller:
Step 11. Wait for the new rack controller to sync with the rest of the region:
Step 12. Disable DHCP on your OTHER DHCP server:
Step 13. Configure MaaS DHCP:
Step 14: Add DHCP reservations if needed.
Step 15. Manually configure hosts by MAC address to set static addresses via DHCP, or at least preserve their addresses from future allocation.
I will have to wait for the new rack controller to finish it''s sync operations before I can tell for sure that rack DHCP is working, but at least I have manual addresses up and running, and should be able to run the DHCP server now.