首先搭建两套一样的OpenStack环境
更改前:
node1: 192.168.200.100 RegionOne
node2: 192.168.200.200 RegionOne
预期结果:
node1: 192.168.200.100 RegionOne keystone(共用)
node2: 192.168.200.200 RegionTwo
一、更改 node2 组件配置文件
[keystone_authtoken] auth_uri = http://192.168.200.200:5000 auth_url = http://192.168.200.200:35357 auth_type = password project_domain_id = default user_domain_id = default project_name = service username = neutron password = openstack memcache_security_strategy = ENCRYPT memcache_secret_key = LSX38kDupTueYjpIjB03zXjhpuWgGU2SdvwkfpMN memcached_servers = 10.95.42.23:11211 os_region_name = RegionOne
2. 组件配置文件os_region_name原先是RegionOne全部改成RegionTwo1. 组件配置文件5000和35357对应的IP全部改成node1的keystone IP
二、更改 node2 keystone数据库
1.导出数据库:
mysqldump -ukeystone -pkeystone keystone > keystone.sql
2.把keystone.sql文件中所有的RegionOne改成RegionTwo
3.把修改后的keystone.sql文件导入数据库:
mysql -ukeystone -pkeystone keystone < keystone.sql
三、node1 创建 node2 所有组件 endpoint
1.创建RegionTwo认证
keystone-manage bootstrap --bootstrap-password openstack
--bootstrap-admin-url http://192.168.200.100:35357/v3/
--bootstrap-internal-url http://192.168.200.100r:5000/v3/
--bootstrap-public-url http://192.168.200.100:5000/v3/
--bootstrap-region-id RegionTwo
2.创建 node2 组件 endpoint
glance:
openstack endpoint create --region RegionTwo image public http://192.168.200.200:9292
openstack endpoint create --region RegionTwo image internal http://192.168.200.200:9292
openstack endpoint create --region RegionTwo image admin http://192.168.200.200:9292
neutron:
openstack endpoint create --region RegionTwo network public http://192.168.200.200:9696
openstack endpoint create --region RegionTwo network internal http://192.168.200.200:9696
openstack endpoint create --region RegionTwo network admin http://192.168.200.200:9696