From 18ac5bcf2be8d8bdbfd5066ef25d57c3c36725e1 Mon Sep 17 00:00:00 2001 From: Narinder Gupta Date: Thu, 11 Aug 2016 05:30:57 -0500 Subject: to adjust the worker mutiplier for api service so that not too many instance of API service spawned up. Change-Id: Ia1d5b542c3f97cbdc7b5523fc8d45b90ed836aa2 Signed-off-by: Narinder Gupta --- ci/02-deploybundle.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'ci/02-deploybundle.sh') diff --git a/ci/02-deploybundle.sh b/ci/02-deploybundle.sh index 12c58fc5..22d44970 100755 --- a/ci/02-deploybundle.sh +++ b/ci/02-deploybundle.sh @@ -52,6 +52,24 @@ if [ -e ~/.juju/deployment.yaml ]; then cephdisk=`grep "ceph-disk" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'` osdomname=`grep "os-domain-name" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'` fi + + workmutiple=`maas maas nodes list | grep "cpu_count" | cut -d ':' -f 2 | sed -e 's/ //' | tr ',' ' '` + max=0 + for v in ${workmutiple[@]}; do + if (( $v > $max )); then max=$v; fi; + done + echo $max + + if [ "$max" -lt 8 ];then + workmutiple=1 + elif [ "$max" -lt 32 ]; then + workmutiple=0.25 + elif [ "$max" -lt 72 ]; then + workmutiple=0.1 + else + workmutiple=0.05 + fi + sed -i "s/worker-multiplier: 2/worker-multiplier: ${workmutiple}/g" default_deployment_config.yaml fi case "$opnfvlab" in -- cgit 1.2.3-korg