Browse Source

Merge "All In One Configurations"

Zuul 2 months ago
parent
commit
a2d1955870

+ 3
- 31
deployment/README.rst View File

@@ -71,33 +71,6 @@ are:
71 71
 - VirtualBox
72 72
 - Libvirt/QEMU
73 73
 
74
-Directory Structure
75
--------------------
76
-
77
-Deployment 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
-
101 74
 Directory: libvirt
102 75
 ~~~~~~~~~~~~~~~~~~
103 76
 
@@ -111,12 +84,11 @@ identity:
111 84
 These nodes are used to create the virtual machines and the network interfaces
112 85
 to setup the StarlingX system:
113 86
 
114
-- Setup All-in-one
115
-
87
+- Setup Simplex
88
+  - 1 Controller
89
+- Setup Duplex
116 90
   - 2 Controllers
117
-
118 91
 - Setup Standard Controller
119
-
120 92
   - 2 Controllers
121 93
   - 2 Computes
122 94
 

+ 4
- 3
deployment/libvirt/README.rst View File

@@ -48,14 +48,15 @@ Controllers
48 48
 There is one script for creating the controllers: ``setup_configuration.sh``. It
49 49
 builds different StarlingX cloud configurations:
50 50
 
51
-- allinone
51
+- simplex
52
+- duplex
52 53
 - standardcontroller
53 54
 
54 55
 You need an StarlingX ISO file for the installation. The script takes the
55 56
 configuration name with the ``-c`` option and the ISO file name with the
56 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
 
60 61
 And the setup will begin.  The script create one or more VMs and start the boot
61 62
 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.
69 70
 
70 71
 Tear 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

+ 1
- 1
deployment/libvirt/destroy_configuration.sh View File

@@ -24,7 +24,7 @@ fi
24 24
 
25 25
 configuration_check ${CONFIGURATION}
26 26
 
27
-CONFIGURATION=${CONFIGURATION:-allinone}
27
+CONFIGURATION=${CONFIGURATION:-simplex}
28 28
 CONTROLLER=${CONTROLLER:-controller}
29 29
 DOMAIN_DIRECTORY=vms
30 30
 

+ 9
- 9
deployment/libvirt/functions.sh View File

@@ -4,7 +4,7 @@ usage() {
4 4
     echo "$0 [-h] [-c <configuration>] [-i <iso image>]"
5 5
     echo ""
6 6
     echo "Options:"
7
-    echo "  -c: Configuration: allinone, standardcontroller"
7
+    echo "  -c: Configuration: simplex, duplex, standardcontroller"
8 8
     echo "  -i: StarlingX ISO image"
9 9
     echo ""
10 10
 }
@@ -13,7 +13,7 @@ usage_destroy() {
13 13
     echo "$0 [-h] [-c <configuration>]"
14 14
     echo ""
15 15
     echo "Options:"
16
-    echo "  -c: Configuration: allinone, standardcontroller"
16
+    echo "  -c: Configuration: simplex, duplex, standardcontroller"
17 17
     echo ""
18 18
 }
19 19
 
@@ -27,9 +27,9 @@ iso_image_check() {
27 27
 
28 28
 configuration_check() {
29 29
     local CONFIGURATION=$1
30
-    if [ $CONFIGURATION != "allinone" ] && [ $CONFIGURATION != "standardcontroller" ]; then
30
+    if [ $CONFIGURATION != "simplex" ] && [ $CONFIGURATION != "duplex" ] && [ $CONFIGURATION != "standardcontroller" ]; then
31 31
         echo "Please check your configuration name, available configurations:"
32
-        echo "allinone, standardcontroller"
32
+        echo "simplex, duplex, standardcontroller"
33 33
         exit 1
34 34
     fi
35 35
 }
@@ -77,7 +77,7 @@ create_controller() {
77 77
     local BRIDGE_INTERFACE=$3
78 78
     local ISOIMAGE=$4
79 79
     local DOMAIN_FILE
80
-    if ([ "$CONFIGURATION" == "allinone" ]); then
80
+    if ([ "$CONFIGURATION" == "simplex" ]); then
81 81
         CONTROLLER_NODE_NUMBER=0
82 82
     else
83 83
         CONTROLLER_NODE_NUMBER=1
@@ -85,7 +85,7 @@ create_controller() {
85 85
     for ((i=0; i<=$CONTROLLER_NODE_NUMBER; i++)); do
86 86
         CONTROLLER_NODE=${CONFIGURATION}-${CONTROLLER}-${i}
87 87
         DOMAIN_FILE=${DOMAIN_DIRECTORY}/${CONTROLLER_NODE}.xml
88
-        if ([ "$CONFIGURATION" == "allinone" ]); then
88
+        if ([ "$CONFIGURATION" == "simplex" ] || [ "$CONFIGURATION" == "duplex" ]); then
89 89
             DISK_0_SIZE=600
90 90
             cp controller_allinone.xml ${DOMAIN_FILE}
91 91
         else
@@ -103,7 +103,7 @@ create_controller() {
103 103
         " ${DOMAIN_FILE}
104 104
         sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${CONTROLLER_NODE}-0.img ${DISK_0_SIZE}G
105 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 107
             sed -i -e "
108 108
                 s,DISK2,/var/lib/libvirt/images/${CONTROLLER_NODE}-2.img,
109 109
             " ${DOMAIN_FILE}
@@ -125,7 +125,7 @@ create_controller() {
125 125
 destroy_controller() {
126 126
     local CONFIGURATION=$1
127 127
     local CONTROLLER=$2
128
-    if ([ "$CONFIGURATION" == "allinone" ]); then
128
+    if ([ "$CONFIGURATION" == "simplex" ]); then
129 129
         CONTROLLER_NODE_NUMBER=0
130 130
     else
131 131
         CONTROLLER_NODE_NUMBER=1
@@ -142,7 +142,7 @@ destroy_controller() {
142 142
             sudo virsh undefine ${CONTROLLER_NODE}
143 143
             delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-0.img
144 144
             delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-1.img
145
-            if ([ "$CONFIGURATION" == "allinone" ]); then
145
+            if ([ "$CONFIGURATION" == "simplex" ] || [ "$CONFIGURATION" == "duplex" ]); then
146 146
                 delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-2.img
147 147
             fi
148 148
             [ -e ${DOMAIN_FILE} ] && delete_xml ${DOMAIN_FILE}

+ 1
- 1
deployment/libvirt/setup_configuration.sh View File

@@ -27,7 +27,7 @@ fi
27 27
 iso_image_check ${ISOIMAGE}
28 28
 configuration_check ${CONFIGURATION}
29 29
 
30
-CONFIGURATION=${CONFIGURATION:-allinone}
30
+CONFIGURATION=${CONFIGURATION:-simplex}
31 31
 BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
32 32
 CONTROLLER=${CONTROLLER:-controller}
33 33
 COMPUTE=${COMPUTE:-compute}

Loading…
Cancel
Save