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
844cdd49
Commit
844cdd49
authored
Mar 02, 2022
by
tianye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入case流程
parent
38dc4565
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
34 deletions
+48
-34
install.sh
Deploy-search-center/install.sh
+48
-34
No files found.
Deploy-search-center/install.sh
View file @
844cdd49
...
...
@@ -13,6 +13,7 @@ env_context=$(cat ${sc_dir}/install.ini.example |grep -v "^#"|grep -v "^$")
echo
"
${
env_context
}
"
>
${
sc_dir
}
/.env
source
${
sc_dir
}
/.env
sudo ln
-s
${
sc_dir
}
/.env
${
sc_dir
}
/install.ini 2>/dev/null
cd
${
sc_dir
}
compose_files
=
"-f docker-compose-base.yaml"
...
...
@@ -24,50 +25,63 @@ server_install)
compose_files
=
"
${
compose_files
}
-f docker-compose-searchcenter.yaml"
;;
server_controller_install
)
if
[
${
ES_ISUSE_STATUS
}
!=
'false'
]
;
then
echo
-e
" 使用外部ES
\n
即将修改配置...."
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"
\
-e
"s#password: .*#password:
${
ES_PASSWORD
}
#g"
\
-e
"s#httpPort: .*#httpPort:
${
ES_HTTP_PORT
}
#g"
\
-e
"s#tcpPort: .*#tcpPort:
${
ES_TCP_PORT
}
#g"
echo
"组件可选模式(es,mq)"
;;
*
)
echo
"错误模式-请重新输入"
exit
127
esac
#是否使用外部组件
if
[
${
INSTALL_MODE
}
==
"all_install"
]
;
then
sudo
docker-compose
${
compose_files
}
up
elif
[
${
INSTALL_MODE
}
==
"server_install"
]
;
then
edit_es_info
edit_mq_info
sudo
docker-compose
${
compose_files
}
up
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
edit_es_info
else
ehco
"es_isuse_status配置错误"
exit
127
fi
if
[
${
MQ_ISUSE_STATUS
}
!=
'false'
]
;
then
echo
-e
" 使用外部MQ
\n
即将修改配置...."
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"
\
-e
"s#password: .*#password:
${
MQ_PASSWORD
}
#g"
\
-e
"s#virtual-host: .*#virtual-host:
${
MQ_VHOST
}
#g"
#判断mq
if
[
${
MQ_ISUSE_STATUS
}
==
'false'
]
;
then
compose_files
=
"
${
compose_files
}
-f docker-compose-mq.yaml"
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
;;
#是否使用外部组件
if
[
${
ES_ISUSE_STATUS
}
!=
'false'
]
;
then
echo
-e
" 使用外部ES
\n
即将修改配置...."
grep
-A
10
-w
"es:"
${
APP_CONF_DIR
}
/application.yml
|
\
sed
-e
"s#host: .*#host:
${
ES_HOST
}
#g"
\
fi
#修改es连接信息为外部
edit_es_info
()
{
echo
-e
" 使用外部ES
\n
即将修改配置...."
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"
\
-e
"s#password: .*#password:
${
ES_PASSWORD
}
#g"
\
-e
"s#httpPort: .*#httpPort:
${
ES_HTTP_PORT
}
#g"
\
-e
"s#tcpPort: .*#tcpPort:
${
ES_TCP_PORT
}
#g"
fi
echo
${
MQ_ISUSE_STATUS
}
if
[
${
MQ_ISUSE_STATUS
}
!=
'false'
]
;
then
echo
-e
" 使用外部MQ
\n
即将修改配置...."
}
#修改mq信息为外部
edit_mq_info
()
{
echo
-e
" 使用外部MQ
\n
即将修改配置...."
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"
\
-e
"s#password: .*#password:
${
MQ_PASSWORD
}
#g"
\
-e
"s#virtual-host: .*#virtual-host:
${
MQ_VHOST
}
#g"
fi
}
echo
${
MQ_ISUSE_STATUS
}
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