-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·44 lines (42 loc) · 1.39 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c)
# 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
##############################################################################
set -o pipefail
set -o errexit
set -o nounset
if [[ "${DEBUG:-true}" == "true" ]]; then
set -o xtrace
fi
echo "Running deployment process..."
case ${DEPLOYMENT_TYPE:-docker} in
docker)
make docker-deploy-demo
if [[ "${DEBUG:-true}" == "true" ]]; then
sudo docker ps
make docker-logs
fi
sudo docker logs "$(sudo docker ps --filter "name=docker_external_client_1*" --format "{{.Names}}")"
;;
k8s)
if [ "${PKG_MGR:-k8s}" == "helm" ]; then
make helm-deploy-demo
if [[ "${DEBUG:-true}" == "true" ]]; then
kubectl get all -o wide
make helm-logs
fi
else
make k8s-deploy-demo
if [[ "${DEBUG:-true}" == "true" ]]; then
kubectl get all -o wide
make k8s-logs
fi
fi
kubectl logs external-client -c external-client
;;
esac