Commit 64114190 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'pr-tutorial' into 'feat/microk8s-deployment'

refactor: fix tutorial deployment issues

See merge request teraflow-h2020/controller!162
parents 9b9228a3 acfa2cc4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
########################################################################################################################

# If not already set, set the name of the Kubernetes namespace to deploy to.
export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs-dev"}
export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"}

# If not already set, set the list of components you want to build images for, and deploy.
export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device automation policy service compute monitoring dbscanserving opticalattackmitigator opticalcentralizedattackdetector webui"}
@@ -32,6 +32,7 @@ for COMPONENT in $TFS_COMPONENTS; do
    echo "Processing '$COMPONENT' component..."

    SERVICE_GRPC_PORT=$(kubectl get service ${COMPONENT}service --namespace $TFS_K8S_NAMESPACE -o 'jsonpath={.spec.ports[?(@.name=="grpc")].port}')
    echo "    '$COMPONENT' service port: $SERVICE_GRPC_PORT"
    if [ -z "${SERVICE_GRPC_PORT}" ]; then
        printf "\n"
        continue;
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

# this script opens the dashboard

K8S_NAMESPACE=${K8S_NAMESPACE:-'tf-dev'}
K8S_NAMESPACE=${K8S_NAMESPACE:-'tfs'}

GRAFANA_IP=$(kubectl get service/webuiservice -n ${K8S_NAMESPACE} -o jsonpath='{.spec.clusterIP}')
GRAFANA_PORT=$(kubectl get service webuiservice-public --namespace $K8S_NAMESPACE -o 'jsonpath={.spec.ports[?(@.port==3000)].nodePort}')
+10 −11
Original line number Diff line number Diff line
@@ -14,10 +14,9 @@

# this script opens the webui

K8S_NAMESPACE=${K8S_NAMESPACE:-'tf-dev'}
K8S_NAMESPACE=${K8S_NAMESPACE:-'tfs'}

WEBUI_SERVICE_NAME="webuiservice-public"
WEBUI_PROTO=`kubectl get service ${WEBUI_SERVICE_NAME} -n ${K8S_NAMESPACE} -o jsonpath='{.spec.ports[0].name}'`
WEBUI_SERVICE_NAME="webuiservice"
WEBUI_IP=`kubectl get service ${WEBUI_SERVICE_NAME} -n ${K8S_NAMESPACE} -o jsonpath='{.spec.clusterIP}'`
# WEBUI_PORT=$(kubectl get service ${WEBUI_SERVICE_NAME} --namespace $K8S_NAMESPACE -o 'jsonpath={.spec.ports[?(@.port==8004)].nodePort}')
WEBUI_PORT=8004
@@ -25,13 +24,13 @@ WEBUI_PORT=8004
GRAFANA_PORT=3000

# Open WebUI
URL=${WEBUI_PROTO}://${WEBUI_IP}:${WEBUI_PORT}
echo Opening web UI on URL ${URL}
# curl -kL ${URL}
python3 -m webbrowser ${URL}
UI_URL="http://${WEBUI_IP}:${WEBUI_PORT}"
echo "Opening web UI on URL ${UI_URL}"
# curl -kL ${UI_URL}
python3 -m webbrowser ${UI_URL}

# Open Dashboard
URL=${WEBUI_PROTO}://${WEBUI_IP}:${GRAFANA_PORT}
echo Opening Dashboard on URL ${URL}
# curl -kL ${URL}
python3 -m webbrowser ${URL}
DASHB_URL="http://${WEBUI_IP}:${GRAFANA_PORT}"
echo "Opening Dashboard on URL ${DASHB_URL}"
# curl -kL ${DASHB_URL}
python3 -m webbrowser ${DASHB_URL}
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
########################################################################################################################

# If not already set, set the name of the Kubernetes namespace to deploy to.
export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs-dev"}
export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"}

########################################################################################################################
# Automated steps start here
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
########################################################################################################################

# If not already set, set the name of the Kubernetes namespace to deploy to.
export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs-dev"}
export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"}

########################################################################################################################
# Automated steps start here
Loading