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 "^$")
...
@@ -13,6 +13,7 @@ env_context=$(cat ${sc_dir}/install.ini.example |grep -v "^#"|grep -v "^$")
echo
"
${
env_context
}
"
>
${
sc_dir
}
/.env
echo
"
${
env_context
}
"
>
${
sc_dir
}
/.env
source
${
sc_dir
}
/.env
source
${
sc_dir
}
/.env
sudo ln
-s
${
sc_dir
}
/.env
${
sc_dir
}
/install.ini 2>/dev/null
sudo ln
-s
${
sc_dir
}
/.env
${
sc_dir
}
/install.ini 2>/dev/null
cd
${
sc_dir
}
compose_files
=
"-f docker-compose-base.yaml"
compose_files
=
"-f docker-compose-base.yaml"
...
@@ -24,50 +25,63 @@ server_install)
...
@@ -24,50 +25,63 @@ server_install)
compose_files
=
"
${
compose_files
}
-f docker-compose-searchcenter.yaml"
compose_files
=
"
${
compose_files
}
-f docker-compose-searchcenter.yaml"
;;
;;
server_controller_install
)
server_controller_install
)
if
[
${
ES_ISUSE_STATUS
}
!=
'false'
]
;
then
echo
"组件可选模式(es,mq)"
echo
-e
" 使用外部ES
\n
即将修改配置...."
;;
grep
-A
10
-w
"es:"
${
APP_CONF_DIR
}
/application.yml |
\
*
)
sed
-e
"s#host: .*#host:
${
ES_HOST
}
#g"
\
echo
"错误模式-请重新输入"
-e
"s#username: .*#username:
${
ES_USERNAME
}
#g"
\
exit
127
-e
"s#password: .*#password:
${
ES_PASSWORD
}
#g"
\
esac
-e
"s#httpPort: .*#httpPort:
${
ES_HTTP_PORT
}
#g"
\
#是否使用外部组件
-e
"s#tcpPort: .*#tcpPort:
${
ES_TCP_PORT
}
#g"
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
fi
#判断mq
if
[
${
MQ_ISUSE_STATUS
}
!=
'false'
]
;
then
if
[
${
MQ_ISUSE_STATUS
}
==
'false'
]
;
then
echo
-e
" 使用外部MQ
\n
即将修改配置...."
compose_files
=
"
${
compose_files
}
-f docker-compose-mq.yaml"
grep
-A
6
-w
"rabbitmq:"
${
APP_CONF_DIR
}
/application.yml |
\
elif
[
{
ES_ISUSE_STATUS
}
==
'true'
]
;
then
sed
-e
"s#host: .*#host:
${
MQ_HOST
}
#g"
\
edit_mq_info
-e
"s#username: .*#username:
${
MQ_USERNAME
}
#g"
\
else
-e
"s#password: .*#password:
${
MQ_PASSWORD
}
#g"
\
ehco
"mq_isuse_status配置错误"
-e
"s#virtual-host: .*#virtual-host:
${
MQ_VHOST
}
#g"
exit
127
fi
fi
COMPOSE_FILES
=
$(
echo
"
${
compose_files
}
-f docker-compose-searchcenter.yaml"
>>
${
sc_dir
}
/compose_files
)
sudo
docker-compose
$COMPOSE_FILES
up
;;
fi
#是否使用外部组件
if
[
${
ES_ISUSE_STATUS
}
!=
'false'
]
;
then
#修改es连接信息为外部
echo
-e
" 使用外部ES
\n
即将修改配置...."
edit_es_info
()
grep
-A
10
-w
"es:"
${
APP_CONF_DIR
}
/application.yml
|
\
{
sed
-e
"s#host: .*#host:
${
ES_HOST
}
#g"
\
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#username: .*#username:
${
ES_USERNAME
}
#g"
\
-e
"s#password: .*#password:
${
ES_PASSWORD
}
#g"
\
-e
"s#password: .*#password:
${
ES_PASSWORD
}
#g"
\
-e
"s#httpPort: .*#httpPort:
${
ES_HTTP_PORT
}
#g"
\
-e
"s#httpPort: .*#httpPort:
${
ES_HTTP_PORT
}
#g"
\
-e
"s#tcpPort: .*#tcpPort:
${
ES_TCP_PORT
}
#g"
-e
"s#tcpPort: .*#tcpPort:
${
ES_TCP_PORT
}
#g"
}
#修改mq信息为外部
fi
edit_mq_info
()
echo
${
MQ_ISUSE_STATUS
}
{
if
[
${
MQ_ISUSE_STATUS
}
!=
'false'
]
;
then
echo
-e
" 使用外部MQ
\n
即将修改配置...."
echo
-e
" 使用外部MQ
\n
即将修改配置...."
grep
-A
6
-w
"rabbitmq:"
${
APP_CONF_DIR
}
/application.yml |
\
grep
-A
6
-w
"rabbitmq:"
${
APP_CONF_DIR
}
/application.yml |
\
sed
-e
"s#host: .*#host:
${
MQ_HOST
}
#g"
\
sed
-e
"s#host: .*#host:
${
MQ_HOST
}
#g"
\
-e
"s#username: .*#username:
${
MQ_USERNAME
}
#g"
\
-e
"s#username: .*#username:
${
MQ_USERNAME
}
#g"
\
-e
"s#password: .*#password:
${
MQ_PASSWORD
}
#g"
\
-e
"s#password: .*#password:
${
MQ_PASSWORD
}
#g"
\
-e
"s#virtual-host: .*#virtual-host:
${
MQ_VHOST
}
#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