2018-10-17 15:14:32 -07:00
|
|
|
.. _Installation-libvirt-qemu:
|
|
|
|
|
|
|
|
=========================
|
|
|
|
Installation libvirt qemu
|
|
|
|
=========================
|
|
|
|
|
|
|
|
Installation for StarlingX using Libvirt/QEMU virtualization.
|
|
|
|
|
|
|
|
---------------------
|
|
|
|
Hardware Requirements
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
A workstation computer with:
|
|
|
|
|
|
|
|
- Processor: x86_64 only supported architecture with BIOS enabled
|
|
|
|
hardware virtualization extensions
|
|
|
|
- Memory: At least 32GB RAM
|
|
|
|
- Hard Disk: 500GB HDD
|
|
|
|
- Network: One network adapter with active Internet connection
|
|
|
|
|
|
|
|
---------------------
|
|
|
|
Software Requirements
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
A workstation computer with:
|
|
|
|
|
|
|
|
- Operating System: This process is known to work on Ubuntu 16.04 and
|
|
|
|
is likely to work on other Linux OS's with some appropriate
|
|
|
|
adjustments.
|
|
|
|
- Proxy settings configured (if applies)
|
|
|
|
- Git
|
|
|
|
- KVM/VirtManager
|
|
|
|
- Libvirt Library
|
|
|
|
- QEMU Full System Emulation Binaries
|
2018-11-20 14:16:49 +08:00
|
|
|
- stx-tools project
|
2018-10-17 15:14:32 -07:00
|
|
|
- StarlingX ISO Image
|
|
|
|
|
2018-11-12 15:37:24 -08:00
|
|
|
----------------------------
|
2018-10-17 15:14:32 -07:00
|
|
|
Deployment Environment Setup
|
2018-11-12 15:37:24 -08:00
|
|
|
----------------------------
|
2018-10-17 15:14:32 -07:00
|
|
|
|
2018-11-12 15:37:24 -08:00
|
|
|
*************
|
2018-10-17 15:14:32 -07:00
|
|
|
Configuration
|
2018-11-12 15:37:24 -08:00
|
|
|
*************
|
2018-10-17 15:14:32 -07:00
|
|
|
|
|
|
|
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 called madcloud.rc:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
export CONTROLLER=madcloud
|
|
|
|
export COMPUTE=madnode
|
|
|
|
export BRIDGE_INTERFACE=madbr
|
|
|
|
export INTERNAL_NETWORK=172.30.20.0/24
|
|
|
|
export INTERNAL_IP=172.30.20.1/24
|
|
|
|
export EXTERNAL_NETWORK=192.168.20.0/24
|
|
|
|
export EXTERNAL_IP=192.168.20.1/24
|
|
|
|
|
|
|
|
|
|
|
|
This rc file shows the defaults baked into the scripts:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
export CONTROLLER=controller
|
|
|
|
export COMPUTE=compute
|
|
|
|
export BRIDGE_INTERFACE=stxbr
|
|
|
|
export INTERNAL_NETWORK=10.10.10.0/24
|
|
|
|
export INTERNAL_IP=10.10.10.1/24
|
|
|
|
export EXTERNAL_NETWORK=192.168.204.0/24
|
|
|
|
export EXTERNAL_IP=192.168.204.1/24
|
|
|
|
|
|
|
|
|
2018-11-12 15:37:24 -08:00
|
|
|
*************************
|
|
|
|
Install stx-tools Project
|
|
|
|
*************************
|
2018-10-17 15:14:32 -07:00
|
|
|
|
|
|
|
Clone the stx-tools project into a working directory.
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
git clone git://git.openstack.org/openstack/stx-tools.git
|
|
|
|
|
|
|
|
|
|
|
|
It will be convenient to set up a shortcut to the deployment script
|
|
|
|
directory:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
SCRIPTS=$(pwd)/stx-tools/deployment/libvirt
|
|
|
|
|
|
|
|
|
|
|
|
Load the configuration (if you created one) from madcloud.rc:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
source madcloud.rc
|
|
|
|
|
|
|
|
|
2018-11-12 15:37:24 -08:00
|
|
|
****************************************
|
2018-10-17 15:14:32 -07:00
|
|
|
Installing Requirements and Dependencies
|
2018-11-12 15:37:24 -08:00
|
|
|
****************************************
|
2018-10-17 15:14:32 -07:00
|
|
|
|
|
|
|
Install the required packages and configure QEMU. This only needs to be
|
|
|
|
done once per host. (NOTE: this script only knows about Ubuntu at this
|
|
|
|
time):
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
$SCRIPTS/install_packages.sh
|
|
|
|
|
|
|
|
|
2018-11-12 15:37:24 -08:00
|
|
|
******************
|
2018-10-17 15:14:32 -07:00
|
|
|
Disabling Firewall
|
2018-11-12 15:37:24 -08:00
|
|
|
******************
|
2018-10-17 15:14:32 -07:00
|
|
|
|
|
|
|
Unload firewall and disable firewall on boot:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
sudo ufw disable
|
|
|
|
sudo ufw status
|
|
|
|
|
|
|
|
|
2018-11-12 15:37:24 -08:00
|
|
|
******************
|
2018-10-17 15:14:32 -07:00
|
|
|
Configure Networks
|
2018-11-12 15:37:24 -08:00
|
|
|
******************
|
2018-10-17 15:14:32 -07:00
|
|
|
|
|
|
|
Configure the network 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.
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
$SCRIPTS/setup_network.sh
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
2018-11-12 15:37:24 -08:00
|
|
|
*********************
|
2018-10-17 15:14:32 -07:00
|
|
|
Configure Controllers
|
2018-11-12 15:37:24 -08:00
|
|
|
*********************
|
2018-10-17 15:14:32 -07:00
|
|
|
|
|
|
|
There are two scripts for creating the controllers: setup_allinone.sh
|
|
|
|
and setup_standard_controller.sh. They are operated in the same manner
|
|
|
|
but build different StarlingX cloud configurations. Choose wisely.
|
|
|
|
|
|
|
|
You need an ISO file for the installation, these scripts take a name
|
|
|
|
with the -i option:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
$SCRIPTS/setup_allinone.sh -i stx-2018-08-28-93.iso
|
|
|
|
|
|
|
|
|
|
|
|
And the setup will begin. The scripts 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 madcloud-0
|
|
|
|
|
|
|
|
|
|
|
|
Continue the usual StarlingX installation from this point forward.
|
|
|
|
|
|
|
|
Tear down the VMs using destroy_allinone.sh and
|
|
|
|
destroy_standard_controller.sh.
|
|
|
|
|
2018-11-12 15:37:24 -08:00
|
|
|
--------
|
2018-10-17 15:14:32 -07:00
|
|
|
Continue
|
2018-11-12 15:37:24 -08:00
|
|
|
--------
|
2018-10-17 15:14:32 -07:00
|
|
|
|
|
|
|
Pick up the installation in one of the existing guides at the
|
|
|
|
'Initializing Controller-0 step.
|
|
|
|
|
|
|
|
- Standard Controller
|
|
|
|
|
|
|
|
- :ref:`StarlingX Cloud with Dedicated Storage Virtual Environment <dedicated-storage>`
|
|
|
|
- :ref:`StarlingX Cloud with Controller Storage Virtual Environment <controller-storage>`
|
|
|
|
|
|
|
|
- All-in-one
|
|
|
|
|
|
|
|
- :ref:`StarlingX Cloud Duplex Virtual Environment <duplex>`
|
|
|
|
- :ref:`StarlingX Cloud Simplex Virtual Environment <simplex>`
|