Rich Freeman on 20 Apr 2016 04:57:43 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] [plug-announce] TOMORROW - Tue, Apr 19, 2016: PLUG North - "Linux Containers" by Jason Plum and Rich Freeman (*6:30 pm* at CoreDial in Blue Bell) |
Thanks to all who came out. As I said when I started - we could have easily chatted about containers all week long. Hopefully everybody was able to grok the concepts at least. Slides can be found at: https://docs.google.com/presentation/d/1qIn3818JCzCL8lcRP8GZXS_XqH_HkvfD5lrQxttUcV0/edit?usp=sharing I'm sure a video will be up shortly. One of the questions that came up at the end was a quick recipe for setting up a network bridge in systemd-networkd so that you could easily run containers on their own interfaces. This recipe will also work for kvm (which is why my bridge is named brkvm - I just recycled my kvm bridge for nspawn). Inside /etc/systemd/network create the following files: cat brkvm.netdev [NetDev] Name=brkvm Kind=bridge cat brkvm.network [Match] Name=brkvm [Network] DNS=192.168.0.5 Address=192.168.0.5/24 Gateway=192.168.0.21 cat eth-bridge.network [Match] Name=e* [Network] Bridge=brkvm Note that the above is for a static interface. You could replace the DNS/Address/Gateway lines with DHCP=yes and just use DHCP. My container host is also my dhcp server. You'll need to tweak the last one if this box is also a router, unless you wanted to bridge your multiple external interfaces. You'd just have multiple network interface files and give each a more specific name file with their individual configurations. The match on name=e* covers both the traditional eth0 and the newer udev persistent names. -- Rich ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug