grizzly版swift和glance整合

系统:ubuntu 12.0.4
环境:3节点
controller节点:172.16.77.128(swift的proxy也在此节点)
network节点:172.16.77.130
compute节点:172.16.77.131

相对于swift和keystone整合,swift和glance整合相对简单
修改/etc/glance/glance-api.conf中
default_store = file
swift_store_auth_address = 127.0.0.1:5000/v2.0/
swift_store_user = jdoe:jdoe
swift_store_key = a86850deb2742ec3cb41518e 26aa2d89
swift_store_create_container_on_put = False

to:
default_store = swift
swift_store_auth_address = http://172.16.77.128:5000/v2.0/(备注:swift proxy url)
swift_store_user = service:swift
swift_store_key = service_pass
swift_store_create_container_on_put = True

然后service glance restart
这时候我们会在/var/log/glance/api.log中看到这样一条日志:
2013-08-19 01:10:42.245 3236 WARNING glance.api.v2.images [-] Could not find schema properties file schema-image.json. Continuing without custom properties
我们修改的配置不生效
这是由于/etc/glance中缺少了schema-image.json.缺少了schema-image.json.,我是通过apt-get install的方式安装的,这应该算是一个bug
cd /home/
git clone  https://github.com/openstack/glance.git
cd glance
git tag
git checkout  grizzly-2
cp etc/schema-image.json /etc/glance/
然后这个问题就搞定了

验证:
glance add name="test" is_public=true  disk_format="qcow2" container_format="bare"  location=" https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img"
grizzly版swift和glance整合
这里我们可以看到glance add成功,通过glance命令查询也可以查到,但是通过swift命令查询并未看到有新的object。而且通过后期创建实例的现象表明,这里glance应该并没有把镜像下到本地,而只是保存了一份记录
那我们先把镜像下到本地,再上传
cd /home/
wget https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img
glance add name="cirros-0.3.0-x86_64-disk" is_public=true disk_format="qcow2" container_format="bare" < cirros-0.3.0-x86_64-disk.img
grizzly版swift和glance整合
这次可以证明swift和glance配置成功

附:
可以通过qemu-img info cirros-0.3.0-x86_64-disk.img查询镜像信息
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值