Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
P
Privatisation_Deploy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
tianye
Privatisation_Deploy
Commits
504d745b
Commit
504d745b
authored
Mar 02, 2022
by
tianye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入sealect
parent
e2b8c100
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
23 deletions
+44
-23
install.sh
Deploy-search-center/install.sh
+44
-23
No files found.
Deploy-search-center/install.sh
View file @
504d745b
...
...
@@ -15,6 +15,7 @@ source ${sc_dir}/.env
sudo ln
-s
${
sc_dir
}
/.env
${
sc_dir
}
/install.ini 2>/dev/null
cd
${
sc_dir
}
#docker-compose的基础配置
compose_files
=
"-f docker-compose-base.yaml"
INSTALL_MODE
=
$1
...
...
@@ -41,30 +42,48 @@ edit_mq_info(){
-e
"s#password: .*#password:
${
MQ_PASSWORD
}
#g"
\
-e
"s#virtual-host: .*#virtual-host:
${
MQ_VHOST
}
#g"
}
#--------------------部署-----------------------
echo
-e
"----------安装向导------------"
echo
-e
"- all模式-->全部安装(主服务seatch-center+数据库+队列)"
echo
-e
"- server模式-->只安装主服务search-center(请注意提前修改install.ini中外部db和mq的连接配置)"
echo
-e
"- controller模式-->安装主服务search-center+数据库 or 队列"
echo
-e
"------------------------------"
PS3
=
'请选择安装模式: '
case
${
INSTALL_MODE
}
in
all_install
)
compose_files
=
"
${
compose_files
}
-f docker-compose-es.yaml -f docker-compose-mq.yaml -f docker-compose-searchcenter.yaml"
;;
server_install
)
compose_files
=
"
${
compose_files
}
-f docker-compose-searchcenter.yaml"
;;
server_controller_install
)
echo
"组件可选模式(es,mq)"
;;
*
)
echo
"错误模式-请重新输入"
exit
127
esac
select
INSTALL_MODE
in
"all"
"server"
"controller"
do
case
${
INSTALL_MODE
}
in
all
)
echo
"即将进入all模式,这将安装search-center全部服务与组件"
sleep
2
compose_files
=
"
${
compose_files
}
-f docker-compose-es.yaml -f docker-compose-mq.yaml -f docker-compose-searchcenter.yaml"
break
;;
server
)
echo
"即将进入server模式,这将只安装search-center服务"
sleep
2
compose_files
=
"
${
compose_files
}
-f docker-compose-searchcenter.yaml"
break
;;
controller
)
echo
"即将进入crontroller模式,这将根据install.ini中您的所配置的(es,mq)是否使用外部来选择安装"
sleep
2
break
;;
*
)
echo
"错误模式-请重新输入"
exit
127
esac
done
#是否使用外部组件
if
[
${
INSTALL_MODE
}
==
"all
_install
"
]
;
then
sudo
docker-compose
${
compose_files
}
up
elif
[
${
INSTALL_MODE
}
==
"server
_install
"
]
;
then
if
[
${
INSTALL_MODE
}
==
"all"
]
;
then
sudo
docker-compose
${
compose_files
}
up
-d
elif
[
${
INSTALL_MODE
}
==
"server"
]
;
then
edit_es_info
edit_mq_info
sudo
docker-compose
${
compose_files
}
up
elif
[
${
INSTALL_MODE
}
==
"
server_controller_install
"
]
;
then
sudo
docker-compose
${
compose_files
}
up
-d
elif
[
${
INSTALL_MODE
}
==
"
controller
"
]
;
then
#判断es
if
[
${
ES_ISUSE_STATUS
}
==
'false'
]
;
then
compose_files
=
"
${
compose_files
}
-f docker-compose-es.yaml"
...
...
@@ -87,11 +106,13 @@ elif [ ${INSTALL_MODE} == "server_controller_install" ];then
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
sudo
docker-compose
${
compose_files
}
up
-d
fi
echo
${
MQ_ISUSE_STATUS
}
if
[
$?
-ne
0
]
;
then
echo
"安装过程出现错误,请查看相关配置..."
exit
127
fi
echo
"search-center 服务已安装成功..."
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment