Add option to choose deploy tool 53/55953/1
authorHarry Huang <huangxiangyu5@huawei.com>
Wed, 18 Apr 2018 07:47:05 +0000 (15:47 +0800)
committerHarry Huang <huangxiangyu5@huawei.com>
Wed, 18 Apr 2018 07:47:05 +0000 (15:47 +0800)
JIRA: COMPASS-596

There may be different kinds of deploy
tools that be supported in future release
of compass. Using option DEPLOY_TOOL to
choose a deploy tool thus specify which
compass-tasks will be brought up

Change-Id: I92b69ebad412e70ccd28ef864fb485e485705dc9
Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
deploy/conf/cluster.conf
deploy/conf/compass.conf

index 0d94710..5178964 100644 (file)
@@ -10,6 +10,7 @@ fi
 
 # pike
 export OPENSTACK_VERSION=${OPENSTACK_VERSION:-"pike"}
+export DEPLOY_TOOL=${DEPLOY_TOOL:-"osa"}
 
 # don't touch this
 export ADAPTER_TARGET_SYSTEM_PATTERN="^openstack$"
@@ -25,6 +26,7 @@ export ADAPTER_FLAVOR_PATTERN="HA-ansible-multinodes-$OPENSTACK_VERSION"
 
 if [[ "x"$KUBERNETES_VERSION != "x" ]]; then
     unset  OPENSTACK_VERSION
+    export DEPLOY_TOOL=${DEPLOY_TOOL:-"k8s"}
     export ADAPTER_NAME=kubernetes
     export ADAPTER_FLAVOR_PATTERN=ansible-kubernetes
     export ADAPTER_TARGET_SYSTEM_PATTERN='^kubernetes$'
index be5d17c..b031c03 100644 (file)
@@ -16,10 +16,6 @@ export NAMESERVERS=${USER_NAMESERVER:-"$COMPASS_SERVER"}
 export COMPASS_REPO_PORT="5151"
 export OFFLINE_DEPLOY=${OFFLINE_DEPLOY:-'Disable'}
 
-if [[ "x"$COMPOSE_IMAGES == "x" && "x"$OPENSTACK_VERSION != "x" ]]; then
-    export COMPOSE_IMAGES="[compass-db,compass-mq,compass-deck,compass-tasks-osa,compass-cobbler]"
-fi
-
-if [[ "x"$COMPOSE_IMAGES == "x" && "x"$KUBERNETES_VERSION != "x" ]]; then
-    export COMPOSE_IMAGES="[compass-db,compass-mq,compass-deck,compass-tasks-k8s,compass-cobbler]"
+if [[ "x"$COMPOSE_IMAGES == "x" ]]; then
+    export COMPOSE_IMAGES="[compass-db,compass-mq,compass-deck,compass-tasks-$DEPLOY_TOOL,compass-cobbler]"
 fi