本篇內(nèi)容主要講解“swift和keystone集成的配置方法”,感興趣的朋友不妨來(lái)看看。本文介紹的方法操作簡(jiǎn)單快捷,實(shí)用性強(qiáng)。下面就讓小編來(lái)帶大家學(xué)習(xí)“swift和keystone集成的配置方法”吧!
創(chuàng)新互聯(lián)于2013年成立,先為高昌等服務(wù)建站,高昌等地企業(yè),進(jìn)行企業(yè)商務(wù)咨詢服務(wù)。為高昌企業(yè)網(wǎng)站制作PC+手機(jī)+微官網(wǎng)三網(wǎng)同步一站式服務(wù)解決您的所有建站問(wèn)題。
swift部署略
keystone部署略
172.18.48.21 proxy01和keystone驗(yàn)證節(jié)點(diǎn)
172.18.48.22 proxy02節(jié)點(diǎn)
注:proxy01和proxy02都有環(huán)境邊變量openrc ,各節(jié)點(diǎn)swift.conf也要一樣
進(jìn)入正題:
1.keystone所在節(jié)點(diǎn)執(zhí)行:
keystone user-create --name=swift --pass=password --email=swift@example.com
keystone user-role-add --user=swift --tenant=service --role=admin
keystone user-role-add --user=swift --tenant=service --role=admin
keystone service-create --name=swift --type=object-store --description="openstack object storage"
keystone endpoint-create --service-id=$(keystone service-list | awk '/ object-store / {print $2}') --publicurl='http://172.18.48.21:8080/v1/AUTH_%(tenant_id)s' --internalurl='http://172.18.48.21:8080/v1/AUTH_%(tenant_id)s' --adminurl=http://172.18.48.21:8080
如有多個(gè)proxy節(jié)點(diǎn),可用keystone分別創(chuàng)建endpoint,注意不同的endpoint要有不同的region
比如在proxy2(172.18.48.22)節(jié)點(diǎn)添加驗(yàn)證服務(wù),只許在keystone節(jié)點(diǎn)執(zhí)行
keystone endpoint-create --region RegionTwo --service-id=$(keystone service-list | awk '/ object-store / {print $2}') --publicurl='http://172.18.48.22:8080/v1/AUTH_%(tenant_id)s' --internalurl='http://172.18.48.22:8080/v1/AUTH_%(tenant_id)s' --adminurl=http://172.18.48.22:8080
2.proxy節(jié)點(diǎn)proxy-server.conf設(shè)置如下
[DEFAULT]
bind_port = 8080
workers = 8
user = swift
[pipeline:main]
pipeline = catch_errors cache authtoken keystoneauth proxy-server
[app:proxy-server]
use = egg:swift#proxy
account_autocreate = true
[filter:keystoneauth]
use = egg:swift#keystoneauth
operator_roles = Member,admin,swift
[filter:healthcheck]
use = egg:swift#healthcheck
[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
delay_auth_decision = 10
auth_protocol = http
service_port = 5000
service_host = 172.18.48.21
auth_port = 35357
auth_host = 172.18.48.21
auth_url = http://172.18.48.21:5000/
admin_token = password
cache = swift.cache
admin_tenant_name = service
admin_user = admin
admin_password = password
[filter:cache]
use = egg:swift#memcache
set log_name = cache
memcache_servers = 172.18.48.22:11211,172.18.48.21:11211
[filter:catch_errors]
use = egg:swift#catch_errors
重啟proxy服務(wù)
swift-init proxy restart
到此,相信大家對(duì)“swift和keystone集成的配置方法”有了更深的了解,不妨來(lái)實(shí)際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!