全新部署蓝鲸社区版6.0(1)
⼀、安装环境准备
1.1 根据官⽹说明,准备3台 CentOS 7.6 的主机。
1.2 IP地址分别为:19
2.168.88.101(中控机)、102、103,并通过root账户登陆
1.3 获取3台主机的mac地址,在蓝鲸官⽹⽣成证书,并上传⾄中控机/data⽬录下
1.4 下载蓝鲸社区版 6.0 的安装包,上传⾄中控机/data⽬录下
1.5 解压蓝鲸资源包,⽣成/install和/src(包含蓝鲸相关产品、依赖包、部署脚本、SaaS镜像及定制Python解释器(已加密))
[root@JSH-01 data]# tar zxvf bkce_src-6. #解压蓝鲸资源包
[root@JSH-01 data]# ls
bkce_src-6. install src ssl_
[root@JSH-01 data]# cd /data/src/; for f in *gz;do tar xf $f; done #解压各产品软件包
1.6 解压证书包(含创建⽬录及授权)
[root@JSH-01 data]# install -d -m 755 /data/src/cert
[root@JSH-01 data]# tar xf /data/ssl_ -C /data/src/cert/
[root@JSH-01 data]# chmod 644 /data/src/cert/*
1.7 拷贝rpm包⽂件夹到 /opt ⽬录
[root@JSH-01 data]# cp -a /data/src/yum /opt
1.8 ⾃定义安装配置⽂件 f
[root@JSH-01 data]# cd /data/install/
[root@JSH-01 install]# fig.3ip.sample fig
[root@JSH-01 install]# fig
[root@JSH-01 install]# fig
192.168.88.101 iam,ssm,usermgr,gse,license,redis,consul,es7,monitorv3(influxdb-
proxy),monitorv3(monitor),monitorv3(grafana)
192.168.88.102 nginx,consul,mongodb,rabbitmq,appo,influxdb(bkmonitorv3),monitorv3(transfer),fta,beanstalk 192.168.88.103 paas,cmdb,job,mysql,zk(config),kafka(config),appt,consul,log(api),nodeman(nodeman)
1.9 设置免密登录
[root@JSH-01 install]# bash /data/install/configure_ssh_without_pass
mysql社区版国内镜像下载⼆、基础包部署
2.1 初始化
[root@JSH-01 ~]# cd /data/install/
[root@JSH-01 install]# ./bk_install common
------------------------- agreements ---------------------------------
Dear users, welcome to use the Tencent BlueKing Software. Please
access bk.tencent/info/#laws to read the Tencent BlueKing
Software License and Service Agreement carefully. You have no right to
install or use the Software and related services unless you have read
and accepted all the terms of this Agreement. By downloading, install-
ing, using or logging in the Software, you shall be deemed to have
read and agreed to be bound by the Agreement above. If you have under-
stood the above content, please enter "yes" to continue installation,
otherwise, please enter "no" to abort. Thank you for your understan-
ding and support of the Tencent BlueKing Software.
----------------------------------------------------------------------
yes/no ? yes
where do you want to install blueking products.
enter an absolute path [/data/bkce]: /data/bkce
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirrors.aliyun
* extras: mirrors.bfsu.edu
* updates: mirror.bit.edu
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/3): extras/7/x86_64/primary_db | 222 kB 00:00:01
(2/3): updates/7/x86_64/primary_db | 2.5 MB 00:00:06
(3/3): base/7/x86_64/primary_db | 6.1 MB 00:00:09
No package pssh available.
No package parallel available.
No package mysql-community-client available.
Package zip-3.0-11.el7.x86_64 already installed and latest version
Package gawk-4.0.2-4.el7_3.1.x86_64 already installed and latest version
Package 2:tar-1.26-35.el7.x86_64 already installed and latest version
Resolving Dependencies
(错误2.1.1)
[root@JSH-01 install]# ./bk_install common
[192.168.88.101]20201116-222029 32 install bkenv has been performed without skip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun
* extras: mirrors.bfsu.edu
* updates: mirror.bit.edu
No package pssh available.
No package parallel available.
No package mysql-community-client available.
Package zip-3.0-11.el7.x86_64 already installed and latest version
Package unzip-6.0-21.el7.x86_64 already installed and latest version
Package rsync-3.1.2-10.el7.x86_64 already installed and latest version
Package gawk-4.0.2-4.el7_3.1.x86_64 already installed and latest version
Package curl-7.29.0-59.el7.x86_64 already installed and latest version
Package lsof-4.87-6.el7.x86_64 already installed and latest version
Package 2:tar-1.26-35.el7.x86_64 already installed and latest version
Package sed-4.2.2-7.el7.x86_64 already installed and latest version
Package iproute-4.11.0-30.el7.x86_64 already installed and latest version
Package uuid-1.6.2-26.el7.x86_64 already installed and latest version
Package psmisc-22.20-17.el7.x86_64 already installed and latest version
Package wget-1.14-18.el7_6.1.x86_64 already installed and latest version
Package at-3.1.13-24.el7.x86_64 already installed and latest version
Nothing to do
[192.168.88.101]20201116-222032 555 install python on host: 192.168.88.101
/data/install/pcmd.sh: line 97: pssh: command not found
(解决2.1.1_1)在每台机器执⾏yum install -y epel-release 后再次执⾏ ./bk_install common 即可(否则安装PAAS会报错)(解决2.1.1_2)官⽅助⼿:使⽤createrepo⼯具⽣成repodata
yum -y install createrepo
createrepo /opt/yum
chmod 644 -R /opt/yum
使⽤python的simplehttp server启动⼀个临时http,提供内⽹的http yum源服务
python -m SimpleHTTPServer 8080 &
配置需要安装开源组件的主机的repo⽂件,可以⼿动也可以使⽤脚本
/data/install/bin/setup_local_yum.sh -l httpserver的内⽹ip地址:8080 -a
2.2 检查相关配置
[root@JSH-01 install]# ./health_check/check_bk_controller.sh
start <<check_ssh_nopass>> ... [OK]
start <<check_cert_mac>> ... [OK]
start <<check_install_config>> ... [OK]
start <<check_domain>> ... [OK]
start <<check_src_dir>> ... [OK]
start <<check_python_version>> ... [OK]
2.3 部署 PaaS
(错误2.3.1)
[root@JSH-01 install]# ./bk_install paas
[192.168.88.101]20201117-103420 52 install consul server on host:
192.168.88.101,192.168.88.102,192.168.88.103
[1] 10:34:20 [FAILURE] 192.168.88.102 Exited with error code 1
Stderr: CLUSTER_IP_LIST(-j)不能为空
[2] 10:34:20 [FAILURE] 192.168.88.103 Exited with error code 1
Stderr: CLUSTER_IP_LIST(-j)不能为空
[3] 10:34:20 [FAILURE] 192.168.88.101 Exited with error code 1
Stderr: CLUSTER_IP_LIST(-j)不能为空
(解决2.3.1_1)(⾸次部署遇到该问题,重启3台机器后重新执⾏ ./bk_install common 看到以下内容后执⾏./health_check/check_bk_controller.sh 报错消失)
(解决2.3.1_2)官⽅助⼿提供的⽅法:(执⾏以下操作后,重新部署,报错依旧)
[root@JSH-01 install]# ./bkcli install bkenv
删除以下临时⽂件(注意去除 i 权限后删除)
[root@JSH-01 install]# cd /root/.tag/
[root@JSH-01 .tag]# chattr -i *
[root@JSH-01 .tag]# rm -rf *
[root@JSH-01 ~]# cd /data/install/bin/01-generate/
[root@JSH-01 01-generate]# rm -rf *
[root@JSH-01 ~]# cd /data/install/bin/02-dynamic/
[root@JSH-01 02-dynamic]# rm -rf *
[root@JSH-01 ~]# cd /data/install/bin/03-userdef/
[root@JSH-01 03-userdef]# rm -rf *
[root@JSH-01 ~]# cd /data/install/bin/04-final/
[root@JSH-01 04-final]# rm -rf *
按照解决2.3.1_1,重启3台机器后:重新部署
(错误2.3.2)
[192.168.88.101]20201117-171853 170 register mysql consul on host: 192.168.88.103 [1] 17:18:53 [FAILURE] 192.168.88.103 Exited with error code 1
Stderr: jq 命令不存在,请安装
Error reloading: Unexpected response code: 500 (1 error occurred:
* Failed to reload configs
)
(解决2.3.2)在每台机器上执⾏yum install -y epel-release 和 yum install jq
重新部署 [root@JSH-01 install]# ./bk_install paas 直到提⽰以下信息,部署完成(中途暂未遇到报错)
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论