From ce407f198e96b1e90c77f00c4a4b4004ae825187 Mon Sep 17 00:00:00 2001 From: Abraham Arce Date: Wed, 31 Oct 2018 04:31:21 -0600 Subject: [PATCH 1/8] [Doc] Check and Include Configuration Names In preparation to support more configurations, use existing allinone and standardcontroller configurations names to: - check if configuration is available via a function before it is created. - to identify what configuration the compute node belongs to. Additional: - Fix linters issues Story: 2004780 Task: 28996 Change-Id: I94ca268760c2cf12072de676dbd19413ef96a1ab Signed-off-by: Abraham Arce --- deployment/libvirt/destroy_configuration.sh | 4 +++- deployment/libvirt/functions.sh | 13 +++++++++++-- deployment/libvirt/setup_configuration.sh | 3 ++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/deployment/libvirt/destroy_configuration.sh b/deployment/libvirt/destroy_configuration.sh index 8d4d3298..1e071f2a 100755 --- a/deployment/libvirt/destroy_configuration.sh +++ b/deployment/libvirt/destroy_configuration.sh @@ -22,6 +22,8 @@ if [[ -z ${CONFIGURATION} ]]; then exit -1 fi +configuration_check ${CONFIGURATION} + CONFIGURATION=${CONFIGURATION:-allinone} CONTROLLER=${CONTROLLER:-controller} DOMAIN_DIRECTORY=vms @@ -32,7 +34,7 @@ if ([ "$CONFIGURATION" == "standardcontroller" ]); then COMPUTE=${COMPUTE:-compute} COMPUTE_NODES_NUMBER=${COMPUTE_NODES_NUMBER:-1} for ((i=0; i<=$COMPUTE_NODES_NUMBER; i++)); do - COMPUTE_NODE=${COMPUTE}-${i} + COMPUTE_NODE=${CONFIGURATION}-${COMPUTE}-${i} destroy_compute $COMPUTE_NODE done fi diff --git a/deployment/libvirt/functions.sh b/deployment/libvirt/functions.sh index d9d1664c..d7ff03a9 100644 --- a/deployment/libvirt/functions.sh +++ b/deployment/libvirt/functions.sh @@ -26,6 +26,15 @@ iso_image_check() { fi } +configuration_check() { + local CONFIGURATION=$1 + if [ $CONFIGURATION != "allinone" ] && [ $CONFIGURATION != "standardcontroller" ]; then + echo "Please check your configuration name, available configurations:" + echo "allinone, standardcontroller" + exit 1 + fi +} + # delete a node's disk file in a safe way delete_disk() { local fpath="$1" @@ -75,7 +84,7 @@ create_controller() { CONTROLLER_NODE_NUMBER=1 fi for ((i=0; i<=$CONTROLLER_NODE_NUMBER; i++)); do - CONTROLLER_NODE=${CONTROLLER}-${i} + CONTROLLER_NODE=${CONFIGURATION}-${CONTROLLER}-${i} DOMAIN_FILE=${DOMAIN_DIRECTORY}/${CONTROLLER_NODE}.xml if ([ "$CONFIGURATION" == "allinone" ]); then DISK_0_SIZE=600 @@ -123,7 +132,7 @@ destroy_controller() { CONTROLLER_NODE_NUMBER=1 fi for ((i=0; i<=$CONTROLLER_NODE_NUMBER; i++)); do - CONTROLLER_NODE=${CONTROLLER}-${i} + CONTROLLER_NODE=${CONFIGURATION}-${CONTROLLER}-${i} DOMAIN_FILE=$DOMAIN_DIRECTORY/$CONTROLLER_NODE.xml if virsh list --all --name | grep ${CONTROLLER_NODE}; then STATUS=$(virsh list --all | grep ${CONTROLLER_NODE} | awk '{ print $3}') diff --git a/deployment/libvirt/setup_configuration.sh b/deployment/libvirt/setup_configuration.sh index 3b17ace7..62bfbc95 100755 --- a/deployment/libvirt/setup_configuration.sh +++ b/deployment/libvirt/setup_configuration.sh @@ -25,6 +25,7 @@ if [[ -z ${CONFIGURATION} ]] || [[ -z "${ISOIMAGE}" ]]; then fi iso_image_check ${ISOIMAGE} +configuration_check ${CONFIGURATION} CONFIGURATION=${CONFIGURATION:-allinone} BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr} @@ -41,7 +42,7 @@ create_controller $CONFIGURATION $CONTROLLER $BRIDGE_INTERFACE $ISOIMAGE if ([ "$CONFIGURATION" == "standardcontroller" ]); then for ((i=0; i<=$COMPUTE_NODES_NUMBER; i++)); do - COMPUTE_NODE=${COMPUTE}-${i} + COMPUTE_NODE=${CONFIGURATION}-${COMPUTE}-${i} create_compute ${COMPUTE_NODE} done fi From c2a1cc2930be76efe92aad1831b1d8ca47b396e5 Mon Sep 17 00:00:00 2001 From: Abraham Arce Date: Wed, 31 Oct 2018 05:00:27 -0600 Subject: [PATCH 2/8] 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 --- deployment/README.rst | 34 ++------------------- deployment/libvirt/README.rst | 7 +++-- deployment/libvirt/destroy_configuration.sh | 2 +- deployment/libvirt/functions.sh | 18 +++++------ deployment/libvirt/setup_configuration.sh | 2 +- 5 files changed, 18 insertions(+), 45 deletions(-) diff --git a/deployment/README.rst b/deployment/README.rst index 9bcb7a14..50f22eb4 100644 --- a/deployment/README.rst +++ b/deployment/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 diff --git a/deployment/libvirt/README.rst b/deployment/libvirt/README.rst index a2004777..92399c24 100644 --- a/deployment/libvirt/README.rst +++ b/deployment/libvirt/README.rst @@ -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 diff --git a/deployment/libvirt/destroy_configuration.sh b/deployment/libvirt/destroy_configuration.sh index 1e071f2a..5b9ec6e3 100755 --- a/deployment/libvirt/destroy_configuration.sh +++ b/deployment/libvirt/destroy_configuration.sh @@ -24,7 +24,7 @@ fi configuration_check ${CONFIGURATION} -CONFIGURATION=${CONFIGURATION:-allinone} +CONFIGURATION=${CONFIGURATION:-simplex} CONTROLLER=${CONTROLLER:-controller} DOMAIN_DIRECTORY=vms diff --git a/deployment/libvirt/functions.sh b/deployment/libvirt/functions.sh index d7ff03a9..0c875199 100644 --- a/deployment/libvirt/functions.sh +++ b/deployment/libvirt/functions.sh @@ -4,7 +4,7 @@ usage() { echo "$0 [-h] [-c ] [-i ]" 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 ]" 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} diff --git a/deployment/libvirt/setup_configuration.sh b/deployment/libvirt/setup_configuration.sh index 62bfbc95..4c6f44a3 100755 --- a/deployment/libvirt/setup_configuration.sh +++ b/deployment/libvirt/setup_configuration.sh @@ -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} From 09c07804b71b827e7a076c680ecd0f0425d440f9 Mon Sep 17 00:00:00 2001 From: Abraham Arce Date: Thu, 1 Nov 2018 04:06:59 -0600 Subject: [PATCH 3/8] Standard Controller Configurations Standard Controller can be configured as: - Controller Storage - Dedicated Storage This includes reusing same function to create and destroy compute nodes for the added storage nodes, renamed to: - create_node - destroy_node Story: 2004780 Task: 28996 Change-Id: I00745db16c936c11564dbc961728e86a541cc907 Signed-off-by: Abraham Arce --- deployment/README.rst | 7 +- deployment/libvirt/README.rst | 3 +- deployment/libvirt/destroy_configuration.sh | 13 ++- deployment/libvirt/functions.sh | 51 +++++------ deployment/libvirt/setup_configuration.sh | 13 ++- deployment/libvirt/storage.xml | 95 +++++++++++++++++++++ 6 files changed, 152 insertions(+), 30 deletions(-) create mode 100644 deployment/libvirt/storage.xml diff --git a/deployment/README.rst b/deployment/README.rst index 50f22eb4..10b30c6f 100644 --- a/deployment/README.rst +++ b/deployment/README.rst @@ -80,6 +80,7 @@ identity: - Controller All-in-one - Controller - Compute +- Storage These nodes are used to create the virtual machines and the network interfaces to setup the StarlingX system: @@ -88,9 +89,13 @@ to setup the StarlingX system: - 1 Controller - Setup Duplex - 2 Controllers -- Setup Standard Controller +- Setup Controller Storage - 2 Controllers - 2 Computes +- Setup Dedicated Storage + - 2 Controllers + - 2 Computes + - 2 Storages Directory: virtualbox ~~~~~~~~~~~~~~~~~~~~~ diff --git a/deployment/libvirt/README.rst b/deployment/libvirt/README.rst index 92399c24..69f71a1b 100644 --- a/deployment/libvirt/README.rst +++ b/deployment/libvirt/README.rst @@ -50,7 +50,8 @@ builds different StarlingX cloud configurations: - simplex - duplex -- standardcontroller +- controllerstorage +- dedicatedstorage 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 diff --git a/deployment/libvirt/destroy_configuration.sh b/deployment/libvirt/destroy_configuration.sh index 5b9ec6e3..624a1ba8 100755 --- a/deployment/libvirt/destroy_configuration.sh +++ b/deployment/libvirt/destroy_configuration.sh @@ -30,11 +30,20 @@ DOMAIN_DIRECTORY=vms destroy_controller ${CONFIGURATION} ${CONTROLLER} -if ([ "$CONFIGURATION" == "standardcontroller" ]); then +if ([ "$CONFIGURATION" == "controllerstorage" ] || [ "$CONFIGURATION" == "dedicatedstorage" ]); then COMPUTE=${COMPUTE:-compute} COMPUTE_NODES_NUMBER=${COMPUTE_NODES_NUMBER:-1} for ((i=0; i<=$COMPUTE_NODES_NUMBER; i++)); do COMPUTE_NODE=${CONFIGURATION}-${COMPUTE}-${i} - destroy_compute $COMPUTE_NODE + destroy_node "compute" $COMPUTE_NODE + done +fi + +if ([ "$CONFIGURATION" == "dedicatedstorage" ]); then + STORAGE=${STORAGE:-storage} + STORAGE_NODES_NUMBER=${STORAGE_NODES_NUMBER:-1} + for ((i=0; i<=$STORAGE_NODES_NUMBER; i++)); do + STORAGE_NODE=${CONFIGURATION}-${STORAGE}-${i} + destroy_node "storage" ${STORAGE_NODE} done fi diff --git a/deployment/libvirt/functions.sh b/deployment/libvirt/functions.sh index 0c875199..d9c8c115 100644 --- a/deployment/libvirt/functions.sh +++ b/deployment/libvirt/functions.sh @@ -4,7 +4,7 @@ usage() { echo "$0 [-h] [-c ] [-i ]" echo "" echo "Options:" - echo " -c: Configuration: simplex, duplex, standardcontroller" + echo " -c: Configuration: simplex, duplex, controllerstorage, dedicatedstorage" echo " -i: StarlingX ISO image" echo "" } @@ -13,7 +13,7 @@ usage_destroy() { echo "$0 [-h] [-c ]" echo "" echo "Options:" - echo " -c: Configuration: simplex, duplex, standardcontroller" + echo " -c: Configuration: simplex, duplex, controllerstorage, dedicatedstorage" echo "" } @@ -28,9 +28,9 @@ iso_image_check() { configuration_check() { local CONFIGURATION=$1 - if [ $CONFIGURATION != "simplex" ] && [ $CONFIGURATION != "duplex" ] && [ $CONFIGURATION != "standardcontroller" ]; then + if [ $CONFIGURATION != "simplex" ] && [ $CONFIGURATION != "duplex" ] && [ $CONFIGURATION != "controllerstorage" ] && [ $CONFIGURATION != "dedicatedstorage" ]; then echo "Please check your configuration name, available configurations:" - echo "simplex, duplex, standardcontroller" + echo "simplex, duplex, controllerstorage, dedicatedstorage" exit 1 fi } @@ -151,17 +151,19 @@ destroy_controller() { done } -# Create a Compute node -create_compute() { - local COMPUTE_NODE=$1 - local DOMAIN_FILE=${DOMAIN_DIRECTORY}/${COMPUTE_NODE}.xml - sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${COMPUTE_NODE}-0.img 200G - sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${COMPUTE_NODE}-1.img 200G - cp compute.xml ${DOMAIN_FILE} +# Create a Node +create_node() { + local IDENTITY=$1 + local NODE=$2 + local BRIDGE_INTERFACE=$3 + local DOMAIN_FILE=${DOMAIN_DIRECTORY}/${NODE}.xml + sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${NODE}-0.img 200G + sudo qemu-img create -f qcow2 /var/lib/libvirt/images/${NODE}-1.img 200G + cp ${IDENTITY}.xml ${DOMAIN_FILE} sed -i -e " - s,NAME,${COMPUTE_NODE},; - s,DISK0,/var/lib/libvirt/images/${COMPUTE_NODE}-0.img,; - s,DISK1,/var/lib/libvirt/images/${COMPUTE_NODE}-1.img, + s,NAME,${NODE},; + s,DISK0,/var/lib/libvirt/images/${NODE}-0.img,; + s,DISK1,/var/lib/libvirt/images/${NODE}-1.img, s,%BR1%,${BRIDGE_INTERFACE}1, s,%BR2%,${BRIDGE_INTERFACE}2, s,%BR3%,${BRIDGE_INTERFACE}3, @@ -170,19 +172,20 @@ create_compute() { sudo virsh define ${DOMAIN_FILE} } -# Delete a Compute node -destroy_compute() { - local COMPUTE_NODE=$1 - local DOMAIN_FILE=$DOMAIN_DIRECTORY/$COMPUTE_NODE.xml - if virsh list --all --name | grep ${COMPUTE_NODE}; then - STATUS=$(virsh list --all | grep ${COMPUTE_NODE} | awk '{ print $3}') +# Delete a Node +destroy_node() { + local IDENTITY=$1 + local NODE=$2 + local DOMAIN_FILE=$DOMAIN_DIRECTORY/$NODE.xml + if virsh list --all --name | grep ${NODE}; then + STATUS=$(virsh list --all | grep ${NODE} | awk '{ print $3}') if ([ "$STATUS" == "running" ]) then - sudo virsh destroy ${COMPUTE_NODE} + sudo virsh destroy ${NODE} fi - sudo virsh undefine ${COMPUTE_NODE} - delete_disk /var/lib/libvirt/images/${COMPUTE_NODE}-0.img - delete_disk /var/lib/libvirt/images/${COMPUTE_NODE}-1.img + sudo virsh undefine ${NODE} + delete_disk /var/lib/libvirt/images/${NODE}-0.img + delete_disk /var/lib/libvirt/images/${NODE}-1.img [ -e ${DOMAIN_FILE} ] && delete_xml ${DOMAIN_FILE} fi } diff --git a/deployment/libvirt/setup_configuration.sh b/deployment/libvirt/setup_configuration.sh index 4c6f44a3..a149bcea 100755 --- a/deployment/libvirt/setup_configuration.sh +++ b/deployment/libvirt/setup_configuration.sh @@ -32,6 +32,8 @@ BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr} CONTROLLER=${CONTROLLER:-controller} COMPUTE=${COMPUTE:-compute} COMPUTE_NODES_NUMBER=${COMPUTE_NODES_NUMBER:-1} +STORAGE=${STORAGE:-storage} +STORAGE_NODES_NUMBER=${STORAGE_NODES_NUMBER:-1} DOMAIN_DIRECTORY=vms bash ${SCRIPT_DIR}/destroy_configuration.sh -c $CONFIGURATION @@ -40,10 +42,17 @@ bash ${SCRIPT_DIR}/destroy_configuration.sh -c $CONFIGURATION create_controller $CONFIGURATION $CONTROLLER $BRIDGE_INTERFACE $ISOIMAGE -if ([ "$CONFIGURATION" == "standardcontroller" ]); then +if ([ "$CONFIGURATION" == "controllerstorage" ] || [ "$CONFIGURATION" == "dedicatedstorage" ]); then for ((i=0; i<=$COMPUTE_NODES_NUMBER; i++)); do COMPUTE_NODE=${CONFIGURATION}-${COMPUTE}-${i} - create_compute ${COMPUTE_NODE} + create_node "compute" ${COMPUTE_NODE} ${BRIDGE_INTERFACE} + done +fi + +if ([ "$CONFIGURATION" == "dedicatedstorage" ]); then + for ((i=0; i<=$STORAGE_NODES_NUMBER; i++)); do + STORAGE_NODE=${CONFIGURATION}-${STORAGE}-${i} + create_node "storage" ${STORAGE_NODE} ${BRIDGE_INTERFACE} done fi diff --git a/deployment/libvirt/storage.xml b/deployment/libvirt/storage.xml new file mode 100644 index 00000000..83f2cd0f --- /dev/null +++ b/deployment/libvirt/storage.xml @@ -0,0 +1,95 @@ + + NAME + 16777216 + 16777216 + 4 + + /machine + + + hvm + + + + + + + + Nehalem + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + libvirt-608ab5c8-8d11-4bdd-885f-f8b5fee12ff0 + + From 06248c2f1eebf57d1b51c906b0ca5b3b4c432246 Mon Sep 17 00:00:00 2001 From: Abraham Arce Date: Tue, 8 Jan 2019 08:08:19 -0600 Subject: [PATCH 4/8] Worker Node Personality Libvirt Change for Libvirt the "compute" personality to "worker". Story: 2004022 Task: 28799 Depends-On: https://review.openstack.org/#/c/628341 Change-Id: Icba19b252b22765c7f64990fd92af19cb748fd6a Signed-off-by: Abraham Arce --- deployment/libvirt/README.rst | 2 +- deployment/libvirt/destroy_configuration.sh | 10 +++++----- deployment/libvirt/setup_configuration.sh | 10 +++++----- deployment/libvirt/{compute.xml => worker.xml} | 0 4 files changed, 11 insertions(+), 11 deletions(-) rename deployment/libvirt/{compute.xml => worker.xml} (100%) diff --git a/deployment/libvirt/README.rst b/deployment/libvirt/README.rst index 69f71a1b..8d6c8603 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 an interactive shell that configures everything. Here's an example:: export CONTROLLER=madcloud - export COMPUTE=madnode + export WORKER=madnode export BRIDGE_INTERFACE=madbr export EXTERNAL_NETWORK=172.30.20.0/24 export EXTERNAL_IP=172.30.20.1/24 diff --git a/deployment/libvirt/destroy_configuration.sh b/deployment/libvirt/destroy_configuration.sh index 624a1ba8..16edd46c 100755 --- a/deployment/libvirt/destroy_configuration.sh +++ b/deployment/libvirt/destroy_configuration.sh @@ -31,11 +31,11 @@ DOMAIN_DIRECTORY=vms destroy_controller ${CONFIGURATION} ${CONTROLLER} if ([ "$CONFIGURATION" == "controllerstorage" ] || [ "$CONFIGURATION" == "dedicatedstorage" ]); then - COMPUTE=${COMPUTE:-compute} - COMPUTE_NODES_NUMBER=${COMPUTE_NODES_NUMBER:-1} - for ((i=0; i<=$COMPUTE_NODES_NUMBER; i++)); do - COMPUTE_NODE=${CONFIGURATION}-${COMPUTE}-${i} - destroy_node "compute" $COMPUTE_NODE + WORKER=${WORKER:-worker} + WORKER_NODES_NUMBER=${WORKER_NODES_NUMBER:-1} + for ((i=0; i<=$WORKER_NODES_NUMBER; i++)); do + WORKER_NODE=${CONFIGURATION}-${WORKER}-${i} + destroy_node "worker" $WORKER_NODE done fi diff --git a/deployment/libvirt/setup_configuration.sh b/deployment/libvirt/setup_configuration.sh index a149bcea..7c1c1bc5 100755 --- a/deployment/libvirt/setup_configuration.sh +++ b/deployment/libvirt/setup_configuration.sh @@ -30,8 +30,8 @@ configuration_check ${CONFIGURATION} CONFIGURATION=${CONFIGURATION:-simplex} BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr} CONTROLLER=${CONTROLLER:-controller} -COMPUTE=${COMPUTE:-compute} -COMPUTE_NODES_NUMBER=${COMPUTE_NODES_NUMBER:-1} +WORKER=${WORKER:-worker} +WORKER_NODES_NUMBER=${WORKER_NODES_NUMBER:-1} STORAGE=${STORAGE:-storage} STORAGE_NODES_NUMBER=${STORAGE_NODES_NUMBER:-1} DOMAIN_DIRECTORY=vms @@ -43,9 +43,9 @@ bash ${SCRIPT_DIR}/destroy_configuration.sh -c $CONFIGURATION create_controller $CONFIGURATION $CONTROLLER $BRIDGE_INTERFACE $ISOIMAGE if ([ "$CONFIGURATION" == "controllerstorage" ] || [ "$CONFIGURATION" == "dedicatedstorage" ]); then - for ((i=0; i<=$COMPUTE_NODES_NUMBER; i++)); do - COMPUTE_NODE=${CONFIGURATION}-${COMPUTE}-${i} - create_node "compute" ${COMPUTE_NODE} ${BRIDGE_INTERFACE} + for ((i=0; i<=$WORKER_NODES_NUMBER; i++)); do + WORKER_NODE=${CONFIGURATION}-${WORKER}-${i} + create_node "worker" ${WORKER_NODE} ${BRIDGE_INTERFACE} done fi diff --git a/deployment/libvirt/compute.xml b/deployment/libvirt/worker.xml similarity index 100% rename from deployment/libvirt/compute.xml rename to deployment/libvirt/worker.xml From 60cbbf508c008e882cffa53586ae0b68b6119037 Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Tue, 22 Jan 2019 09:32:06 -0600 Subject: [PATCH 5/8] Upversion kubernetes tarball to 1.12.3 Story: 2002843 Task: 29030 Change-Id: Ifb2ca9f36ae2a2f69038f0aad05a4af93eaaa5ad Signed-off-by: Al Bailey --- centos-mirror-tools/tarball-dl.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centos-mirror-tools/tarball-dl.lst b/centos-mirror-tools/tarball-dl.lst index 5b9e6af2..762b6f7f 100644 --- a/centos-mirror-tools/tarball-dl.lst +++ b/centos-mirror-tools/tarball-dl.lst @@ -46,7 +46,7 @@ openstack-helm-9d72fe1a501bc609a875eebf7b6274e18600ed70.tar.gz#openstack-helm#ht openstack-helm-infra-5d356f9265b337b75f605dee839faa8cd0ed3ab2.tar.gz#openstack-helm-infra#https://github.com/openstack/openstack-helm-infra/archive/5d356f9265b337b75f605dee839faa8cd0ed3ab2.tar.gz#http## gnocchi-4.2.5.tar.gz#gnocchi-4.2.5#https://pypi.io/packages/source/g/gnocchi/gnocchi-4.2.5.tar.gz#http## gnocchiclient-7.0.1.tar.gz#gnocchiclient-7.0.1#https://pypi.io/packages/source/g/gnocchiclient/gnocchiclient-7.0.1.tar.gz#http## -kubernetes-v1.12.1.tar.gz#kubernetes-1.12.1#https://github.com/kubernetes/kubernetes/archive/v1.12.1.tar.gz#http## +kubernetes-v1.12.3.tar.gz#kubernetes-1.12.3#https://github.com/kubernetes/kubernetes/archive/v1.12.3.tar.gz#http## kubernetes-contrib-v1.12.1.tar.gz#kubernetes-contrib-1.12.1#https://github.com/kubernetes/contrib/tarball/4b2a8512a95611acb174bd306e501719ce70b1cf#http## gorilla-mux-456bcfa82d672db7cae587c9b541463f65bc2718.tar.gz#gorilla-mux#https://github.com/gorilla/mux/archive/456bcfa82d672db7cae587c9b541463f65bc2718.tar.gz#http## gorilla-context-08b5f424b9271eedf6f9f0ce86cb9396ed337a42.tar.gz#gorilla-context#https://github.com/gorilla/context/archive/08b5f424b9271eedf6f9f0ce86cb9396ed337a42.tar.gz#http## From 40a9622d7716e60a28807724ce5eece22f0e1c0c Mon Sep 17 00:00:00 2001 From: Marcela Rosales Date: Wed, 23 Jan 2019 16:20:18 -0600 Subject: [PATCH 6/8] Change download mechanism for tss2 (git clone to wget) tss2 is the only tarball that is generated using git clone, this commit makes the downloader get all the tarballs using wget. Change-Id: Ib6009341f6b7c890f43962f2c24fc73e95ec81b7 Story: 2004413 Signed-off-by: Marcela Rosales --- centos-mirror-tools/dl_tarball.sh | 42 +++++------------------------- centos-mirror-tools/tarball-dl.lst | 2 +- 2 files changed, 7 insertions(+), 37 deletions(-) diff --git a/centos-mirror-tools/dl_tarball.sh b/centos-mirror-tools/dl_tarball.sh index 753e877d..4846d9e2 100755 --- a/centos-mirror-tools/dl_tarball.sh +++ b/centos-mirror-tools/dl_tarball.sh @@ -329,48 +329,18 @@ for line in $(cat $tarball_file); do rm -rf $directory_name rm e6aef069b6e97790cb127d5eeb86ae9ff0b7b0e3.tar.gz elif [ "$tarball_name" = "tss2-930.tar.gz" ]; then - dest_dir=ibmtpm20tss-tss - for dl_src in $dl_source; do - case $dl_src in - $dl_from_stx_mirror) - url="$(url_to_stx_mirror_url "$tarball_url" "$distro")" - ;; - $dl_from_upstream) - url="$tarball_url" - ;; - *) - echo "Error: Unknown dl_source '$dl_src'" - continue - ;; - esac - - git clone $url $dest_dir - if [ $? -eq 0 ]; then - # Success - break - else - echo "Warning: Failed to git clone from '$url'" - continue - fi - done - - if [ ! -d $dest_dir ]; then - echo "Error: Failed to git clone from '$tarball_url'" - echo "$tarball_url" > "$output_log" + download_package $tarball_url + if [ $? -ne 0 ]; then error_count=$((error_count + 1)) popd # pushd $output_tarball continue fi - - pushd $dest_dir - branch=$util - git checkout $branch - rm -rf .git - popd - mv ibmtpm20tss-tss $directory_name + unzip_file=ibmtpm20tss-tss-52539cb81c811c973b26ed23fafd28a700b7cc78 + zip_file="$unzip_file.zip" + unzip $zip_file + mv $unzip_file $directory_name tar czvf $tarball_name $directory_name rm -rf $directory_name - popd # pushd $dest_dir fi popd # pushd $output_tarball continue diff --git a/centos-mirror-tools/tarball-dl.lst b/centos-mirror-tools/tarball-dl.lst index 762b6f7f..19a5e02d 100644 --- a/centos-mirror-tools/tarball-dl.lst +++ b/centos-mirror-tools/tarball-dl.lst @@ -28,7 +28,7 @@ requests-toolbelt-0.5.1.tar.gz#requests-toolbelt-0.5.1#https://github.com/reques rpm-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## swtpm-0.1.0-253eac5.tar.gz#swtpm-0.1.0#https://github.com/stefanberger/swtpm/tarball/1303be7d03294fb02204cb8242f366cbf0da076d#http## !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 -!tss2-930.tar.gz#tss2-930#https://git.code.sf.net/p/ibmtpm20tss/tss#git#v930# +!tss2-930.tar.gz#tss2-930#https://sourceforge.net/code-snapshots/git/i/ib/ibmtpm20tss/tss.git/ibmtpm20tss-tss-52539cb81c811c973b26ed23fafd28a700b7cc78.zip#http## spectre-meltdown-checker-0.37+-5cc77741.tar.gz#spectre-meltdown-checker#https://github.com/speed47/spectre-meltdown-checker/tarball/5cc77741af1d2f52140aa9f89339f56b6c4b6783#http## puppet-boolean-22b726dd78b0a60a224cc7054aebbf28e9306f62.tar.gz#puppet-boolean#https://github.com/voxpupuli/puppet-boolean/tarball/22b726dd78b0a60a224cc7054aebbf28e9306f62#http## puppet-dnsmasq-cff07e90890662972c97684a2baee964f68ff3ed.tar.gz#packstack/puppet/modules/dnsmasq/#https://github.com/procore/puppet-dnsmasq/tarball/cff07e90890662972c97684a2baee964f68ff3ed#http## From 505596f67da9e32995932964f4431116360a4941 Mon Sep 17 00:00:00 2001 From: Kristal Dale Date: Thu, 31 Jan 2019 15:21:15 -0800 Subject: [PATCH 7/8] Update config Update conf.py for release notes to include the project variable, set to the project name. This is so the string above the left nav renders the project name. Story: 2004900 Task: 29236 Change-Id: I4b1219c6246ab49279f716fe0d9295e263818dae Signed-off-by: Kristal Dale --- releasenotes/source/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 4e0a1c19..10855304 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -46,6 +46,8 @@ source_suffix = '.rst' # The master toctree document. master_doc = 'index' +project = u'stx-tools' + # Release notes are version independent, no need to set version and release release = '' version = '' From c8e0636ad22db2c7de9e0ab471450e649663b983 Mon Sep 17 00:00:00 2001 From: Tee Ngo Date: Wed, 6 Feb 2019 11:50:56 -0500 Subject: [PATCH 8/8] Pulling in RPMs for Ansible Playbook Pulling in the needed RPMs in preparation for Ansible Playbook inclusion in the image. Tests conducted: - Test of download mirror scripts to pull the required packages - Successful installation Story: 2004695 Task: 29376 Change-Id: Iaecd1dac75b34183cbaf7390d58ba057fdfabe7c Signed-off by: Tee Ngo --- centos-mirror-tools/rpms_3rdparties.lst | 1 + centos-mirror-tools/rpms_centos.lst | 3 +++ 2 files changed, 4 insertions(+) diff --git a/centos-mirror-tools/rpms_3rdparties.lst b/centos-mirror-tools/rpms_3rdparties.lst index 2e3aade5..be7ed41e 100644 --- a/centos-mirror-tools/rpms_3rdparties.lst +++ b/centos-mirror-tools/rpms_3rdparties.lst @@ -1,3 +1,4 @@ +ansible-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 libvirt-python-4.7.0-1.fc28.src.rpm#https://libvirt.org/sources/python/libvirt-python-4.7.0-1.fc28.src.rpm novnc-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 python2-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 2a72be52..e9bbb825 100644 --- a/centos-mirror-tools/rpms_centos.lst +++ b/centos-mirror-tools/rpms_centos.lst @@ -1200,12 +1200,14 @@ python2-passlib-1.7.0-4.el7.noarch.rpm python2-pbr-3.1.1-1.el7.noarch.rpm python2-pecan-1.1.2-1.el7.noarch.rpm python2-persist-queue-0.1.4-1.el7.noarch.rpm +python2-pexpect-4.6-1.el7.noarch.rpm python2-pifpaf-0.12.0-1.el7.noarch.rpm python2-pika-0.10.0-9.el7.noarch.rpm python2-pika_pool-0.1.3-3.el7.noarch.rpm python2-pillow-4.0.0-1.el7.x86_64.rpm python2-positional-1.1.1-2.el7.noarch.rpm python2-psutil-5.2.2-2.el7.x86_64.rpm +python2-ptyprocess-0.5.2-3.el7.noarch.rpm python2-pyasn1-0.1.9-7.el7.noarch.rpm python2-pyasn1-modules-0.1.9-7.el7.noarch.rpm python2-pycadf-2.6.0-1.el7.noarch.rpm @@ -1583,6 +1585,7 @@ speex-1.2-0.19.rc1.el7.x86_64.rpm sqlite-3.7.17-8.el7.x86_64.rpm sqlite-devel-3.7.17-8.el7.x86_64.rpm squashfs-tools-4.3-0.21.gitaae0aff4.el7.x86_64.rpm +sshpass-1.06-1.el7.x86_64.rpm ssmtp-2.64-14.el7.x86_64.rpm stix-fonts-1.1.0-5.el7.noarch.rpm stix-math-fonts-1.1.0-5.el7.noarch.rpm