summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2019-02-12 07:59:46 -0800
committerSaul Wold <sgw@linux.intel.com>2019-02-12 08:00:06 -0800
commit6a4cd915dc78bac1c677466e2538c209ef88ed45 (patch)
tree651080e9404022e0d14eed1353459634897f7226
parent553a053915c9ddbd18bed462465cad1079db844a (diff)
parentc8e0636ad22db2c7de9e0ab471450e649663b983 (diff)
Merge remote-tracking branch 'gerrit/master' into f/centos76f/centos76
Change-Id: I7b1596189f735623f21cfc231b289d08e4852d32 Signed-off-by: Saul Wold <sgw@linux.intel.com>
Notes
Notes (review): Code-Review+2: Scott Little <scott.little@windriver.com> Code-Review+2: Don Penney <don.penney@windriver.com> Workflow+1: Don Penney <don.penney@windriver.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 12 Feb 2019 19:23:45 +0000 Reviewed-on: https://review.openstack.org/636362 Project: openstack/stx-tools Branch: refs/heads/f/centos76
-rwxr-xr-xcentos-mirror-tools/dl_tarball.sh42
-rw-r--r--centos-mirror-tools/rpms_3rdparties.lst1
-rw-r--r--centos-mirror-tools/rpms_centos.lst3
-rw-r--r--centos-mirror-tools/tarball-dl.lst4
-rw-r--r--deployment/README.rst41
-rw-r--r--deployment/libvirt/README.rst12
-rwxr-xr-xdeployment/libvirt/destroy_configuration.sh25
-rw-r--r--deployment/libvirt/functions.sh70
-rwxr-xr-xdeployment/libvirt/setup_configuration.sh24
-rw-r--r--deployment/libvirt/storage.xml95
-rw-r--r--deployment/libvirt/worker.xml (renamed from deployment/libvirt/compute.xml)0
-rw-r--r--releasenotes/source/conf.py2
12 files changed, 201 insertions, 118 deletions
diff --git a/centos-mirror-tools/dl_tarball.sh b/centos-mirror-tools/dl_tarball.sh
index 601cbd6..01b6681 100755
--- a/centos-mirror-tools/dl_tarball.sh
+++ b/centos-mirror-tools/dl_tarball.sh
@@ -313,48 +313,18 @@ for line in $(cat $tarball_file); do
313 rm -rf $directory_name 313 rm -rf $directory_name
314 rm e6aef069b6e97790cb127d5eeb86ae9ff0b7b0e3.tar.gz 314 rm e6aef069b6e97790cb127d5eeb86ae9ff0b7b0e3.tar.gz
315 elif [ "$tarball_name" = "tss2-930.tar.gz" ]; then 315 elif [ "$tarball_name" = "tss2-930.tar.gz" ]; then
316 dest_dir=ibmtpm20tss-tss 316 download_package $tarball_url
317 for dl_src in $dl_source; do 317 if [ $? -ne 0 ]; then
318 case $dl_src in
319 $dl_from_stx_mirror)
320 url="$(url_to_stx_mirror_url "$tarball_url" "$distro")"
321 ;;
322 $dl_from_upstream)
323 url="$tarball_url"
324 ;;
325 *)
326 echo "Error: Unknown dl_source '$dl_src'"
327 continue
328 ;;
329 esac
330
331 git clone $url $dest_dir
332 if [ $? -eq 0 ]; then
333 # Success
334 break
335 else
336 echo "Warning: Failed to git clone from '$url'"
337 continue
338 fi
339 done
340
341 if [ ! -d $dest_dir ]; then
342 echo "Error: Failed to git clone from '$tarball_url'"
343 echo "$tarball_url" > "$output_log"
344 error_count=$((error_count + 1)) 318 error_count=$((error_count + 1))
345 popd # pushd $output_tarball 319 popd # pushd $output_tarball
346 continue 320 continue
347 fi 321 fi
348 322 unzip_file=ibmtpm20tss-tss-52539cb81c811c973b26ed23fafd28a700b7cc78
349 pushd $dest_dir 323 zip_file="$unzip_file.zip"
350 branch=$util 324 unzip $zip_file
351 git checkout $branch 325 mv $unzip_file $directory_name
352 rm -rf .git
353 popd
354 mv ibmtpm20tss-tss $directory_name
355 tar czvf $tarball_name $directory_name 326 tar czvf $tarball_name $directory_name
356 rm -rf $directory_name 327 rm -rf $directory_name
357 popd # pushd $dest_dir
358 fi 328 fi
359 popd # pushd $output_tarball 329 popd # pushd $output_tarball
360 continue 330 continue
diff --git a/centos-mirror-tools/rpms_3rdparties.lst b/centos-mirror-tools/rpms_3rdparties.lst
index 2e3aade..be7ed41 100644
--- a/centos-mirror-tools/rpms_3rdparties.lst
+++ b/centos-mirror-tools/rpms_3rdparties.lst
@@ -1,3 +1,4 @@
1ansible-2.7.5-1.el7.ans.noarch.rpm#https://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/ansible-2.7.5-1.el7.ans.noarch.rpm
1libvirt-python-4.7.0-1.fc28.src.rpm#https://libvirt.org/sources/python/libvirt-python-4.7.0-1.fc28.src.rpm 2libvirt-python-4.7.0-1.fc28.src.rpm#https://libvirt.org/sources/python/libvirt-python-4.7.0-1.fc28.src.rpm
2novnc-0.6.2-1.el7.noarch.rpm#http://cbs.centos.org/kojifiles/packages/novnc/0.6.2/1.el7/noarch/novnc-0.6.2-1.el7.noarch.rpm 3novnc-0.6.2-1.el7.noarch.rpm#http://cbs.centos.org/kojifiles/packages/novnc/0.6.2/1.el7/noarch/novnc-0.6.2-1.el7.noarch.rpm
3python2-docker-3.3.0-1.el7.noarch.rpm#http://cbs.centos.org/kojifiles/packages/python-docker/3.3.0/1.el7/noarch/python2-docker-3.3.0-1.el7.noarch.rpm 4python2-docker-3.3.0-1.el7.noarch.rpm#http://cbs.centos.org/kojifiles/packages/python-docker/3.3.0/1.el7/noarch/python2-docker-3.3.0-1.el7.noarch.rpm
diff --git a/centos-mirror-tools/rpms_centos.lst b/centos-mirror-tools/rpms_centos.lst
index 849d9b1..bbe735a 100644
--- a/centos-mirror-tools/rpms_centos.lst
+++ b/centos-mirror-tools/rpms_centos.lst
@@ -1233,12 +1233,14 @@ python2-passlib-1.7.0-4.el7.noarch.rpm
1233python2-pbr-3.1.1-1.el7.noarch.rpm 1233python2-pbr-3.1.1-1.el7.noarch.rpm
1234python2-pecan-1.1.2-1.el7.noarch.rpm 1234python2-pecan-1.1.2-1.el7.noarch.rpm
1235python2-persist-queue-0.1.4-1.el7.noarch.rpm 1235python2-persist-queue-0.1.4-1.el7.noarch.rpm
1236python2-pexpect-4.6-1.el7.noarch.rpm
1236python2-pifpaf-0.12.0-1.el7.noarch.rpm 1237python2-pifpaf-0.12.0-1.el7.noarch.rpm
1237python2-pika-0.10.0-9.el7.noarch.rpm 1238python2-pika-0.10.0-9.el7.noarch.rpm
1238python2-pika_pool-0.1.3-3.el7.noarch.rpm 1239python2-pika_pool-0.1.3-3.el7.noarch.rpm
1239python2-pillow-4.0.0-1.el7.x86_64.rpm 1240python2-pillow-4.0.0-1.el7.x86_64.rpm
1240python2-positional-1.1.1-2.el7.noarch.rpm 1241python2-positional-1.1.1-2.el7.noarch.rpm
1241python2-psutil-5.2.2-2.el7.x86_64.rpm 1242python2-psutil-5.2.2-2.el7.x86_64.rpm
1243python2-ptyprocess-0.5.2-3.el7.noarch.rpm
1242python2-pyasn1-0.1.9-7.el7.noarch.rpm 1244python2-pyasn1-0.1.9-7.el7.noarch.rpm
1243python2-pyasn1-modules-0.1.9-7.el7.noarch.rpm 1245python2-pyasn1-modules-0.1.9-7.el7.noarch.rpm
1244python2-pycadf-2.6.0-1.el7.noarch.rpm 1246python2-pycadf-2.6.0-1.el7.noarch.rpm
@@ -1616,6 +1618,7 @@ speex-1.2-0.19.rc1.el7.x86_64.rpm
1616sqlite-3.7.17-8.el7.x86_64.rpm 1618sqlite-3.7.17-8.el7.x86_64.rpm
1617sqlite-devel-3.7.17-8.el7.x86_64.rpm 1619sqlite-devel-3.7.17-8.el7.x86_64.rpm
1618squashfs-tools-4.3-0.21.gitaae0aff4.el7.x86_64.rpm 1620squashfs-tools-4.3-0.21.gitaae0aff4.el7.x86_64.rpm
1621sshpass-1.06-1.el7.x86_64.rpm
1619ssmtp-2.64-14.el7.x86_64.rpm 1622ssmtp-2.64-14.el7.x86_64.rpm
1620stix-fonts-1.1.0-5.el7.noarch.rpm 1623stix-fonts-1.1.0-5.el7.noarch.rpm
1621stix-math-fonts-1.1.0-5.el7.noarch.rpm 1624stix-math-fonts-1.1.0-5.el7.noarch.rpm
diff --git a/centos-mirror-tools/tarball-dl.lst b/centos-mirror-tools/tarball-dl.lst
index 7d13f2f..015de99 100644
--- a/centos-mirror-tools/tarball-dl.lst
+++ b/centos-mirror-tools/tarball-dl.lst
@@ -26,7 +26,7 @@ requests-toolbelt-0.5.1.tar.gz#requests-toolbelt-0.5.1#https://github.com/reques
26rpm-4.14.0.tar.bz2#rpm-4.14.0#https://ftp.osuosl.org/pub/rpm/releases/rpm-4.14.x/rpm-4.14.0.tar.bz2#http## 26rpm-4.14.0.tar.bz2#rpm-4.14.0#https://ftp.osuosl.org/pub/rpm/releases/rpm-4.14.x/rpm-4.14.0.tar.bz2#http##
27swtpm-0.1.0-253eac5.tar.gz#swtpm-0.1.0#https://github.com/stefanberger/swtpm/tarball/1303be7d03294fb02204cb8242f366cbf0da076d#http## 27swtpm-0.1.0-253eac5.tar.gz#swtpm-0.1.0#https://github.com/stefanberger/swtpm/tarball/1303be7d03294fb02204cb8242f366cbf0da076d#http##
28!tpm-kmod-e6aef069.tar.gz#tpm#http://git.infradead.org/users/jjs/linux-tpmdd.git/snapshot/e6aef069b6e97790cb127d5eeb86ae9ff0b7b0e3.tar.gz#http_script#post-dl-script/tpm-kmod.sh 28!tpm-kmod-e6aef069.tar.gz#tpm#http://git.infradead.org/users/jjs/linux-tpmdd.git/snapshot/e6aef069b6e97790cb127d5eeb86ae9ff0b7b0e3.tar.gz#http_script#post-dl-script/tpm-kmod.sh
29!tss2-930.tar.gz#tss2-930#https://git.code.sf.net/p/ibmtpm20tss/tss#git#v930# 29!tss2-930.tar.gz#tss2-930#https://sourceforge.net/code-snapshots/git/i/ib/ibmtpm20tss/tss.git/ibmtpm20tss-tss-52539cb81c811c973b26ed23fafd28a700b7cc78.zip#http##
30spectre-meltdown-checker-0.37+-5cc77741.tar.gz#spectre-meltdown-checker#https://github.com/speed47/spectre-meltdown-checker/tarball/5cc77741af1d2f52140aa9f89339f56b6c4b6783#http## 30spectre-meltdown-checker-0.37+-5cc77741.tar.gz#spectre-meltdown-checker#https://github.com/speed47/spectre-meltdown-checker/tarball/5cc77741af1d2f52140aa9f89339f56b6c4b6783#http##
31puppet-boolean-22b726dd78b0a60a224cc7054aebbf28e9306f62.tar.gz#puppet-boolean#https://github.com/voxpupuli/puppet-boolean/tarball/22b726dd78b0a60a224cc7054aebbf28e9306f62#http## 31puppet-boolean-22b726dd78b0a60a224cc7054aebbf28e9306f62.tar.gz#puppet-boolean#https://github.com/voxpupuli/puppet-boolean/tarball/22b726dd78b0a60a224cc7054aebbf28e9306f62#http##
32puppet-dnsmasq-cff07e90890662972c97684a2baee964f68ff3ed.tar.gz#packstack/puppet/modules/dnsmasq/#https://github.com/procore/puppet-dnsmasq/tarball/cff07e90890662972c97684a2baee964f68ff3ed#http## 32puppet-dnsmasq-cff07e90890662972c97684a2baee964f68ff3ed.tar.gz#packstack/puppet/modules/dnsmasq/#https://github.com/procore/puppet-dnsmasq/tarball/cff07e90890662972c97684a2baee964f68ff3ed#http##
@@ -44,7 +44,7 @@ openstack-helm-9d72fe1a501bc609a875eebf7b6274e18600ed70.tar.gz#openstack-helm#ht
44openstack-helm-infra-5d356f9265b337b75f605dee839faa8cd0ed3ab2.tar.gz#openstack-helm-infra#https://github.com/openstack/openstack-helm-infra/archive/5d356f9265b337b75f605dee839faa8cd0ed3ab2.tar.gz#http## 44openstack-helm-infra-5d356f9265b337b75f605dee839faa8cd0ed3ab2.tar.gz#openstack-helm-infra#https://github.com/openstack/openstack-helm-infra/archive/5d356f9265b337b75f605dee839faa8cd0ed3ab2.tar.gz#http##
45gnocchi-4.2.5.tar.gz#gnocchi-4.2.5#https://pypi.io/packages/source/g/gnocchi/gnocchi-4.2.5.tar.gz#http## 45gnocchi-4.2.5.tar.gz#gnocchi-4.2.5#https://pypi.io/packages/source/g/gnocchi/gnocchi-4.2.5.tar.gz#http##
46gnocchiclient-7.0.1.tar.gz#gnocchiclient-7.0.1#https://pypi.io/packages/source/g/gnocchiclient/gnocchiclient-7.0.1.tar.gz#http## 46gnocchiclient-7.0.1.tar.gz#gnocchiclient-7.0.1#https://pypi.io/packages/source/g/gnocchiclient/gnocchiclient-7.0.1.tar.gz#http##
47kubernetes-v1.12.1.tar.gz#kubernetes-1.12.1#https://github.com/kubernetes/kubernetes/archive/v1.12.1.tar.gz#http## 47kubernetes-v1.12.3.tar.gz#kubernetes-1.12.3#https://github.com/kubernetes/kubernetes/archive/v1.12.3.tar.gz#http##
48kubernetes-contrib-v1.12.1.tar.gz#kubernetes-contrib-1.12.1#https://github.com/kubernetes/contrib/tarball/4b2a8512a95611acb174bd306e501719ce70b1cf#http## 48kubernetes-contrib-v1.12.1.tar.gz#kubernetes-contrib-1.12.1#https://github.com/kubernetes/contrib/tarball/4b2a8512a95611acb174bd306e501719ce70b1cf#http##
49gorilla-mux-456bcfa82d672db7cae587c9b541463f65bc2718.tar.gz#gorilla-mux#https://github.com/gorilla/mux/archive/456bcfa82d672db7cae587c9b541463f65bc2718.tar.gz#http## 49gorilla-mux-456bcfa82d672db7cae587c9b541463f65bc2718.tar.gz#gorilla-mux#https://github.com/gorilla/mux/archive/456bcfa82d672db7cae587c9b541463f65bc2718.tar.gz#http##
50gorilla-context-08b5f424b9271eedf6f9f0ce86cb9396ed337a42.tar.gz#gorilla-context#https://github.com/gorilla/context/archive/08b5f424b9271eedf6f9f0ce86cb9396ed337a42.tar.gz#http## 50gorilla-context-08b5f424b9271eedf6f9f0ce86cb9396ed337a42.tar.gz#gorilla-context#https://github.com/gorilla/context/archive/08b5f424b9271eedf6f9f0ce86cb9396ed337a42.tar.gz#http##
diff --git a/deployment/README.rst b/deployment/README.rst
index 9bcb7a1..10b30c6 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
@@ -107,18 +80,22 @@ identity:
107- Controller All-in-one 80- Controller All-in-one
108- Controller 81- Controller
109- Compute 82- Compute
83- Storage
110 84
111These nodes are used to create the virtual machines and the network interfaces 85These nodes are used to create the virtual machines and the network interfaces
112to setup the StarlingX system: 86to setup the StarlingX system:
113 87
114- Setup All-in-one 88- Setup Simplex
115 89 - 1 Controller
90- Setup Duplex
116 - 2 Controllers 91 - 2 Controllers
117 92- Setup Controller Storage
118- Setup Standard Controller 93 - 2 Controllers
119 94 - 2 Computes
95- Setup Dedicated Storage
120 - 2 Controllers 96 - 2 Controllers
121 - 2 Computes 97 - 2 Computes
98 - 2 Storages
122 99
123Directory: virtualbox 100Directory: virtualbox
124~~~~~~~~~~~~~~~~~~~~~ 101~~~~~~~~~~~~~~~~~~~~~
diff --git a/deployment/libvirt/README.rst b/deployment/libvirt/README.rst
index a200477..8d6c860 100644
--- a/deployment/libvirt/README.rst
+++ b/deployment/libvirt/README.rst
@@ -23,7 +23,7 @@ The simplest way to handle this is to keep an rc file that can be sourced into
23an interactive shell that configures everything. Here's an example:: 23an interactive shell that configures everything. Here's an example::
24 24
25 export CONTROLLER=madcloud 25 export CONTROLLER=madcloud
26 export COMPUTE=madnode 26 export WORKER=madnode
27 export BRIDGE_INTERFACE=madbr 27 export BRIDGE_INTERFACE=madbr
28 export EXTERNAL_NETWORK=172.30.20.0/24 28 export EXTERNAL_NETWORK=172.30.20.0/24
29 export EXTERNAL_IP=172.30.20.1/24 29 export EXTERNAL_IP=172.30.20.1/24
@@ -48,14 +48,16 @@ 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- standardcontroller 52- duplex
53- controllerstorage
54- dedicatedstorage
53 55
54You need an StarlingX ISO file for the installation. The script takes the 56You 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 57configuration name with the ``-c`` option and the ISO file name with the
56``-i`` option:: 58``-i`` option::
57 59
58 ./setup_configuration.sh -c allinone -i stx-2018-08-28-93.iso 60 ./setup_configuration.sh -c simplex -i stx-2018-08-28-93.iso
59 61
60And the setup will begin. The script create one or more VMs and start the boot 62And 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 63of the first controller, named oddly enough ``controller-0``. If you have Xwindows
@@ -69,4 +71,4 @@ Continue the usual StarlingX installation from this point forward.
69 71
70Tear down the VMs giving the configuration name with the ``-c`` option:: 72Tear down the VMs giving the configuration name with the ``-c`` option::
71 73
72>-------./destroy_configuration.sh -c allinone 74>-------./destroy_configuration.sh -c simplex
diff --git a/deployment/libvirt/destroy_configuration.sh b/deployment/libvirt/destroy_configuration.sh
index 8d4d329..16edd46 100755
--- a/deployment/libvirt/destroy_configuration.sh
+++ b/deployment/libvirt/destroy_configuration.sh
@@ -22,17 +22,28 @@ if [[ -z ${CONFIGURATION} ]]; then
22 exit -1 22 exit -1
23fi 23fi
24 24
25CONFIGURATION=${CONFIGURATION:-allinone} 25configuration_check ${CONFIGURATION}
26
27CONFIGURATION=${CONFIGURATION:-simplex}
26CONTROLLER=${CONTROLLER:-controller} 28CONTROLLER=${CONTROLLER:-controller}
27DOMAIN_DIRECTORY=vms 29DOMAIN_DIRECTORY=vms
28 30
29destroy_controller ${CONFIGURATION} ${CONTROLLER} 31destroy_controller ${CONFIGURATION} ${CONTROLLER}
30 32
31if ([ "$CONFIGURATION" == "standardcontroller" ]); then 33if ([ "$CONFIGURATION" == "controllerstorage" ] || [ "$CONFIGURATION" == "dedicatedstorage" ]); then
32 COMPUTE=${COMPUTE:-compute} 34 WORKER=${WORKER:-worker}
33 COMPUTE_NODES_NUMBER=${COMPUTE_NODES_NUMBER:-1} 35 WORKER_NODES_NUMBER=${WORKER_NODES_NUMBER:-1}
34 for ((i=0; i<=$COMPUTE_NODES_NUMBER; i++)); do 36 for ((i=0; i<=$WORKER_NODES_NUMBER; i++)); do
35 COMPUTE_NODE=${COMPUTE}-${i} 37 WORKER_NODE=${CONFIGURATION}-${WORKER}-${i}
36 destroy_compute $COMPUTE_NODE 38 destroy_node "worker" $WORKER_NODE
39 done
40fi
41
42if ([ "$CONFIGURATION" == "dedicatedstorage" ]); then
43 STORAGE=${STORAGE:-storage}
44 STORAGE_NODES_NUMBER=${STORAGE_NODES_NUMBER:-1}
45 for ((i=0; i<=$STORAGE_NODES_NUMBER; i++)); do
46 STORAGE_NODE=${CONFIGURATION}-${STORAGE}-${i}
47 destroy_node "storage" ${STORAGE_NODE}
37 done 48 done
38fi 49fi
diff --git a/deployment/libvirt/functions.sh b/deployment/libvirt/functions.sh
index e0efe36..b460f30 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, controllerstorage, dedicatedstorage"
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, controllerstorage, dedicatedstorage"
17 echo "" 17 echo ""
18} 18}
19 19
@@ -25,6 +25,15 @@ iso_image_check() {
25 fi 25 fi
26} 26}
27 27
28configuration_check() {
29 local CONFIGURATION=$1
30 if [ $CONFIGURATION != "simplex" ] && [ $CONFIGURATION != "duplex" ] && [ $CONFIGURATION != "controllerstorage" ] && [ $CONFIGURATION != "dedicatedstorage" ]; then
31 echo "Please check your configuration name, available configurations:"
32 echo "simplex, duplex, controllerstorage, dedicatedstorage"
33 exit 1
34 fi
35}
36
28# delete a node's disk file in a safe way 37# delete a node's disk file in a safe way
29delete_disk() { 38delete_disk() {
30 local fpath="$1" 39 local fpath="$1"
@@ -68,15 +77,15 @@ create_controller() {
68 local BRIDGE_INTERFACE=$3 77 local BRIDGE_INTERFACE=$3
69 local ISOIMAGE=$4 78 local ISOIMAGE=$4
70 local DOMAIN_FILE 79 local DOMAIN_FILE
71 if ([ "$CONFIGURATION" == "allinone" ]); then 80 if ([ "$CONFIGURATION" == "simplex" ]); then
72 CONTROLLER_NODE_NUMBER=0 81 CONTROLLER_NODE_NUMBER=0
73 else 82 else
74 CONTROLLER_NODE_NUMBER=1 83 CONTROLLER_NODE_NUMBER=1
75 fi 84 fi
76 for ((i=0; i<=$CONTROLLER_NODE_NUMBER; i++)); do 85 for ((i=0; i<=$CONTROLLER_NODE_NUMBER; i++)); do
77 CONTROLLER_NODE=${CONTROLLER}-${i} 86 CONTROLLER_NODE=${CONFIGURATION}-${CONTROLLER}-${i}
78 DOMAIN_FILE=${DOMAIN_DIRECTORY}/${CONTROLLER_NODE}.xml 87 DOMAIN_FILE=${DOMAIN_DIRECTORY}/${CONTROLLER_NODE}.xml
79 if ([ "$CONFIGURATION" == "allinone" ]); then 88 if ([ "$CONFIGURATION" == "simplex" ] || [ "$CONFIGURATION" == "duplex" ]); then
80 DISK_0_SIZE=600 89 DISK_0_SIZE=600
81 cp controller_allinone.xml ${DOMAIN_FILE} 90 cp controller_allinone.xml ${DOMAIN_FILE}
82 else 91 else
@@ -94,7 +103,7 @@ create_controller() {
94 " ${DOMAIN_FILE} 103 " ${DOMAIN_FILE}
95 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
96 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
97 if ([ "$CONFIGURATION" == "allinone" ]); then 106 if ([ "$CONFIGURATION" == "simplex" ] || [ "$CONFIGURATION" == "duplex" ]); then
98 sed -i -e " 107 sed -i -e "
99 s,DISK2,/var/lib/libvirt/images/${CONTROLLER_NODE}-2.img, 108 s,DISK2,/var/lib/libvirt/images/${CONTROLLER_NODE}-2.img,
100 " ${DOMAIN_FILE} 109 " ${DOMAIN_FILE}
@@ -116,13 +125,13 @@ create_controller() {
116destroy_controller() { 125destroy_controller() {
117 local CONFIGURATION=$1 126 local CONFIGURATION=$1
118 local CONTROLLER=$2 127 local CONTROLLER=$2
119 if ([ "$CONFIGURATION" == "allinone" ]); then 128 if ([ "$CONFIGURATION" == "simplex" ]); then
120 CONTROLLER_NODE_NUMBER=0 129 CONTROLLER_NODE_NUMBER=0
121 else 130 else
122 CONTROLLER_NODE_NUMBER=1 131 CONTROLLER_NODE_NUMBER=1
123 fi 132 fi
124 for ((i=0; i<=$CONTROLLER_NODE_NUMBER; i++)); do 133 for ((i=0; i<=$CONTROLLER_NODE_NUMBER; i++)); do
125 CONTROLLER_NODE=${CONTROLLER}-${i} 134 CONTROLLER_NODE=${CONFIGURATION}-${CONTROLLER}-${i}
126 DOMAIN_FILE=$DOMAIN_DIRECTORY/$CONTROLLER_NODE.xml 135 DOMAIN_FILE=$DOMAIN_DIRECTORY/$CONTROLLER_NODE.xml
127 if virsh list --all --name | grep ${CONTROLLER_NODE}; then 136 if virsh list --all --name | grep ${CONTROLLER_NODE}; then
128 STATUS=$(virsh list --all | grep ${CONTROLLER_NODE} | awk '{ print $3}') 137 STATUS=$(virsh list --all | grep ${CONTROLLER_NODE} | awk '{ print $3}')
@@ -133,7 +142,7 @@ destroy_controller() {
133 sudo virsh undefine ${CONTROLLER_NODE} 142 sudo virsh undefine ${CONTROLLER_NODE}
134 delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-0.img 143 delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-0.img
135 delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-1.img 144 delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-1.img
136 if ([ "$CONFIGURATION" == "allinone" ]); then 145 if ([ "$CONFIGURATION" == "simplex" ] || [ "$CONFIGURATION" == "duplex" ]); then
137 delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-2.img 146 delete_disk /var/lib/libvirt/images/${CONTROLLER_NODE}-2.img
138 fi 147 fi
139 [ -e ${DOMAIN_FILE} ] && delete_xml ${DOMAIN_FILE} 148 [ -e ${DOMAIN_FILE} ] && delete_xml ${DOMAIN_FILE}
@@ -141,17 +150,19 @@ destroy_controller() {
141 done 150 done
142} 151}
143 152
144# Create a Compute node 153# Create a Node
145create_compute() { 154create_node() {
146 local COMPUTE_NODE=$1 155 local IDENTITY=$1
147 local DOMAIN_FILE=${DOMAIN_DIRECTORY}/${COMPUTE_NODE}.xml 156 local NODE=$2
148 sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${COMPUTE_NODE}-0.img 200G 157 local BRIDGE_INTERFACE=$3
149 sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${COMPUTE_NODE}-1.img 200G 158 local DOMAIN_FILE=${DOMAIN_DIRECTORY}/${NODE}.xml
150 cp compute.xml ${DOMAIN_FILE} 159 sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${NODE}-0.img 200G
160 sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${NODE}-1.img 200G
161 cp ${IDENTITY}.xml ${DOMAIN_FILE}
151 sed -i -e " 162 sed -i -e "
152 s,NAME,${COMPUTE_NODE},; 163 s,NAME,${NODE},;
153 s,DISK0,/var/lib/libvirt/images/${COMPUTE_NODE}-0.img,; 164 s,DISK0,/var/lib/libvirt/images/${NODE}-0.img,;
154 s,DISK1,/var/lib/libvirt/images/${COMPUTE_NODE}-1.img, 165 s,DISK1,/var/lib/libvirt/images/${NODE}-1.img,
155 s,%BR1%,${BRIDGE_INTERFACE}1, 166 s,%BR1%,${BRIDGE_INTERFACE}1,
156 s,%BR2%,${BRIDGE_INTERFACE}2, 167 s,%BR2%,${BRIDGE_INTERFACE}2,
157 s,%BR3%,${BRIDGE_INTERFACE}3, 168 s,%BR3%,${BRIDGE_INTERFACE}3,
@@ -160,19 +171,20 @@ create_compute() {
160 sudo virsh define ${DOMAIN_FILE} 171 sudo virsh define ${DOMAIN_FILE}
161} 172}
162 173
163# Delete a Compute node 174# Delete a Node
164destroy_compute() { 175destroy_node() {
165 local COMPUTE_NODE=$1 176 local IDENTITY=$1
166 local DOMAIN_FILE=$DOMAIN_DIRECTORY/$COMPUTE_NODE.xml 177 local NODE=$2
167 if virsh list --all --name | grep ${COMPUTE_NODE}; then 178 local DOMAIN_FILE=$DOMAIN_DIRECTORY/$NODE.xml
168 STATUS=$(virsh list --all | grep ${COMPUTE_NODE} | awk '{ print $3}') 179 if virsh list --all --name | grep ${NODE}; then
180 STATUS=$(virsh list --all | grep ${NODE} | awk '{ print $3}')
169 if ([ "$STATUS" == "running" ]) 181 if ([ "$STATUS" == "running" ])
170 then 182 then
171 sudo virsh destroy ${COMPUTE_NODE} 183 sudo virsh destroy ${NODE}
172 fi 184 fi
173 sudo virsh undefine ${COMPUTE_NODE} 185 sudo virsh undefine ${NODE}
174 delete_disk /var/lib/libvirt/images/${COMPUTE_NODE}-0.img 186 delete_disk /var/lib/libvirt/images/${NODE}-0.img
175 delete_disk /var/lib/libvirt/images/${COMPUTE_NODE}-1.img 187 delete_disk /var/lib/libvirt/images/${NODE}-1.img
176 [ -e ${DOMAIN_FILE} ] && delete_xml ${DOMAIN_FILE} 188 [ -e ${DOMAIN_FILE} ] && delete_xml ${DOMAIN_FILE}
177 fi 189 fi
178} 190}
diff --git a/deployment/libvirt/setup_configuration.sh b/deployment/libvirt/setup_configuration.sh
index 3b17ace..7c1c1bc 100755
--- a/deployment/libvirt/setup_configuration.sh
+++ b/deployment/libvirt/setup_configuration.sh
@@ -25,12 +25,15 @@ if [[ -z ${CONFIGURATION} ]] || [[ -z "${ISOIMAGE}" ]]; then
25fi 25fi
26 26
27iso_image_check ${ISOIMAGE} 27iso_image_check ${ISOIMAGE}
28configuration_check ${CONFIGURATION}
28 29
29CONFIGURATION=${CONFIGURATION:-allinone} 30CONFIGURATION=${CONFIGURATION:-simplex}
30BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr} 31BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
31CONTROLLER=${CONTROLLER:-controller} 32CONTROLLER=${CONTROLLER:-controller}
32COMPUTE=${COMPUTE:-compute} 33WORKER=${WORKER:-worker}
33COMPUTE_NODES_NUMBER=${COMPUTE_NODES_NUMBER:-1} 34WORKER_NODES_NUMBER=${WORKER_NODES_NUMBER:-1}
35STORAGE=${STORAGE:-storage}
36STORAGE_NODES_NUMBER=${STORAGE_NODES_NUMBER:-1}
34DOMAIN_DIRECTORY=vms 37DOMAIN_DIRECTORY=vms
35 38
36bash ${SCRIPT_DIR}/destroy_configuration.sh -c $CONFIGURATION 39bash ${SCRIPT_DIR}/destroy_configuration.sh -c $CONFIGURATION
@@ -39,10 +42,17 @@ bash ${SCRIPT_DIR}/destroy_configuration.sh -c $CONFIGURATION
39 42
40create_controller $CONFIGURATION $CONTROLLER $BRIDGE_INTERFACE $ISOIMAGE 43create_controller $CONFIGURATION $CONTROLLER $BRIDGE_INTERFACE $ISOIMAGE
41 44
42if ([ "$CONFIGURATION" == "standardcontroller" ]); then 45if ([ "$CONFIGURATION" == "controllerstorage" ] || [ "$CONFIGURATION" == "dedicatedstorage" ]); then
43 for ((i=0; i<=$COMPUTE_NODES_NUMBER; i++)); do 46 for ((i=0; i<=$WORKER_NODES_NUMBER; i++)); do
44 COMPUTE_NODE=${COMPUTE}-${i} 47 WORKER_NODE=${CONFIGURATION}-${WORKER}-${i}
45 create_compute ${COMPUTE_NODE} 48 create_node "worker" ${WORKER_NODE} ${BRIDGE_INTERFACE}
49 done
50fi
51
52if ([ "$CONFIGURATION" == "dedicatedstorage" ]); then
53 for ((i=0; i<=$STORAGE_NODES_NUMBER; i++)); do
54 STORAGE_NODE=${CONFIGURATION}-${STORAGE}-${i}
55 create_node "storage" ${STORAGE_NODE} ${BRIDGE_INTERFACE}
46 done 56 done
47fi 57fi
48 58
diff --git a/deployment/libvirt/storage.xml b/deployment/libvirt/storage.xml
new file mode 100644
index 0000000..83f2cd0
--- /dev/null
+++ b/deployment/libvirt/storage.xml
@@ -0,0 +1,95 @@
1<domain type='kvm' id='187'>
2 <name>NAME</name>
3 <memory unit='KiB'>16777216</memory>
4 <currentMemory unit='KiB'>16777216</currentMemory>
5 <vcpu placement='static'>4</vcpu>
6 <resource>
7 <partition>/machine</partition>
8 </resource>
9 <os>
10 <type arch='x86_64' machine='pc-q35-xenial'>hvm</type>
11 </os>
12 <features>
13 <acpi/>
14 <apic/>
15 <pae/>
16 </features>
17 <cpu match='exact'>
18 <model fallback='forbid'>Nehalem</model>
19 <topology sockets='1' cores='4' threads='1'/>
20 <feature policy='require' name='vmx'/>
21 <feature policy='optional' name='svm'/>
22 </cpu>
23 <clock offset='utc'/>
24 <on_poweroff>destroy</on_poweroff>
25 <on_reboot>restart</on_reboot>
26 <on_crash>destroy</on_crash>
27 <devices>
28 <emulator>/usr/bin/qemu-system-x86_64</emulator>
29 <disk type='file' device='disk'>
30 <driver name='qemu' type='qcow2'/>
31 <source file='DISK0'/>
32 <backingStore/>
33 <target dev='sda' bus='sata'/>
34 <boot order='1'/>
35 </disk>
36 <disk type='file' device='disk'>
37 <driver name='qemu' type='qcow2'/>
38 <source file='DISK1'/>
39 <backingStore/>
40 <target dev='sdb' bus='sata'/>
41 </disk>
42 <interface type='bridge'>
43 <source bridge='%BR1%'/>
44 <target dev='vnet8'/>
45 <model type='e1000'/>
46 <alias name='net0'/>
47 </interface>
48 <interface type='bridge'>
49 <source bridge='%BR2%'/>
50 <target dev='vnet9'/>
51 <model type='e1000'/>
52 <boot order='2'/>
53 <alias name='net1'/>
54 </interface>
55 <interface type='bridge'>
56 <source bridge='%BR3%'/>
57 <target dev='vnet10'/>
58 <model type='virtio'/>
59 <alias name='net2'/>
60 </interface>
61 <interface type='bridge'>
62 <source bridge='%BR4%'/>
63 <target dev='vnet11'/>
64 <model type='virtio'/>
65 <alias name='net3'/>
66 </interface>
67 <serial type='pty'>
68 <source path='/dev/pts/12'/>
69 <target port='0'/>
70 <alias name='serial0'/>
71 </serial>
72 <console type='pty' tty='/dev/pts/12'>
73 <source path='/dev/pts/12'/>
74 <target type='serial' port='0'/>
75 <alias name='serial0'/>
76 </console>
77 <input type='mouse' bus='ps2'/>
78 <input type='keyboard' bus='ps2'/>
79 <graphics type='vnc' port='5903' autoport='yes' listen='127.0.0.1'
80keymap='en-us'>
81 <listen type='address' address='127.0.0.1'/>
82 </graphics>
83 <video>
84 <model type='cirrus' vram='16384' heads='1'/>
85 <alias name='video0'/>
86 </video>
87 <memballoon model='virtio'>
88 <alias name='balloon0'/>
89 </memballoon>
90 </devices>
91 <seclabel type='dynamic' model='apparmor' relabel='yes'>
92 <label>libvirt-608ab5c8-8d11-4bdd-885f-f8b5fee12ff0</label>
93 <imagelabel>libvirt-608ab5c8-8d11-4bdd-885f-f8b5fee12ff0</imagelabel>
94 </seclabel>
95</domain>
diff --git a/deployment/libvirt/compute.xml b/deployment/libvirt/worker.xml
index d1f9291..d1f9291 100644
--- a/deployment/libvirt/compute.xml
+++ b/deployment/libvirt/worker.xml
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
index 4e0a1c1..1085530 100644
--- a/releasenotes/source/conf.py
+++ b/releasenotes/source/conf.py
@@ -46,6 +46,8 @@ source_suffix = '.rst'
46# The master toctree document. 46# The master toctree document.
47master_doc = 'index' 47master_doc = 'index'
48 48
49project = u'stx-tools'
50
49# Release notes are version independent, no need to set version and release 51# Release notes are version independent, no need to set version and release
50release = '' 52release = ''
51version = '' 53version = ''