Commit e2b8c100 authored by tianye's avatar tianye

修改问题

parent 5428de7b
......@@ -20,7 +20,9 @@ INSTALL_MODE=$1
#修改es连接信息为外部
edit_es_info(){
echo -e " 使用外部ES\n即将修改配置...."
echo -e " 使用外部MQ"
echo -e " 即将修改配置...."
sleep 2
grep -A 10 -w "es:" ${APP_CONF_DIR}/application.yml | \
sed -e "s#host: .*#host: ${ES_HOST}#g"\
-e "s#username: .*#username: ${ES_USERNAME}#g"\
......@@ -30,7 +32,9 @@ edit_es_info(){
}
#修改mq信息为外部
edit_mq_info(){
echo -e " 使用外部MQ\n即将修改配置...."
echo -e " 使用外部MQ"
echo -e " 即将修改配置...."
sleep 2
grep -A 6 -w "rabbitmq:" ${APP_CONF_DIR}/application.yml | \
sed -e "s#host: .*#host: ${MQ_HOST}#g"\
-e "s#username: .*#username: ${MQ_USERNAME}#g"\
......@@ -64,23 +68,27 @@ elif [ ${INSTALL_MODE} == "server_controller_install" ];then
#判断es
if [ ${ES_ISUSE_STATUS} == 'false' ];then
compose_files="${compose_files} -f docker-compose-es.yaml"
elif [ {ES_ISUSE_STATUS} == 'true' ];then
elif [ ${ES_ISUSE_STATUS} == 'true' ];then
edit_es_info
else
ehco "es_isuse_status配置错误"
echo "es_isuse_status配置错误"
exit 127
fi
#判断mq
if [ ${MQ_ISUSE_STATUS} == 'false' ];then
compose_files="${compose_files} -f docker-compose-mq.yaml"
elif [ {ES_ISUSE_STATUS} == 'true' ];then
elif [ ${ES_ISUSE_STATUS} == 'true' ];then
edit_mq_info
else
ehco "mq_isuse_status配置错误"
exit 127
fi
COMPOSE_FILES=$(echo "${compose_files} -f docker-compose-searchcenter.yaml">>${sc_dir}/compose_files)
sudo docker-compose $COMPOSE_FILES up
#将所需要部署的组件ymal输出到文件
echo "${compose_files} -f docker-compose-searchcenter.yaml">${sc_dir}/compose_files
compose_files=$(cat ${sc_dir}/compose_files)
#echo ${compose_files}
sudo docker-compose ${compose_files} up
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment