Openstack Multi-Space Support

The first patches have landed in Juju edge that support multi-space/multi-NIC support for Openstack.

If you want begin testing this feature, there is no better way than with Microstack.

Installing Microstack via Snap is trivial and the process is outlined in the documentation. For bevity, simply run the following.

sudo snap install microstack --beta --classic
sudo microstack.init --auto

Out of the box, Microstack comes with a single internal test network, consisting of a single subnet.

microstack.openstack network list
+--------------------------------------+----------+--------------------------------------+
| ID                                   | Name     | Subnets                              |
+--------------------------------------+----------+--------------------------------------+
| a216626e-505b-4c55-984a-68a69b1f4eae | external | 8e8feea4-2fdb-4b53-8067-eec56d6a7729 |
| eda1ffba-ff39-4637-a56f-f271da23663f | test     | 18e2c4ea-0f98-4ad1-9d98-532bcef6016c |
+--------------------------------------+----------+--------------------------------------+

microstack.openstack subnet list
+--------------------------------------+-----------------+--------------------------------------+------------------+
| ID                                   | Name            | Network                              | Subnet           |
+--------------------------------------+-----------------+--------------------------------------+------------------+
| 18e2c4ea-0f98-4ad1-9d98-532bcef6016c | test-subnet     | eda1ffba-ff39-4637-a56f-f271da23663f | 192.168.222.0/24 |
| 8e8feea4-2fdb-4b53-8067-eec56d6a7729 | external-subnet | a216626e-505b-4c55-984a-68a69b1f4eae | 10.20.20.0/24    |
+--------------------------------------+-----------------+--------------------------------------+------------------+

In order to test with multiple spaces, we need to add another subnet to the internal network.

microstack.openstack subnet create --network test --subnet-range 192.168.223.0/24 --allocation-pool start=192.168.223.2,end=192.168.223.254 test-subnet-2
...

microstack.openstack subnet list
+--------------------------------------+-----------------+--------------------------------------+------------------+
| ID                                   | Name            | Network                              | Subnet           |
+--------------------------------------+-----------------+--------------------------------------+------------------+
| 18e2c4ea-0f98-4ad1-9d98-532bcef6016c | test-subnet     | eda1ffba-ff39-4637-a56f-f271da23663f | 192.168.222.0/24 |
| 3e961779-fbb1-4b7f-8d14-1741120d7479 | test-subnet-2   | eda1ffba-ff39-4637-a56f-f271da23663f | 192.168.223.0/24 |
| 8e8feea4-2fdb-4b53-8067-eec56d6a7729 | external-subnet | a216626e-505b-4c55-984a-68a69b1f4eae | 10.20.20.0/24    |
+--------------------------------------+-----------------+--------------------------------------+------------------+

With Microstack now prepared with this network topology, we need to add it as a Juju cloud. This is also covered in the Microstack documentation. Once bootstrapped, let’s create some spaces via:

juju add-space space-1 192.168.222.0/24

and:

juju add-space space-2 192.168.223.0/24

Then create a machine constrained to be in both of these spaces.

juju add-machine --constraints "spaces=space-1,space-2"

Once the machine is created we can see that it has 2 addresses; one in each of the spaces.

juju show-machine 0

machines:
  "0":
    juju-status:
      current: pending
      since: 19 Feb 2020 12:54:12+01:00
    dns-name: 10.20.20.214
    ip-addresses:
    - 10.20.20.214
    - 192.168.222.16
    - 192.168.223.164
    instance-id: b90595bc-5b77-455c-b528-5be1a5a05ec4
    machine-status:
      current: running
      message: ACTIVE
      since: 19 Feb 2020 12:55:02+01:00
    modification-status:
      current: idle
      since: 19 Feb 2020 12:54:12+01:00
    series: bionic
    constraints: spaces=space-1,space-2
    hardware: arch=amd64 cores=1 mem=2048M root-disk=20480M availability-zone=nova

In forthcoming patches, we will be ensuring this plays nicely with bindings and teardown.

2 Likes

Great work folks. Exciting stuff!