VOL-3213 - (2) allow settings for onos and bbsim
- any values for onos and bbsim in *-values.yaml
- fix monitor.sh (bug)
- add bbsim index to ced script
Change-Id: I3b53ec546276fb57902d5fd475ce7fb44943e399
diff --git a/voltha b/voltha
index e41d5d8..8bb1059 100755
--- a/voltha
+++ b/voltha
@@ -1161,6 +1161,7 @@
elif [ "${FILTER:0:1}" == "+" ]; then
cp "$NAME-values.yaml" "$VALUES_FILE"
yq r - "${FILTER:1}" <"$NAME-values.yaml" >>"$VALUES_FILE"
+ cat "$VALUES_FILE" >>"$LOG"
else
yq r - "$FILTER" <"$NAME-values.yaml" >"$VALUES_FILE"
fi
@@ -1631,7 +1632,7 @@
bspin "Verify ONOS LEGACY installed $BIRD"
if [ "$HELM_USE_UPGRADE" == "yes" ] || [ "$(helm list --deployed --short --namespace "$INFRA_NS" "^onos\$" | wc -l)" -ne 1 ]; then
espin "$NOT_VERIFIED"
- INTERNAL_EXTRA_HELM_INSTALL_ARGS="$SET_TAG $EXTRA_HELM_FLAGS" helm_install - "$INFRA_NS" onos "$ONOS_CHART" "$ONOS_CHART_VERSION" - "$_HELM_DESC ONOS LEGACY"
+ INTERNAL_EXTRA_HELM_INSTALL_ARGS="$SET_TAG $EXTRA_HELM_FLAGS" helm_install - "$INFRA_NS" onos "$ONOS_CHART" "$ONOS_CHART_VERSION" "+onos" "$_HELM_DESC ONOS LEGACY"
INTERNAL_EXTRA_HELM_INSTALL_ARGS=
else
espin "$VERIFIED"
@@ -1679,7 +1680,7 @@
fi
INTERNAL_EXTRA_HELM_INSTALL_ARGS="--set image.pullPolicy=$_ONOS_PULL_POLICY,image.repository=$_ONOS_REPO,image.tag=$_ONOS_TAG,replicas=$NUM_OF_ONOS,atomix.replicas=$NUM_OF_ATOMIX" \
- helm_install - "$INFRA_NS" onos "$ONOS_CLASSIC_CHART" "$ONOS_CLASSIC_CHART_VERSION" - "$_HELM_DESC ONOS CLASSIC"
+ helm_install - "$INFRA_NS" onos "$ONOS_CLASSIC_CHART" "$ONOS_CLASSIC_CHART_VERSION" "+onos" "$_HELM_DESC ONOS CLASSIC"
INTERNAL_EXTRA_HELM_INSTALL_ARGS=
else
espin "$VERIFIED"
@@ -2105,7 +2106,17 @@
else
INTERNAL_EXTRA_HELM_INSTALL_ARGS+=" --set dhcp=false"
fi
- helm_install - "$BBSIM_NS" "bbsim${instance_num}" "$VOLTHA_BBSIM_CHART" "$VOLTHA_BBSIM_CHART_VERSION" - "$_HELM_DESC BBSIM${instance_num}"
+ if is_in "$WITH_KAFKA" "yes,external"; then
+ _HOST=kafka.$INFRA_NS.svc
+ _PORT=9092
+ INTERNAL_EXTRA_HELM_INSTALL_ARGS+=" --set kafkaAddress=$_HOST:$_PORT"
+ elif [ "$WITH_KAFKA" != "no" ]; then
+ _HOST="$(echo "$WITH_KAFKA" | cut -d: -f1)"
+ _PORT="$(echo "$WITH_KAFKA" | cut -s -d: -f2)"
+ _PORT=${_PORT:-9092}
+ INTERNAL_EXTRA_HELM_INSTALL_ARGS+=" --set kafkaAddress=$_HOST:$_PORT"
+ fi
+ helm_install - "$BBSIM_NS" "bbsim${instance_num}" "$VOLTHA_BBSIM_CHART" "$VOLTHA_BBSIM_CHART_VERSION" "+bbsim" "$_HELM_DESC BBSIM${instance_num}"
INTERNAL_EXTRA_HELM_INSTALL_ARGS=
else
espin - "$VERIFIED"