update cluster def files.
This commit is contained in:
parent
8fd2ac74d0
commit
d5b2cea2e9
|
@ -39,6 +39,9 @@ case $source_mode in
|
|||
local_file="/local$source_dir/$1"
|
||||
remote_file="$target_dir/$1"
|
||||
|
||||
# source file not exists ?
|
||||
[ ! -f "$local_file" ] && echo "file $local_file not exists, exit " && exit 101
|
||||
|
||||
# create directory in remote side.
|
||||
remote_dir=$(dirname $remote_file)
|
||||
eval "$ssh_cmd mkdir -p $remote_dir"; code=$?
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
CLUSTER=inline-cluster
|
||||
|
||||
GROUP_SIZE=10000
|
||||
GROUP_SIZE=1000
|
||||
NUM_GROUPS=100
|
||||
|
||||
CALC_HOST=(n[0-3])|(h0)
|
||||
CALC_HOST=n-0[0-3]
|
||||
|
||||
NUM_PARALLEL=4
|
||||
NUM_PARALLEL=1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
clusters ?= local inline-cluster external-cluster
|
||||
clusters ?= local inline-cluster
|
||||
|
||||
include defs.mk
|
||||
|
||||
|
@ -79,7 +79,7 @@ pull-all:
|
|||
|
||||
get-cli:
|
||||
@ mkdir -p ~/bin
|
||||
@ docker pull hub.cstcloud.cn/scalebox/cli
|
||||
@# docker pull hub.cstcloud.cn/scalebox/cli
|
||||
@ os=`uname| tr '[:upper:]' '[:lower:]'` \
|
||||
&& arch=`uname -m` \
|
||||
&& if [ "$$arch" = "x86_64" ]; then arch="amd64"; fi \
|
||||
|
|
|
@ -19,6 +19,7 @@ services:
|
|||
- PGHOST=${PGHOST}
|
||||
- PGPORT=${PGPORT}
|
||||
- LOG_LEVEL=WARN
|
||||
- PG_BATCH_MODE=yes
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /tmp/scalebox/log/controld:/tmp/scalebox/log/controld
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
version: '1.0.0'
|
||||
|
||||
label: Global Definition Cluster external-cluster
|
||||
|
||||
clusters:
|
||||
external-cluster:
|
||||
parameters:
|
||||
base_dir: /gfs
|
||||
base_data_dir: /gfs/mydata
|
||||
uname: ${USER}
|
||||
conn_url: fhpc://<myserver>:<myport>
|
||||
grpc_server: 10.100.1.30
|
||||
total_resources:
|
||||
# CPU cores
|
||||
num_cores: 48
|
||||
# Memory(GB)
|
||||
mem_gb: 256.0
|
||||
# Disk(GB)
|
||||
disk: 29000.0
|
|
@ -25,15 +25,15 @@ clusters:
|
|||
role: head
|
||||
spec: inline-vm-00
|
||||
comment: CentOS 8
|
||||
n0:
|
||||
n-00:
|
||||
ip_addr: 10.0.6.101
|
||||
spec: inline-vm-00
|
||||
n1:
|
||||
n-01:
|
||||
ip_addr: 10.0.6.102
|
||||
spec: inline-vm-00
|
||||
n2:
|
||||
n-02:
|
||||
ip_addr: 10.0.6.103
|
||||
spec: inline-vm-00
|
||||
n3:
|
||||
n-03:
|
||||
ip_addr: 10.0.6.104
|
||||
spec: inline-vm-00
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
# local_ip_index : 1..n
|
||||
# local_ip_index=4
|
||||
|
||||
if [ -z "$local_ip_index" ]; then
|
||||
local_ip=$(hostname -i)
|
||||
else
|
||||
local_ip=$(hostname -I| cut -d ' ' -f ${local_ip_index})
|
||||
fi
|
||||
echo "local-ip:$local_ip"
|
||||
|
||||
docker exec -it database psql -Uscalebox -P pager=off -c "
|
||||
DELETE
|
||||
FROM t_host
|
||||
WHERE cluster<>'local' AND cluster NOT IN(
|
||||
SELECT cluster
|
||||
FROM t_host
|
||||
WHERE ip_addr='$local_ip'
|
||||
);
|
||||
|
||||
"
|
Loading…
Reference in New Issue