Skip to content

Commit a40328a

Browse files
Merge pull request #4 from Ray-Eldath/auto-deploy
alter scripts for auto-deploy pipelines
2 parents 467959e + 5aa4b42 commit a40328a

5 files changed

Lines changed: 23 additions & 23 deletions

File tree

‎auto-deploy/clear_cluster.sh‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
source deploy.conf
2-
3-
if [ $# -eq 0 ]; then
4-
echo "$0 CLUSTER"
1+
if [ $# -lt 2 ]; then
2+
echo "$0 CONF_FILE CLUSTER"
53
exit 1
64
fi
75

8-
CLUSTER=$1
9-
CLUSTER_DIR=$cluster_dir_prefix/$CLUSTER
6+
source $1
7+
8+
CLUSTER=$2
9+
CLUSTER_DIR=$cluster_dir_prefix
1010
STEPS=2
1111

1212
set -x

‎auto-deploy/deploy_cluster.sh‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
source deploy.conf
1+
source $1
22

3-
if [ $# -eq 0 ]; then
4-
echo "$0 CLUSTER"
3+
if [ $# -lt 2 ]; then
4+
echo "$0 CONF_FILE CLUSTER"
55
exit 1
66
fi
77

8-
CLUSTER=$1
9-
CLUSTER_DIR=$cluster_dir_prefix/$CLUSTER
8+
CLUSTER=$2
9+
CLUSTER_DIR=$cluster_dir_prefix
1010
STEPS=10
1111
# 1. create dirs
1212
echo " =============1/$STEPS create dirs=============="

‎auto-deploy/open_cluster_vec.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
2-
source deploy.conf
2+
source $1
33

4-
CLUSTER=$1
4+
CLUSTER=$2
55

66
cluster_arr=($clusters)
77
if [ -z $CLUSTER ]; then

‎auto-deploy/start_cluster.sh‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
source deploy.conf
1+
source $1
22

3-
if [ $# -eq 0 ]; then
4-
echo "$0 CLUSTER"
3+
if [ $# -lt 2 ]; then
4+
echo "$0 CONF_FILE CLUSTER"
55
exit 1
66
fi
77

8-
CLUSTER=$1
9-
CLUSTER_DIR=$cluster_dir_prefix/$CLUSTER
8+
CLUSTER=$2
9+
CLUSTER_DIR=$cluster_dir_prefix
1010
EDIT_PORT=$(grep edit_log_port $CLUSTER/conf/fe.conf | awk -F '=' '{print $2}' | sed 's/[ ]*//g')
1111
FE_MASTER_HOST=$(cat $CLUSTER/fe_master_host | awk -F '@' '{print $2}')
1212
echo " ============= start service=============="

‎auto-deploy/stop_cluster.sh‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
source deploy.conf
1+
source $1
22

3-
if [ $# -eq 0 ]; then
4-
echo "$0 CLUSTER"
3+
if [ $# -lt 2 ]; then
4+
echo "$0 CONF_FILE CLUSTER"
55
exit 1
66
fi
77

8-
CLUSTER=$1
9-
CLUSTER_DIR=$cluster_dir_prefix/$CLUSTER
8+
CLUSTER=$2
9+
CLUSTER_DIR=$cluster_dir_prefix
1010

1111
echo " ============= stop service=============="
1212

0 commit comments

Comments
 (0)