Merge pull request #32431 from taosdata/fix/main/add-mqtt
feat: add taosmqtt support in packaging scripts and cleanup routines
This commit is contained in:
commit
ee078f0a17
|
@ -35,6 +35,7 @@ else
|
|||
${csudo}rm -f ${bin_link_dir}/taosdemo || :
|
||||
${csudo}rm -f ${bin_link_dir}/taoskeeper || :
|
||||
${csudo}rm -f ${bin_link_dir}/taos-explorer || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosmqtt || :
|
||||
${csudo}rm -f ${cfg_link_dir}/* || :
|
||||
${csudo}rm -f ${inc_link_dir}/taos.h || :
|
||||
${csudo}rm -f ${inc_link_dir}/taosdef.h || :
|
||||
|
|
|
@ -110,7 +110,8 @@ sed -i "s/versionType=\"enterprise\"/versionType=\"community\"/g" ${pkg_dir}${in
|
|||
cp ${compile_dir}/build/bin/taosd ${pkg_dir}${install_home_path}/bin
|
||||
cp ${compile_dir}/build/bin/taosudf ${pkg_dir}${install_home_path}/bin
|
||||
cp ${compile_dir}/build/bin/taosBenchmark ${pkg_dir}${install_home_path}/bin
|
||||
cp ${compile_dir}/build/bin/taosdump ${pkg_dir}${install_home_path}/bin
|
||||
cp ${compile_dir}/build/bin/taosdump ${pkg_dir}${install_home_path}/bin
|
||||
cp ${compile_dir}/build/bin/taosmqtt ${pkg_dir}${install_home_path}/bin
|
||||
|
||||
if [ -f "${compile_dir}/build/bin/taosadapter" ]; then
|
||||
cp ${compile_dir}/build/bin/taosadapter ${pkg_dir}${install_home_path}/bin ||:
|
||||
|
|
|
@ -101,6 +101,7 @@ cp %{_compiledir}/build/bin/taosd %{buildroot}%{homepath}/bin
|
|||
cp %{_compiledir}/build/bin/taosudf %{buildroot}%{homepath}/bin
|
||||
cp %{_compiledir}/build/bin/taosBenchmark %{buildroot}%{homepath}/bin
|
||||
cp %{_compiledir}/build/bin/taosdump %{buildroot}%{homepath}/bin
|
||||
cp %{_compiledir}/build/bin/taosmqtt %{buildroot}%{homepath}/bin
|
||||
cp %{_compiledir}/../../enterprise/packaging/start-all.sh %{buildroot}%{homepath}/bin
|
||||
cp %{_compiledir}/../../enterprise/packaging/stop-all.sh %{buildroot}%{homepath}/bin
|
||||
sed -i "s/versionType=\"enterprise\"/versionType=\"community\"/g" %{buildroot}%{homepath}/bin/start-all.sh
|
||||
|
@ -245,6 +246,7 @@ if [ $1 -eq 0 ];then
|
|||
${csudo}rm -f ${bin_link_dir}/taoskeeper || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosdump || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosBenchmark || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosmqtt || :
|
||||
${csudo}rm -f ${cfg_link_dir}/* || :
|
||||
${csudo}rm -f ${inc_link_dir}/taos.h || :
|
||||
${csudo}rm -f ${inc_link_dir}/taosdef.h || :
|
||||
|
|
|
@ -41,6 +41,7 @@ explorerName="${PREFIX}-explorer"
|
|||
keeperName="${PREFIX}keeper"
|
||||
inspect_name="${PREFIX}inspect"
|
||||
set_malloc_bin="set_taos_malloc.sh"
|
||||
mqtt_name="${PREFIX}mqtt"
|
||||
|
||||
bin_link_dir="/usr/bin"
|
||||
lib_link_dir="/usr/lib"
|
||||
|
@ -160,7 +161,7 @@ done
|
|||
|
||||
#echo "verType=${verType} interactiveFqdn=${interactiveFqdn}"
|
||||
|
||||
tools=(${clientName} ${benchmarkName} ${dumpName} ${demoName} ${inspect_name} remove.sh ${udfdName} set_core.sh TDinsight.sh start_pre.sh start-all.sh stop-all.sh)
|
||||
tools=(${clientName} ${benchmarkName} ${dumpName} ${demoName} ${inspect_name} ${mqtt_name} remove.sh ${udfdName} set_core.sh TDinsight.sh start_pre.sh start-all.sh stop-all.sh)
|
||||
if [ "${verMode}" == "cluster" ]; then
|
||||
if [ "${entMode}" == "lite" ]; then
|
||||
services=(${serverName} ${adapterName} ${explorerName} ${keeperName})
|
||||
|
@ -170,7 +171,7 @@ if [ "${verMode}" == "cluster" ]; then
|
|||
elif [ "${verMode}" == "edge" ]; then
|
||||
if [ "${pkgMode}" == "full" ]; then
|
||||
services=(${serverName} ${adapterName} ${keeperName} ${explorerName})
|
||||
tools=(${clientName} ${benchmarkName} ${dumpName} ${demoName} remove.sh ${udfdName} set_core.sh TDinsight.sh start_pre.sh start-all.sh stop-all.sh)
|
||||
tools=(${clientName} ${benchmarkName} ${dumpName} ${demoName} ${mqtt_name} remove.sh ${udfdName} set_core.sh TDinsight.sh start_pre.sh start-all.sh stop-all.sh)
|
||||
else
|
||||
services=(${serverName})
|
||||
tools=(${clientName} ${benchmarkName} remove.sh start_pre.sh)
|
||||
|
|
|
@ -174,6 +174,8 @@ function install_bin() {
|
|||
${csudo}rm -f ${bin_link_dir}/taosudf || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosBenchmark || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosdump || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosmqtt || :
|
||||
|
||||
${csudo}rm -f ${bin_link_dir}/${uninstallScript} || :
|
||||
|
||||
if [ "$osType" != "Darwin" ]; then
|
||||
|
@ -186,6 +188,7 @@ function install_bin() {
|
|||
[ -f ${binary_dir}/build/bin/taosadapter ] && ${csudo}cp -r ${binary_dir}/build/bin/taosadapter ${install_main_dir}/bin || :
|
||||
[ -f ${binary_dir}/build/bin/taoskeeper ] && ${csudo}cp -r ${binary_dir}/build/bin/taoskeeper ${install_main_dir}/bin || :
|
||||
[ -f ${binary_dir}/build/bin/taosudf ] && ${csudo}cp -r ${binary_dir}/build/bin/taosudf ${install_main_dir}/bin || :
|
||||
[ -f ${binary_dir}/build/bin/taosmqtt ] && ${csudo}cp -r ${binary_dir}/build/bin/taosmqtt ${install_main_dir}/bin || :
|
||||
[ -f ${binary_dir}/build/bin/taosx ] && ${csudo}cp -r ${binary_dir}/build/bin/taosx ${install_main_dir}/bin || :
|
||||
${csudo}cp -r ${binary_dir}/build/bin/${serverName} ${install_main_dir}/bin || :
|
||||
|
||||
|
@ -201,6 +204,7 @@ function install_bin() {
|
|||
[ -x ${install_main_dir}/bin/taosadapter ] && ${csudo}ln -s ${install_main_dir}/bin/taosadapter ${bin_link_dir}/taosadapter > /dev/null 2>&1 || :
|
||||
[ -x ${install_main_dir}/bin/taoskeeper ] && ${csudo}ln -s ${install_main_dir}/bin/taoskeeper ${bin_link_dir}/taoskeeper > /dev/null 2>&1 || :
|
||||
[ -x ${install_main_dir}/bin/taosudf ] && ${csudo}ln -s ${install_main_dir}/bin/taosudf ${bin_link_dir}/taosudf > /dev/null 2>&1 || :
|
||||
[ -x ${install_main_dir}/bin/taosmqtt ] && ${csudo}ln -s ${install_main_dir}/bin/taosmqtt ${bin_link_dir}/taosmqtt > /dev/null 2>&1 || :
|
||||
[ -x ${install_main_dir}/bin/taosdump ] && ${csudo}ln -s ${install_main_dir}/bin/taosdump ${bin_link_dir}/taosdump > /dev/null 2>&1 || :
|
||||
[ -x ${install_main_dir}/bin/taosBenchmark ] && ${csudo}ln -s ${install_main_dir}/bin/taosBenchmark ${bin_link_dir}/taosBenchmark > /dev/null 2>&1 || :
|
||||
[ -x ${install_main_dir}/bin/taosx ] && ${csudo}ln -s ${install_main_dir}/bin/taosx ${bin_link_dir}/taosx > /dev/null 2>&1 || :
|
||||
|
@ -215,6 +219,7 @@ function install_bin() {
|
|||
[ -f ${binary_dir}/build/bin/taosadapter ] && ${csudo}cp -r ${binary_dir}/build/bin/taosadapter ${install_main_dir}/bin || :
|
||||
[ -f ${binary_dir}/build/bin/taoskeeper ] && ${csudo}cp -r ${binary_dir}/build/bin/taoskeeper ${install_main_dir}/bin || :
|
||||
[ -f ${binary_dir}/build/bin/taosudf ] && ${csudo}cp -r ${binary_dir}/build/bin/taosudf ${install_main_dir}/bin || :
|
||||
[ -f ${binary_dir}/build/bin/taosmqtt ] && ${csudo}cp -r ${binary_dir}/build/bin/taosmqtt ${install_main_dir}/bin || :
|
||||
[ -f ${binary_dir}/build/bin/taosx ] && ${csudo}cp -r ${binary_dir}/build/bin/taosx ${install_main_dir}/bin || :
|
||||
[ -f ${binary_dir}/build/bin/*explorer ] && ${csudo}cp -r ${binary_dir}/build/bin/*explorer ${install_main_dir}/bin || :
|
||||
${csudo}cp -r ${binary_dir}/build/bin/${serverName} ${install_main_dir}/bin || :
|
||||
|
@ -227,6 +232,7 @@ function install_bin() {
|
|||
[ -x ${install_main_dir}/bin/taosadapter ] && ${csudo}ln -s ${install_main_dir}/bin/taosadapter ${bin_link_dir}/taosadapter > /dev/null 2>&1 || :
|
||||
[ -x ${install_main_dir}/bin/taoskeeper ] && ${csudo}ln -s ${install_main_dir}/bin/taoskeeper ${bin_link_dir}/taoskeeper > /dev/null 2>&1 || :
|
||||
[ -x ${install_main_dir}/bin/taosudf ] && ${csudo}ln -s ${install_main_dir}/bin/taosudf ${bin_link_dir}/taosudf > /dev/null 2>&1 || :
|
||||
[ -x ${install_main_dir}/bin/taosmqtt ] && ${csudo}ln -s ${install_main_dir}/bin/taosmqtt ${bin_link_dir}/taosmqtt > /dev/null 2>&1 || :
|
||||
[ -x ${install_main_dir}/bin/taosdump ] && ${csudo}ln -s ${install_main_dir}/bin/taosdump ${bin_link_dir}/taosdump > /dev/null 2>&1 || :
|
||||
[ -f ${install_main_dir}/bin/taosBenchmark ] && ${csudo}ln -sf ${install_main_dir}/bin/taosBenchmark ${bin_link_dir}/taosBenchmark > /dev/null 2>&1 || :
|
||||
[ -x ${install_main_dir}/bin/taosx ] && ${csudo}ln -s ${install_main_dir}/bin/taosx ${bin_link_dir}/taosx > /dev/null 2>&1 || :
|
||||
|
|
|
@ -99,6 +99,7 @@ else
|
|||
${build_dir}/bin/${clientName}adapter \
|
||||
${build_dir}/bin/${clientName}keeper \
|
||||
${build_dir}/bin/taosudf \
|
||||
${build_dir}/bin/taosmqtt \
|
||||
${script_dir}/remove.sh \
|
||||
${script_dir}/set_core.sh \
|
||||
${script_dir}/startPre.sh \
|
||||
|
|
|
@ -240,6 +240,7 @@ function install_bin() {
|
|||
${csudo}rm -f ${bin_link_dir}/taos || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosd || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosudf || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosmqtt || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosadapter || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosBenchmark || :
|
||||
${csudo}rm -f ${bin_link_dir}/taoskeeper || :
|
||||
|
@ -264,6 +265,9 @@ function install_bin() {
|
|||
if [ -x ${bin_dir}/taosudf ]; then
|
||||
${csudo}ln -s ${bin_dir}/taosudf ${bin_link_dir}/taosudf 2>>${install_log_path} || return 1
|
||||
fi
|
||||
if [ -x ${bin_dir}/taosmqtt ]; then
|
||||
${csudo}ln -s ${bin_dir}/taosmqtt ${bin_link_dir}/taosmqtt 2>>${install_log_path} || return 1
|
||||
fi
|
||||
if [ -x ${bin_dir}/taosadapter ]; then
|
||||
${csudo}ln -s ${bin_dir}/taosadapter ${bin_link_dir}/taosadapter 2>>${install_log_path} || return 1
|
||||
fi
|
||||
|
|
|
@ -151,6 +151,7 @@ clean_service
|
|||
${csudo}rm -f ${bin_link_dir}/taos || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosd || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosudf || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosmqtt || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosadapter || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosBenchmark || :
|
||||
${csudo}rm -f ${bin_link_dir}/taosdemo || :
|
||||
|
|
|
@ -46,6 +46,7 @@ xName="${PREFIX}x"
|
|||
explorerName="${PREFIX}-explorer"
|
||||
inspect_name="${PREFIX}inspect"
|
||||
tarbitratorName="tarbitratord"
|
||||
mqtt_name="${PREFIX}mqtt"
|
||||
productName="TDengine TSDB"
|
||||
|
||||
#install main path
|
||||
|
@ -59,15 +60,14 @@ config_dir="/etc/${PREFIX}"
|
|||
|
||||
if [ "${verMode}" == "cluster" ]; then
|
||||
if [ "${entMode}" == "full" ]; then
|
||||
services=(${PREFIX}"d" ${PREFIX}"adapter" ${PREFIX}"keeper")
|
||||
services=("${serverName}" ${adapterName} "${keeperName}")
|
||||
else
|
||||
services=(${PREFIX}"d" ${PREFIX}"adapter" ${PREFIX}"keeper" ${PREFIX}"-explorer")
|
||||
services=("${serverName}" ${adapterName} "${keeperName}" "${explorerName}")
|
||||
fi
|
||||
tools=(${PREFIX} ${PREFIX}"Benchmark" ${PREFIX}"dump" ${PREFIX}"demo" ${PREFIX}"inspect" ${PREFIX}"udf" set_core.sh TDinsight.sh $uninstallScript start-all.sh stop-all.sh)
|
||||
tools=("${clientName}" "${benchmarkName}" "${dumpName}" "${demoName}" "${inspect_name}" "${PREFIX}udf" "${mqtt_name}" "set_core.sh" "TDinsight.sh" "$uninstallScript" "start-all.sh" "stop-all.sh")
|
||||
else
|
||||
tools=(${PREFIX} ${PREFIX}"Benchmark" ${PREFIX}"dump" ${PREFIX}"demo" ${PREFIX}"udf" set_core.sh TDinsight.sh $uninstallScript start-all.sh stop-all.sh)
|
||||
|
||||
services=(${PREFIX}"d" ${PREFIX}"adapter" ${PREFIX}"keeper" ${PREFIX}"-explorer")
|
||||
tools=("${clientName}" "${benchmarkName}" "${dumpName}" "${demoName}" "${PREFIX}udf" "${mqtt_name}" "set_core.sh" "TDinsight.sh" "$uninstallScript" "start-all.sh" "stop-all.sh")
|
||||
services=("${serverName}" ${adapterName} "${keeperName}" "${explorerName}")
|
||||
fi
|
||||
|
||||
csudo=""
|
||||
|
@ -214,15 +214,15 @@ function clean_log() {
|
|||
}
|
||||
|
||||
function clean_service_on_launchctl() {
|
||||
${csudo}launchctl unload -w /Library/LaunchDaemons/com.taosdata.taosd.plist || :
|
||||
${csudo}launchctl unload -w /Library/LaunchDaemons/com.taosdata.${PREFIX}adapter.plist || :
|
||||
${csudo}launchctl unload -w /Library/LaunchDaemons/com.taosdata.${PREFIX}keeper.plist || :
|
||||
${csudo}launchctl unload -w /Library/LaunchDaemons/com.taosdata.${PREFIX}-explorer.plist || :
|
||||
${csudo}launchctl unload -w /Library/LaunchDaemons/com.taosdata.${serverName}.plist || :
|
||||
${csudo}launchctl unload -w /Library/LaunchDaemons/com.taosdata.${adapterName}.plist || :
|
||||
${csudo}launchctl unload -w /Library/LaunchDaemons/com.taosdata.${keeperName}.plist || :
|
||||
${csudo}launchctl unload -w /Library/LaunchDaemons/com.taosdata.${explorerName}.plist || :
|
||||
|
||||
${csudo}launchctl remove com.tdengine.taosd || :
|
||||
${csudo}launchctl remove com.tdengine.${PREFIX}adapter || :
|
||||
${csudo}launchctl remove com.tdengine.${PREFIX}keeper || :
|
||||
${csudo}launchctl remove com.tdengine.${PREFIX}-explorer || :
|
||||
${csudo}launchctl remove com.tdengine.${adapterName} || :
|
||||
${csudo}launchctl remove com.tdengine.${keeperName} || :
|
||||
${csudo}launchctl remove com.tdengine.${explorerName} || :
|
||||
|
||||
${csudo}rm /Library/LaunchDaemons/com.taosdata.* >/dev/null 2>&1 || :
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue