全新部署蓝鲸社区版6.0(1)

一、安装环境准备

1.1 根据官网说明,准备3台 CentOS 7.6 的主机。

1.2 IP地址分别为:192.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.0.0.tgz     #解压蓝鲸资源包
  • [root@JSH-01 data]# ls
  • bkce_src-6.0.0.tgz  install  src  ssl_certificates.tar.gz
  • [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_certificates.tar.gz -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 自定义安装配置文件 install.conf

  • [root@JSH-01 data]# cd /data/install/
  • [root@JSH-01 install]# cp install.config.3ip.sample  install.config
  • [root@JSH-01 install]# vi install.config
  • [root@JSH-01 install]# cat install.config
    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

二、基础包部署

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 http://bk.tencent.com/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.com
     * extras: mirrors.bfsu.edu.cn
     * updates: mirror.bit.edu.cn
    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 FATAL stat...  skip
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirrors.aliyun.com
     * extras: mirrors.bfsu.edu.cn
     * updates: mirror.bit.edu.cn
    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 http://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 报错消失
  • [1] 09:41:31 [SUCCESS] 192.168.88.102
    写入yum配置文件:/etc/yum.repos.d/Blueking.repo
    [bk-custom]
    name=Blueking
    baseurl=http://192.168.88.101:8080
    enabled=1   
    gpgcheck=0  
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirror.bit.edu.cn
     * epel: mirrors.bfsu.edu.cn
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    Metadata Cache Created
    setup local yum successful
     

  • (解决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 直到提示以下信息,部署完成(中途暂未遇到报错)

如果以上步骤没有报错, 你现在可以通过 http://paas.bktencent.com:80 访问 paas 平台(需配置本地hosts文件)
登陆用户名(login user): admin
登陆密码(login password): JngAqiTmjPVN
 

 

 

 

  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值