openstack-manuals/doc/install-guide/source/swift-storage-install.rst
Matthew Kassawara 5eb78aad48 [install] Liberty updates for swift
Update swift configuration for Liberty. Includes moving
basic host configuration of object storage nodes to
environment section. Also addresses some consistency
issues, mostly from the RST conversion.

Changes and testing specific to distribution packages
primarily involve Ubuntu. Other distributions may require
additional patches.

Change-Id: I00c9f9fbc3700ebf0423a4c1ac92ff6863852df6
Implements: blueprint installguide-liberty
2015-10-07 16:37:24 -06:00

6.0 KiB

Install and configure the storage nodes

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.

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.

  1. Install the supporting utility packages:

    ubuntu or debian

    # apt-get install xfsprogs rsync

    rdo

    # yum install xfsprogs rsync

    obs

    # zypper install xfsprogs rsync
  2. Format the /dev/sdb and /dev/sdc devices as XFS:

    # mkfs.xfs /dev/sdb
    # mkfs.xfs /dev/sdc
  3. Create the mount point directory structure:

    # mkdir -p /srv/node/sdb
    # mkdir -p /srv/node/sdc
  4. 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
  5. Mount the devices:

    # mount /srv/node/sdb
    # mount /srv/node/sdc
  6. Edit the /etc/rsyncd.conf file and add the following to it:

    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.

ubuntu or debian

  1. Edit the /etc/default/rsync file and enable the rsync service:

    RSYNC_ENABLE=true
  2. Start the rsync service:

    # service rsync start

obs or rdo

  1. Start the rsyncd service and configure it to start when the system boots:

    # systemctl enable rsyncd.service
    # systemctl start rsyncd.service

Install and configure components

Note

Perform these steps on each storage node.

  1. Install the packages:

    ubuntu or debian

    # apt-get install swift swift-account swift-container swift-object

    rdo

    # yum install openstack-swift-account openstack-swift-container \
      openstack-swift-object

    obs

    # zypper install openstack-swift-account \
      openstack-swift-container openstack-swift-object python-xml

ubuntu or rdo or debian

  1. Obtain the accounting, container, object, container-reconciler, and object-expirer 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/liberty
    # curl -o /etc/swift/container-server.conf \
      https://git.openstack.org/cgit/openstack/swift/plain/etc/container-server.conf-sample?h=stable/liberty
    # curl -o /etc/swift/object-server.conf \
      https://git.openstack.org/cgit/openstack/swift/plain/etc/object-server.conf-sample?h=stable/liberty
    # curl -o /etc/swift/container-reconciler.conf \
      https://git.openstack.org/cgit/openstack/swift/plain/etc/container-reconciler.conf-sample?h=stable/liberty
    # curl -o /etc/swift/object-expirer.conf \
      https://git.openstack.org/cgit/openstack/swift/plain/etc/object-expirer.conf-sample?h=stable/liberty
  2. Ensure proper ownership of the mount point directory structure:

    # chown -R root:swift /srv/node
  3. Create the recon directory and ensure proper ownership of it:

    # mkdir -p /var/cache/swift
    # chown -R root:swift /var/cache/swift

obs

  1. Ensure proper ownership of the mount point directory structure:

    # chown -R root:swift /srv/node
  2. Create the recon directory and ensure proper ownership of it:

    # mkdir -p /var/cache/swift
    # chown -R root:swift /var/cache/swift