控制节点
[root@controller ~]#yum install -y openstack-swift-proxy python-swiftclient python-keystoneclient python-keystonemiddleware memcached
[root@controller ~]# vim /etc/swift/proxy-server.conf #配置文件在各发行版本中可能不同。你可能需要添加这些部分和选项而不是修改已经存在的部分和选项!!!
[DEFAULT] #在[DEFAULT]部分,配置绑定端口,用户和配置目录
bind_port = 8080
user = swift
swift_dir = /etc/swift
[pipeline:main] #在[pipeline:main]部分,启用合适的模块
pipeline = catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk ratelimit authtoken keystoneauth container-quotas account-quotas slo dlo versioned_writes proxy-logging proxy-serve
[app:proxy-server] #在[app:proxy-server]部分,启用自动帐号创建
use = egg:swift#proxy
account_autocreate = true
[filter:keystoneauth] #在[filter:keystoneauth]部分,配置操作员角色
use = egg:swift#keystoneauth
operator_roles = admin,use
[filter:authtoken] #在[filter:authtoken]部分,配置认证服务访问
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = swift
password = 123456
delay_auth_decision = true
[filter:cache] #在[filter:cache]部分,配置memcached位置
use = egg:swift#memcache
memcache_servers = 127.0.0.1:11211