手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

OpenStack HA 高可用组件部署--MySQL篇

[日期:2013-11-12] 来源:Linux社区  作者:nibaojin [字体: ]

前言:
openstack中,controller节点的单点故障一直是影响整个云计算平台稳定性的重大问题,因此对controller节点的各个组件实现HA显得至关重要,由于controller节点上部署的服务组件众多,MySQL,rabbitmq,keystone,glance,nova等等,每种组件对于HA的实现都有着不同点和共同点,因此必须分开讨论,本文即时在参照之前国内一篇网文的基础之上,对其进行更新与修正,构建里一个基本的Mysql ha环境,广大爱好者可以借鉴本文的思路,最终将mysql的HA应用在两台controller节点上。

系统环境:

Ubuntu 12.04.2 LTS

节点1: 192.168.1.143(eth0)    ha1

节点2: 192.168.1.144(eth0)    ha2

Mysql virtual ip:192.168.1.10(这个稍后会用到)

以两天集群的集群环境为例,开始我们的Mysql HA部署

(1)所有节点,编辑/etc/hosts文件

vim /etc/hosts

添加以下内容

192.168.1.143  ha1

192.168.1.144  ha2

(2)安装pacemaker和corosync

apt-get install pacemaker corosync

要对corosync进行设置,将如下内容复制粘贴到所有节点的/etc/corosync/corosync.conf内:

 

# Please read the openais.conf.5 manual page

totem {
 version: 2

 # How long before declaring a token lost (ms)
 token: 3000

 # How many token retransmits before forming a new configuration
 token_retransmits_before_loss_const: 10

 # How long to wait for join messages in the membership protocol (ms)
 join: 60

 # How long to wait for consensus to be achieved before starting a new round of membership configuration (ms)
 consensus: 3600

 # Turn off the virtual synchrony filter
 vsftype: none

 # Number of messages that may be sent by one processor on receipt of the token
 max_messages: 20

 # Limit generated nodeids to 31-bits (positive signed integers)
 clear_node_high_bit: yes

 # Disable encryption
  secauth: off

 # How many threads to use for encryption/decryption
  threads: 0

 # Optionally assign a fixed node id (integer)
 # nodeid: 1234

 # This specifies the mode of redundant ring, which may be none, active, or passive.
  rrp_mode: none

  interface {
  # The following values need to be set based on your environment
  ringnumber: 0
  bindnetaddr: 192.168.1.0
  mcastaddr: 226.94.1.1
  mcastport: 5405
 }
}

amf {
 mode: disabled
}

service {
  # Load the Pacemaker Cluster Resource Manager
  ver:      1
  name:      pacemaker
}
quorum {
provider:corosync_votequorum
expected_votes:2
}
aisexec {
        user:  root
        group:  root
}

logging {
        fileline: off
        to_stderr: yes
        to_logfile: no
        to_syslog: yes
 syslog_facility: daemon
        debug: off
        timestamp: on
        logger_subsys {
                subsys: AMF
                debug: off
                tags: enter|leave|trace1|trace2|trace3|trace4|trace6
        }
}

更多详情见请继续阅读下一页的精彩内容http://www.linuxidc.com/Linux/2013-11/92641p2.htm

相关阅读

在Ubuntu 12.10 上安装部署Openstack http://www.linuxidc.com/Linux/2013-08/88184.htm

Ubuntu 12.04 OpenStack Swift单节点部署手册 http://www.linuxidc.com/Linux/2013-08/88182.htm

MySQL服务器的HA集群之Corosync+DRBD+Pacemaker实现 http://www.linuxidc.com/Linux/2012-08/68101.htm

MySQL服务器的HA集群之Corosync+DRBD+Pacemaker实现-上篇 http://www.linuxidc.com/Linux/2012-06/61963.htm

MySQL服务器的HA集群之Corosync+DRBD+Pacemaker实现-下篇 http://www.linuxidc.com/Linux/2012-06/61964.htm

linux
相关资讯       HA  Openstack部署 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款