Java知识分享网 - 轻松学习从此开始!    

Java知识分享网

Java1234官方群25:java1234官方群17
Java1234官方群25:838462530
        
SpringBoot+SpringSecurity+Vue+ElementPlus权限系统实战课程 震撼发布        

最新Java全栈就业实战课程(免费)

springcloud分布式电商秒杀实战课程

IDEA永久激活

66套java实战课程无套路领取

锋哥开始收Java学员啦!

Python学习路线图

锋哥开始收Java学员啦!
当前位置: 主页 > Java文档 > Java基础相关 >

OpenStack-Rocky高可用集群部署 PDF 下载


分享到:
时间:2021-05-23 08:56来源:http://www.java1234.com 作者:转载  侵权举报
OpenStack-Rocky高可用集群部署 PDF 下载
失效链接处理
OpenStack-Rocky高可用集群部署 PDF 下载


 
本站整理下载:
提取码:1ubs 
 
 
相关截图:
 
主要内容:


各节点设置各节点配置IP与主机名解析
[root@controller1 ~]# more /etc/hosts
192.168.100.100 controller
192.168.100.181 controller1
192.168.100.182 controller2
192.168.100.183 controller3
192.168.100.184 compute1
[root@controller1 ~]#
各节点关闭相关服务与防火墙
[root@controller1 ~]# systemctl stop NetworkManager
[root@controller1 ~]# systemctl disable NetworkManager
[root@controller1 ~]# systemctl stop firewalld.service
[root@controller1 ~]# systemctl stop iptables.service
[root@controller1 ~]# setenforce 0
各节点时间同步,安装chrony并配置
控制节点:
[root@controller1 ~]# yum install chrony
[root@controller1 ~]# vim /etc/chrony.conf
server 127.0.0.1 iburst #注释其它的server
allow 192.168.100.0/24
local stratum 10
[root@controller1 ~]# service chronyd restart
其它节点:
[root@computer1 ~]# yum install chrony
server 192.168.100.181 iburst #这里填入控制节点的主机IP或主机名
server controller1 iburst
[root@computer1 ~]# service chronyd restart
验证(控制节点)
[root@controller1 ~]# chronyc sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? localhost 0 6 0 - +0ns[ +0ns] +/- 0ns
[root@controller1 ~]#
验证(其它节点)
[root@computer1 ~]# chronyc sources
210 Number of sources = 2
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* 192.168.122.15 10 6 177 19 +506ns[+4678ns] +/- 136us
^? controller1 0 8 0 - +0ns[ +0ns] +/- 0ns
[root@computer1 ~]#
各节点配置yum源,安装配置依赖服务 (OpenStack客户端)
[root@controller1 ~]# more /etc/yum.repos.d/openstack-rocky.repo
[openstack-rocky]
name=openstack-rocky
baseurl=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-rocky/
enabled=1
gpgcheck=0
[root@controller1 ~]# yum install python-openstackclient openstack-selinux
[root@controller1 ~]# yum upgrade
B、配置高可用环境
B1、配置MariaDB-Galera-server集群
节点A:
[root@controller1 ~]# yum install mariadb mariadb-server
[root@controller1 ~]# service mariadb start
[root@controller1 ~]# mysql_secure_installation
[root@controller1 ~]# yum install mariadb-server-galera
[root@controller1 ~]# vim /etc/my.cnf.d/mariadb-server.cnf
[galera]
bind-address = 192.168.100.181
wsrep_provider = /usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address ="gcomm://controller1,controller2,controller3"
wsrep_cluster_name = openstack-cluster-01
wsrep_node_name = controller1
wsrep_node_address = 192.168.100.181
wsrep_on=ON
wsrep_slave_threads=4
wsrep_sst_method=rsync
default_storage_engine=InnoDB
wsrep_sst_auth=galera:galera #集群认证用户密码
[root@controller1 ~]#
启动集群第1个节点,添加集群认证用户
[root@controller1 ~]# service mariadb stop
[root@controller1 ~]# galera_new_cluster
[root@controller1 ~]# mysql
MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO 'galera'@'%' IDENTIFIED BY 'galera' WITH GRANT OPTION;
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit
节点B、C 安装配置数据库(以节点B 为例)
[root@controller2 ~]# yum install mariadb mariadb-server
[root@controller2 ~]# service mariadb start
[root@controller2 ~]# mysql_secure_installation
[root@controller2 ~]# service mariadb stop
[root@controller2 ~]# yum install mariadb-server-galera
在节点B和C,将节点A的配置文件复制过来,改一下
[root@controller2 ~]# more /etc/my.cnf.d/mariadb-server.cnf
[galera]
bind-address = 192.168.100.182 #这里改成各个节点的IP
wsrep_provider = /usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address ="gcomm://controller1,controller2,controller13"
wsrep_cluster_name = openstack-cluster-01
wsrep_node_name = controller2 #这里改成各个节点的主机名
wsrep_node_address = 192.168.100.182 #这里改成各个节点的IP
wsrep_on=ON
wsrep_slave_threads=4
wsrep_sst_method=rsync
default_storage_engine=InnoDB
启动后查看日志
[root@controller2 ~]# service mariadb start
[root@controller2 ~]# tail /var/log/mariadb/mariadb.log -n 20
2019-03-05 20:39:01 140188135188224 [Note] WSREP: 1.0 (controller1): State transfer from 0.0 (controller1) complete.
2019-03-05 20:39:01 140188135188224 [Note] WSREP: Shifting JOINER -> JOINED (TO: 0)
2019-03-05 20:39:01 140188135188224 [Note] WSREP: Member 1.0 (controller1) synced with group.
2019-03-05 20:39:01 140188135188224 [Note] WSREP: Shifting JOINED -> SYNCED (TO: 0)
2019-03-05 20:39:01 140188337101568 [Note] WSREP: Synchronized with group, ready for connections
2019-03-05 20:39:01 140188337101568 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
2019-03-05 20:39:01 140188478163136 [Note] /usr/libexec/mysqld: ready for connections.
Version: '10.1.20-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server

 
 
------分隔线----------------------------

锋哥公众号


锋哥微信


关注公众号
【Java资料站】
回复 666
获取 
66套java
从菜鸡到大神
项目实战课程

锋哥推荐