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
52951157
Commit
52951157
authored
Mar 16, 2022
by
tianye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交hcrc相关配置
parent
27964a27
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
hcctl
Deploy-search-center/hcctl
+3
-1
install.ini
Deploy-search-center/install.ini
+1
-1
install.sh
Deploy-search-center/install.sh
+6
-4
No files found.
Deploy-search-center/hcctl
View file @
52951157
#!/bin/bash
#!/bin/bash
action
=
$1
action
=
$1
target
=
$2
target
=
$2
sc_dir
=
${
sc_dir
:-
/home/tianye/search-center
}
source
~/.hcrc 2>/dev/null
||
echo
""
sc_dir
=
${
sc_dir
:-
/ops_project
}
source
${
sc_dir
}
/install.ini
source
${
sc_dir
}
/install.ini
COMPOSE_FILE
=
$(
cat
${
sc_dir
}
/compose_files 2>/dev/null
||
echo
""
)
COMPOSE_FILE
=
$(
cat
${
sc_dir
}
/compose_files 2>/dev/null
||
echo
""
)
...
...
Deploy-search-center/install.ini
View file @
52951157
...
@@ -5,7 +5,7 @@ SC_IMAGE_NAME=search-center
...
@@ -5,7 +5,7 @@ SC_IMAGE_NAME=search-center
SC_IMAGE_VERSION
=
v1.0
SC_IMAGE_VERSION
=
v1.0
#部署目录
#部署目录
DEPLOY_DIR
=
/
home/tianye/
DEPLOY_DIR
=
/
ops_project
#search-center配置文件目录
#search-center配置文件目录
APP_CONF_DIR
=
${DEPLOY_DIR}/search-center/conf/app
APP_CONF_DIR
=
${DEPLOY_DIR}/search-center/conf/app
...
...
Deploy-search-center/install.sh
View file @
52951157
...
@@ -2,16 +2,18 @@
...
@@ -2,16 +2,18 @@
#set -e
#set -e
source
./install.ini
source
./install.ini
DEPLOY_FILE
=
$(
dirname
$0
)
DEPLOY_FILE
=
$(
dirname
$0
)
if
[
!
-d
${
DEPLOY_DIR
}
]
;
then
mkdir
-p
${
DEPLOY_DIR
}
;
fi
sc_dir
=
${
DEPLOY_DIR
}
/search-center
sc_dir
=
${
DEPLOY_DIR
}
/search-center
#将docker-compose工程部署到本机
#将docker-compose工程部署到本机
if
[
!
-d
${
sc_dir
}
]
;
then
if
[
[
!
-d
${
sc_dir
}
&&
!
-f
~/.hcrc
]
]
;
then
cp
-rf
${
DEPLOY_FILE
}
/search_center
${
sc_dir
}
cp
-rf
${
DEPLOY_FILE
}
/search_center
${
sc_dir
}
else
else
echo
"目标目录已安装search_center
"
echo
"目标目录已安装search_center,请检查
${
sc_dir
}
和.hcrc是否存在
"
exit
127
exit
127
fi
fi
#将配置文件存入环境变量文件,使其全局生效
#将配置文件存入环境变量文件,使其全局生效
cp
./install.ini
${
sc_dir
}
/install.ini.example
cp
./install.ini
${
sc_dir
}
/install.ini.example
env_context
=
$(
cat
${
sc_dir
}
/install.ini.example |grep
-v
"^#"
|grep
-v
"^$"
)
env_context
=
$(
cat
${
sc_dir
}
/install.ini.example |grep
-v
"^#"
|grep
-v
"^$"
)
...
@@ -20,7 +22,7 @@ source ${sc_dir}/.env
...
@@ -20,7 +22,7 @@ source ${sc_dir}/.env
ln
-s
${
sc_dir
}
/.env
${
sc_dir
}
/install.ini 2>/dev/null
ln
-s
${
sc_dir
}
/.env
${
sc_dir
}
/install.ini 2>/dev/null
#安装hcrc版本文件
#安装hcrc版本文件
echo
"
search-center版本
${
SC_IMAGE_VERSION
}
"
>
~/.hcrc 2>/dev/null
||
echo
""
echo
-e
"sc_dir=
${
sc_dir
}
\n
search-center版本
${
SC_IMAGE_VERSION
}
"
>
~/.hcrc 2>/dev/null
||
echo
""
#安装hcctl管理命令
#安装hcctl管理命令
sudo cp
hcctl /usr/local/bin
&&
sudo chmod
+x /usr/local/bin/hcctl
sudo cp
hcctl /usr/local/bin
&&
sudo chmod
+x /usr/local/bin/hcctl
...
...
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