hostname | IP | cpu | mem | storage | system |
---|---|---|---|---|---|
lanjing1 | 192.168.100.100 | 1C | 2G | 20G | CentOS Linux release 7.3.1611 (Core) |
lanjing2 | 192.168.100.101 | 1C | 2G | 20G | CentOS Linux release 7.3.1611 (Core) |
lanjing3 | 192.168.100.102 | 1C | 2G | 20G | CentOS Linux release 7.3.1611 (Core) |
systemctl stop firewalld && systemctl disable firewalld
setenforce 0
sed -i 's/enforcing/disabled/g' /etc/selinux/config
yum -y groupinstall "Development Tools"
192.168.100.100 lanjing1
192.168.100.101 lanjing2
192.168.100.102 lanjing3
192.168.100.100 paas.lanjing.com job.lanjing.com cmdb.lanjing.com
http://bk.tencent.com/download/#community
03/05/2018 09:37 AM 1,056,917,635 bkce_src-3.1.7.tgz
03/05/2018 09:30 AM 9,101,500 install_ce-1.0.15.tgz
03/05/2018 10:00 AM 24,500 ssl_certificates.tar.gz
$ mkdir /data
$ cd /data
$ tar xf bkce_src-3.1.6.tgz
$ tar xf install_ce-1.0.14.tgz
$ cd src/cert; tar xf /root/ssl_certificates.tar.gz
$ cd ../../install # 回到操作目录
192.168.100.100 nginx,appt,rabbitmq,kafka,zk,es,bkdata,consul,fta
192.168.100.101 license,appo,kafka,zk,es,mysql,beanstalk,consul
192.168.100.102 paas,cmdb,job,gse,kafka,zk,es,consul,redis,bkarchiva
修改install/global.env
export BK_DOMAIN="lanjing.com"
# vi src/.pip/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
# ssh-keygen -t rsa -b 2048 #有确认提示,一直按回车即可
# cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys
# chmod 600 ~/.ssh/authorized_keys
# for ip in $(awk '{print $1}' install.config );do rsync -a ~/.ssh/authorized_keys root@$ip:/root/ .ssh ;done
$ ./bkcec sync all # 分发安装脚本及代码到所有目标机器
consul 安装并启动
$ ./bkcec install consul
$ ./bkcec start consul
./bkcec install mysql
./bkcec install zk
./bkcec install kafka
./bkcec install es
./bkcec install nginx
./bkcec install redis
./bkcec install beanstalk
nginx报错,在192.168.100.100上运行配置nginx的yum源:
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
beanstalk报错,在192.168.100.101上手工安装:
wget https://github.com/kr/beanstalkd/archive/v1.10.tar.gz
tar -zxvf v1.10.tar.gz
cd beanstalkd-1.10/
make
make install
./bkcec start mysql
./bkcec initdata mysql
./bkcec start zk
./bkcec start kafka
./bkcec start es
./bkcec start nginx
./bkcec start redis
./bkcec start beanstalk
./bkcec install cmdb
./bkcec install job
./bkcec install paas
./bkcec install bkdata
./bkcec install fta
./bkcec install gse
./bkcec install license
./bkcec install bkarchiva
./bkcec install bkdata时告警,忽略:
[192.168.100.100]20180305-145652 180 pip install completed
[192.168.100.100]20180305-145654 160 activate virtualenv [databus]
[192.168.100.100]20180305-145654 183 file requirements.txt does not exists skip pip install.
[192.168.100.100]20180305-145654 184 this is not an error if project is not written in python
[192.168.100.100]20180305-145654 301 install bkdata done
./bkcec initdata gse
./bkcec initdata paas
./bkcec initdata cmdb
./bkcec initdata job
./bkcec initdata fta
./bkcec start license
./bkcec start gse
./bkcec start cmdb
./bkcec start job
./bkcec start paas
./bkcec initdata bkdata
./bkcec start bkdata
./bkcec start fta
./bkcec start bkarchiva
./bkcec install rabbitmq
./bkcec start rabbitmq
./bkcec initdata rabbitmq
./bkcec install appo
./bkcec initdata appo
./bkcec start appo
./bkcec activate appo
./bkcec install appt
./bkcec initdata appt
./bkcec start appt
./bkcec activate appt
注意:这里可能会报找不到rabbitmq的安装包,你需要到目标服务器上手动安装192.168.100.100下配置:
首先是需要安装erlang
# rpm -Uvh http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
# yum install -y erlang
完成安装后安装RabbitMQ
# wget https://dl.bintray.com/rabbitmq/rabbitmq-server-rpm/rabbitmq-server-3.6.12-1.el7.noarch.rpm
# yum install https://dl.bintray.com/rabbitmq/rabbitmq-server-rpm/rabbitmq-server-3.6.12-1.el7.noarch.rpm
安装 gse_agent
./bkcec install gse_agent
修改本机hosts文件
192.168.100.100 cmdb.lanjing.com
192.168.100.100 paas.lanjing.com
192.168.100.100 jobs.lanjing.com
就可以访问web界面了。