CentOS three node deployment of blue whale operation and maintenance system

Equipment condition

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)

Turn off firewall and SELinux:

systemctl stop firewalld && systemctl disable firewalld
setenforce 0
sed -i 's/enforcing/disabled/g' /etc/selinux/config

Install Development Kit:

yum -y groupinstall "Development Tools"

Modify the host name and / etc/hosts:

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

On lanjing1

Download File:
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
Put it in / data to decompress
$ 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   # Back to operation directory
Modify install/install.config
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
//modifyinstall/global.env 
export BK_DOMAIN="lanjing.com"
Modify pip.conf to configure PIP source
# vi src/.pip/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
Configure password free login:
# ssh-keygen -t rsa -b 2048 #If there is a confirmation prompt, just press enter all the time

# 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

Start installation:

Master node:
  • Pre command:
$ ./bkcec sync all        # Distribute installation scripts and code to all target machines
Global service dependency installation

Consumer install and start

$ ./bkcec install consul
$ ./bkcec start consul
Basic services
./bkcec install mysql

./bkcec install zk

./bkcec install kafka

./bkcec install es

./bkcec install nginx

./bkcec install redis

./bkcec install beanstalk

When nginx reports an error, run the yum source configured for nginx on 192.168.100.100

rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

beanstalk reports an error. Install it manually on 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
Installation of various products
./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, ignore:

[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
Initialization of basic data
./bkcec initdata gse

./bkcec initdata paas

./bkcec initdata cmdb

./bkcec initdata job

./bkcec initdata fta
Start the above service and product process
./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
Formal environment / test environment
./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

Note: it may be reported that the rabbitmq installation package cannot be found here. You need to manually install the configuration under 192.168.100.100 on the target server:

First, you need to install erlang

# rpm -Uvh http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
# yum install -y erlang

Install RabbitMQ after installation

# 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

Install GSE agent

./bkcec install gse_agent

Modify the native hosts file

192.168.100.100 cmdb.lanjing.com
192.168.100.100 paas.lanjing.com
192.168.100.100 jobs.lanjing.com

You can access the web interface.

Tags: RabbitMQ RPM Nginx ssh

Posted on Fri, 03 Apr 2020 02:03:13 -0700 by PDP11