分享

建立高可用OpenStack云系列--建立HA Openstack云(五):安装Glance

xioaxu790 发表于 2014-5-30 09:43:53 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 0 19052


在Keystone教程里,我假定你已经安装了Glance并使用了。
与通常的设置不同的地方是:
·当设置/etc/glance/glance-api-paste.ini和/etc/glance/glance-registry-paste.ini时,记得也要编辑auth host:
  1. service_protocol=http
  2. service_host = clusterkeystone
  3. service_port = 5000
  4. auth_host = clusterkeystone
  5. auth_port = 35357
  6. auth_protocol = http
  7. auth_uri = http://clusterkeystone:5000/
  8. admin_tenant_name = service
  9. admin_user = glance
  10. admin_password = glance
复制代码


·当设置/etc/glance/glance-registry.conf时,使用“clustermysql”作为MySQL主机
·在设置的最后,运行
  1. glance-manage version_control 0 和 glance-manage db_sync
复制代码


·一定要安装curl,glance-registry资源代理没说但你需要它
现在我们要让Pacemaker在需要时运行glance,首先我们要停止glance服务并在启动时禁用,然后下载资源代理,在所有主机上做以下操作:
  1. echo "manual" > /etc/init/glance-api.override
  2. echo "manual" > /etc/init/glance-registry.override
  3. service glance-api stop
  4. service glance-registry stop
  5. cd /usr/lib/ocf/resource.d/openstack/
  6. wget https://raw.github.com/madkiss/glance/ha/tools/ocf/glance-api
  7. wget https://raw.github.com/madkiss/glance/ha/tools/ocf/glance-registry
  8. chmod u+x *
复制代码


然后添加资源:
  1. crm configure primitive glanceApiService ocf:openstack:glance-api \
  2. params config="/etc/glance/glance-api.conf" os_auth_url="http://clusterkeystone:5000/v2.0/" os_password="admin" \
  3. os_tenant_name="admin" os_username="admin" user="glance" client_binary="/usr/bin/glance" \
  4. op monitor interval="15s" timeout="30s"
  5. crm configure primitive glanceRegistryService ocf:openstack:glance-registry \
  6. params config="/etc/glance/glance-registry.conf" os_auth_url="http://clusterkeystone:5000/v2.0/" \
  7. os_password="admin" os_tenant_name="admin" os_username="admin" user="glance" \
  8. op monitor interval="15s" timeout="30s"
复制代码


现在pacemaker可以在我们的集群上运行Glance API and Registry了。
按惯例,分组并给Glance添加正确的命令:
  1. group Glance glanceIP glanceApiService glanceRegistryService
  2. crm configure order glance_after_keystone inf: Keystone Glance
复制代码


我设置让Glance在Keystone之后运行,因为它依赖于那两者还有MySQL,因为Keystone在MySQL之后运行,你只能让它在Keystone之后运行。
这是由此产生的配置:
  1. ============
  2. Last updated: Mon Jul 30 16:14:09 2012
  3. Last change: Mon Jul 30 16:11:54 2012 via crm_attribute on server1
  4. Stack: openais
  5. Current DC: server1 - partition with quorum
  6. Version: 1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c
  7. 2 Nodes configured, 2 expected votes
  8. 8 Resources configured.
  9. ============
  10. Online: [ server1 server2 ]
  11. mysqlmasterIP (ocf::heartbeat:IPaddr2): Started server1
  12. Master/Slave Set: ms_MySQL [clustermysql]
  13. Masters: [ server1 ]
  14. Slaves: [ server2 ]
  15. Resource Group: Keystone
  16. keystoneIP (ocf::heartbeat:IPaddr2): Started server2
  17. keystoneService (ocf::openstack:keystone): Started server2
  18. Resource Group: Glance
  19. glanceIP (ocf::heartbeat:IPaddr2): Started server1
  20. glanceApiService (ocf::openstack:glance-api): Started server1
  21. glanceRegistryService (ocf::openstack:glance-registry): Started server1
复制代码

上一篇:
建立高可用OpenStack云系列--《建立HA Openstack云 (四):安装Keystone》

下一篇:
建立高可用OpenStack云系列-- 建立HA Openstack云(六):安装Nova




没找到任何评论,期待你打破沉寂

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条