In this tutorial we’ll deploy an OpenStack cloud with Sunbeam and MAAS.
Note: all commands in this tutorial are run on the sunbeam05
machine.
In order to install OpenStack snap, execute the following command:
$ sudo snap install openstack --channel 2024.1/beta
In order to prepare the client machine for OpenStack usage, execute the following command:
$ sunbeam prepare-node-script | bash -x && newgrp snap_daemon
In order to add the MAAS deployment called my_maas
to the client machine according to the “Reference configuration” section, execute the following command:
$ sunbeam deployment add maas \
--name my_maas \
--url http://172.16.1.1:5240/MAAS \
--token z6sbVdQTuKWPFCFvPF:WkRdtsJnwXu38aRHUz:77SqG9DmaugFRHNT4SFtyGqubmLawNBJ \
You should be able to see the following message:
MAAS deployment my_maas added.
In order to map the MAAS network space from the “Reference configuration” section to all OpenStack cloud networks, execute the following commands:
$ sunbeam deployment space map myspace data
$ sunbeam deployment space map myspace internal
$ sunbeam deployment space map myspace management
$ sunbeam deployment space map myspace public
$ sunbeam deployment space map myspace storage
$ sunbeam deployment space map myspace storage-cluster
You should be able to see the following message:
Space myspace mapped to network data.
Space myspace mapped to network internal.
Space myspace mapped to network management.
Space myspace mapped to network public.
Space myspace mapped to network storage.
Space myspace mapped to network storage-cluster.
In order to validate the deployment, execute the following command:
$ sunbeam deployment validate
Sample output:
Checking machines, roles, networks and storage... OK
Checking zone distribution... OK
Checking networking... OK
Report saved to '/home/guardian/snap/openstack/common/reports/validate-deployment-my_maas-20240610-113835.433548.yaml'
If you see any FAIL
messages in the output of the sunbeam deployment validate
command, check the report file mentioned in the output to see any potential issues with your deployment. Fix those issues and then run the sunbeam deployment validate
command again.
Note: a validation error will lessen the chances of a successful deployment but it will not block an attempted deployment.
In order to bootstrap the governor according to the “Reference configuration” section, execute the following command:
$ sunbeam cluster bootstrap
! sunbeam cluster bootstrap
This command takes a while to finish. Please, be patient.
When prompted, enter the following values:
- Use proxy to access external network resources? - type
n
and press Enter
,
Sample output:
Use proxy to access external network resources? [y/n] (n): n
Once finished, you should be able to see the following message:
Bootstrap controller components complete.
In order to bootstrap the cloud according to the “Reference configuration” section, execute the following command:
$ sunbeam cluster deploy
! sunbeam cluster deploy
This command takes a while to finish. Please, be patient.
When prompted, enter the following values:
- Enter a region name (cannot be changed later) (RegionOne) - type
RegionOne
and press Enter
,
Sample output:
Enter a region name (cannot be changed later) (RegionOne): RegionOne
Once finished, you should be able to see the following message:
Deployment complete with 3 control, 3 compute and 3 storage nodes. Total nodes in cluster: 3
In order to configure the cloud according to the “Reference configuration” section, execute the following command:
$ sunbeam configure --openrc demo-openrc
When prompted, enter the following values:
- CIDR of network to use for external networking - type the value of the
CIDR
field from the “External networking” sub-section of the “Reference configuration” section and press Enter
,
- IP address of default gateway for external network - type the value of the
Gateway
field from the “External networking” sub-section of the “Reference configuration” section and press Enter
,
- Start of IP allocation range for external network - type the first IP address from the range defined in the
Address range
field from the “External networking” sub-section of the “Reference configuration” section and press Enter
,
- End of IP allocation range for external network - type the last IP address from the range defined in the
Address range
field from the “External networking” sub-section of the “Reference configuration” section and press Enter
,
- Network type for access to external network - type
flat
and press Enter
,
- Populate OpenStack cloud with demo user, default images, flavors etc - type
y
and press Enter
,
- Username to use for access to OpenStack - type
demo
and press Enter
,
- Password to use for access to OpenStack - type
demo
and press Enter
,
- Network range to use for project network - press
Enter
,
- List of nameservers guests should use for DNS resolution - type an IP address of a DNS server (e.g.
8.8.8.8
) accessible from the External network,
- Enable ping and SSH access to instances? - type
y
and press Enter
,
- Free network interface that will be configured for external traffic - type the value of the
Interface name on machine
field from the “External networking” sub-section of the “Reference configuration” section and press Enter
.
Sample output:
CIDR of network to use for external networking (10.20.20.0/24): 172.16.2.0/24
IP address of default gateway for external network (172.16.2.1): 172.16.2.1
Start of IP allocation range for external network (172.16.2.2): 172.16.2.2
End of IP allocation range for external network (172.16.2.254): 172.16.2.254
Network type for access to external network [flat/vlan] (flat): flat
Populate OpenStack cloud with demo user, default images, flavors etc [y/n] (y): y
Username to use for access to OpenStack (demo): demo
Password to use for access to OpenStack (DS********):
Network range to use for project network (192.168.122.0/24):
List of nameservers guests should use for DNS resolution (8.8.8.8): 8.8.8.8
Enable ping and SSH access to instances? [y/n] (y): y
Once finished, you should be able to see the following message:
Writing openrc to demo-openrc ... done