kolla-ansible 多区域 multiRegion 安装 部署 openstack

一、环境

centos      7.8
python      2..7.5
pip      19.3.1
ansible          2.7.18     
kolla-ansible        7.2.2.dev9     (对应openstack Rocky版)
docker   4.2.0

二、架构

regionOne 高可用性,启用keystone  horizon

regionTwo 使用 regionOne的 keystone horizon

三、步骤

 1、部署区域1 regionOne

1.1编辑/etc/kolla/globals.yml

# Location of configuration overrides
node_custom_config: "/etc/kolla/config"

# Region options
################
# Use this option to change the name of this region.
openstack_region_name: "RegionOne"

# Use this option to define a list of region names - only needs to be configured
# in a multi-region deployment, and then only in the *first* region.
multiple_regions_names:
           - "{{ openstack_region_name }}"
           - "RegionTwo"


enable_haproxy: "yes"
enable_horizon: "yes"
enable_keystone: "yes"

1.2编辑主机清单文件 multinode01
 

[control]
# These hostname must be resolvable from your deployment host
controller01
controller02
controller03

# The above can also be specified as follows:
#control[01:03]     ansible_user=kolla

# The network nodes are where your l3-agent and loadbalancers will run
# This can be the same as a host in the control group
[network]
controller01
controller02
controller03

# inner-compute is the groups of compute nodes which do not have
# external reachability.
# DEPRECATED, the group will be removed in S release of OpenStack,
# use variable neutron_compute_dvr_mode instead.
[inner-compute]

# external-compute is the groups of compute nodes which can reach
# outside.
# DEPRECATED, the group will be removed in S release of OpenStack,
# use variable neutron_compute_dvr_mode instead.
[external-compute]
compute01

[compute:children]
inner-compute
external-compute

1.3 运行kolla-ansible部署

kolla-ansible -i multinode01 deploy -vvv

部署完成后可看到登录面板上已有regionOne  regionTwo选项,但此时regionTwo还没有资源。

2、部署区域2 regionTwo

2.1  编辑/etc/kolla/globals.yml

################
# Region options
################
# Use this option to change the name of this region.
openstack_region_name: "RegionTwo"

# Use this option to define a list of region names - only needs to be configured
# in a multi-region deployment, and then only in the *first* region.
multiple_regions_names:
           - "{{ openstack_region_name }}"
           - "RegionTwo"

keystone_admin_url: "http://10.0.49.149:5000"
keystone_internal_url: "http://10.0.49.149:5000"
openstack_auth:
    auth_url: "http://10.0.49.149:5000"
    username: "admin"
    password: "{{ keystone_admin_password }}"
    project_name: "admin"
    domain_name: "default"

# http://10.0.49.149:5000 为regionOne keystone url地址

enable_haproxy: "no"
enable_horizon: "no"
enable_keystone: "no"

2.2在/etc/kolla/config文件夹下增加配置文件

nova.conf

[placement]
auth_url = {{ keystone_admin_url }}

 

global.conf

[keystone_authtoken]
www_authenticate_uri = {{ keystone_internal_url }}
auth_url = {{ keystone_admin_url }}

heat.conf
 

[trustee]
www_authenticate_uri = {{ keystone_internal_url }}
auth_url = {{ keystone_internal_url }}

[ec2authtoken]
www_authenticate_uri = {{ keystone_internal_url }}

[clients_keystone]
www_authenticate_uri = {{ keystone_internal_url }

 若启用了此它的服务,则需加其他配置文件,如: ceilometer ceph等

2.3编辑区域2 主机清单文件multinode02

 

# These initial groups are the only groups required to be modified. The
# additional groups are for more control of the environment.
[control]
# These hostname must be resolvable from your deployment host
network01
#controller01
#controller02
#controller03

# The above can also be specified as follows:
#control[01:03]     ansible_user=kolla

# The network nodes are where your l3-agent and loadbalancers will run
# This can be the same as a host in the control group
[network]
network01
#controller01
#controller02
#controller03



# inner-compute is the groups of compute nodes which do not have
# external reachability.
# DEPRECATED, the group will be removed in S release of OpenStack,
# use variable neutron_compute_dvr_mode instead.
[inner-compute]

# external-compute is the groups of compute nodes which can reach
# outside.
# DEPRECATED, the group will be removed in S release of OpenStack,
# use variable neutron_compute_dvr_mode instead.
[external-compute]
compute02
compute03

2.4部署区域2 regionTwo

kolla-ansible -i multinoe02 deploy -vvv

完成后即可以使用

可以选择在区域1 regionOne或区域2 regionTwo 创建实例

单独区域部署,可参考以前的文章
https://blog.csdn.net/zhujisoft/article/details/103108558

 

同理,可以根据需要部署区域3、区域4……

 

四、参考文档


 https://docs.openstack.org/kolla-ansible/rocky/user/multi-regions.html

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值