diff options
author | Narinder Gupta <narinder.gupta@canonical.com> | 2016-08-11 05:30:57 -0500 |
---|---|---|
committer | Narinder Gupta <narinder.gupta@canonical.com> | 2016-08-11 05:32:19 -0500 |
commit | 18ac5bcf2be8d8bdbfd5066ef25d57c3c36725e1 (patch) | |
tree | 195b51fee77b0b2a0adad14389144ca4aa92483e /ci/02-deploybundle.sh | |
parent | 7411dac64daead190ea6a0566bc5cc7043768ea8 (diff) |
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 <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/02-deploybundle.sh')
-rwxr-xr-x | ci/02-deploybundle.sh | 18 |
1 files changed, 18 insertions, 0 deletions
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 |