This adds swift-specific contents from the OpenStack Installation Guide in the swift repo per [1]. A separate change will remove the swift contents from the OpenStack Installation Guide for Newton per [2]. The swift install-guide structure is based on the Install Guide Cookiecutter [3]. Also adds tox.ini environment for install-guide and adds openstackdocs-theme to test-requirements.txt. [1] http://specs.openstack.org/openstack/docs-specs/specs/newton/project-specific-installguides.html [2] http://specs.openstack.org/openstack/docs-specs/specs/newton/installguide.html [3] http://git.openstack.org/cgit/openstack/installguide-cookiecutter/ Change-Id: I59b92eebaf5acc657b97bcf10d9ff2cf2db05885 Partially-Implements: blueprint projectspecificinstallguides Depends-On: Ifebc65b188c4f2ba35b61c0deae5ec24401df7f9
4.5 KiB
Install and configure the storage nodes for Ubuntu and Debian
This section describes how to install and configure storage nodes
that operate the account, container, and object services. For
simplicity, this configuration references two storage nodes, each
containing two empty local block storage devices. The instructions use
/dev/sdb
and /dev/sdc
, but you can substitute
different values for your particular nodes.
Although Object Storage supports any file system with extended attributes (xattr), testing and benchmarking indicate the best performance and reliability on XFS. For more information on horizontally scaling your environment, see the Deployment Guide.
This section applies to Ubuntu 14.04 (LTS) and Debian.
Prerequisites
Before you install and configure the Object Storage service on the storage nodes, you must prepare the storage devices.
Note
Perform these steps on each storage node.
Install the supporting utility packages:
# apt-get install xfsprogs rsync
Format the
/dev/sdb
and/dev/sdc
devices as XFS:# mkfs.xfs /dev/sdb # mkfs.xfs /dev/sdc
Create the mount point directory structure:
# mkdir -p /srv/node/sdb # mkdir -p /srv/node/sdc
Edit the
/etc/fstab
file and add the following to it:/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
Mount the devices:
# mount /srv/node/sdb # mount /srv/node/sdc
Create or edit the
/etc/rsyncd.conf
file to contain the following:uid = swift gid = swift log file = /var/log/rsyncd.log pid file = /var/run/rsyncd.pid address = MANAGEMENT_INTERFACE_IP_ADDRESS [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
Replace
MANAGEMENT_INTERFACE_IP_ADDRESS
with the IP address of the management network on the storage node.Note
The
rsync
service requires no authentication, so consider running it on a private network in production environments.Edit the
/etc/default/rsync
file and enable thersync
service:RSYNC_ENABLE=true
Start the
rsync
service:# service rsync start
Install and configure components
Note
Default configuration files vary by distribution. You might need to
add these sections and options rather than modifying existing sections
and options. Also, an ellipsis (...
) in the configuration
snippets indicates potential default configuration options that you
should retain.
Note
Perform these steps on each storage node.
Install the packages:
# apt-get install swift swift-account swift-container swift-object
Obtain the accounting, container, and object service configuration files from the Object Storage source repository:
# curl -o /etc/swift/account-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/account-server.conf-sample?h=stable/mitaka # curl -o /etc/swift/container-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/container-server.conf-sample?h=stable/mitaka # curl -o /etc/swift/object-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/object-server.conf-sample?h=stable/mitaka
Ensure proper ownership of the mount point directory structure:
# chown -R swift:swift /srv/node
Create the
recon
directory and ensure proper ownership of it:# mkdir -p /var/cache/swift # chown -R root:swift /var/cache/swift # chmod -R 775 /var/cache/swift