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
6136057f
Commit
6136057f
authored
Jun 15, 2022
by
tianye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改install.sh
parent
d34a4e68
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
21 deletions
+18
-21
hcctl
hcctl
+8
-8
install.ini
install.ini
+8
-11
install.sh
install.sh
+1
-1
uninstall.sh
uninstall.sh
+1
-1
No files found.
hcctl
View file @
6136057f
...
...
@@ -46,7 +46,7 @@ edit_mongodb_info(){
echo
-e
" 使用外部MongoDB"
echo
-e
" 即将修改配置...."
sleep
2
sed
-i
-e
"s#uri: mongodb:
\/\/
ego_gw_self:123456@mongo
\/
ego_gw_db#uri: mongodb:
\/\/
${
MONGODB_USERNAME
}
:
${
MONGODB_PASSWORD
}
@
${
MONGODB_URL
}
\/
${
MONGODB_DB
}
"
${
APP_CONF_DIR
}
/application.yml
sed
-i
-e
"s#uri: mongodb:
\/\/
ego_gw_self:123456@mongo
\/
ego_gw_db#uri: mongodb:
\/\/
${
MONGODB_USERNAME
}
:
${
MONGODB_PASSWORD
}
@
${
MONGODB_URL
}
\/
${
MONGODB_DB
}
#g
"
${
APP_CONF_DIR
}
/application.yml
}
#修改redis连接信息(默认-->外部)
edit_redis_info
(){
...
...
@@ -115,7 +115,7 @@ install_compose-files(){
mkdir
-p
${
db_sc_dir
}
/data/
{
es_data,mq_data,mongo_data,redis_data,mysql_data
}
elif
[
${
INSTALL_MODE
}
==
"server"
]
;
then
true_count
=
$(
grep
-i
"true"
${
app_sc_dir
}
/
${
APP_NAME
}
/install.ini|wc
-l
)
if
[
$true_count
-
eq
0
]
;
then
if
[
$true_count
-
ne
0
]
;
then
edit_es_info
edit_mq_info
edit_mysql_info
...
...
@@ -146,7 +146,7 @@ install_compose-files(){
elif
[
${
MQ_ISUSE_STATUS
}
==
'true'
]
;
then
edit_mq_info
else
e
hc
o
"mq_isuse_status配置错误"
e
ch
o
"mq_isuse_status配置错误"
exit
127
fi
...
...
@@ -155,10 +155,10 @@ install_compose-files(){
echo
-e
"正在创建MYSQL数据目录..."
mkdir
-p
${
db_sc_dir
}
/data/mysql_data
compose_files
=
"
${
compose_files
}
-f
${
DB_DEPLOY_DIR
}
/docker-compose-mysql.yaml -f
${
app_sc_dir
}
/
${
APP_NAME
}
/docker-compose-
${
APP_NAME
}
.yaml"
elif
[
${
M
Q
_ISUSE_STATUS
}
==
'true'
]
;
then
elif
[
${
M
YSQL
_ISUSE_STATUS
}
==
'true'
]
;
then
edit_mysql_info
else
e
hc
o
"mysql_isuse_status配置错误"
e
ch
o
"mysql_isuse_status配置错误"
exit
127
fi
...
...
@@ -167,10 +167,10 @@ install_compose-files(){
echo
-e
"正在创建MongoDB数据目录..."
mkdir
-p
${
db_sc_dir
}
/data/mongo_data
compose_files
=
"
${
compose_files
}
-f
${
DB_DEPLOY_DIR
}
/docker-compose-mongodb.yaml -f
${
app_sc_dir
}
/
${
APP_NAME
}
/docker-compose-
${
APP_NAME
}
.yaml"
elif
[
${
M
Q
_ISUSE_STATUS
}
==
'true'
]
;
then
elif
[
${
M
ONGODB
_ISUSE_STATUS
}
==
'true'
]
;
then
edit_mongodb_info
else
e
hc
o
"mongodb_isuse_status配置错误"
e
ch
o
"mongodb_isuse_status配置错误"
exit
127
fi
...
...
@@ -182,7 +182,7 @@ install_compose-files(){
elif
[
${
REDIS_ISUSE_STATUS
}
==
'true'
]
;
then
edit_redis_info
else
e
hc
o
"redis_isuse_status配置错误"
e
ch
o
"redis_isuse_status配置错误"
exit
127
fi
...
...
install.ini
View file @
6136057f
#!/bin/bash
#项目名
APP_NAME
=
search-center
APP_NAME
=
#镜像相关
SC_IMAGE_URL
=
harbor.hw.jiankangyouyi.com:5000/search-center-public/
SC_IMAGE_NAME
=
${APP_NAME}
...
...
@@ -13,8 +13,11 @@ DB_DEPLOY_DIR=/ops_project/Health-cloud-server-DB
#search-center配置文件目录
APP_CONF_DIR
=
${DEPLOY_DIR}/${APP_NAME}/conf
#是否使用外部中间件,使用true,不使用false
#注意:如果您安装的微服务没有用到其中某种中间件配置,请写true
#是否使用外部es
ES_ISUSE_STATUS
=
fals
e
ES_ISUSE_STATUS
=
tru
e
#es
ES_HOST
=
192.168.1.201
ES_USERNAME
=
app_search-center
...
...
@@ -33,7 +36,7 @@ MQ_USERNAME=ego_gw_dev
MQ_PASSWORD
=
jkyy_pwd
#是否使用外部mysql
MYSQL_ISUSE_STATUS
=
fals
e
MYSQL_ISUSE_STATUS
=
tru
e
#mysql
MYSQL_HOST
=
test.mysql.hw
MYSQL_PORT
=
3306
...
...
@@ -42,7 +45,7 @@ MYSQL_USERNAME=egd_hca
MYSQL_PASSWORD
=
eYhGqLHo7HrDKITh
#是否使用外部mongodb
MONGODB_ISUSE_STATUS
=
fals
e
MONGODB_ISUSE_STATUS
=
tru
e
#mongodb
MONGODB_URL
=
192.168.1.14:8635,192.168.1.2:8635
MONGODB_DB
=
ego_gw_db
...
...
@@ -50,16 +53,10 @@ MONGODB_USERNAME=egd_hca
MONGODB_PASSWORD
=
wx+M-LAbog^l0xL0
#是否使用外部redis
REDIS_ISUSE_STATUS
=
fals
e
REDIS_ISUSE_STATUS
=
tru
e
#redis
REDIS_HOST
=
test.redis.hw
REDIS_PORT
=
6379
REDIS_PASSWORD
=
FezUc3YF9CK7PGu5
install.sh
View file @
6136057f
...
...
@@ -63,6 +63,7 @@ echo -e "app_sc_dir=${app_sc_dir}\n db_sc_dir=${db_sc_dir}\n APP_NAME=${APP_NAME
#安装hcctl管理命令
sudo cp
hcctl /usr/local/bin
&&
sudo chmod
+x /usr/local/bin/hcctl
ln
-s
/usr/local/bin/hcctl /usr/bin/hcctl 2>/dev/null
sed
-i
"s#APP_NAME=
${
APP_NAME
}
#APP_NAME=#g"
$(
dirname
$0
)
/install.ini
cd
${
app_sc_dir
}
/
${
APP_NAME
}
#--------------------部署-----------------------#
...
...
@@ -86,5 +87,4 @@ sleep 2
sudo
/usr/local/bin/hcctl status
${
APP_NAME
}
sleep
2
echo
"Good Bye ~"
#sed -i "s/APP_NAME=${APP_NAME}/APP_NAME=/g" $(dirname $0)/install.ini
uninstall.sh
View file @
6136057f
...
...
@@ -23,7 +23,7 @@ else
echo
"You are Not Install The hcrc File"
exit
127
fi
hcctl uninstall
rm
-f
/root/.hcrc
echo
"Uninstalling APP contried"
...
...
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