summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-01-28 22:11:09 +0000
committerGerrit Code Review <review@openstack.org>2019-01-28 22:11:09 +0000
commita2d195587080e0620b93769ff5fe77d9e316029e (patch)
treebf61dc6cff70c6da1614b03368fb09cf4ddcea58
parentb2cb51b2955f9c6cd1e4ca2cb3060659dce675c9 (diff)
parentc2a1cc2930be76efe92aad1831b1d8ca47b396e5 (diff)
Merge "All In One Configurations"
-rw-r--r--deployment/README.rst34
-rw-r--r--deployment/libvirt/README.rst7
-rwxr-xr-xdeployment/libvirt/destroy_configuration.sh2
-rw-r--r--deployment/libvirt/functions.sh18
-rwxr-xr-xdeployment/libvirt/setup_configuration.sh2
5 files changed, 18 insertions, 45 deletions
diff --git a/deployment/README.rst b/deployment/README.rst
index 9bcb7a1..50f22eb 100644
--- a/deployment/README.rst
+++ b/deployment/README.rst
@@ -71,33 +71,6 @@ are:
71- VirtualBox 71- VirtualBox
72- Libvirt/QEMU 72- Libvirt/QEMU
73 73
74Directory Structure
75-------------------
76
77Deployment directory hosts a total of 3 directories and 18 files::
78
79 $ tree -L 3 deployment/
80 deployment/
81 ├── libvirt
82 │   ├── compute.xml
83 │   ├── controller_allinone.xml
84 │   ├── controller.xml
85 │   ├── destroy_allinone.sh
86 │   ├── destroy_standard_controller.sh
87 │   ├── install_packages.sh
88 │   ├── setup_allinone.sh
89 │   └── setup_standard_controller.sh
90 ├── provision
91 │   ├── simplex_stage_1.sh
92 │   └── simplex_stage_2.sh
93 └── virtualbox
94 ├── all_in_one.conf
95 ├── serial_vm.sh
96 ├── setup_vm.sh
97 ├── standard_controller.conf
98 ├── start_vm.sh
99 └── stop_vm.sh
100
101Directory: libvirt 74Directory: libvirt
102~~~~~~~~~~~~~~~~~~ 75~~~~~~~~~~~~~~~~~~
103 76
@@ -111,12 +84,11 @@ identity:
111These nodes are used to create the virtual machines and the network interfaces 84These nodes are used to create the virtual machines and the network interfaces
112to setup the StarlingX system: 85to setup the StarlingX system:
113 86
114- Setup All-in-one 87- Setup Simplex
115 88 - 1 Controller
89- Setup Duplex
116 - 2 Controllers 90 - 2 Controllers
117
118- Setup Standard Controller 91- Setup Standard Controller
119
120 - 2 Controllers 92 - 2 Controllers
121 - 2 Computes 93 - 2 Computes
122 94
diff --git a/deployment/libvirt/README.rst b/deployment/libvirt/README.rst
index a200477..92399c2 100644
--- a/deployment/libvirt/README.rst
+++ b/deployment/libvirt/README.rst
@@ -48,14 +48,15 @@ Controllers
48There is one script for creating the controllers: ``setup_configuration.sh``. It 48There is one script for creating the controllers: ``setup_configuration.sh``. It
49builds different StarlingX cloud configurations: 49builds different StarlingX cloud configurations:
50 50
51- allinone 51- simplex
52- duplex
52- standardcontroller 53- standardcontroller
53 54
54You need an StarlingX ISO file for the installation. The script takes the 55You need an StarlingX ISO file for the installation. The script takes the
55configuration name with the ``-c`` option and the ISO file name with the 56configuration name with the ``-c`` option and the ISO file name with the
56``-i`` option:: 57``-i`` option::
57 58
58 ./setup_configuration.sh -c allinone -i stx-2018-08-28-93.iso 59 ./setup_configuration.sh -c simplex -i stx-2018-08-28-93.iso
59 60
60And the setup will begin. The script create one or more VMs and start the boot 61And the setup will begin. The script create one or more VMs and start the boot
61of the first controller, named oddly enough ``controller-0``. If you have Xwindows 62of 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.
69 70
70Tear down the VMs giving the configuration name with the ``-c`` option:: 71Tear down the VMs giving the configuration name with the ``-c`` option::
71 72
72>-------./destroy_configuration.sh -c allinone 73>-------./destroy_configuration.sh -c simplex
diff --git a/deployment/libvirt/destroy_configuration.sh b/deployment/libvirt/destroy_configuration.sh
index 1e071f2..5b9ec6e 100755
--- a/deployment/libvirt/destroy_configuration.sh
+++ b/deployment/libvirt/destroy_configuration.sh
@@ -24,7 +24,7 @@ fi
24 24
25configuration_check ${CONFIGURATION} 25configuration_check ${CONFIGURATION}
26 26
27CONFIGURATION=${CONFIGURATION:-allinone} 27CONFIGURATION=${CONFIGURATION:-simplex}
28CONTROLLER=${CONTROLLER:-controller} 28CONTROLLER=${CONTROLLER:-controller}
29DOMAIN_DIRECTORY=vms 29DOMAIN_DIRECTORY=vms
30 30
diff --git a/deployment/libvirt/functions.sh b/deployment/libvirt/functions.sh
index e4d085c..729a46f 100644
--- a/deployment/libvirt/functions.sh
+++ b/deployment/libvirt/functions.sh
@@ -4,7 +4,7 @@ usage() {
4 echo "$0 [-h] [-c <configuration>] [-i <iso image>]" 4 echo "$0 [-h] [-c <configuration>] [-i <iso image>]"
5 echo "" 5 echo ""
6 echo "Options:" 6 echo "Options:"
7 echo " -c: Configuration: allinone, standardcontroller" 7 echo " -c: Configuration: simplex, duplex, standardcontroller"
8 echo " -i: StarlingX ISO image" 8 echo " -i: StarlingX ISO image"
9 echo "" 9 echo ""
10} 10}
@@ -13,7 +13,7 @@ usage_destroy() {
13 echo "$0 [-h] [-c <configuration>]" 13 echo "$0 [-h] [-c <configuration>]"
14 echo "" 14 echo ""
15 echo "Options:" 15 echo "Options:"
16 echo " -c: Configuration: allinone, standardcontroller" 16 echo " -c: Configuration: simplex, duplex, standardcontroller"
17 echo "" 17 echo ""
18} 18}
19 19
@@ -27,9 +27,9 @@ iso_image_check() {
27 27
28configuration_check() { 28configuration_check() {
29 local CONFIGURATION=$1 29 local CONFIGURATION=$1
30 if [ $CONFIGURATION != "allinone" ] && [ $CONFIGURATION != "standardcontroller" ]; then 30 if [ $CONFIGURATION != "simplex" ] && [ $CONFIGURATION != "duplex" ] && [ $CONFIGURATION != "standardcontroller" ]; then
31 echo "Please check your configuration name, available configurations:" 31 echo "Please check your configuration name, available configurations:"
32 echo "allinone, standardcontroller" 32 echo "simplex, duplex, standardcontroller"
33 exit 1 33 exit 1
34 fi 34 fi
35} 35}
@@ -77,7 +77,7 @@ create_controller() {
77 local BRIDGE_INTERFACE=$3 77 local BRIDGE_INTERFACE=$3
78 local ISOIMAGE=$4 78 local ISOIMAGE=$4
79 local DOMAIN_FILE 79 local DOMAIN_FILE
80 if ([ "$CONFIGURATION" == "allinone" ]); then 80 if ([ "$CONFIGURATION" == "simplex" ]); then
81 CONTROLLER_NODE_NUMBER=0 81 CONTROLLER_NODE_NUMBER=0
82 else 82 else
83 CONTROLLER_NODE_NUMBER=1 83 CONTROLLER_NODE_NUMBER=1
@@ -85,7 +85,7 @@ create_controller() {
85 for ((i=0; i<=$CONTROLLER_NODE_NUMBER; i++)); do 85 for ((i=0; i<=$CONTROLLER_NODE_NUMBER; i++)); do
86 CONTROLLER_NODE=${CONFIGURATION}-${CONTROLLER}-${i} 86 CONTROLLER_NODE=${CONFIGURATION}-${CONTROLLER}-${i}
87 DOMAIN_FILE=${DOMAIN_DIRECTORY}/${CONTROLLER_NODE}.xml 87 DOMAIN_FILE=${DOMAIN_DIRECTORY}/${CONTROLLER_NODE}.xml
88 if ([ "$CONFIGURATION" == "allinone" ]); then 88 if ([ "$CONFIGURATION" == "simplex" ] || [ "$CONFIGURATION" == "duplex" ]); then
89 DISK_0_SIZE=600 89 DISK_0_SIZE=600
90 cp controller_allinone.xml ${DOMAIN_FILE} 90 cp controller_allinone.xml ${DOMAIN_FILE}
91 else 91 else
@@ -103,7 +103,7 @@ create_controller() {
103 " ${DOMAIN_FILE} 103 " ${DOMAIN_FILE}
104 sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${CONTROLLER_NODE}-0.img ${DISK_0_SIZE}G 104 sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${CONTROLLER_NODE}-0.img ${DISK_0_SIZE}G
105 sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${CONTROLLER_NODE}-1.img 200G 105 sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${CONTROLLER_NODE}-1.img 200G
106 if ([ "$CONFIGURATION" == "allinone" ]); then 106 if ([ "$CONFIGURATION" == "simplex" ] || [ "$CONFIGURATION" == "duplex" ]); then
107 sed -i -e " 107 sed -i -e "
108 s,DISK2,/var/lib/libvirt/images/${CONTROLLER_NODE}-2.img, 108 s,DISK2,/var/lib/libvirt/images/${CONTROLLER_NODE}-2.img,
109 " ${DOMAIN_FILE} 109 " ${DOMAIN_FILE}
@@ -125,7 +125,7 @@ create_controller() {
125destroy_controller() { 125destroy_controller() {
126 local CONFIGURATION=$1 126 local CONFIGURATION=$1
127 local CONTROLLER=$2 127 local CONTROLLER=$2
128 if ([ "$CONFIGURATION" == "allinone" ]); then 128 if ([ "$CONFIGURATION" == "simplex" ]); then
129 CONTROLLER_NODE_NUMBER=0 129 CONTROLLER_NODE_NUMBER=0
130 else 130 else
131 CONTROLLER_NODE_NUMBER=1 131 CONTROLLER_NODE_NUMBER=1
@@ -142,7 +142,7 @@ destroy_controller() {
142 sudo virsh undefine ${CONTROLLER_NODE} 142 sudo virsh undefine ${CONTROLLER_NODE}
143 delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-0.img 143 delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-0.img
144 delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-1.img 144 delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-1.img
145 if ([ "$CONFIGURATION" == "allinone" ]); then 145 if ([ "$CONFIGURATION" == "simplex" ] || [ "$CONFIGURATION" == "duplex" ]); then
146 delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-2.img 146 delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-2.img
147 fi 147 fi
148 [ -e ${DOMAIN_FILE} ] && delete_xml ${DOMAIN_FILE} 148 [ -e ${DOMAIN_FILE} ] && delete_xml ${DOMAIN_FILE}
diff --git a/deployment/libvirt/setup_configuration.sh b/deployment/libvirt/setup_configuration.sh
index 62bfbc9..4c6f44a 100755
--- a/deployment/libvirt/setup_configuration.sh
+++ b/deployment/libvirt/setup_configuration.sh
@@ -27,7 +27,7 @@ fi
27iso_image_check ${ISOIMAGE} 27iso_image_check ${ISOIMAGE}
28configuration_check ${CONFIGURATION} 28configuration_check ${CONFIGURATION}
29 29
30CONFIGURATION=${CONFIGURATION:-allinone} 30CONFIGURATION=${CONFIGURATION:-simplex}
31BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr} 31BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
32CONTROLLER=${CONTROLLER:-controller} 32CONTROLLER=${CONTROLLER:-controller}
33COMPUTE=${COMPUTE:-compute} 33COMPUTE=${COMPUTE:-compute}