LXD 3.9 Networking on Digital Ocean


(Yosu Cadilla) #1

Hi guys, so I was so happy with my Ubuntu 16.04 LXD installation when I discovered that the latest version is 3.9, not 2.0.2 and that it has many new features, including MAAS and clustering.

So I snapped 3 new droplets with internal network enabled on DO and I’m ready to roll (well, almost).

Now since Digital Ocean provides me with internal network, I was wondering how this affects the network setup for non clustered LXD.

Also, what I want these 3 droplets for is to run a PHP APP in an HA setup, for this I usually run LXD without clustering, then HAProxy on one of the nodes and then run 3 copies of the APP, one on each node.

Would clustering be a better option? and if so, how should I setup the FUN with an internal network enabled?
I tried several times and I get error messages stating that there is more than one IP on the node.

Never used MAAS before, but I’m of course open to suggestions if that’s a possibility on VPSs and if it helps keeping it simple.


(Stéphane Graber) #2

So you can manually setup the Fan bridge specifying your underlay subnet.

Something like:

lxc network create fanbr0 bridge.mode=fan fan.underlay_subnet=10.0.1.0/24

You’ll need to change the 10.0.1.0/24 to match the subnet used on your internal network.


(Yosu Cadilla) #3

Well, that’s the name hey give it, but it’s just ONE internal IP address per node, not a subnet, so 10.1.1.2 is my address but 10.1.1.3 is for another customer.


(Stéphane Graber) #4

Okay, then you need to figure out whether all your servers are in the same /16 or /24 chunk of that subnet, then you can use that for your underlay.


(Yosu Cadilla) #5

Yup /16
10.35.135.x
10.135.182.x
10.35.135.x
Understood I will try that, thanks a lot Stéphane @stgraber

I will open a ticket on DO, maybe they can set it up so I can use /24… and maybe they can make my new nodes go to that range too.