cybertron / openstack-virtual-baremetal

Tools for using OpenStack instances as baremetal deployment targets
20 stars 19 forks source link

Routed networks - - Add external gateways #52

Closed hjensas closed 5 years ago

hjensas commented 5 years ago

UPDATE Also fixed-ip's required for the dhcp-relay instance provision interfaces.

(I closed PR #51 and fixed up my mistakes to avoid having commit's with silly mistakes. Hope I got it right this time. :) )

cybertron commented 5 years ago

Okay, I was thinking about this last night and I think we need to make it optional. The reason being that in some environments IPs on the external network are at somewhat of a premium, and this is doubling (or tripling for routed-networks) the number of IPs required there. In a CI environment that's significant, and even in some individual developer environments you may only have access to a single external IP.

What I'm thinking is that we go ahead and add the router for undercloud-networks-routed.yaml since it's required there, but we leave undercloud-networks.yaml alone and create a new undercloud-networks file that includes the router for non-routed cases. Or you could leave the latter to me since it's a general feature request not specific to this work.

How does that sound?

hjensas commented 5 years ago

That is a good point regarding use of external addressing.

I wonder, would it work to double NAT? I.e we already have a router on the private network with external_gateway_info, could we set the private net as the external_gateway network for the provisioning and public network routers and get away with using only the one External address?

UPDATE: -- Nope, this does not work since private_net is not an external network.

hjensas commented 5 years ago

So, I made some changes to the two commits and force pushed them. It uses a separate undercloud-network-public-router template for the non-routed use-case of deploying a public router. The undercloud-networks-routed still deploy the router by default.

Would be better to have the public router in a completely separate template and resource registry it to OS::Heat::None by default instead?

cybertron commented 5 years ago

So, I made some changes to the two commits and force pushed them. It uses a separate undercloud-network-public-router template for the non-routed use-case of deploying a public router. The undercloud-networks-routed still deploy the router by default.

Would be better to have the public router in a completely separate template and resource registry it to OS::Heat::None by default instead?

What you did is what I had in mind. If we find that the number of undercloud-networks templates starts exploding then maybe we'll need to decompose them, but these templates typically haven't changed that much (hence why they weren't customizable previously) so I don't expect a lot of trouble with that.

Monday I'll fire up a new test environment with this latest change and then we should be able to merge it. The changes all lgtm.