首页 > 技术文章 > Ceph Object Gateway support

gushiren 2018-08-22 11:14 原文

官网链接:https://docs.openstack.org/ironic/latest/admin/radosgw.html

 

Ceph目标存储网关的支持

概述
Ceph目标存储是一个功能强大的分布式存储系统。它包含目标存储,同时提供了RADOS Gateway Swift API,这个API能和OpenStack Swift API兼容适配。这两种API的temprorary URLs在使用格式>上有所不同。

Ironic在Mitaka版本添加了对RADOS Gateway temprorary URL的支持。

使用RADOS Gateway配置Ironic和Glance
1. 安装Ceph目标存储,并安装RADOS Gateway。参考:http://docs.ceph.com/docs/master/

 

2. 在RADOS Gateway管理节点上,执行下面的命令,来为Glance创建RADOS Gateway证书:
sudo radosgw-admin user create --uid="GLANCE_USERNAME" --display-name="User for Glance"
sudo radosgw-admin subuser create --uid=GLANCE_USERNAME --subuser=GLANCE_USERNAME:swift --access=full
sudo radosgw-admin key create --subuser=GLANCE_USERNAME:swift --key-type=swift --secret=STORE_KEY
sudo radosgw-admin user modify --uid=GLANCE_USERNAME --temp-url-key=TEMP_URL_KEY
为Glance访问这个Gateway创建用户名字,用它来替换GLANCE_USERNAME,使用适当的keys来替换STORE_KEY和TEMP_URL_KEY。
注意:不要使用"-gen-secret"命令行参数,因为它产生的keys不能同Glance工作。


3. 为把RADOS Swift API做为后端来使用,配置Glance API服务。编辑Glance API服务的配置文件(典型位于/etc/glance/glance-api.conf)。使用RADOS Gateway的API服务的IP/port来替换RADOS_IP和PORT。
[glance_store]

stores = file, http, swift
default_store = swift
swift_store_auth_version = 1
swift_store_auth_address = http://RADOS_IP:PORT/auth/1.0
swift_store_user = GLANCE_USERNAME:swift
swift_store_key = STORE_KEY
swift_store_container = glance
swift_store_create_container_on_put = True
注意:RADOS Gateway使用FastCGI协议来与HTTP服务器交互。如果希望支持HTTPS,就阅读一个HTTP服务器文档。

4. 重起Glance API服务,并上传所有需要的镜像。


5. 修改位于conductor节点上的ironic配置文件:
[glance]

swift_container = glance
swift_api_version = v1
swift_endpoint_url = http://RADOS_IP:PORT
swift_temp_url_key = TEMP_URL_KEY

[deploy]

object_store_endpoint_type = radosgw

 

6. 重起ironic conductor服务。

推荐阅读