From 4904a3f2ca228627c95ae00832365fc76a6c7912 Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Wed, 20 Feb 2019 11:31:57 +0100 Subject: Initial version of kubespray deployment Change-Id: I909fc16c982a8bbe23048515692b1583459223a4 Signed-off-by: Martin Klozik --- ci/deploy-onap-fuel.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'ci/deploy-onap-fuel.sh') diff --git a/ci/deploy-onap-fuel.sh b/ci/deploy-onap-fuel.sh index 70e1287..c120e9c 100755 --- a/ci/deploy-onap-fuel.sh +++ b/ci/deploy-onap-fuel.sh @@ -25,12 +25,21 @@ export SSH_USER="ubuntu" export SSH_IDENTITY="/root/.ssh/onap_key" +# detect hypervisor details to be used as default values if needed +OS_HYPER_CMD="openstack hypervisor list --long" +echo -e "\nOpenStack Hepervisor list\n" +$OS_HYPER_CMD + +DEFAULT_CMP_COUNT=$($OS_HYPER_CMD -f value -c "ID" | wc -l) +DEFAULT_CMP_MIN_MEM=$($OS_HYPER_CMD -f value -c "Memory MB" | sort | head -n1) +DEFAULT_CMP_MIN_CPUS=$($OS_HYPER_CMD -f value -c "vCPUs" | sort | head -n1) + # Use default values if compute configuration was not set by FUEL installer AUTO_INSTALL_DIR=${AUTO_INSTALL_DIR:-"."} AUTO_IMAGE_DIR="${AUTO_INSTALL_DIR}/images" -CMP_COUNT=${CMP_COUNT:-2} # number of compute nodes -CMP_MIN_MEM=${CMP_MIN_MEM:-64000} # MB RAM of the weakest compute node -CMP_MIN_CPUS=${CMP_MIN_CPUS:-36} # CPU count of the weakest compute node +CMP_COUNT=${CMP_COUNT:-$DEFAULT_CMP_COUNT} # number of compute nodes +CMP_MIN_MEM=${CMP_MIN_MEM:-$DEFAULT_CMP_MIN_MEM} # MB RAM of the weakest compute node +CMP_MIN_CPUS=${CMP_MIN_CPUS:-$DEFAULT_CMP_MIN_CPUS} # CPU count of the weakest compute node # size of storage for instances CMP_STORAGE_TOTAL=${CMP_STORAGE_TOTAL:-$((80*$CMP_COUNT))} VM_COUNT=${VM_COUNT:-6} # number of VMs available for k8s cluster -- cgit 1.2.3-korg