diff options
author | Mandeep Khinda <mandeep.khinda@amdocs.com> | 2018-04-30 20:20:45 +0000 |
---|---|---|
committer | Mandeep Khinda <mandeep.khinda@amdocs.com> | 2018-05-01 15:54:24 +0000 |
commit | 789ee4aefe17623b25375b0a17474d12bc79354a (patch) | |
tree | 448aa4632ee0d33f0509cbedf0f8143d2ffcb7b7 /kubernetes/portal/launch-onap-portal.sh | |
parent | f38eddde9bfca44ffd8c7c23f8468973dddb32fa (diff) |
exposing portal on port 8989 outside the cluster
-introducing a loadBalancer object instead of node port.
this will let us use port 8989 instead of 300xx
-removing port forwarding helper script
-making URLs configurable for flexibility
Issue-ID: OOM-633
Change-Id: I92a0205e6ed68b2217c08d124ddfaf1a1f73a6cd
Signed-off-by: Mandeep Khinda <mandeep.khinda@amdocs.com>
Diffstat (limited to 'kubernetes/portal/launch-onap-portal.sh')
-rwxr-xr-x | kubernetes/portal/launch-onap-portal.sh | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/kubernetes/portal/launch-onap-portal.sh b/kubernetes/portal/launch-onap-portal.sh deleted file mode 100755 index d9f64c121b..0000000000 --- a/kubernetes/portal/launch-onap-portal.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -usage () { echo "Usage : $0 <namespace> <helm release name>"; } - -READY_JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}' - -NAMESPACE=$1 -RELEASE_NAME=$2 - -if [ ! "$NAMESPACE" ] || [ ! "$RELEASE_NAME" ] -then - usage - exit 1 -fi - -PORTAL_POD_NAME=`kubectl get pods --namespace $NAMESPACE --selector=app=portal-app,release=$RELEASE_NAME \ --o jsonpath='{.items[*].metadata.name}' -o jsonpath="$READY_JSONPATH" | grep "Ready=True"|awk -F: '{print $1}' ` -SDC_POD_NAME=`kubectl get pods --namespace $NAMESPACE --selector=app=sdc-fe,release=$RELEASE_NAME \ --o jsonpath='{.items[*].metadata.name}' -o jsonpath="$READY_JSONPATH" | grep "Ready=True" |awk -F: '{print $1}'` -VID_POD_NAME=`kubectl get pods --namespace $NAMESPACE --selector=app=vid,release=$RELEASE_NAME \ --o jsonpath='{.items[*].metadata.name}' -o jsonpath="$READY_JSONPATH" | grep "Ready=True" |awk -F: '{print $1}'` -POLICY_POD_NAME=`kubectl get pods --namespace $NAMESPACE --selector=app=pap,release=$RELEASE_NAME \ --o jsonpath='{.items[*].metadata.name}' -o jsonpath="$READY_JSONPATH" | grep "Ready=True" |awk -F: '{print $1}'` -PORTALSDK_POD_NAME=`kubectl get pods --namespace $NAMESPACE --selector=app=portal-sdk,release=$RELEASE_NAME \ --o jsonpath='{.items[*].metadata.name}' -o jsonpath="$READY_JSONPATH" | grep "Ready=True" |awk -F: '{print $1}'` - -#TODO: Add more as testing progresses -[[ -z "$PORTAL_POD_NAME" ]] && { echo "WARNING: portal-app is not running in your Kubernetes cluster"; } -[[ -z "$SDC_POD_NAME" ]] && { echo "WARNING: sdc-fe is not running in your Kubernetes cluster"; } -[[ -z "$VID_POD_NAME" ]] && { echo "WARNING: vid is not running in your Kubernetes cluster"; } -[[ -z "$POLICY_POD_NAME" ]] && { echo "WARNING: pap is not running in your Kubernetes cluster"; } -[[ -z "$PORTALSDK_POD_NAME" ]] && { echo "WARNING: portal-sdk is not running in your Kubernetes cluster"; } - -if [ ! -z "$PORTAL_POD_NAME" ] -then - kubectl -n $NAMESPACE port-forward "$PORTAL_POD_NAME" 8989:8080 & - PORTAL_PID=$! -fi - -if [ ! -z "$VID_POD_NAME" ] -then - kubectl -n $NAMESPACE port-forward "$VID_POD_NAME" 8080:8080 & - VID_PID=$! -fi - -if [ ! -z "$SDC_POD_NAME" ] -then - kubectl -n $NAMESPACE port-forward "$SDC_POD_NAME" 8181:8181 & - SDC_PID=$! -fi - -if [ ! -z "$POLICY_POD_NAME" ] -then - kubectl -n $NAMESPACE port-forward "$POLICY_POD_NAME" 8443:8443 & - POLICY_PID=$! -fi - -if [ ! -z "$PORTALSDK_POD_NAME" ] -then - kubectl -n $NAMESPACE port-forward "$PORTALSDK_POD_NAME" 8990:8080 & - PORTALSDK_PID=$! -fi - -trap "{ kill -9 $PORTAL_PID $VID_PID $SDC_PID $POLICY_PID $PORTALSDK_PID; exit 0; }" INT -echo -e $'Press Ctrl+C to exit...\n' - -while : -do - sleep 60 -done
\ No newline at end of file |