virtual-deployment/libvirt
Michel Thebeau 3eb7e6467e libvirt: include worker nodes in duplex configuration
Duplex configuration may include worker nodes, as described in
"Deployment Configurations" page of Starlingx docs.  Allow the
setup_configuration.sh and destroy_configuration.sh to include worker
nodes.

Test Plan:
PASS  setup/destroy configurations

Story: 2010816
Task: 49219

Change-Id: I276002255f42ca68228d179777e717fc84ea2e9a
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
2023-12-07 10:40:14 -05:00
..
regression libvirt: Regression tests for mad and default 2023-07-14 13:10:25 +00:00
xml libvirt: move xml files to an xml subdirectory 2023-08-16 09:52:28 -04:00
yaml libvirt: move yaml files to a yaml subdirectory 2023-12-07 10:32:44 -05:00
README.rst libvirt: move yaml files to a yaml subdirectory 2023-12-07 10:32:44 -05:00
cleanup_network.sh Remove working dir issues from deploy scripts 2018-10-09 19:31:21 -05:00
config.py libvirt: improve error msg for host key value 2023-12-07 10:32:56 -05:00
destroy_configuration.sh libvirt: include worker nodes in duplex configuration 2023-12-07 10:40:14 -05:00
destroy_network.sh libvirt: Add override variable for DISK variables 2023-08-09 12:04:03 -04:00
functions.sh libvirt: move xml files to an xml subdirectory 2023-08-16 09:52:28 -04:00
install_packages.sh Modify install_packages.sh for system without apparmor model 2019-03-26 08:46:03 +00:00
readconfig.sh libvirt: fix readconfig.sh usage and permissions 2023-08-16 09:53:38 -04:00
set_defaults.sh Libvirt: CPU and Memory value configurable 2023-08-16 08:54:23 -04:00
setup_configuration.sh libvirt: include worker nodes in duplex configuration 2023-12-07 10:40:14 -05:00
setup_network.sh libvirt: Add override variable for DISK variables 2023-08-09 12:04:03 -04:00
show_diskusage.sh Script to show host's and lab's disk usage 2023-08-25 13:50:28 +00:00

README.rst

StarlingX Deployment on Libvirt

This is a quick reference for deploying StarlingX on libvirt/qemu systems. It assumes you have a working libvirt/qemu installation for a non-root user and that your user has NOPASSWD sudo permissions.

Refer also to pages "Installation Guide" on the StarlingX Documentation: https://docs.starlingx.io/installation_guide/index.html

Overview

We create 4 bridges to use for the STX cloud. This is done in an initial step separate from the VM management.

Depending on which basic configuration is chosen, we create a number of VMs for one or more controllers and storage nodes.

These scripts are configured using environment variables that all have built-in defaults. On shared systems you probably do not want to use the defaults. The simplest way to handle this is to keep an rc file that can be sourced into an interactive shell that configures everything. Here's an example:

export CONTROLLER=madcloud
export WORKER=madnode
export BRIDGE_INTERFACE=madbr
export EXTERNAL_NETWORK=172.30.20.0/24
export EXTERNAL_IP=172.30.20.1/24

Using source ./readconfig.sh yaml/madcloud.yaml also sets the madcloud environment variables. Use yaml/default.yaml or yaml/madcloud.yaml as templates to make custom configurations.

Networking

Configure the bridges using setup_network.sh before doing anything else. It will create 4 bridges named stxbr1, stxbr2, stxbr3 and stxbr4. Set the BRIDGE_INTERFACE environment variable if you need to change stxbr to something unique.

The destroy_network.sh script does the reverse, and should not be used lightly. It should also only be used after all of the VMs created below have been destroyed.

There is also a script cleanup_network.sh that will remove networking configuration from libvirt.

Controllers

There is one script for creating the controllers: setup_configuration.sh. It builds different StarlingX cloud configurations:

  • simplex
  • duplex
  • controllerstorage
  • dedicatedstorage

You need an StarlingX ISO file for the installation. The script takes the configuration name with the -c option and the ISO file name with the -i option:

./setup_configuration.sh -c simplex -i stx-2018-08-28-93.iso

And the setup will begin. The script create one or more VMs and start the boot of the first controller, named oddly enough controller-0. If you have Xwindows available you will get virt-manager running. If not, Ctrl-C out of that attempt if it doesn't return to a shell prompt. Then connect to the serial console:

virsh console controller-0

Continue the usual StarlingX installation from this point forward.

Tear down the VMs giving the configuration name with the -c option:

>-------./destroy_configuration.sh -c simplex