All In One Configurations
All In One can be configured as: - Simplex - Duplex Story: 2004780 Task: 28996 Change-Id: I8a1ec35a525babdc44fe0df65fa58d49257d83f4 Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
This commit is contained in:
parent
5e2573703b
commit
6a3c3b0d1a
34
README.rst
34
README.rst
@ -71,33 +71,6 @@ are:
|
||||
- VirtualBox
|
||||
- Libvirt/QEMU
|
||||
|
||||
Directory Structure
|
||||
-------------------
|
||||
|
||||
Deployment directory hosts a total of 3 directories and 18 files::
|
||||
|
||||
$ tree -L 3 deployment/
|
||||
deployment/
|
||||
├── libvirt
|
||||
│ ├── compute.xml
|
||||
│ ├── controller_allinone.xml
|
||||
│ ├── controller.xml
|
||||
│ ├── destroy_allinone.sh
|
||||
│ ├── destroy_standard_controller.sh
|
||||
│ ├── install_packages.sh
|
||||
│ ├── setup_allinone.sh
|
||||
│ └── setup_standard_controller.sh
|
||||
├── provision
|
||||
│ ├── simplex_stage_1.sh
|
||||
│ └── simplex_stage_2.sh
|
||||
└── virtualbox
|
||||
├── all_in_one.conf
|
||||
├── serial_vm.sh
|
||||
├── setup_vm.sh
|
||||
├── standard_controller.conf
|
||||
├── start_vm.sh
|
||||
└── stop_vm.sh
|
||||
|
||||
Directory: libvirt
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@ -111,12 +84,11 @@ identity:
|
||||
These nodes are used to create the virtual machines and the network interfaces
|
||||
to setup the StarlingX system:
|
||||
|
||||
- Setup All-in-one
|
||||
|
||||
- Setup Simplex
|
||||
- 1 Controller
|
||||
- Setup Duplex
|
||||
- 2 Controllers
|
||||
|
||||
- Setup Standard Controller
|
||||
|
||||
- 2 Controllers
|
||||
- 2 Computes
|
||||
|
||||
|
@ -48,14 +48,15 @@ Controllers
|
||||
There is one script for creating the controllers: ``setup_configuration.sh``. It
|
||||
builds different StarlingX cloud configurations:
|
||||
|
||||
- allinone
|
||||
- simplex
|
||||
- duplex
|
||||
- standardcontroller
|
||||
|
||||
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 allinone -i stx-2018-08-28-93.iso
|
||||
./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
|
||||
@ -69,4 +70,4 @@ 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 allinone
|
||||
>-------./destroy_configuration.sh -c simplex
|
||||
|
@ -24,7 +24,7 @@ fi
|
||||
|
||||
configuration_check ${CONFIGURATION}
|
||||
|
||||
CONFIGURATION=${CONFIGURATION:-allinone}
|
||||
CONFIGURATION=${CONFIGURATION:-simplex}
|
||||
CONTROLLER=${CONTROLLER:-controller}
|
||||
DOMAIN_DIRECTORY=vms
|
||||
|
||||
|
@ -4,7 +4,7 @@ usage() {
|
||||
echo "$0 [-h] [-c <configuration>] [-i <iso image>]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -c: Configuration: allinone, standardcontroller"
|
||||
echo " -c: Configuration: simplex, duplex, standardcontroller"
|
||||
echo " -i: StarlingX ISO image"
|
||||
echo ""
|
||||
}
|
||||
@ -13,7 +13,7 @@ usage_destroy() {
|
||||
echo "$0 [-h] [-c <configuration>]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -c: Configuration: allinone, standardcontroller"
|
||||
echo " -c: Configuration: simplex, duplex, standardcontroller"
|
||||
echo ""
|
||||
}
|
||||
|
||||
@ -28,9 +28,9 @@ iso_image_check() {
|
||||
|
||||
configuration_check() {
|
||||
local CONFIGURATION=$1
|
||||
if [ $CONFIGURATION != "allinone" ] && [ $CONFIGURATION != "standardcontroller" ]; then
|
||||
if [ $CONFIGURATION != "simplex" ] && [ $CONFIGURATION != "duplex" ] && [ $CONFIGURATION != "standardcontroller" ]; then
|
||||
echo "Please check your configuration name, available configurations:"
|
||||
echo "allinone, standardcontroller"
|
||||
echo "simplex, duplex, standardcontroller"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@ -78,7 +78,7 @@ create_controller() {
|
||||
local BRIDGE_INTERFACE=$3
|
||||
local ISOIMAGE=$4
|
||||
local DOMAIN_FILE
|
||||
if ([ "$CONFIGURATION" == "allinone" ]); then
|
||||
if ([ "$CONFIGURATION" == "simplex" ]); then
|
||||
CONTROLLER_NODE_NUMBER=0
|
||||
else
|
||||
CONTROLLER_NODE_NUMBER=1
|
||||
@ -86,7 +86,7 @@ create_controller() {
|
||||
for ((i=0; i<=$CONTROLLER_NODE_NUMBER; i++)); do
|
||||
CONTROLLER_NODE=${CONFIGURATION}-${CONTROLLER}-${i}
|
||||
DOMAIN_FILE=${DOMAIN_DIRECTORY}/${CONTROLLER_NODE}.xml
|
||||
if ([ "$CONFIGURATION" == "allinone" ]); then
|
||||
if ([ "$CONFIGURATION" == "simplex" ] || [ "$CONFIGURATION" == "duplex" ]); then
|
||||
DISK_0_SIZE=600
|
||||
cp controller_allinone.xml ${DOMAIN_FILE}
|
||||
else
|
||||
@ -104,7 +104,7 @@ create_controller() {
|
||||
" ${DOMAIN_FILE}
|
||||
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${CONTROLLER_NODE}-0.img ${DISK_0_SIZE}G
|
||||
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${CONTROLLER_NODE}-1.img 200G
|
||||
if ([ "$CONFIGURATION" == "allinone" ]); then
|
||||
if ([ "$CONFIGURATION" == "simplex" ] || [ "$CONFIGURATION" == "duplex" ]); then
|
||||
sed -i -e "
|
||||
s,DISK2,/var/lib/libvirt/images/${CONTROLLER_NODE}-2.img,
|
||||
" ${DOMAIN_FILE}
|
||||
@ -126,7 +126,7 @@ create_controller() {
|
||||
destroy_controller() {
|
||||
local CONFIGURATION=$1
|
||||
local CONTROLLER=$2
|
||||
if ([ "$CONFIGURATION" == "allinone" ]); then
|
||||
if ([ "$CONFIGURATION" == "simplex" ]); then
|
||||
CONTROLLER_NODE_NUMBER=0
|
||||
else
|
||||
CONTROLLER_NODE_NUMBER=1
|
||||
@ -143,7 +143,7 @@ destroy_controller() {
|
||||
sudo virsh undefine ${CONTROLLER_NODE}
|
||||
delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-0.img
|
||||
delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-1.img
|
||||
if ([ "$CONFIGURATION" == "allinone" ]); then
|
||||
if ([ "$CONFIGURATION" == "simplex" ] || [ "$CONFIGURATION" == "duplex" ]); then
|
||||
delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-2.img
|
||||
fi
|
||||
[ -e ${DOMAIN_FILE} ] && delete_xml ${DOMAIN_FILE}
|
||||
|
@ -27,7 +27,7 @@ fi
|
||||
iso_image_check ${ISOIMAGE}
|
||||
configuration_check ${CONFIGURATION}
|
||||
|
||||
CONFIGURATION=${CONFIGURATION:-allinone}
|
||||
CONFIGURATION=${CONFIGURATION:-simplex}
|
||||
BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
|
||||
CONTROLLER=${CONTROLLER:-controller}
|
||||
COMPUTE=${COMPUTE:-compute}
|
||||
|
Loading…
Reference in New Issue
Block a user