-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdeploy.sh
executable file
·55 lines (50 loc) · 1.6 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
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
######################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# SPDX-License-Identifier: MIT-0 #
######################################################################
print_help() {
echo ""
echo "Usage: $0 [arg]"
echo ""
echo " This script deploys and manages the model servers on the configured runtime."
echo " Both Docker for single host deployments and Kubernetes for cluster deployments are supported container runtimes."
echo " If no arguments are specified, the default action (run) will be executed."
echo ""
echo " Available optional arguments:"
echo " run - deploy the model servers to the configured runtime."
echo " stop - remove the model servers from the configured runtime."
echo " status [id] - show current status of deployed model servers, optionally just for the specified server id."
echo " logs [id] - show model server logs for all servers, or only the specified server id."
echo " exec <id> - open bash shell into the container of the server with the specified id. Note the id is required."
echo ""
}
action=$1
if [ "$action" == "" ]
then
action="run"
fi
echo ""
pushd ./4-deploy > /dev/null
case "$action" in
"run")
./run.sh
;;
"stop")
./stop.sh
;;
"status")
./status.sh $2
;;
"logs")
./logs.sh $2
;;
"exec")
./exec.sh $2
;;
*)
print_help
;;
esac
popd > /dev/null
echo ""