diff options
author | Stephen Wong <stephen.kf.wong@gmail.com> | 2018-04-15 06:59:43 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-04-15 06:59:43 +0000 |
commit | cd091d69bf68d3428908d58832ed35bade71e6c0 (patch) | |
tree | 90fbe331fcfba30def705ae90085171093936f74 | |
parent | bb52b9c4235e622dfb08bf7cf674f4daabc1cff6 (diff) | |
parent | 41051bbbdec39f4ccd1795b936c1d14fea1fe01b (diff) |
Merge "Add SDC deploy/clean scripts" into stable/fraser
-rwxr-xr-x | samples/scenarios/clean.sh | 28 | ||||
-rwxr-xr-x | samples/scenarios/deploy.sh | 22 | ||||
-rwxr-xr-x | samples/scenarios/view.sh | 30 |
3 files changed, 80 insertions, 0 deletions
diff --git a/samples/scenarios/clean.sh b/samples/scenarios/clean.sh new file mode 100755 index 0000000..bf4a7af --- /dev/null +++ b/samples/scenarios/clean.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# +# Copyright (c) Authors of Clover +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +# + +CLOVER_BASE_DIR=${CLOVER_BASE_DIR:-"/home/opnfv/repos/clover"} +ISTIO_BASE_DIR=${ISTIO_BASE_DIR:-"/istio-source"} + +cd $CLOVER_BASE_DIR + +echo "Deleting Service Delivery Controller sample scenario" + +kubectl delete -f ./samples/scenarios/service_delivery_controller_opnfv.yaml + +echo "Deleting Istio" + +kubectl delete -f $ISTIO_BASE_DIR/install/kubernetes/istio.yaml + +echo "Deleting Prometheus monitoring and Jaeger Tracing" + +kubectl delete -n istio-system -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml + +kubectl delete -f $ISTIO_BASE_DIR/install/kubernetes/addons/prometheus.yaml diff --git a/samples/scenarios/deploy.sh b/samples/scenarios/deploy.sh new file mode 100755 index 0000000..1ffea37 --- /dev/null +++ b/samples/scenarios/deploy.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright (c) Authors of Clover +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +# + +CLOVER_BASE_DIR=${CLOVER_BASE_DIR:-"/home/opnfv/repos/clover"} +ISTIO_BASE_DIR=${ISTIO_BASE_DIR:-"/istio-source"} + +cd $CLOVER_BASE_DIR + +echo "Deploying Istio manual sidecar injection without TLS authentication" + +kubectl apply -f $ISTIO_BASE_DIR/install/kubernetes/istio.yaml + +echo "Deploying Service Delivery Controller sample scenario" + +kubectl apply -f <(istioctl kube-inject --debug -f ./samples/scenarios/service_delivery_controller_opnfv.yaml) diff --git a/samples/scenarios/view.sh b/samples/scenarios/view.sh new file mode 100755 index 0000000..8b155ce --- /dev/null +++ b/samples/scenarios/view.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# +# Copyright (c) Authors of Clover +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +# + +CLOVER_BASE_DIR=${CLOVER_BASE_DIR:-"/home/opnfv/repos/clover"} +ISTIO_BASE_DIR=${ISTIO_BASE_DIR:-"/istio-source"} + +cd $CLOVER_BASE_DIR + +echo "Deploying Prometheus monitoring" + +kubectl apply -f $ISTIO_BASE_DIR/install/kubernetes/addons/prometheus.yaml + +echo "Deploying Jaeger tracing" + +kubectl apply -n istio-system -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml + +echo "Exposing tracing and monitoring outside of Kubernetes cluster" + +kubectl delete -n istio-system svc prometheus + +kubectl expose -n istio-system deployment jaeger-deployment --port=16686 --type=NodePort + +kubectl expose -n istio-system deployment prometheus --port=9090 --type=NodePort |