Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
309bbd65
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
309bbd65
编写于
2月 04, 2021
作者:
P
Ping Xiao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-2846]<test>: imporve docker cluster scripts
上级
4e2e7596
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
72 addition
and
24 deletion
+72
-24
tests/pytest/cluster/clusterEnvSetup/Dockerfile
tests/pytest/cluster/clusterEnvSetup/Dockerfile
+13
-2
tests/pytest/cluster/clusterEnvSetup/buildClusterEnv.sh
tests/pytest/cluster/clusterEnvSetup/buildClusterEnv.sh
+18
-8
tests/pytest/cluster/clusterEnvSetup/docker-compose.yml
tests/pytest/cluster/clusterEnvSetup/docker-compose.yml
+22
-9
tests/pytest/cluster/clusterEnvSetup/node4.yml
tests/pytest/cluster/clusterEnvSetup/node4.yml
+8
-3
tests/pytest/cluster/clusterEnvSetup/node5.yml
tests/pytest/cluster/clusterEnvSetup/node5.yml
+11
-2
未找到文件。
tests/pytest/cluster/clusterEnvSetup/Dockerfile
浏览文件 @
309bbd65
...
@@ -9,6 +9,7 @@ WORKDIR /root
...
@@ -9,6 +9,7 @@ WORKDIR /root
COPY
${PACKAGE} .
COPY
${PACKAGE} .
RUN
tar
-zxf
${
PACKAGE
}
RUN
tar
-zxf
${
PACKAGE
}
RUN
tar
-zxf
${
TARBITRATORPKG
}
RUN
mv
${
EXTRACTDIR
}
/driver ./lib
RUN
mv
${
EXTRACTDIR
}
/driver ./lib
RUN
tar
-zxf
${
EXTRACTDIR
}
/
${
CONTENT
}
RUN
tar
-zxf
${
EXTRACTDIR
}
/
${
CONTENT
}
...
@@ -19,8 +20,18 @@ WORKDIR /root
...
@@ -19,8 +20,18 @@ WORKDIR /root
RUN
apt-get update
RUN
apt-get update
RUN
apt-get
install
-y
vim tmux net-tools
RUN
apt-get
install
-y
vim tmux net-tools
RUN
echo
'alias ll="ls -l --color=auto"'
>>
/root/.bashrc
RUN
echo
'alias ll="ls -l --color=auto"'
>>
/root/.bashrc
RUN
echo
'node1 172.27.0.7'
>>
/etc/hosts
RUN
echo
'node2 172.27.0.8'
>>
/etc/hosts
RUN
echo
'node3 172.27.0.9'
>>
/etc/hosts
RUN
echo
'node4 172.27.0.10'
>>
/etc/hosts
RUN
echo
'node5 172.27.0.11'
>>
/etc/hosts
RUN
ulimit
-c
unlimited
RUN
mkdir
/coredump
RUN
echo
'kernel.core_pattern=/coredump/core_%e_%p'
>>
/etc/sysctl.conf
RUN
sysctl
-p
COPY
--from=builder /root/bin/taosd /usr/bin
COPY
--from=builder /root/bin/taosd /usr/bin
COPY
--from=builder /root/bin/tarbitrator /usr/bin
COPY
--from=builder /root/bin/taos /usr/bin
COPY
--from=builder /root/bin/taos /usr/bin
COPY
--from=builder /root/cfg/taos.cfg /etc/taos/
COPY
--from=builder /root/cfg/taos.cfg /etc/taos/
COPY
--from=builder /root/lib/libtaos.so.* /usr/lib/libtaos.so.1
COPY
--from=builder /root/lib/libtaos.so.* /usr/lib/libtaos.so.1
...
@@ -29,7 +40,7 @@ ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib"
...
@@ -29,7 +40,7 @@ ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib"
ENV
LC_CTYPE=en_US.UTF-8
ENV
LC_CTYPE=en_US.UTF-8
ENV
LANG=en_US.UTF-8
ENV
LANG=en_US.UTF-8
EXPOSE
6030-604
1
/tcp 6060/tcp 6030-6039/udp
EXPOSE
6030-604
2
/tcp 6060/tcp 6030-6039/udp
# VOLUME [ "/var/lib/taos", "/var/log/taos", "/etc/taos" ]
# VOLUME [ "/var/lib/taos", "/var/log/taos", "/etc/taos" ]
...
...
tests/pytest/cluster/clusterEnvSetup/buildClusterEnv.sh
浏览文件 @
309bbd65
...
@@ -34,6 +34,7 @@ function createDIR {
...
@@ -34,6 +34,7 @@ function createDIR {
mkdir
-p
/data/node
$i
/data
mkdir
-p
/data/node
$i
/data
mkdir
-p
/data/node
$i
/log
mkdir
-p
/data/node
$i
/log
mkdir
-p
/data/node
$i
/cfg
mkdir
-p
/data/node
$i
/cfg
mkdir
-p
/data/node
$i
/core
done
done
}
}
...
@@ -54,16 +55,25 @@ function prepareBuild {
...
@@ -54,16 +55,25 @@ function prepareBuild {
rm
-rf
$CURR_DIR
/../../../../release/
*
rm
-rf
$CURR_DIR
/../../../../release/
*
fi
fi
cd
$CURR_DIR
/../../../../packaging
./release.sh
-v
edge
-n
$VERSION
>>
/dev/null
if
[
!
-f
$CURR_DIR
/../../../../release/TDengine-server-
$VERSION
-Linux-x64
.tar.gz
]
;
then
if
[
!
-e
$DOCKER_DIR
/TDengine-server-
$VERSION
-Linux-x64
.tar.gz
&&
!
-e
TDengine-arbitrator-
$VERSION
-Linux-x64
.tar.gz
]
;
then
echo
"no TDengine install package found"
cd
$CURR_DIR
/../../../../packaging
exit
1
./release.sh
-v
edge
-n
$VERSION
>>
/dev/null
fi
if
[
!
-e
$CURR_DIR
/../../../../release/TDengine-server-
$VERSION
-Linux-x64
.tar.gz
]
;
then
echo
"no TDengine install package found"
exit
1
fi
cd
$CURR_DIR
/../../../../release
if
[
!
-e
$CURR_DIR
/../../../../release/TDengine-arbitrator-
$VERSION
-Linux-x64
.tar.gz
]
;
then
mv
TDengine-server-
$VERSION
-Linux-x64
.tar.gz
$DOCKER_DIR
echo
"no arbitrator install package found"
exit
1
fi
cd
$CURR_DIR
/../../../../release
mv
TDengine-server-
$VERSION
-Linux-x64
.tar.gz
$DOCKER_DIR
mv
TDengine-arbitrator-
$VERSION
-Linux-x64
.tar.gz
$DOCKER_DIR
fi
rm
-rf
$DOCKER_DIR
/
*
.yml
rm
-rf
$DOCKER_DIR
/
*
.yml
cd
$CURR_DIR
cd
$CURR_DIR
...
...
tests/pytest/cluster/clusterEnvSetup/docker-compose.yml
浏览文件 @
309bbd65
version
:
'
3.7'
version
:
'
3.7'
services
:
services
:
td2.0-node1
:
td2.0-node1
:
build
:
build
:
context
:
.
context
:
.
args
:
args
:
-
PACKAGE=${PACKAGE}
-
PACKAGE=${PACKAGE}
-
TARBITRATORPKG=${TARBITRATORPKG}
-
EXTRACTDIR=${DIR}
-
EXTRACTDIR=${DIR}
image
:
'
tdengine:${VERSION}'
image
:
'
tdengine:${VERSION}'
container_name
:
'
td
2.0-
node1'
container_name
:
'
tdnode1'
cap_add
:
cap_add
:
-
ALL
-
ALL
stdin_open
:
true
stdin_open
:
true
...
@@ -32,14 +33,18 @@ services:
...
@@ -32,14 +33,18 @@ services:
-
type
:
bind
-
type
:
bind
source
:
/data/node1/cfg
source
:
/data/node1/cfg
target
:
/etc/taos
target
:
/etc/taos
# bind core dump path
-
type
:
bind
source
:
/data/node2/core
target
:
/coredump
-
type
:
bind
-
type
:
bind
source
:
/data
source
:
/data
target
:
/root
target
:
/root
hostname
:
node1
hostname
:
tdnode1
networks
:
networks
:
taos_update_net
:
taos_update_net
:
ipv4_address
:
172.27.0.7
ipv4_address
:
172.27.0.7
command
:
taosd
command
:
taosd
&& tarbitrator
td2.0-node2
:
td2.0-node2
:
build
:
build
:
...
@@ -48,7 +53,7 @@ services:
...
@@ -48,7 +53,7 @@ services:
-
PACKAGE=${PACKAGE}
-
PACKAGE=${PACKAGE}
-
EXTRACTDIR=${DIR}
-
EXTRACTDIR=${DIR}
image
:
'
tdengine:${VERSION}'
image
:
'
tdengine:${VERSION}'
container_name
:
'
td
2.0-
node2'
container_name
:
'
tdnode2'
cap_add
:
cap_add
:
-
ALL
-
ALL
stdin_open
:
true
stdin_open
:
true
...
@@ -72,9 +77,15 @@ services:
...
@@ -72,9 +77,15 @@ services:
-
type
:
bind
-
type
:
bind
source
:
/data/node2/cfg
source
:
/data/node2/cfg
target
:
/etc/taos
target
:
/etc/taos
# bind configuration
-
type
:
bind
source
:
/data/node2/core
target
:
/coredump
# bind core dump path
-
type
:
bind
-
type
:
bind
source
:
/data
source
:
/data
target
:
/root
target
:
/root
hostname
:
tdnode2
networks
:
networks
:
taos_update_net
:
taos_update_net
:
ipv4_address
:
172.27.0.8
ipv4_address
:
172.27.0.8
...
@@ -87,7 +98,7 @@ services:
...
@@ -87,7 +98,7 @@ services:
-
PACKAGE=${PACKAGE}
-
PACKAGE=${PACKAGE}
-
EXTRACTDIR=${DIR}
-
EXTRACTDIR=${DIR}
image
:
'
tdengine:${VERSION}'
image
:
'
tdengine:${VERSION}'
container_name
:
'
td
2.0-node3'
container_name
:
'
td
node3'
cap_add
:
cap_add
:
-
ALL
-
ALL
stdin_open
:
true
stdin_open
:
true
...
@@ -96,7 +107,7 @@ services:
...
@@ -96,7 +107,7 @@ services:
TZ
:
"
Asia/Shanghai"
TZ
:
"
Asia/Shanghai"
command
:
>
command
:
>
sh -c "ln -snf /usr/share/zoneinfo/$TZ /etc/localtime &&
sh -c "ln -snf /usr/share/zoneinfo/$TZ /etc/localtime &&
echo $TZ > /etc/timezone &&
echo $TZ > /etc/timezone &&
exec my-main-application"
exec my-main-application"
volumes
:
volumes
:
# bind data directory
# bind data directory
...
@@ -111,9 +122,11 @@ services:
...
@@ -111,9 +122,11 @@ services:
-
type
:
bind
-
type
:
bind
source
:
/data/node3/cfg
source
:
/data/node3/cfg
target
:
/etc/taos
target
:
/etc/taos
# bind core dump path
-
type
:
bind
-
type
:
bind
source
:
/data
source
:
/data
target
:
/root
target
:
/root
hostname
:
tdnode3
networks
:
networks
:
taos_update_net
:
taos_update_net
:
ipv4_address
:
172.27.0.9
ipv4_address
:
172.27.0.9
...
...
tests/pytest/cluster/clusterEnvSetup/node4.yml
浏览文件 @
309bbd65
...
@@ -8,7 +8,7 @@ services:
...
@@ -8,7 +8,7 @@ services:
-
PACKAGE=${PACKAGE}
-
PACKAGE=${PACKAGE}
-
EXTRACTDIR=${DIR}
-
EXTRACTDIR=${DIR}
image
:
'
tdengine:2.0.13.1'
image
:
'
tdengine:2.0.13.1'
container_name
:
'
td
2.0-
node4'
container_name
:
'
tdnode4'
cap_add
:
cap_add
:
-
ALL
-
ALL
stdin_open
:
true
stdin_open
:
true
...
@@ -17,7 +17,7 @@ services:
...
@@ -17,7 +17,7 @@ services:
TZ
:
"
Asia/Shanghai"
TZ
:
"
Asia/Shanghai"
command
:
>
command
:
>
sh -c "ln -snf /usr/share/zoneinfo/$TZ /etc/localtime &&
sh -c "ln -snf /usr/share/zoneinfo/$TZ /etc/localtime &&
echo $TZ > /etc/timezone &&
echo $TZ > /etc/timezone &&
exec my-main-application"
exec my-main-application"
volumes
:
volumes
:
# bind data directory
# bind data directory
...
@@ -32,9 +32,14 @@ services:
...
@@ -32,9 +32,14 @@ services:
-
type
:
bind
-
type
:
bind
source
:
/data/node4/cfg
source
:
/data/node4/cfg
target
:
/etc/taos
target
:
/etc/taos
# bind core dump path
-
type
:
bind
source
:
/data/node2/core
target
:
/coredump
-
type
:
bind
-
type
:
bind
source
:
/data
source
:
/data
target
:
/root
target
:
/root
hostname
:
tdnode4
networks
:
networks
:
taos_update_net
:
taos_update_net
:
ipv4_address
:
172.27.0.10
ipv4_address
:
172.27.0.10
...
...
tests/pytest/cluster/clusterEnvSetup/node5.yml
浏览文件 @
309bbd65
...
@@ -8,7 +8,7 @@ services:
...
@@ -8,7 +8,7 @@ services:
-
PACKAGE=${PACKAGE}
-
PACKAGE=${PACKAGE}
-
EXTRACTDIR=${DIR}
-
EXTRACTDIR=${DIR}
image
:
'
tdengine:2.0.13.1'
image
:
'
tdengine:2.0.13.1'
container_name
:
'
td
2.0-
node5'
container_name
:
'
tdnode5'
cap_add
:
cap_add
:
-
ALL
-
ALL
stdin_open
:
true
stdin_open
:
true
...
@@ -32,9 +32,18 @@ services:
...
@@ -32,9 +32,18 @@ services:
-
type
:
bind
-
type
:
bind
source
:
/data/node5/cfg
source
:
/data/node5/cfg
target
:
/etc/taos
target
:
/etc/taos
# bind core dump path
-
type
:
bind
source
:
/data/node2/core
target
:
/coredump
# bind core dump path
-
type
:
bind
source
:
/data/node2/core
target
:
/coredump
-
type
:
bind
-
type
:
bind
source
:
/data
source
:
/data
target
:
/root
target
:
/root
hostname
:
tdnode5
networks
:
networks
:
taos_update_net
:
taos_update_net
:
ipv4_address
:
172.27.0.11
ipv4_address
:
172.27.0.11
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录