-
Swift安装部署(与keystone依赖包有冲突,需要安装不同版本eventlet)
参考:http://www.server110.com/openstack/201402/6662.html
http://www.server110.com/openstack/201402/6662.html
-
源码下载
-
git clone -b stable/icehouse https://github.com/openstack/swift.git
-
-
安装
-
pip install -r requirements.txt
-
python setup.py install
-
-
准备工作
-
安装xfs:yum install xfsprogs xinetd –y
-
新磁盘数据存储:
mkfs.xfs /dev/sdb1
echo "/dev/sdb1 /srv/node/sdb1 xfs noatime,nodiratime,nobarrier,logbufs=8 0 0" >> /etc/fstab
mkdir -p /srv/node/sdb1
mount /srv/node/sdb1
chown -R root:root /srv/node
-
配置文件修改
cp account-server.conf-sample account-server.conf
cp container-server.conf-sample container-server.conf
cp object-server.conf-sample object-server.conf
-
设置rsync
参考(注意账号):
-
安装proxy服务
-
参考:
-
安装memcached:yum install memcached –y
-
-
Swift的日志配置
-
启动proxy:./bin/swift-proxy-server /etc/swift/proxy-server.conf(需要权限)
swift-init proxy-server start,开启8080端口。
-
启动object、container、account服务。参考:
swift-init all start,依次占用6000、6001、6002端口。
-
安装python-swiftclient
git clone https://github.com/openstack/python-swiftclient.git
问题可以在openstack官网论坛搜索:
https://ask.openstack.org/en/question/57608/proxy-server-error-insufficient-storage-10001556002sdb1/
-
简单测试
Stat、container、文件上传、下载、删除等
-
-
-
与Glance对接
-
参考
http://ericzhong.github.io/2013/09/04/install-openstack-from-source/
http://longgeek.com/2012/07/18/use-swift-as-a-glance-back-end-storage/
http://mobile.51cto.com/hot-448613.htm
-
Glance对接swift
glance image-create --progress --name="CirrOS 0.3.0" --disk-format=qcow2 --container-format=ovf --is-public=true < image-dir/cirros-0.3.0-x86_64-disk.img
glance image-create --name "cirros-0.3.3-x86_64" --file image-dir/cirros-0.3.3-x86_64-disk.img --disk-format qcow2 --container-format ovf --is-public=true --progress
glance image-list
swift list
-
-
Swift源码分析
-
Swift存储节点扩减容