Commit 531690b1 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Deploy Scripts:

- Removed unneeded scripts/files
- Cleaned up changes
parent 6850ad48
Loading
Loading
Loading
Loading

deploy/expose_perf_dashboards.sh

deleted100755 → 0
+0 −20
Original line number Diff line number Diff line
#!/bin/bash

EXT_GRAFANA_HTTP_PORT="31001"
EXT_PROMETHEUS_HTTP_PORT="31002"

GRAFANA_HTTP_PORT=$(kubectl --namespace monitoring get service grafana -o 'jsonpath={.spec.ports[?(@.name=="http")].port}')
PATCH='{"data": {"'${EXT_GRAFANA_HTTP_PORT}'": "monitoring/grafana:'${GRAFANA_HTTP_PORT}'"}}'
kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}"
PORT_MAP='{"containerPort": '${EXT_GRAFANA_HTTP_PORT}', "hostPort": '${EXT_GRAFANA_HTTP_PORT}'}'
CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}'
PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}'
kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}"

PROMETHEUS_HTTP_PORT=$(kubectl --namespace monitoring get service prometheus-k8s -o 'jsonpath={.spec.ports[?(@.name=="web")].port}')
PATCH='{"data": {"'${EXT_PROMETHEUS_HTTP_PORT}'": "monitoring/prometheus-k8s:'${PROMETHEUS_HTTP_PORT}'"}}'
kubectl patch configmap nginx-ingress-tcp-microk8s-conf --namespace ingress --patch "${PATCH}"
PORT_MAP='{"containerPort": '${EXT_PROMETHEUS_HTTP_PORT}', "hostPort": '${EXT_PROMETHEUS_HTTP_PORT}'}'
CONTAINER='{"name": "nginx-ingress-microk8s", "ports": ['${PORT_MAP}']}'
PATCH='{"spec": {"template": {"spec": {"containers": ['${CONTAINER}']}}}}'
kubectl patch daemonset nginx-ingress-microk8s-controller --namespace ingress --patch "${PATCH}"
+1 −2
Original line number Diff line number Diff line
@@ -241,8 +241,7 @@ for COMPONENT in $TFS_COMPONENTS; do

    echo "  Adapting '$COMPONENT' manifest file..."
    MANIFEST="$TMP_MANIFESTS_FOLDER/${COMPONENT}service.yaml"
    #cp ./manifests/"${COMPONENT}"service.yaml "$MANIFEST"
    cat ./manifests/"${COMPONENT}"service.yaml | linkerd inject - --proxy-cpu-request "10m" --proxy-cpu-limit "1" --proxy-memory-request "64Mi" --proxy-memory-limit "256Mi" > "$MANIFEST"
    cp ./manifests/"${COMPONENT}"service.yaml "$MANIFEST"

    if [ "$COMPONENT" == "pathcomp" ]; then
        IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-frontend:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')

manifests/performance-hpa.txt

deleted100644 → 0
+0 −14
Original line number Diff line number Diff line
NAME            CPU     MEM     metric
context         0.07    65      min
context         0.085   66      avg
context         0.1     71      max
device          0.112   64      min/avg/max
serviceservice  0.034   32      min
serviceservice  0.047   33      avg
serviceservice  0.06    37      max
pathcompservice 0.087   184     min/avg/max
sliceservice    0.028   103     min
sliceservice    0.046   106     avg
sliceservice    0.062   110     max
load-generator  0.192   35      min/avg/max
webuiservice    0.003   75      min/avg/max
+2 −3
Original line number Diff line number Diff line
@@ -20,8 +20,7 @@
export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/"

# Set the list of components, separated by spaces, you want to build images for, and deploy.
#automation monitoring compute 
export TFS_COMPONENTS="context device pathcomp service slice webui load_generator"
export TFS_COMPONENTS="context device automation monitoring pathcomp service slice compute webui load_generator"

# Set the tag you want to use for your images.
export TFS_IMAGE_TAG="dev"
@@ -64,7 +63,7 @@ export CRDB_DATABASE="tfs"
export CRDB_DEPLOY_MODE="single"

# Disable flag for dropping database, if it exists.
export CRDB_DROP_DATABASE_IF_EXISTS="YES"
export CRDB_DROP_DATABASE_IF_EXISTS=""

# Disable flag for re-deploying CockroachDB from scratch.
export CRDB_REDEPLOY=""