騰訊藍鯨平台部署
1. 環境准備
#1. 基礎優化
ulimit -SHn 655360
yum remove mysql-devel -y && yum install mysql-devel -y
#2. yum源優化
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-7.repo
yum clean all
#3. 解析
cat /etc/hosts:
81.69.219.162 chuocong.com
81.69.219.162 paas.chucong.com
81.69.219.162 docs.chuocong.com
81.69.219.162 o.chuocong.com
81.69.219.162 t.chuocong.com
81.69.219.162 cmdb.chuocong.com job.chuocong.com
安裝包下載
wget https://bkopen-1252002024.file.myqcloud.com/ce/38f7796/bkce_src-5.1.29.tar.gz
tar -xvf /data/bkce_src-5.1.29.tar.gz -C /data/
證書配置
1. 先獲取mac地址
cat /sys/class/net/eth0/address
52:54:00:26:13:ce <---- mac地址
2. 去騰訊雲粘貼mac地址 生成並下載證書
https://bk.tencent.com/download_ssl/
3. 解壓證書
把下載好的證書文件上傳到 /data 目錄
tar -xvf /data/ssl_certificates.tar.gz -C /data/src/cert/
4. 避坑
yum remove mysql-devel -y && yum install mysql-devel -y
藍鯨配置
修改藍鯨配置參數:
vim /data/install/globals.env
修改 export BK_DOMAIN="bk.com"
改為 export BK_DOMAIN="bk.cloud.tencent.com"
修改 [PAAS_ADMIN_PASS]對應密碼為 admin
export PAAS_ADMIN_PASS='admin'
藍鯨安裝:
[root@rbtnode1 install]# ./install_minibk -y
------------------------- 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
問題集合
[root@node1 install]# ./install_minibk -y
[10.105.26.156]20201025-190133 8 install.config exists. backup it to install.config.20201025_190133
‘install.config’ -> ‘install.config.20201025_190133’
<<check_ssh_nopass>> has been checked successfully... SKIP
<<check_password>> has been checked successfully... SKIP
start <<check_cert_mac>> ... [FAILED]
cert not exists
[10.105.26.156]20201025-190133 34 bk_install precheck failed.
#證書無法通過驗證,重新解壓證書到/data/src/cert/目錄
tar -xvf /data/ssl_certificates.tar.gz -C /data/src/cert/
解決辦法:
yum remove mysql-devel -y && yum install mysql-devel -y
#重啟后發現頁面都打不開?
./bkcec start all
環境驗證
1. 登錄到中控機,通過腳本自帶的命令查詢藍鯨后台模塊的運行狀態
# 加載環境變量和藍鯨安裝維護的函數
source /data/install/utils.fc
# 查看運行狀態
./bkcec status all [全部是running為正確]
2. 檢查 BKDATA 清洗數據的任務是否正常啟動
檢查是否有包含 databus_etl 的任務
crontab -l
3. 檢查 BKDATA 運行狀態
/data/bkce/bkdata/dataapi/bin/check_databus_status.sh
4. 檢查 Agent 狀態是否正常:
在中控機執行
./bkcec status gse_agent
# 返回 “Running” 說明 Agent 狀態正常
# 如果返回 "Exit" 則需要手動安裝或者啟動
# 手動安裝
./bkcec install gse_agent
# 啟動
./bkcec start gse_agent
5. 檢查健康狀態 API:
藍鯨產品后台提供了健康檢查的接口,用 HTTP GET 請求訪問,接口地址和端口用變量表達:
cd /data/install && source utils.fc
# PaaS 注意 URL 末尾帶上/
curl http://pass.chuocong.com/healthz/
# CMDB
curl http://cmdb.chuocong.com
# JOB
http://job.chuocong.com
# 開發者中心
http://paas.chuocong.com/app/list/