Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
99649fe3
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
99649fe3
编写于
3月 04, 2022
作者:
haoranc
提交者:
GitHub
3月 04, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move dockerbuild.sh to community (#10530)
上级
1f981a67
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
75 addition
and
151 deletion
+75
-151
packaging/docker/dockerManifest.sh
packaging/docker/dockerManifest.sh
+0
-82
packaging/docker/dockerbuild.sh
packaging/docker/dockerbuild.sh
+75
-13
packaging/docker/dockerbuildi.sh
packaging/docker/dockerbuildi.sh
+0
-56
未找到文件。
packaging/docker/dockerManifest.sh
已删除
100755 → 0
浏览文件 @
1f981a67
#!/bin/bash
set
-e
#set -x
# dockerbuild.sh
# -n [version number]
# -p [xxxx]
# -V [stable | beta]
# set parameters by default value
version
=
""
passWord
=
""
verType
=
""
while
getopts
"hn:p:V:"
arg
do
case
$arg
in
n
)
#echo "version=$OPTARG"
version
=
$(
echo
$OPTARG
)
;;
p
)
#echo "passWord=$OPTARG"
passWord
=
$(
echo
$OPTARG
)
;;
V
)
#echo "verType=$OPTARG"
verType
=
$(
echo
$OPTARG
)
;;
h
)
echo
"Usage:
`
basename
$0
`
-n [version number] "
echo
" -p [password for docker hub] "
exit
0
;;
?
)
#unknow option
echo
"unkonw argument"
exit
1
;;
esac
done
echo
"version=
${
version
}
"
#docker manifest rm tdengine/tdengine
#docker manifest rm tdengine/tdengine:${version}
if
[
"
$verType
"
==
"beta"
]
;
then
docker manifest create
-a
tdengine/tdengine-beta:
${
version
}
tdengine/tdengine-amd64-beta:
${
version
}
tdengine/tdengine-aarch64-beta:
${
version
}
tdengine/tdengine-aarch32-beta:
${
version
}
docker manifest create
-a
tdengine/tdengine-beta:latest tdengine/tdengine-amd64-beta:latest tdengine/tdengine-aarch64-beta:latest tdengine/tdengine-aarch32-beta:latest
docker manifest
rm
tdengine/tdengine-beta:
${
version
}
docker manifest
rm
tdengine/tdengine-beta:latest
docker manifest create
-a
tdengine/tdengine-beta:
${
version
}
tdengine/tdengine-amd64-beta:
${
version
}
tdengine/tdengine-aarch64-beta:
${
version
}
tdengine/tdengine-aarch32-beta:
${
version
}
docker manifest create
-a
tdengine/tdengine-beta:latest tdengine/tdengine-amd64-beta:latest tdengine/tdengine-aarch64-beta:latest tdengine/tdengine-aarch32-beta:latest
docker manifest inspect tdengine/tdengine:latest
docker manifest inspect tdengine/tdengine:
${
version
}
docker login
-u
tdengine
-p
${
passWord
}
#replace the docker registry username and password
docker manifest push tdengine/tdengine-beta:
${
version
}
docker manifest push tdengine/tdengine-beta:latest
elif
[
"
$verType
"
==
"stable"
]
;
then
docker manifest create
-a
tdengine/tdengine:
${
version
}
tdengine/tdengine-amd64:
${
version
}
tdengine/tdengine-aarch64:
${
version
}
tdengine/tdengine-aarch32:
${
version
}
docker manifest create
-a
tdengine/tdengine:latest tdengine/tdengine-amd64:latest tdengine/tdengine-aarch64:latest tdengine/tdengine-aarch32:latest
docker manifest
rm
tdengine/tdengine:latest
docker manifest
rm
tdengine/tdengine:
${
version
}
docker manifest create
-a
tdengine/tdengine:
${
version
}
tdengine/tdengine-amd64:
${
version
}
tdengine/tdengine-aarch64:
${
version
}
tdengine/tdengine-aarch32:
${
version
}
docker manifest create
-a
tdengine/tdengine:latest tdengine/tdengine-amd64:latest tdengine/tdengine-aarch64:latest tdengine/tdengine-aarch32:latest
docker manifest inspect tdengine/tdengine:latest
docker manifest inspect tdengine/tdengine:
${
version
}
docker login
-u
tdengine
-p
${
passWord
}
#replace the docker registry username and password
docker manifest push tdengine/tdengine:
${
version
}
docker manifest push tdengine/tdengine:latest
else
echo
"unknow verType, nor stabel or beta"
exit
1
fi
# docker manifest create -a tdengine/${dockername}:${version} tdengine/tdengine-amd64:${version} tdengine/tdengine-aarch64:${version} tdengine/tdengine-aarch32:${version}
# docker manifest create -a tdengine/${dockername}:latest tdengine/tdengine-amd64:latest tdengine/tdengine-aarch64:latest tdengine/tdengine-aarch32:latest
# docker login -u tdengine -p ${passWord} #replace the docker registry username and password
# docker manifest push tdengine/tdengine:latest
# # how set latest version ???
packaging/docker/dockerbuild.sh
浏览文件 @
99649fe3
...
...
@@ -18,8 +18,9 @@ version=""
passWord
=
""
pkgFile
=
""
verType
=
"stable"
dockerLatest
=
"n"
while
getopts
"hc:n:p:f:V:"
arg
while
getopts
"hc:n:p:f:V:
a:b:
"
arg
do
case
$arg
in
c
)
...
...
@@ -38,17 +39,25 @@ do
#echo "pkgFile=$OPTARG"
pkgFile
=
$(
echo
$OPTARG
)
;;
b
)
#echo "branchName=$OPTARG"
branchName
=
$(
echo
$OPTARG
)
;;
V
)
#echo "verType=$OPTARG"
verType
=
$(
echo
$OPTARG
)
;;
a
)
#echo "dockerLatest=$OPTARG"
dockerLatest
=
$(
echo
$OPTARG
)
;;
h
)
echo
"Usage:
`
basename
$0
`
-c [aarch32 | aarch64 | amd64 | x86 | mips64 ...] "
echo
" -n [version number] "
echo
" -p [password for docker hub] "
echo
" -V [stable | beta] "
echo
" -f [pkg file] "
echo
" -a [y | n ] "
exit
0
;;
?
)
#unknow option
...
...
@@ -58,13 +67,11 @@ do
esac
done
# if [ "$verType" == "beta" ]; then
# pkgFile=TDengine-server-${version}-Linux-${cpuType}-${verType}.tar.gz
# elif [ "$verType" == "stable" ]; then
# pkgFile=TDengine-server-${version}-Linux-${cpuType}.tar.gz
# else
# echo "unknow verType, nor stabel or beta"
# exit 1
# Check_verison()
# {
# }
if
[
"
$verType
"
==
"beta"
]
;
then
dockername
=
${
cpuType
}
-
${
verType
}
...
...
@@ -84,6 +91,9 @@ echo "====NOTES: ${pkgFile} must be in the same directory as dockerbuild.sh===="
scriptDir
=
$(
dirname
$(
readlink
-f
$0
))
comunityArchiveDir
=
/nas/TDengine/v
$version
/community
# community version’package directory
communityDir
=
${
scriptDir
}
/../../../community
DockerfilePath
=
${
communityDir
}
/packaging/docker/
Dockerfile
=
${
communityDir
}
/packaging/docker/Dockerfile
cd
${
scriptDir
}
cp
-f
${
comunityArchiveDir
}
/
${
pkgFile
}
.
...
...
@@ -100,13 +110,65 @@ else
exit
1
fi
docker build
--rm
-f
"
Dockerfile
"
--network
=
host
-t
tdengine/tdengine-
${
dockername
}
:
${
version
}
"."
--build-arg
pkgFile
=
${
pkgFile
}
--build-arg
dirName
=
${
dirName
}
--build-arg
cpuType
=
${
cpuTypeAlias
}
docker build
--rm
-f
"
${
Dockerfile
}
"
--network
=
host
-t
tdengine/tdengine-
${
dockername
}
:
${
version
}
"."
--build-arg
pkgFile
=
${
pkgFile
}
--build-arg
dirName
=
${
dirName
}
--build-arg
cpuType
=
${
cpuTypeAlias
}
docker login
-u
tdengine
-p
${
passWord
}
#replace the docker registry username and password
docker push tdengine/tdengine-
${
dockername
}
:
${
version
}
# set this version to latest version
docker tag tdengine/tdengine-
${
dockername
}
:
${
version
}
tdengine/tdengine-
${
dockername
}
:latest
docker push tdengine/tdengine-
${
dockername
}
:latest
if
[
-n
"
$(
docker ps
-aq
)
"
]
;
then
echo
"delte docker process"
docker stop
$(
docker ps
-aq
)
docker
rm
$(
docker ps
-aq
)
fi
if
[
-n
"
$(
pidof taosd
)
"
]
;
then
echo
"kill taosd "
kill
-9
$(
pidof taosd
)
fi
if
[
-n
"
$(
pidof power
)
"
]
;
then
echo
"kill power "
kill
-9
$(
pidof power
)
fi
echo
">>>>>>>>>>>>> check whether tdengine/tdengine-
${
dockername
}
:
${
version
}
has been published"
docker run
-d
--name
doctest
-p
6030-6049:6030-6049
-p
6030-6049:6030-6049/udp tdengine/tdengine-
${
dockername
}
:
${
version
}
sleep
2
curl
-u
root:taosdata
-d
'show variables;'
127.0.0.1:6041/rest/sql
>
temp1.data
data_version
=
$(
cat
temp1.data |jq .data| jq
'.[]'
|grep
"version"
-A
2
-B
1 | jq
".[1]"
)
echo
"
${
data_version
}
"
if
[
"
${
data_version
}
"
==
"
\"
${
version
}
\"
"
]
;
then
echo
"docker version is right "
else
echo
"docker version is wrong "
exit
1
fi
rm
-rf
temp1.data
# set this version to latest version
if
[
${
dockerLatest
}
==
'y'
]
;
then
docker tag tdengine/tdengine-
${
dockername
}
:
${
version
}
tdengine/tdengine-
${
dockername
}
:latest
docker push tdengine/tdengine-
${
dockername
}
:latest
echo
">>>>>>>>>>>>> check whether tdengine/tdengine-
${
dockername
}
:latest has been published correctly"
docker run
-d
--name
doctestla
-p
7030-7049:6030-6049
-p
7030-7049:6030-6049/udp tdengine/tdengine-
${
dockername
}
:latest
sleep
2
curl
-u
root:taosdata
-d
'show variables;'
127.0.0.1:7041/rest/sql
>
temp2.data
version_latest
=
`
cat
temp2.data |jq .data| jq
'.[]'
|grep
"version"
-A
2
-B
1 | jq
".[1]"
`
echo
"
${
version_latest
}
"
if
[
"
${
version_latest
}
"
==
"
\"
${
version
}
\"
"
]
;
then
echo
"docker version is right "
else
echo
"docker version is wrong "
exit
1
fi
fi
rm
-rf
temp2.data
if
[
-n
"
$(
docker ps
-aq
)
"
]
;
then
echo
"delte docker process"
docker stop
$(
docker ps
-aq
)
docker
rm
$(
docker ps
-aq
)
fi
cd
${
scriptDir
}
rm
-f
${
pkgFile
}
packaging/docker/dockerbuildi.sh
已删除
100755 → 0
浏览文件 @
1f981a67
#!/bin/bash
#
set
-e
#set -x
# dockerbuild.sh
# -c [aarch32 | aarch64 | amd64 | x86 | mips64 ...]
# -n [version number]
# -p [password for docker hub]
# set parameters by default value
cpuType
=
aarch64
verNumber
=
""
passWord
=
""
while
getopts
"hc:n:p:f:"
arg
do
case
$arg
in
c
)
#echo "cpuType=$OPTARG"
cpuType
=
$(
echo
$OPTARG
)
;;
n
)
#echo "verNumber=$OPTARG"
verNumber
=
$(
echo
$OPTARG
)
;;
p
)
#echo "passWord=$OPTARG"
passWord
=
$(
echo
$OPTARG
)
;;
h
)
echo
"Usage:
`
basename
$0
`
-c [aarch32 | aarch64 | amd64 | x86 | mips64 ...] "
echo
" -n [version number] "
echo
" -p [password for docker hub] "
exit
0
;;
?
)
#unknow option
echo
"unkonw argument"
exit
1
;;
esac
done
pkgFile
=
TDengine-server-
${
verNumber
}
-Linux-
${
cpuType
}
.tar.gz
echo
"cpuType=
${
cpuType
}
verNumber=
${
verNumber
}
pkgFile=
${
pkgFile
}
"
scriptDir
=
`
pwd
`
pkgDir
=
$scriptDir
/../../release/
cp
-f
${
pkgDir
}
/
${
pkgFile
}
.
./dockerbuild.sh
-c
${
cpuType
}
-f
${
pkgFile
}
-n
${
verNumber
}
-p
${
passWord
}
rm
-f
${
pkgFile
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录