Swift Hand-built

Source: Internet
Author: User
Tags scp command

Controller


Keystone User-create--name=swift--pass=swift [email protected]

Keystone User-role-add--user=swift--tenant=service--role=admin


Create an 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 $} ') \

--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 node:

Yum install Openstack-swift-account openstack-swift-container \

Openstack-swift-object Xfsprogs xinetd




Configure Object,container, account configuration file

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


Add a new disk:


/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



Configuring Proxy-node (Controller)


To install Swift-proxy related packages:

Yum install openstack-swift-proxy memcached python-swiftclient Python-keystone-auth-token


According to the official documentation, no Python-keystone-auth-token, became installed Python-keystoneclient


Vim/etc/sysconfig/memcached

Options= "-L 10.0.0.11"


Start the memcached service and join the boot boot


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


Building the 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


Copy all ring.tar.gz files to storage node


SCP *ring.gz [Email protected]:/etc/swift


If there is no SCP command, execute:

Yum Install-y openssh-clients


Chown-r Swift:swift/etc/swift


Service Openstack-swift-proxy Restart

Chkconfig Openstack-swift-proxy on



Start the service of the object storage node, add to boot boot


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


or a boot:


Swift-init all start


Controller node verifies swift service


SOURCE admin-openrc.sh


Swift Stat

Swift Upload myfiles test.txt

Swift Upload Myfiles test2.txt

This article is from the "Gaogaozi" blog, make sure to keep this source http://hangtiangazi.blog.51cto.com/8584103/1675951

Swift Hand-built

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.