cybertron / openstack-virtual-baremetal

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

Add routed networks support to OVB #43

Closed hjensas closed 2 years ago

hjensas commented 6 years ago

This change adds support to deploy routed networks: 3x Provisioning networks 2x Networks for each isolated net (internal_api, tenant, etc)

Neutron routers are configured to provide the routing between the different networks.

A dhcprealy instance is created. It will relay DHCP requests on networks provisioning_leaf1 and provisioning_leaf2 to the undercloud ip addresses on the provisioning_leaf0 network.

The undercloud is connected to provision_leaf0. Baremetal nodes are connected to provision_leaf1 and provision_leaf2. By default 1 baremetal node is set up in each leaf, the number of nodes are controlled by the node_count_leaf1 and node_count_leaf2 parameters.

To deploy: bin/deploy.py \ --quintupleo_routed \ -e environments/quintupleo-routed.yaml -e ../overrides_env.yaml

A new option '--physical_network' is added to build-nodes-json. When this option is used the nodes json uses the new (since Rocky) schema to define ports, and includes the physical network as well as the mac address when baremetal ports are created.

To create nodes_json for importing bm's in undercloud run the build-nodes-json command twice using each leafs respective prefixes and provision_net. For example:

bin/build-nodes-json \ --bmc_prefix bmc_leaf1 \ --baremetal_prefix baremetal_leaf1 \ --provision_net provision_leaf1 \ --driver ipmi \ --physical_network leaf1 \ --nodes_json ../nodes_leaf1.json

bin/build-nodes-json \ --bmc_prefix bmc_leaf2 \ --baremetal_prefix baremetal_leaf2 \ --provision_net provision_leaf2 \ --driver ipmi \ --physical_network leaf2 \ --nodes_json ../nodes_leaf2.json

cybertron commented 6 years ago

Just to update: I started a new branch with some changes to enable this with roles: https://github.com/cybertron/openstack-virtual-baremetal/tree/routed-networks

So far it's just the physical_network changes and some abstraction of the undercloud network templates so they can be fully customized, including new networks. I did tweak the physical_network change a bit to simplify it. Let me know if what I did is wrong though.

It's also worth noting that this is technically backwards-incompatible. That said, I think we're at a point where some of the really old behaviors and features need to be dropped, including the ones broken by these changes. Probably the thing to do will be to cut a stable branch for anyone who might still be running against really old clouds and such, then merge this and the other changes I want to make to master.

Anyway, I'll continue integrating your changes into that branch and see if I can get it working. I just wanted to get the initial work pushed for backup purposes and so you can take a look and see if it seems to be headed in the right direction.

hjensas commented 6 years ago

Thanks Ben! Sorry fpr not getting back sooner. I have been on PTO, and will continue to be on PTO for two more weeks. Will have a look at your new branch when I am back home.

cybertron commented 6 years ago

Yeah, no rush. What's up there right now isn't all that close to complete, but hopefully this week I'll be able to start integrating your template changes and see if this is going to work.

cybertron commented 6 years ago

Okay, the routed-networks branch will now deploy all the networks and a DHCP relay instance. We'll need to sync up on it because I made a few changes that I need to discuss with you (mostly I removed a few things to simplify the deployment, but I don't know if they were necessary for some reason I'm not aware of). I'm also out on PTO next week so we can discuss it further when we're both back.