In this tutorial we’ll bootstrap the first node in the cluster.
In order to install OpenStack snap on the first node in the cluster, execute the following command on sunbeam01
machine:
$ sudo snap install openstack --channel 2024.1/beta
In order to prepare the first node for OpenStack usage, execute the following command on sunbeam01
machine:
$ sunbeam prepare-node-script | bash -x && newgrp snap_daemon
In order to bootstrap the cloud according to the “Reference configuration” section, execute the following command on sunbeam01
machine:
$ sunbeam cluster bootstrap --role control --role compute --role storage
! 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
,
- Management networks shared by hosts - type the value of the
CIDR
field from the “Control plane networking” sub-section of the “Reference configuration” section and press Enter
,
- MetalLB address allocation range - type the value of the
Address range
field from the “Control plane networking” sub-section of the “Reference configuration” section and press Enter
,
- Disks to attach to MicroCeph - type the value of the
Un-partitioned disk
field next to the sunbeam01
machine from the “Machines” sub-section of the “Reference configuration” section and press Enter
.
Sample output:
Use proxy to access external network resources? [y/n] (n): n
Management networks shared by hosts (CIDRs, separated by comma) (172.16.1.0/24): 172.16.1.0/24
MetalLB address allocation range (supports multiple ranges, comma separated) (10.20.21.10-10.20.21.20): 172.16.1.201-172.16.1.220
Disks to attach to MicroCeph (comma separated list) (): /dev/sdb
Once finished, you should be able to see the following message:
Node has been bootstrapped with roles: control, compute, storage
In order to display all nodes in the cluster, execute the following command:
$ sunbeam cluster list
In order to configure the cloud according to the “Reference configuration” section, execute the following command on sunbeam01
machine:
$ sunbeam configure --openrc demo-openrc
When prompted, enter the following values:
- Local or remote access to VMs - type
remote
and press Enter
,
- 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
n
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:
Local or remote access to VMs [local/remote] (local): remote
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 (PR********):
Network range to use for project network (192.168.122.0/24):
List of nameservers guests should use for DNS resolution (172.16.1.1): 8.8.8.8
Enable ping and SSH access to instances? [y/n] (y): y
Free network interface that will be configured for external traffic [eno2] (eno2): eno2
Once finished, you should be able to see the following message:
Writing openrc to demo-openrc ... done
In order to launch your first instance, execute the following command:
$ sunbeam launch ubuntu --name test
Sample output:
Access instance with `ssh -i /home/ubuntu/snap/openstack/456/sunbeam ubuntu@172.16.2.146`
Note that since “remote” access to VMs has been configured, you won’t be able to SSH into them from any of the nodes in the cluster. Copy the private key given in the above output from the launching node to an external machine with an access to the 172.16.2.0/24 network. Note that the VM will not be ready instantaneously; waiting time is mostly determined by the cloud’s available resources.