OpenStack Swift Node Installation manual 1-node configuration

Source: Internet
Author: User
Tags openstack swift



This article refers to the official tutorial: http://docs.openstack.org/project-install-guide/object-storage/draft/environment-networking.html



The SWIFT node name we want to set is Object1, both the master node and the proxy node are controllers.



In the Controller node's/etc/hosts file to write the node name and IP address, must be able to ping the address, similarly, the swift node's/etc/hosts file to write various addresses.



On the controller node, do the following:




Source /root/admin-openrc.sh #The profile must be found


To create a swift user:




OpenStack user Create--domain default--password-prompt Swift


Assigning Admin role permissions to Swift users




OpenStack role Add--project service--user Swift Admin


To create a swift service:




OpenStack Service Create--name Swift  --description "OpenStack Object Storage" Object-store


Create Endpoints:


OpenStack Endpoint Create--region regionone object-store public http://controller:8080/v1/auth_%\ (tenant_id\) s
OpenStack Endpoint Create--region regionone object-store internal http://controller:8080/v1/auth_%\ (tenant_id\) s
OpenStack Endpoint Create--region regionone object-store admin http://controller:8080/v1


Install the required components:




Memcached 


To download the configuration file:








curl -o /etc/swift/proxy-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/proxy-server.conf-sample?h=stable/newton

To modify the configuration file/etc/swift/proxy-server.conf:






[DEFAULT]
bind_port = 8080
user = swift
swift_dir = /etc/swift




[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-server


 
 
[app:proxy-server]
use = egg:swift#proxy
...
account_autocreate = True
[filter:keystoneauth]
use = egg:swift#keystoneauth
...
operator_roles = admin,use


[filter:authtoken]
Paste.filter_factory = keystonemiddleware.auth_token:filter_factory
...
Auth_uri = http://controller:5000
Auth_url = http://controller:35357
Memcached_servers = controller:11211 #This sometimes needs to be changed to 127.0.0.1:11211
Auth_type = password
Project_domain_name = default
User_domain_name = default
Project_name = service
Username = swift
Password = the password of the swift user to be set
Delay_auth_decision = True


[filter:cache]
Use = egg:swift#memcache
...
Memcache_servers = controller:11211 #This sometimes needs to be changed to 127.0.0.1:11211


The next step is to operate on the storage node, the Swift node, and if there are multiple nodes, it needs to be executed on each node machine.
To install dependent components:




Yum Install Xfsprogs rsync


Pre-connect several unformatted hard drives, do not mount and format them, and then execute the following commands, typically two to three blocks




Mkfs.xfs/dev/sdbMKFS.XFS/DEV/SDC Mkfs.xfs/dev/sdd 


Create the corresponding Mount node directory:




Mkdir-p/srv/node/sdbmkdir-p/SRV/NODE/SDC Mkdir-p/SRV/NODE/SDD


Modify the following file/etc/fstab:


/dev/sdb/srv/node/sdb xfs noatime,nodiratime,nobarrier,logbufs=8 0 2
/dev/sdc/srv/node/sdc xfs Noatime,nodiratime, Nobarrier,logbufs=8 0 2
/DEV/SDD/SRV/NODE/SDD XFS noatime,nodiratime,nobarrier,logbufs=8 0 2



Mounting PLATE:




Mount/srv/node/sdbMOUNT/SRV/NODE/SDC Mount/srv/node/sdd


To modify the/etc/rsyncd.conf file:


Uid = swift
Gid = swift
Log file = /var/log/rsyncd.log
Pid file = /var/run/rsyncd.pid
Address = address used by the storage node for external access
[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



To create and restart a service:




Enable Rsyncd.servicesystemctl start Rsyncd.service 


The above is the installation configuration for the proxy connection component, followed by the account component configuration, first install the component package:




Openstack-swift-object 


To modify the/etc/swift/account-server.conf file:




[DEFAULT]
...
Bind_ip = storage (swift) node connection address for external access
Bind_port = 6002
User = swift
Swift_dir = /etc/swift
Devices = /srv/node
Mount_check = True




[pipeline:main]
pipeline = healthcheck recon account-server




[filter:recon]
use = egg:swift#recon
...
recon_cache_path = /var/cache/swift


Modify the configuration file for container/etc/swift/container-server.conf:




[Default]...bind_ip =storage (Swift) node connection address for external access
Bind_port = 6001 Mount_check = True 


[Pipeline:main]pipeline = Healthcheck Recon Container-server


[Filter:recon]use = Egg:swift#recon...recon_cache_path =/var/cache/swift


Modify the object configuration file/etc/swift/object-server.conf:




[Default]...bind_ip =storage (Swift) node connection address for external access  Mount_check = True 


[Pipeline:main]pipeline = Healthcheck Recon Object-server


[Filter:recon]use = Egg:swift#recon...recon_cache_path =/var/cache/swiftrecon_lock_path =/var/lock


Assigning permissions to a node






chown -R swift:swift /srv/node mkdir -p /var/cache/swift chown -R root:swift /var/cache/swift
chmod -R 775 /var/cache/swift

OpenStack Swift Node Installation manual 1-node configuration


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.