2.12.安装gse_agent
[root@rbtnode1 install]# ./bk_install gse_agent
蓝鲸自动化运维平台
1.蓝鲸简介
官网:https://bk.tencent.com/docs/
腾讯蓝鲸智云,简称蓝鲸,是腾讯互动娱乐事业群(Interactive Entertainment Group,简称 IEG)自研自用的一套用于构建企业研发运营一体化体系的 PaaS 开发框架,提供了 aPaaS(DevOps 流水线、运行环境托管、前后台框架)和 iPaaS(持续集成、CMDB、作业平台、容器管理、数据平台、AI 等原子平台)等模块,帮助企业技术人员快速构建基础运营 PaaS。
2.蓝鲸部署
2.1.环境准备2.2.关闭Selinux
[root@localhost ~]# setenforce 0 [root@localhost ~]# sed -ri '/^SELINUX=/c SELINUX=disabled' /etc/selinux/config [root@localhost ~]# sed -ri '/^SELINUX=/c SELINUX=disabled' /etc/sysconfig/selinux
2.3.关闭防火墙/网络配置器
[root@localhost ~]# systemctl stop firewalld.service [root@localhost ~]# systemctl disable firewalld.service Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. [root@localhost ~]# systemctl stop NetworkManager [root@localhost ~]# systemctl disable NetworkManager
2.4.调整最大文件打开数
[root@localhost ~]# echo 'root soft nofile 102400' >> /etc/security/limits.d/20-nproc.conf [root@localhost ~]# echo 'root hard nofile 102400' >> /etc/security/limits.d/20-nproc.conf [root@localhost ~]# reboot
2.5.配置yum仓库
[root@localhost ~]# curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo ;curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo [root@localhost ~]# ls /etc/yum.repos.d/ CentOS-Base.repo epel.repo
2.6.准备软件包
程序包 https://bk.tencent.com/download/ ssl认证文件 https://bk.tencent.com/download_ssl/
2.7.非标准ip处理方法
蓝鲸社区版部署脚本install目录下从以下文件中获取ip的函数get_lan_ip,非标准地址,在部署前都要完成修改
[root@localhost install]# grep -l 'get_lan_ip *()' -r /data/install/
修改方法:
假设服务器ip是129.x.x.x
2.8.安装paas、cmdb、job
1)准备安装目录 [root@localhost soft]# mkdir /data 2)解压 [root@localhost soft]# tar xf bkce_src-5.1.28.tar.gz /data [root@localhost ~]# ls /data/ install src 3)解压ssl认证 [root@localhost ~]# tar xf /soft/ssl_certificates.tar.gz -C /data/src/cert/ 4)环境检测 [root@localhost install]# ./precheck.sh 如果报错则使用-r重新检测 [root@localhost install]# ./precheck.sh -r 5)部署组件 如果部署所有组件 [root@localhost install]# ./install_minibk -y 按需部署则 [root@localhost install]# ./install_minibk [root@localhost install]# ./install_minibk paas && ./install_minibk cmdb && ./install_minibk job
pass组件安装成功
cmdb组件安装成功
job组件安装成功
2.9.安装app_mgr
[root@rbtnode1 install]# ./bk_install app_mgr
2.10.安装pkdata
[root@rbtnode1 install]# ./bk_install bkdata
2.11.安装fta
[root@rbtnode1 install]# ./bk_install fta
2.13.安装saas-o
[root@rbtnode1 install]# ./bkcec install saas-o
2.14.以上全部安装好后安装节点管理
[root@rbtnode1 install]# ./bk_install saas-o bk_nodeman
3.故障解决
3.1.安装app_mgr报错
原因:paas_agent启动失败,没有解析到paas
解决方法:
解析paas /data/bkce/bin/health_check/check_proc_exists -m paas 查看一下appt的状态 [root@rbtnode1 install]# ./bkcec status appt [192.168.81.240] paas_agent() paas_agent FATAL Exited too quickly (process log may have details) [192.168.81.240] nginx: RUNNING 发现没有启动,启动appt [root@rbtnode1 install]# ./bkcec start appt [192.168.81.240]20200616-104319 98 starting appt(ALL) on host: 192.168.81.240 paas_agent: started
3.2.安装bkdata报错
解决方法
[root@rbtnode1 install]# /data/bkce/service/zk/bin/zkCli.sh -server zk.service.consul:2181 ls /common_kafka/brokers/ids Connecting to zk.service.consul:2181 log4j:WARN No appenders could be found for logger (org.apache.zookeeper.ZooKeeper). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. WATCHER:: WatchedEvent state:SyncConnected type:None path:null [1] [root@rbtnode1 ~]# pip install kazoo
3.3.技巧
一般遇到上图的现象都是对应的插件没有安装,安装即可解决问题
4.注意事项
4.1.主机重启
主机重启后需要手动启动paas、cmdb、job等一系列模块
首先查一下有没有启动,如果启动了就用./bkcec stop 模块名停止在用./bkcec start 模块名启动
启动paas
[root@rbtnode1 install]# ./bkcec start paas [192.168.81.240]20200616-205049 98 starting paas(ALL) on host: 192.168.81.240 Unlinking stale socket /data/bkce/logs/open_paas/supervisor.sock
启动cmdb
[root@rbtnode1 install]# ./bkcec stop cmdb [192.168.81.240]20200616-205617 135 stopping cmdb(ALL) on host: 192.168.81.240 cmdb_hostcontroller: stopped cmdb_hostserver: stopped cmdb_toposerver: stopped cmdb_objectcontroller: stopped cmdb_webserver: stopped cmdb_procserver: stopped cmdb_auditcontoller: stopped cmdb_apiserver: stopped cmdb_eventserver: stopped cmdb_datacollection: stopped cmdb_adminserver: stopped cmdb_proccontroller: stopped Shut down [root@rbtnode1 install]# ./bkcec start cmdb [192.168.81.240]20200616-205626 98 starting cmdb(ALL) on host: 192.168.81.240
启动job
[root@rbtnode1 install]# ./bkcec start job [192.168.81.240]20200616-205129 98 starting job(ALL) on host: 192.168.81.240
启动app_mgr
[root@rbtnode1 install]# ./bkcec status appo [192.168.81.240] paas_agent() paas_agent RUNNING pid 19074, uptime 1:40:13 [192.168.81.240] nginx: RUNNING [root@rbtnode1 install]# ./bkcec status appt [192.168.81.240] paas_agent() paas_agent RUNNING pid 19074, uptime 1:41:51 [192.168.81.240] nginx: RUNNING
启动bkdata
[root@rbtnode1 install]# ./bkcec status bkdata