Commit 7fae0639 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Updated Hackfest 5 scripts

parent dd1164aa
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -212,8 +212,8 @@ export GRAF_EXT_PORT_HTTP=${GRAF_EXT_PORT_HTTP:-"3000"}
# Deploy QuestDB
./deploy/qdb.sh

# Deploy Apache Kafka
./deploy/kafka.sh
## Deploy Apache Kafka
#./deploy/kafka.sh

# Expose Dashboard
./deploy/expose_dashboard.sh
+1 −2
Original line number Diff line number Diff line
@@ -69,8 +69,7 @@ function nats_deploy_single() {
        echo ">>> NATS is present; skipping step."
    else
        echo ">>> Deploy NATS"
        helm3 install ${NATS_NAMESPACE} nats/nats --namespace ${NATS_NAMESPACE} --set nats.image=nats:2.9-alpine --set config.cluster.enabled=true --set config.cluster.tls.enabled=true

        helm3 install ${NATS_NAMESPACE} nats/nats --namespace ${NATS_NAMESPACE} --set nats.image=nats:2.9-alpine

        echo ">>> Waiting NATS statefulset to be created..."
        while ! kubectl get --namespace ${NATS_NAMESPACE} statefulset/${NATS_NAMESPACE} &> /dev/null; do
+16 −16
Original line number Diff line number Diff line
@@ -112,16 +112,16 @@ export PROM_EXT_PORT_HTTP=${PROM_EXT_PORT_HTTP:-"9090"}
export GRAF_EXT_PORT_HTTP=${GRAF_EXT_PORT_HTTP:-"3000"}


# ----- Apache Kafka ------------------------------------------------------

# If not already set, set the namespace where Apache Kafka will be deployed.
export KFK_NAMESPACE=${KFK_NAMESPACE:-"kafka"}

# If not already set, set the port Apache Kafka server will be exposed to.
export KFK_SERVER_PORT=${KFK_SERVER_PORT:-"9092"}

# If not already set, if flag is YES, Apache Kafka will be redeployed and topic will be lost.
export KFK_REDEPLOY=${KFK_REDEPLOY:-""}
## ----- Apache Kafka ------------------------------------------------------
#
## If not already set, set the namespace where Apache Kafka will be deployed.
#export KFK_NAMESPACE=${KFK_NAMESPACE:-"kafka"}
#
## If not already set, set the port Apache Kafka server will be exposed to.
#export KFK_SERVER_PORT=${KFK_SERVER_PORT:-"9092"}
#
## If not already set, if flag is YES, Apache Kafka will be redeployed and topic will be lost.
#export KFK_REDEPLOY=${KFK_REDEPLOY:-""}

########################################################################################################################
# Automated steps start here
@@ -153,12 +153,12 @@ kubectl create secret generic crdb-data --namespace ${TFS_K8S_NAMESPACE} --type=
    --from-literal=CRDB_SSLMODE=require
printf "\n"

echo ">>> Create Secret with Apache Kakfa..."
KFK_SERVER_PORT=$(kubectl --namespace ${KFK_NAMESPACE} get service kafka-service -o 'jsonpath={.spec.ports[0].port}')
kubectl create secret generic kfk-kpi-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \
    --from-literal=KFK_NAMESPACE=${KFK_NAMESPACE} \
    --from-literal=KFK_SERVER_PORT=${KFK_SERVER_PORT}
printf "\n"
#echo ">>> Create Secret with Apache Kafka..."
#KFK_SERVER_PORT=$(kubectl --namespace ${KFK_NAMESPACE} get service kafka-service -o 'jsonpath={.spec.ports[0].port}')
#kubectl create secret generic kfk-kpi-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \
#    --from-literal=KFK_NAMESPACE=${KFK_NAMESPACE} \
#    --from-literal=KFK_SERVER_PORT=${KFK_SERVER_PORT}
#printf "\n"

echo "Create secret with NATS data"
NATS_CLIENT_PORT=$(kubectl --namespace ${NATS_NAMESPACE} get service ${NATS_NAMESPACE} -o 'jsonpath={.spec.ports[?(@.name=="client")].port}')
+5 −0
Original line number Diff line number Diff line
@@ -14,4 +14,9 @@
# limitations under the License.

source ~/tfs-ctrl/hackfest5/deploy_specs.sh

helm3 uninstall --namespace ${NATS_NAMESPACE} ${NATS_NAMESPACE}
kubectl delete namespace ${NATS_NAMESPACE} --ignore-not-found
kubectl delete namespace ${KFK_NAMESPACE} --ignore-not-found

./deploy/all.sh