controller:
成都創(chuàng)新互聯(lián)公司是一家集網(wǎng)站建設,安丘企業(yè)網(wǎng)站建設,安丘品牌網(wǎng)站建設,網(wǎng)站定制,安丘網(wǎng)站建設報價,網(wǎng)絡營銷,網(wǎng)絡優(yōu)化,安丘網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強企業(yè)競爭力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時我們時刻保持專業(yè)、時尚、前沿,時刻以成就客戶成長自我,堅持不斷學習、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實用型網(wǎng)站。
keystone user-create --name=swift --pass=swift --email=swift@example.com
keystone user-role-add --user=swift --tenant=service --role=admin
創(chuàng)建Object Storage Service:
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://controller:8080/v1/AUTH_%(tenant_id)s' \
--internalurl='http://controller:8080/v1/AUTH_%(tenant_id)s' \
--adminurl=http://controller:8080
all node :
mkdir -p /etc/swift
vim /etc/swift/swift.conf
[swift-hash]
swift_hash_path_prefix = xrfuniounenqjnw
swift_hash_path_suffix = fLIbertYgibbitZ
swift0節(jié)點:
yum install openstack-swift-account openstack-swift-container \
openstack-swift-object xfsprogs xinetd
配置object,container ,account 的配置文件
openstack-config --set /etc/swift/account-server.conf DEFAULT bind_ip 10.0.0.51
openstack-config --set /etc/swift/container-server.conf DEFAULT bind_ip 10.0.0.51
openstack-config --set /etc/swift/object-server.conf DEFAULT bind_ip 10.0.0.51
新添加一塊磁盤:
/dev/sdb
fdisk /dev/sdb
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 swift:swift /srv/node
vim /etc/rsyncd.conf
uid = swift
gid = swift
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
address = 10.0.1.51
[account]
max connections = 2
path = /srv/node/
read only = false
lock file = /var/lock/account.lock
[container]
max connections = 2
path = /srv/node/
read only = false
lock file = /var/lock/container.lock
[object]
max connections = 2
path = /srv/node/
read only = false
lock file = /var/lock/object.lock
vim /etc/xinetd.d/rsync
disable = no
service xinetd start
mkdir -p /var/swift/recon
chown -R swift:swift /var/swift/recon
配置 proxy-node(controller)
安裝swift-proxy的相關包:
yum install openstack-swift-proxy memcached python-swiftclient python-keystone-auth-token
//按照官方的文檔,沒有python-keystone-auth-token,變成安裝 python-keystoneclient
vim /etc/sysconfig/memcached
OPTIONS="-l 10.0.0.11"
啟動memcached的服務,加入開機啟動
service memcached restart
chkconfig memcached on
vim /etc/swift/proxy-server.conf
[DEFAULT]
bind_port = 8080
user = swift
[pipeline:main]
pipeline = healthcheck cache authtoken keystoneauth proxy-server
[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true
account_autocreate = true
[filter:keystoneauth]
use = egg:swift#keystoneauth
operator_roles = Member,admin,swiftoperator
[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
# Delaying the auth decision is required to support token-less
# usage for anonymous referrers ('.r:*').
delay_auth_decision = true
# auth_* settings refer to the Keystone server
auth_protocol = http
auth_host = controller
auth_port = 35357
# the service tenant and swift username and password created in Keystone
admin_tenant_name = service
admin_user = swift
admin_password = swift
[filter:cache]
use = egg:swift#memcache
[filter:catch_errors]
use = egg:swift#catch_errors
[filter:healthcheck]
use = egg:swift#healthcheck
構(gòu)建ring:
cd /etc/swift
swift-ring-builder account.builder create 18 3 1
swift-ring-builder container.builder create 18 3 1
swift-ring-builder object.builder create 18 3 1
swift-ring-builder account.builder add z1-10.0.0.51:6002R10.0.0.51:6005/sdb1 100
swift-ring-builder container.builder add z1-10.0.0.51:6001R10.0.0.51:6004/sdb1 100
swift-ring-builder object.builder add z1-10.0.0.51:6000R10.0.0.51:6003/sdb1 100
swift-ring-builder account.builder
swift-ring-builder container.builder
swift-ring-builder object.builder
swift-ring-builder account.builder rebalance
swift-ring-builder container.builder rebalance
swift-ring-builder object.builder rebalance
拷貝所有的ring.tar.gz文件到storage node
scp *ring.gz root@10.0.0.51:/etc/swift
若沒有scp命令,執(zhí)行:
yum install -y openssh-clients
chown -R swift:swift /etc/swift
service openstack-swift-proxy restart
chkconfig openstack-swift-proxy on
啟動對象存儲節(jié)點的服務,加入到開機啟動
service openstack-swift-object restart
service openstack-swift-object-replicator restart
service openstack-swift-object-updater restart
service openstack-swift-object-auditor restart
service openstack-swift-container start
service openstack-swift-container-replicator restart
service openstack-swift-container-updater restart
service openstack-swift-container-auditor restart
service openstack-swift-account restart
service openstack-swift-account-replicator restart
service openstack-swift-account-reaper restart
service openstack-swift-account-auditor restart
chkconfig openstack-swift-object on
chkconfig openstack-swift-object-replicator on
chkconfig openstack-swift-object-updater on
chkconfig openstack-swift-object-auditor on
chkconfig openstack-swift-container on
chkconfig openstack-swift-container-replicator on
chkconfig openstack-swift-container-updater on
chkconfig openstack-swift-container-auditor on
chkconfig openstack-swift-account on
chkconfig openstack-swift-account-replicator on
chkconfig openstack-swift-account-reaper on
chkconfig openstack-swift-account-auditor on
或者是一次啟動:
swift-init all start
controller節(jié)點驗證swift服務
source admin-openrc.sh
swift stat
swift upload myfiles test.txt
swift upload myfiles test2.txt
網(wǎng)站題目:swift手工搭建
網(wǎng)頁URL:http://muchs.cn/article0/igeioo.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設計公司、外貿(mào)網(wǎng)站建設、軟件開發(fā)、做網(wǎng)站、靜態(tài)網(wǎng)站、品牌網(wǎng)站制作
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)