[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
This commit is contained in:
Matthew Kassawara 2015-10-06 16:35:02 -06:00
parent 0b4b57dbb9
commit 5eb78aad48
15 changed files with 556 additions and 453 deletions

View File

@ -76,6 +76,15 @@ Configure name resolution
# compute1 # compute1
10.0.0.31 compute1 10.0.0.31 compute1
# block1
10.0.0.41 block1
# object1
10.0.0.51 object1
# object2
10.0.0.52 object2
.. warning:: .. warning::
Some distributions add an extraneous entry in the :file:`/etc/hosts` Some distributions add an extraneous entry in the :file:`/etc/hosts`
@ -83,3 +92,8 @@ Configure name resolution
address such as ``127.0.1.1``. You must comment out or remove this address such as ``127.0.1.1``. You must comment out or remove this
entry to prevent name resolution problems. **Do not remove the entry to prevent name resolution problems. **Do not remove the
127.0.0.1 entry.** 127.0.0.1 entry.**
.. note::
To reduce complexity of this guide, we add host entries for optional
services regardless of whether you choose to deploy them.

View File

@ -72,6 +72,15 @@ Configure name resolution
# compute1 # compute1
10.0.0.31 compute1 10.0.0.31 compute1
# block1
10.0.0.41 block1
# object1
10.0.0.51 object1
# object2
10.0.0.52 object2
.. warning:: .. warning::
Some distributions add an extraneous entry in the :file:`/etc/hosts` Some distributions add an extraneous entry in the :file:`/etc/hosts`
@ -79,3 +88,8 @@ Configure name resolution
address such as ``127.0.1.1``. You must comment out or remove this address such as ``127.0.1.1``. You must comment out or remove this
entry to prevent name resolution problems. **Do not remove the entry to prevent name resolution problems. **Do not remove the
127.0.0.1 entry.** 127.0.0.1 entry.**
.. note::
To reduce complexity of this guide, we add host entries for optional
services regardless of whether you choose to deploy them.

View File

@ -0,0 +1,101 @@
Object storage nodes (Optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you want to deploy the Object Storage service, configure two
additional storage nodes.
First node
----------
Configure network interfaces
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Configure the management interface:
IP address: 10.0.0.51
Network mask: 255.255.255.0 (or /24)
Default gateway: 10.0.0.1
Configure name resolution
^^^^^^^^^^^^^^^^^^^^^^^^^
#. Set the hostname of the node to ``object1``.
#. Edit the ``/etc/hosts`` file to contain the following:
.. code-block:: ini
# controller
10.0.0.11 controller
# compute1
10.0.0.31 compute1
# block1
10.0.0.41 block1
# object1
10.0.0.51 object1
# object2
10.0.0.52 object2
.. warning::
Some distributions add an extraneous entry in the ``/etc/hosts``
file that resolves the actual hostname to another loopback IP
address such as ``127.0.1.1``. You must comment out or remove this
entry to prevent name resolution problems. **Do not remove the
127.0.0.1 entry.**
#. Reboot the system to activate the changes.
Second node
-----------
Configure network interfaces
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#. Configure the management interface:
IP address: 10.0.0.52
Network mask: 255.255.255.0 (or /24)
Default gateway: 10.0.0.1
Configure name resolution
^^^^^^^^^^^^^^^^^^^^^^^^^
#. Set the hostname of the node to ``object2``.
#. Edit the ``/etc/hosts`` file to contain the following:
.. code-block:: ini
# controller
10.0.0.11 controller
# compute1
10.0.0.31 compute1
# block1
10.0.0.41 block1
# object1
10.0.0.51 object1
# object2
10.0.0.52 object2
.. warning::
Some distributions add an extraneous entry in the ``/etc/hosts``
file that resolves the actual hostname to another loopback IP
address such as ``127.0.1.1``. You must comment out or remove this
entry to prevent name resolution problems. **Do not remove the
127.0.0.1 entry.**
#. Reboot the system to activate the changes.

View File

@ -122,4 +122,5 @@ the controller node.
environment-networking-controller.rst environment-networking-controller.rst
environment-networking-compute.rst environment-networking-compute.rst
environment-networking-storage-swift.rst
environment-networking-verify.rst environment-networking-verify.rst

View File

@ -1,11 +1,10 @@
Edit the :file:`/etc/swift/proxy-server.conf` file and complete the Edit the ``/etc/swift/proxy-server.conf`` file and complete the
following actions: following actions:
* In the ``[DEFAULT]`` section, configure the bind port, user, and * In the ``[DEFAULT]`` section, configure the bind port, user, and
configuration directory: configuration directory:
.. code-block:: ini .. code-block:: ini
:linenos:
[DEFAULT] [DEFAULT]
... ...
@ -16,12 +15,11 @@ following actions:
* In the ``[pipeline:main]`` section, enable the appropriate modules: * In the ``[pipeline:main]`` section, enable the appropriate modules:
.. code-block:: ini .. code-block:: ini
:linenos:
[pipeline:main] [pipeline:main]
pipeline = catch_errors gatekeeper healthcheck proxy-logging cache \ pipeline = catch_errors gatekeeper healthcheck proxy-logging cache
container_sync bulk ratelimit authtoken keystoneauth container-quotas \ container_sync bulk ratelimit authtoken keystoneauth container-quotas
account-quotas slo dlo proxy-logging proxy-server account-quotas slo dlo versioned_writes proxy-logging proxy-server
.. note:: .. note::
@ -48,7 +46,6 @@ following actions:
* In the ``[filter:authtoken]`` section, configure Identity service access: * In the ``[filter:authtoken]`` section, configure Identity service access:
.. code-block:: ini .. code-block:: ini
:linenos:
[filter:authtoken] [filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory paste.filter_factory = keystonemiddleware.auth_token:filter_factory
@ -74,7 +71,6 @@ following actions:
* In the ``[filter:cache]`` section, configure the ``memcached`` location: * In the ``[filter:cache]`` section, configure the ``memcached`` location:
.. code-block:: ini .. code-block:: ini
:linenos:
[filter:cache] [filter:cache]
... ...

View File

@ -1,6 +1,7 @@
========================================= .. _swift-controller:
Install and configure the controller node Install and configure the controller node
========================================= ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This section describes how to install and configure the proxy service that This section describes how to install and configure the proxy service that
handles requests for the account, container, and object services operating handles requests for the account, container, and object services operating
@ -11,8 +12,8 @@ Additionally, you can install and configure the proxy service on multiple
nodes to increase performance and redundancy. For more information, see the nodes to increase performance and redundancy. For more information, see the
`Deployment Guide <http://docs.openstack.org/developer/swift/deployment_guide.html>`__. `Deployment Guide <http://docs.openstack.org/developer/swift/deployment_guide.html>`__.
To configure prerequisites Prerequisites
~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------
The proxy service relies on an authentication and authorization mechanism such The proxy service relies on an authentication and authorization mechanism such
as the Identity service. However, unlike other services, it also offers an as the Identity service. However, unlike other services, it also offers an
@ -38,30 +39,27 @@ create service credentials and an API endpoint.
.. code-block:: console .. code-block:: console
$ openstack user create --password-prompt swift $ openstack user create --domain default --password-prompt swift
User Password: User Password:
Repeat User Password: Repeat User Password:
+----------+----------------------------------+ +-----------+----------------------------------+
| Field | Value | | Field | Value |
+----------+----------------------------------+ +-----------+----------------------------------+
| email | None | | domain_id | default |
| enabled | True | | enabled | True |
| id | d535e5cbd2b74ac7bfb97db9cced3ed6 | | id | d535e5cbd2b74ac7bfb97db9cced3ed6 |
| name | swift | | name | swift |
| username | swift | +-----------+----------------------------------+
+----------+----------------------------------+
* Add the ``admin`` role to the ``swift`` user: * Add the ``admin`` role to the ``swift`` user:
.. code-block:: console .. code-block:: console
$ openstack role add --project service --user swift admin $ openstack role add --project service --user swift admin
+-------+----------------------------------+
| Field | Value | .. note::
+-------+----------------------------------+
| id | cd2cb9a39e874ea69e5d4b896eb16128 | This command provides no output.
| name | admin |
+-------+----------------------------------+
* Create the ``swift`` service entity: * Create the ``swift`` service entity:
@ -79,65 +77,97 @@ create service credentials and an API endpoint.
| type | object-store | | type | object-store |
+-------------+----------------------------------+ +-------------+----------------------------------+
#. Create the Object Storage service API endpoint: #. Create the Object Storage service API endpoints:
.. code-block:: console .. code-block:: console
$ openstack endpoint create \ $ openstack endpoint create --region RegionOne \
--publicurl 'http://controller:8080/v1/AUTH_%(tenant_id)s' \ object-store public http://controller:8080/v1/AUTH_%\(tenant_id\)s
--internalurl 'http://controller:8080/v1/AUTH_%(tenant_id)s' \
--adminurl http://controller:8080 \
--region RegionOne \
object-store
+--------------+----------------------------------------------+ +--------------+----------------------------------------------+
| Field | Value | | Field | Value |
+--------------+----------------------------------------------+ +--------------+----------------------------------------------+
| adminurl | http://controller:8080/ | | enabled | True |
| id | af534fb8b7ff40a6acf725437c586ebe | | id | 12bfd36f26694c97813f665707114e0d |
| internalurl | http://controller:8080/v1/AUTH_%(tenant_id)s | | interface | public |
| publicurl | http://controller:8080/v1/AUTH_%(tenant_id)s |
| region | RegionOne | | region | RegionOne |
| region_id | RegionOne |
| service_id | 75ef509da2c340499d454ae96a2c5c34 | | service_id | 75ef509da2c340499d454ae96a2c5c34 |
| service_name | swift | | service_name | swift |
| service_type | object-store | | service_type | object-store |
| url | http://controller:8080/v1/AUTH_%(tenant_id)s |
+--------------+----------------------------------------------+ +--------------+----------------------------------------------+
To install and configure the controller node components $ openstack endpoint create --region RegionOne \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ object-store internal http://controller:8080/v1/AUTH_%\(tenant_id\)s
+--------------+----------------------------------------------+
| Field | Value |
+--------------+----------------------------------------------+
| enabled | True |
| id | 7a36bee6733a4b5590d74d3080ee6789 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 75ef509da2c340499d454ae96a2c5c34 |
| service_name | swift |
| service_type | object-store |
| url | http://controller:8080/v1/AUTH_%(tenant_id)s |
+--------------+----------------------------------------------+
$ openstack endpoint create --region RegionOne \
object-store admin http://controller:8080/v1
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | ebb72cd6851d4defabc0b9d71cdca69b |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 75ef509da2c340499d454ae96a2c5c34 |
| service_name | swift |
| service_type | object-store |
| url | http://controller:8080/v1 |
+--------------+----------------------------------+
Install and configure components
--------------------------------
.. include:: shared/note_configuration_vary_by_distribution.rst .. include:: shared/note_configuration_vary_by_distribution.rst
#. Install the packages: #. Install the packages:
.. only:: ubuntu or debian
.. code-block:: console
# apt-get install swift swift-proxy python-swiftclient \
python-keystoneclient python-keystonemiddleware \
memcached
.. only:: rdo
.. code-block:: console
# yum install openstack-swift-proxy python-swiftclient \
python-keystone-auth-token python-keystonemiddleware \
memcached
.. only:: obs
.. code-block:: console
# zypper install openstack-swift-proxy python-swiftclient \
python-keystoneclient python-keystonemiddleware \
python-xml memcached
.. note:: .. note::
Complete OpenStack environments already include some of these Complete OpenStack environments already include some of these
packages. packages.
.. only:: ubuntu or debian
.. code-block:: console
# apt-get install swift swift-proxy python-swiftclient python-keystoneclient \
python-keystonemiddleware memcached
.. only:: rdo
.. code-block:: console
# yum install openstack-swift-proxy python-swiftclient python-keystone-auth-token \
python-keystonemiddleware memcached
.. only:: obs
.. code-block:: console
# zypper install openstack-swift-proxy python-swiftclient python-keystoneclient \
python-keystonemiddleware python-xml memcached
.. only:: ubuntu or debian .. only:: ubuntu or debian
2. Create the :file:`/etc/swift` directory. 2. Create the ``/etc/swift`` directory.
3. Obtain the proxy service configuration file from the Object Storage 3. Obtain the proxy service configuration file from the Object Storage
source repository: source repository:
@ -146,7 +176,7 @@ To install and configure the controller node components
# curl -o /etc/swift/proxy-server.conf \ # curl -o /etc/swift/proxy-server.conf \
https://git.openstack.org/cgit/openstack/swift/plain/etc/ \ https://git.openstack.org/cgit/openstack/swift/plain/etc/ \
proxy-server.conf-sample?h=stable/kilo proxy-server.conf-sample?h=stable/liberty
.. only:: rdo .. only:: rdo
@ -157,16 +187,16 @@ To install and configure the controller node components
# curl -o /etc/swift/proxy-server.conf \ # curl -o /etc/swift/proxy-server.conf \
https://git.openstack.org/cgit/openstack/swift/plain/etc/ \ https://git.openstack.org/cgit/openstack/swift/plain/etc/ \
proxy-server.conf-sample?h=stable/kilo proxy-server.conf-sample?h=stable/liberty
.. only:: obs .. only:: obs
2. .. include:: swift-controller-node-include.txt 2. .. include:: swift-controller-include.txt
.. only:: rdo .. only:: rdo
3. .. include:: swift-controller-node-include.txt 3. .. include:: swift-controller-include.txt
.. only:: ubuntu .. only:: ubuntu
4. .. include:: swift-controller-node-include.txt 4. .. include:: swift-controller-include.txt

View File

@ -1,29 +1,25 @@
=====================
Finalize installation Finalize installation
===================== ~~~~~~~~~~~~~~~~~~~~~
**Configure hashes and default storage policy**
.. include:: shared/note_configuration_vary_by_distribution.rst .. include:: shared/note_configuration_vary_by_distribution.rst
.. only:: ubuntu or rdo or debian .. only:: ubuntu or rdo or debian
#. Obtain the :file:`/etc/swift/swift.conf` file from the Object #. Obtain the ``/etc/swift/swift.conf`` file from the Object
Storage source repository: Storage source repository:
.. code-block:: console .. code-block:: console
# curl -o /etc/swift/swift.conf \ # curl -o /etc/swift/swift.conf \
https://git.openstack.org/cgit/openstack/swift/plain/etc/swift.conf-sample?h=stable/kilo https://git.openstack.org/cgit/openstack/swift/plain/etc/swift.conf-sample?h=stable/liberty
#. Edit the :file:`/etc/swift/swift.conf` file and complete the following #. Edit the ``/etc/swift/swift.conf`` file and complete the following
actions: actions:
a. In the ``[swift-hash]`` section, configure the hash path prefix and a. In the ``[swift-hash]`` section, configure the hash path prefix and
suffix for your environment. suffix for your environment.
.. code-block:: ini .. code-block:: ini
:linenos:
[swift-hash] [swift-hash]
... ...
@ -40,26 +36,24 @@ Finalize installation
storage policy: storage policy:
.. code-block:: ini .. code-block:: ini
:linenos:
[storage-policy:0] [storage-policy:0]
... ...
name = Policy-0 name = Policy-0
default = yes default = yes
#. Copy the :file:`swift.conf` file to the :file:`/etc/swift` directory on #. Copy the ``swift.conf`` file to the ``/etc/swift`` directory on
each storage node and any additional nodes running the proxy service. each storage node and any additional nodes running the proxy service.
.. only:: obs .. only:: obs
#. Edit the :file:`/etc/swift/swift.conf` file and complete the following #. Edit the ``/etc/swift/swift.conf`` file and complete the following
actions: actions:
a. In the ``[swift-hash]`` section, configure the hash path prefix and a. In the ``[swift-hash]`` section, configure the hash path prefix and
suffix for your environment. suffix for your environment.
.. code-block:: ini .. code-block:: ini
:linenos:
[swift-hash] [swift-hash]
... ...
@ -76,14 +70,13 @@ Finalize installation
storage policy: storage policy:
.. code-block:: ini .. code-block:: ini
:linenos:
[storage-policy:0] [storage-policy:0]
... ...
name = Policy-0 name = Policy-0
default = yes default = yes
#. Copy the :file:`swift.conf` file to the :file:`/etc/swift` directory on #. Copy the ``swift.conf`` file to the ``/etc/swift`` directory on
each storage node and any additional nodes running the proxy service. each storage node and any additional nodes running the proxy service.
.. only:: ubuntu or debian .. only:: ubuntu or debian
@ -92,7 +85,7 @@ Finalize installation
.. code-block:: console .. code-block:: console
# chown -R swift:swift /etc/swift # chown -R root:swift /etc/swift
5. On the controller node and any other nodes running the proxy service, 5. On the controller node and any other nodes running the proxy service,
restart the Object Storage proxy service including its dependencies: restart the Object Storage proxy service including its dependencies:
@ -120,7 +113,7 @@ Finalize installation
.. code-block:: console .. code-block:: console
# chown -R swift:swift /etc/swift # chown -R root:swift /etc/swift
5. On the controller node and any other nodes running the proxy service, 5. On the controller node and any other nodes running the proxy service,
start the Object Storage proxy service including its dependencies and start the Object Storage proxy service including its dependencies and
@ -155,7 +148,7 @@ Finalize installation
.. code-block:: console .. code-block:: console
# chown -R swift:swift /etc/swift # chown -R root:swift /etc/swift
4. On the controller node and any other nodes running the proxy service, 4. On the controller node and any other nodes running the proxy service,
start the Object Storage proxy service including its dependencies and start the Object Storage proxy service including its dependencies and

View File

@ -1,6 +1,5 @@
==================== Create and distribute initial rings
Create initial rings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
====================
Before starting the Object Storage services, you must create the initial Before starting the Object Storage services, you must create the initial
account, container, and object rings. The ring builder creates configuration account, container, and object rings. The ring builder creates configuration
@ -12,16 +11,17 @@ directory on a storage device rather than a conventional partition table.
For more information, see the For more information, see the
`Deployment Guide <http://docs.openstack.org/developer/swift/deployment_guide.html>`__. `Deployment Guide <http://docs.openstack.org/developer/swift/deployment_guide.html>`__.
Account ring .. note::
~~~~~~~~~~~~ Perform these steps on the controller node.
Create account ring
-------------------
The account server uses the account ring to maintain lists of containers. The account server uses the account ring to maintain lists of containers.
To create the ring perform the following steps on the controller node. #. Change to the ``/etc/swift`` directory.
#. Change to the :file:`/etc/swift` directory. #. Create the base ``account.builder`` file:
#. Create the base :file:`account.builder` file:
.. code-block:: console .. code-block:: console
@ -42,13 +42,13 @@ To create the ring perform the following steps on the controller node.
Replace ``STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS`` with the IP address Replace ``STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS`` with the IP address
of the management network on the storage node. Replace ``DEVICE_NAME`` with a of the management network on the storage node. Replace ``DEVICE_NAME`` with a
storage device name on the same storage node. For example, using the first storage device name on the same storage node. For example, using the first
storage node in :doc:`swift-storage-node` with the :file:`/dev/sdb1` storage storage node in :ref:`swift-storage` with the ``/dev/sdb`` storage
device and weight of 100: device and weight of 100:
.. code-block:: console .. code-block:: console
# swift-ring-builder account.builder add \ # swift-ring-builder account.builder add \
--region 1 --zone 1 --ip 10.0.0.51 --port 6002 --device sdb1 --weight 100 --region 1 --zone 1 --ip 10.0.0.51 --port 6002 --device sdb --weight 100
Repeat this command for each storage device on each storage node. In the Repeat this command for each storage device on each storage node. In the
example architecture, use the command in four variations: example architecture, use the command in four variations:
@ -56,17 +56,17 @@ To create the ring perform the following steps on the controller node.
.. code-block:: console .. code-block:: console
# swift-ring-builder account.builder add \ # swift-ring-builder account.builder add \
--region 1 --zone 1 --ip 10.0.0.51 --port 6002 --device sdb1 --weight 100 --region 1 --zone 1 --ip 10.0.0.51 --port 6002 --device sdb --weight 100
Device d0r1z1-10.0.0.51:6002R10.0.0.51:6002/sdb1_"" with 100.0 weight got id 0 Device d0r1z1-10.0.0.51:6002R10.0.0.51:6002/sdb_"" with 100.0 weight got id 0
# swift-ring-builder account.builder add \ # swift-ring-builder account.builder add \
--region 1 --zone 2 --ip 10.0.0.51 --port 6002 --device sdc1 --weight 100 --region 1 --zone 2 --ip 10.0.0.51 --port 6002 --device sdc --weight 100
Device d1r1z2-10.0.0.51:6002R10.0.0.51:6002/sdc1_"" with 100.0 weight got id 1 Device d1r1z2-10.0.0.51:6002R10.0.0.51:6002/sdc_"" with 100.0 weight got id 1
# swift-ring-builder account.builder add \ # swift-ring-builder account.builder add \
--region 1 --zone 3 --ip 10.0.0.52 --port 6002 --device sdb1 --weight 100 --region 1 --zone 3 --ip 10.0.0.52 --port 6002 --device sdb --weight 100
Device d2r1z3-10.0.0.52:6002R10.0.0.52:6002/sdb1_"" with 100.0 weight got id 2 Device d2r1z3-10.0.0.52:6002R10.0.0.52:6002/sdb_"" with 100.0 weight got id 2
# swift-ring-builder account.builder add \ # swift-ring-builder account.builder add \
--region 1 --zone 4 --ip 10.0.0.52 --port 6002 --device sdc1 --weight 100 --region 1 --zone 4 --ip 10.0.0.52 --port 6002 --device sdc --weight 100
Device d3r1z4-10.0.0.52:6002R10.0.0.52:6002/sdc1_"" with 100.0 weight got id 3 Device d3r1z4-10.0.0.52:6002R10.0.0.52:6002/sdc_"" with 100.0 weight got id 3
#. Verify the ring contents: #. Verify the ring contents:
@ -78,10 +78,10 @@ To create the ring perform the following steps on the controller node.
The minimum number of hours before a partition can be reassigned is 1 The minimum number of hours before a partition can be reassigned is 1
The overload factor is 0.00% (0.000000) The overload factor is 0.00% (0.000000)
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
0 1 1 10.0.0.51 6002 10.0.0.51 6002 sdb1 100.00 0 -100.00 0 1 1 10.0.0.51 6002 10.0.0.51 6002 sdb 100.00 0 -100.00
1 1 2 10.0.0.51 6002 10.0.0.51 6002 sdc1 100.00 0 -100.00 1 1 2 10.0.0.51 6002 10.0.0.51 6002 sdc 100.00 0 -100.00
2 1 3 10.0.0.52 6002 10.0.0.52 6002 sdb1 100.00 0 -100.00 2 1 3 10.0.0.52 6002 10.0.0.52 6002 sdb 100.00 0 -100.00
3 1 4 10.0.0.52 6002 10.0.0.52 6002 sdc1 100.00 0 -100.00</computeroutput></screen> 3 1 4 10.0.0.52 6002 10.0.0.52 6002 sdc 100.00 0 -100.00
#. Rebalance the ring: #. Rebalance the ring:
@ -90,19 +90,15 @@ To create the ring perform the following steps on the controller node.
# swift-ring-builder account.builder rebalance # swift-ring-builder account.builder rebalance
Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00 Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00
| Create container ring
---------------------
Container ring
~~~~~~~~~~~~~~
The container server uses the container ring to maintain lists of objects. The container server uses the container ring to maintain lists of objects.
However, it does not track object locations. However, it does not track object locations.
To create the ring perform the following steps on the controller node. #. Change to the ``/etc/swift`` directory.
#. Change to the :file:`/etc/swift` directory. #. Create the base ``container.builder`` file:
#. Create the base :file:`container.builder` file:
.. code-block:: console .. code-block:: console
@ -123,13 +119,13 @@ To create the ring perform the following steps on the controller node.
Replace ``STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS`` with the IP address Replace ``STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS`` with the IP address
of the management network on the storage node. Replace ``DEVICE_NAME`` with a of the management network on the storage node. Replace ``DEVICE_NAME`` with a
storage device name on the same storage node. For example, using the first storage device name on the same storage node. For example, using the first
storage node in :doc:`swift-storage-node` with the :file:`/dev/sdb1` storage node in :ref:`swift-storage` with the ``/dev/sdb``
storage device and weight of 100: storage device and weight of 100:
.. code-block:: console .. code-block:: console
# swift-ring-builder container.builder add \ # swift-ring-builder container.builder add \
--region 1 --zone 1 --ip 10.0.0.51 --port 6001 --device sdb1 --weight 100 --region 1 --zone 1 --ip 10.0.0.51 --port 6001 --device sdb --weight 100
Repeat this command for each storage device on each storage node. In the Repeat this command for each storage device on each storage node. In the
example architecture, use the command in four variations: example architecture, use the command in four variations:
@ -137,17 +133,17 @@ To create the ring perform the following steps on the controller node.
.. code-block:: console .. code-block:: console
# swift-ring-builder container.builder add \ # swift-ring-builder container.builder add \
--region 1 --zone 1 --ip 10.0.0.51 --port 6001 --device sdb1 --weight 100 --region 1 --zone 1 --ip 10.0.0.51 --port 6001 --device sdb --weight 100
Device d0r1z1-10.0.0.51:6001R10.0.0.51:6001/sdb1_"" with 100.0 weight got id 0 Device d0r1z1-10.0.0.51:6001R10.0.0.51:6001/sdb_"" with 100.0 weight got id 0
# swift-ring-builder container.builder add \ # swift-ring-builder container.builder add \
--region 1 --zone 2 --ip 10.0.0.51 --port 6001 --device sdc1 --weight 100 --region 1 --zone 2 --ip 10.0.0.51 --port 6001 --device sdc --weight 100
Device d1r1z2-10.0.0.51:6001R10.0.0.51:6001/sdc1_"" with 100.0 weight got id 1 Device d1r1z2-10.0.0.51:6001R10.0.0.51:6001/sdc_"" with 100.0 weight got id 1
# swift-ring-builder container.builder add \ # swift-ring-builder container.builder add \
--region 1 --zone 3 --ip 10.0.0.52 --port 6001 --device sdb1 --weight 100 --region 1 --zone 3 --ip 10.0.0.52 --port 6001 --device sdb --weight 100
Device d2r1z3-10.0.0.52:6001R10.0.0.52:6001/sdb1_"" with 100.0 weight got id 2 Device d2r1z3-10.0.0.52:6001R10.0.0.52:6001/sdb_"" with 100.0 weight got id 2
# swift-ring-builder container.builder add \ # swift-ring-builder container.builder add \
--region 1 --zone 4 --ip 10.0.0.52 --port 6001 --device sdc1 --weight 100 --region 1 --zone 4 --ip 10.0.0.52 --port 6001 --device sdc --weight 100
Device d3r1z4-10.0.0.52:6001R10.0.0.52:6001/sdc1_"" with 100.0 weight got id 3 Device d3r1z4-10.0.0.52:6001R10.0.0.52:6001/sdc_"" with 100.0 weight got id 3
#. Verify the ring contents: #. Verify the ring contents:
@ -159,10 +155,10 @@ To create the ring perform the following steps on the controller node.
The minimum number of hours before a partition can be reassigned is 1 The minimum number of hours before a partition can be reassigned is 1
The overload factor is 0.00% (0.000000) The overload factor is 0.00% (0.000000)
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
0 1 1 10.0.0.51 6001 10.0.0.51 6001 sdb1 100.00 0 -100.00 0 1 1 10.0.0.51 6001 10.0.0.51 6001 sdb 100.00 0 -100.00
1 1 2 10.0.0.51 6001 10.0.0.51 6001 sdc1 100.00 0 -100.00 1 1 2 10.0.0.51 6001 10.0.0.51 6001 sdc 100.00 0 -100.00
2 1 3 10.0.0.52 6001 10.0.0.52 6001 sdb1 100.00 0 -100.00 2 1 3 10.0.0.52 6001 10.0.0.52 6001 sdb 100.00 0 -100.00
3 1 4 10.0.0.52 6001 10.0.0.52 6001 sdc1 100.00 0 -100.00 3 1 4 10.0.0.52 6001 10.0.0.52 6001 sdc 100.00 0 -100.00
#. Rebalance the ring: #. Rebalance the ring:
@ -171,17 +167,15 @@ To create the ring perform the following steps on the controller node.
# swift-ring-builder container.builder rebalance # swift-ring-builder container.builder rebalance
Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00 Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00
Object ring Create object ring
~~~~~~~~~~~ ------------------
The object server uses the object ring to maintain lists of object locations The object server uses the object ring to maintain lists of object locations
on local devices. on local devices.
To create the ring perform the following steps on the controller node. #. Change to the ``/etc/swift`` directory.
#. Change to the :file:`/etc/swift` directory. #. Create the base ``object.builder`` file:
#. Create the base :file:`object.builder` file:
.. code-block:: console .. code-block:: console
@ -202,12 +196,12 @@ To create the ring perform the following steps on the controller node.
Replace ``STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS`` with the IP address Replace ``STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS`` with the IP address
of the management network on the storage node. Replace ``DEVICE_NAME`` with of the management network on the storage node. Replace ``DEVICE_NAME`` with
a storage device name on the same storage node. For example, using the first a storage device name on the same storage node. For example, using the first
storage node in :doc:`swift-storage-node` with the :file:`/dev/sdb1` storage storage node in :ref:`swift-storage` with the ``/dev/sdb`` storage
device and weight of 100: device and weight of 100:
.. code-block:: console .. code-block:: console
# swift-ring-builder object.builder add r1z1-10.0.0.51:6000/sdb1 100 # swift-ring-builder object.builder add r1z1-10.0.0.51:6000/sdb 100
Repeat this command for each storage device on each storage node. In the Repeat this command for each storage device on each storage node. In the
example architecture, use the command in four variations: example architecture, use the command in four variations:
@ -215,17 +209,17 @@ To create the ring perform the following steps on the controller node.
.. code-block:: console .. code-block:: console
# swift-ring-builder object.builder add \ # swift-ring-builder object.builder add \
--region 1 --zone 1 --ip 10.0.0.51 --port 6000 --device sdb1 --weight 100 --region 1 --zone 1 --ip 10.0.0.51 --port 6000 --device sdb --weight 100
Device d0r1z1-10.0.0.51:6000R10.0.0.51:6000/sdb1_"" with 100.0 weight got id 0 Device d0r1z1-10.0.0.51:6000R10.0.0.51:6000/sdb_"" with 100.0 weight got id 0
# swift-ring-builder object.builder add \ # swift-ring-builder object.builder add \
--region 1 --zone 2 --ip 10.0.0.51 --port 6000 --device sdc1 --weight 100 --region 1 --zone 2 --ip 10.0.0.51 --port 6000 --device sdc --weight 100
Device d1r1z2-10.0.0.51:6000R10.0.0.51:6000/sdc1_"" with 100.0 weight got id 1 Device d1r1z2-10.0.0.51:6000R10.0.0.51:6000/sdc_"" with 100.0 weight got id 1
# swift-ring-builder object.builder add \ # swift-ring-builder object.builder add \
--region 1 --zone 3 --ip 10.0.0.52 --port 6000 --device sdb1 --weight 100 --region 1 --zone 3 --ip 10.0.0.52 --port 6000 --device sdb --weight 100
Device d2r1z3-10.0.0.52:6000R10.0.0.52:6000/sdb1_"" with 100.0 weight got id 2 Device d2r1z3-10.0.0.52:6000R10.0.0.52:6000/sdb_"" with 100.0 weight got id 2
# swift-ring-builder object.builder add \ # swift-ring-builder object.builder add \
--region 1 --zone 4 --ip 10.0.0.52 --port 6000 --device sdc1 --weight 100 --region 1 --zone 4 --ip 10.0.0.52 --port 6000 --device sdc --weight 100
Device d3r1z4-10.0.0.52:6000R10.0.0.52:6000/sdc1_"" with 100.0 weight got id 3 Device d3r1z4-10.0.0.52:6000R10.0.0.52:6000/sdc_"" with 100.0 weight got id 3
#. Verify the ring contents: #. Verify the ring contents:
@ -237,10 +231,10 @@ To create the ring perform the following steps on the controller node.
The minimum number of hours before a partition can be reassigned is 1 The minimum number of hours before a partition can be reassigned is 1
The overload factor is 0.00% (0.000000) The overload factor is 0.00% (0.000000)
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
0 1 1 10.0.0.51 6000 10.0.0.51 6000 sdb1 100.00 0 -100.00 0 1 1 10.0.0.51 6000 10.0.0.51 6000 sdb 100.00 0 -100.00
1 1 2 10.0.0.51 6000 10.0.0.51 6000 sdc1 100.00 0 -100.00 1 1 2 10.0.0.51 6000 10.0.0.51 6000 sdc 100.00 0 -100.00
2 1 3 10.0.0.52 6000 10.0.0.52 6000 sdb1 100.00 0 -100.00 2 1 3 10.0.0.52 6000 10.0.0.52 6000 sdb 100.00 0 -100.00
3 1 4 10.0.0.52 6000 10.0.0.52 6000 sdc1 100.00 0 -100.00 3 1 4 10.0.0.52 6000 10.0.0.52 6000 sdc 100.00 0 -100.00
#. Rebalance the ring: #. Rebalance the ring:
@ -250,10 +244,9 @@ To create the ring perform the following steps on the controller node.
Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00 Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00
Distribute ring configuration files Distribute ring configuration files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----------------------------------
Copy the :file:`account.ring.gz`, :file:`container.ring.gz`, and
:file:`object.ring.gz` files to the :file:`/etc/swift` directory
on each storage node and any additional nodes running the proxy service.
Copy the ``account.ring.gz``, ``container.ring.gz``, and
``object.ring.gz`` files to the ``/etc/swift`` directory
on each storage node and any additional nodes running the
proxy service.

View File

@ -1,11 +1,10 @@
Edit the :file:`/etc/swift/account-server.conf` file and complete the Edit the ``/etc/swift/account-server.conf`` file and complete the
following actions: following actions:
* In the ``[DEFAULT]`` section, configure the bind IP address, bind port, * In the ``[DEFAULT]`` section, configure the bind IP address, bind port,
user, configuration directory, and mount point directory: user, configuration directory, and mount point directory:
.. code-block:: ini .. code-block:: ini
:linenos:
[DEFAULT] [DEFAULT]
... ...
@ -14,6 +13,7 @@ following actions:
user = swift user = swift
swift_dir = /etc/swift swift_dir = /etc/swift
devices = /srv/node devices = /srv/node
mount_check = true
Replace ``MANAGEMENT_INTERFACE_IP_ADDRESS`` with the IP address of the Replace ``MANAGEMENT_INTERFACE_IP_ADDRESS`` with the IP address of the
management network on the storage node. management network on the storage node.
@ -21,7 +21,6 @@ following actions:
* In the ``[pipeline:main]`` section, enable the appropriate modules: * In the ``[pipeline:main]`` section, enable the appropriate modules:
.. code-block:: ini .. code-block:: ini
:linenos:
[pipeline:main] [pipeline:main]
pipeline = healthcheck recon account-server pipeline = healthcheck recon account-server
@ -35,7 +34,6 @@ following actions:
directory: directory:
.. code-block:: ini .. code-block:: ini
:linenos:
[filter:recon] [filter:recon]
... ...

View File

@ -1,11 +1,10 @@
Edit the :file:`/etc/swift/container-server.conf` file and complete the Edit the ``/etc/swift/container-server.conf`` file and complete the
following actions: following actions:
* In the ``[DEFAULT]`` section, configure the bind IP address, bind port, * In the ``[DEFAULT]`` section, configure the bind IP address, bind port,
user, configuration directory, and mount point directory: user, configuration directory, and mount point directory:
.. code-block:: ini .. code-block:: ini
:linenos:
[DEFAULT] [DEFAULT]
... ...
@ -14,6 +13,7 @@ following actions:
user = swift user = swift
swift_dir = /etc/swift swift_dir = /etc/swift
devices = /srv/node devices = /srv/node
mount_check = true
Replace ``MANAGEMENT_INTERFACE_IP_ADDRESS`` with the IP address of the Replace ``MANAGEMENT_INTERFACE_IP_ADDRESS`` with the IP address of the
management network on the storage node. management network on the storage node.
@ -21,7 +21,6 @@ following actions:
* In the ``[pipeline:main]`` section, enable the appropriate modules: * In the ``[pipeline:main]`` section, enable the appropriate modules:
.. code-block:: ini .. code-block:: ini
:linenos:
[pipeline:main] [pipeline:main]
pipeline = healthcheck recon container-server pipeline = healthcheck recon container-server
@ -35,7 +34,6 @@ following actions:
directory: directory:
.. code-block:: ini .. code-block:: ini
:linenos:
[filter:recon] [filter:recon]
... ...

View File

@ -1,11 +1,10 @@
Edit the :file:`/etc/swift/object-server.conf` file and complete the Edit the ``/etc/swift/object-server.conf`` file and complete the
following actions: following actions:
* In the ``[DEFAULT]`` section, configure the bind IP address, bind port, * In the ``[DEFAULT]`` section, configure the bind IP address, bind port,
user, configuration directory, and mount point directory: user, configuration directory, and mount point directory:
.. code-block:: ini .. code-block:: ini
:linenos:
[DEFAULT] [DEFAULT]
... ...
@ -14,14 +13,14 @@ following actions:
user = swift user = swift
swift_dir = /etc/swift swift_dir = /etc/swift
devices = /srv/node devices = /srv/node
mount_check = true
Replace MANAGEMENT_INTERFACE_IP_ADDRESS with the IP address of the Replace ``MANAGEMENT_INTERFACE_IP_ADDRESS`` with the IP address of the
management network on the storage node. management network on the storage node.
* In the ``[pipeline:main]`` section, enable the appropriate modules: * In the ``[pipeline:main]`` section, enable the appropriate modules:
.. code-block:: ini .. code-block:: ini
:linenos:
[pipeline:main] [pipeline:main]
pipeline = healthcheck recon object-server pipeline = healthcheck recon object-server
@ -35,7 +34,6 @@ following actions:
and lock directories: and lock directories:
.. code-block:: ini .. code-block:: ini
:linenos:
[filter:recon] [filter:recon]
... ...

View File

@ -0,0 +1,220 @@
.. _swift-storage:
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
:term:`extended attributes (xattr)`, testing and benchmarking
indicate the best performance and reliability on :term:`XFS`. For
more information on horizontally scaling your environment, see the
`Deployment Guide <http://docs.openstack.org/developer/swift/deployment_guide.html>`_.
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:
.. only:: ubuntu or debian
.. code-block:: console
# apt-get install xfsprogs rsync
.. only:: rdo
.. code-block:: console
# yum install xfsprogs rsync
.. only:: obs
.. code-block:: console
# zypper install xfsprogs rsync
#. Format the ``/dev/sdb`` and ``/dev/sdc`` devices as XFS:
.. code-block:: console
# mkfs.xfs /dev/sdb
# mkfs.xfs /dev/sdc
#. Create the mount point directory structure:
.. code-block:: console
# mkdir -p /srv/node/sdb
# mkdir -p /srv/node/sdc
#. Edit the ``/etc/fstab`` file and add the following to it:
.. code-block:: ini
/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:
.. code-block:: console
# mount /srv/node/sdb
# mount /srv/node/sdc
#. Edit the ``/etc/rsyncd.conf`` file and add the following to it:
.. code-block:: ini
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.
.. only:: ubuntu or debian
5. Edit the ``/etc/default/rsync`` file and enable the ``rsync``
service:
.. code-block:: ini
RSYNC_ENABLE=true
6. Start the ``rsync`` service:
.. code-block:: console
# service rsync start
.. only:: obs or rdo
5. Start the ``rsyncd`` service and configure it to start when the
system boots:
.. code-block:: console
# systemctl enable rsyncd.service
# systemctl start rsyncd.service
Install and configure components
--------------------------------
.. include:: shared/note_configuration_vary_by_distribution.rst
.. note::
Perform these steps on each storage node.
#. Install the packages:
.. only:: ubuntu or debian
.. code-block:: console
# apt-get install swift swift-account swift-container swift-object
.. only:: rdo
.. code-block:: console
# yum install openstack-swift-account openstack-swift-container \
openstack-swift-object
.. only:: obs
.. code-block:: console
# zypper install openstack-swift-account \
openstack-swift-container openstack-swift-object python-xml
.. only:: ubuntu or rdo or debian
2. Obtain the accounting, container, object, container-reconciler, and
object-expirer service configuration files from the Object Storage
source repository:
.. code-block:: console
# 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
3. .. include:: swift-storage-include1.txt
4. .. include:: swift-storage-include2.txt
5. .. include:: swift-storage-include3.txt
6. Ensure proper ownership of the mount point directory structure:
.. code-block:: console
# chown -R root:swift /srv/node
7. Create the ``recon`` directory and ensure proper ownership of it:
.. code-block:: console
# mkdir -p /var/cache/swift
# chown -R root:swift /var/cache/swift
.. only:: obs
2. .. include:: swift-storage-include1.txt
3. .. include:: swift-storage-include2.txt
4. .. include:: swift-storage-include3.txt
5. Ensure proper ownership of the mount point directory structure:
.. code-block:: console
# chown -R root:swift /srv/node
6. Create the ``recon`` directory and ensure proper ownership of it:
.. code-block:: console
# mkdir -p /var/cache/swift
# chown -R root:swift /var/cache/swift

View File

@ -1,261 +0,0 @@
=======================================
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. Each of the
devices, :file:`/dev/sdb` and :file:`/dev/sdc`, must contain a
suitable partition table with one partition occupying the entire
device. Although the Object Storage service supports any file system
with :term:`extended attributes (xattr)`, testing and benchmarking
indicate the best performance and reliability on :term:`XFS`. For
more information on horizontally scaling your environment, see the
`Deployment Guide <http://docs.openstack.org/developer/swift/deployment_guide.html>`_.
To configure prerequisites
~~~~~~~~~~~~~~~~~~~~~~~~~~
You must configure each storage node before you install and configure
the Object Storage service on it. Similar to the controller node, each
storage node contains one network interface on the :term:`management network`.
Optionally, each storage node can contain a second network interface on
a separate network for replication. For more information, see
:ref:`environment`.
#. Configure unique items on the first storage node:
Configure the management interface:
* IP address: ``10.0.0.51``
* Network mask: ``255.255.255.0`` (or ``/24``)
* Default gateway: ``10.0.0.1``
Set the hostname of the node to ``object1``.
#. Configure unique items on the second storage node:
Configure the management interface:
* IP address: ``10.0.0.52``
* Network mask: ``255.255.255.0`` (or ``/24``)
* Default gateway: ``10.0.0.1``
Set the hostname of the node to ``object2``.
#. Configure shared items on both storage nodes:
* Copy the contents of the :file:`/etc/hosts` file from the controller
node and add the following to it:
.. code-block:: ini
:linenos:
# object1
10.0.0.51 object1
# object2
10.0.0.52 object2
Also add this content to the :file:`/etc/hosts` file on all other
nodes in your environment.
* Install and configure :term:`NTP` using the instructions in
:ref:`environment-ntp`.
* Install the supporting utility packages:
.. only:: ubuntu or debian
.. code-block:: console
# apt-get install xfsprogs rsync
.. only:: rdo
.. code-block:: console
# yum install xfsprogs rsync
.. only:: obs
.. code-block:: console
# zypper install xfsprogs rsync
* Format the :file:`/dev/sdb1` and :file:`/dev/sdc1` partitions as XFS:
.. code-block:: console
# mkfs.xfs /dev/sdb1
# mkfs.xfs /dev/sdc1
* Create the mount point directory structure:
.. code-block:: console
# mkdir -p /srv/node/sdb1
# mkdir -p /srv/node/sdc1
* Edit the :file:`/etc/fstab` file and add the following to it:
.. code-block:: ini
:linenos:
/dev/sdb1 /srv/node/sdb1 xfs noatime,nodiratime,nobarrier,logbufs=8 0 2
/dev/sdc1 /srv/node/sdc1 xfs noatime,nodiratime,nobarrier,logbufs=8 0 2
* Mount the devices:
.. code-block:: console
# mount /srv/node/sdb1
# mount /srv/node/sdc1
#. Edit the :file:`/etc/rsyncd.conf` file and add the following to it:
.. code-block:: ini
:linenos:
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.
.. only:: ubuntu or debian
5. Edit the :file:`/etc/default/rsync` file and enable the ``rsync``
service:
.. code-block:: ini
:linenos:
RSYNC_ENABLE=true
6. Start the ``rsync`` service:
.. code-block:: console
# service rsync start
.. only:: obs or rdo
5. Start the ``rsyncd`` service and configure it to start when the
system boots:
.. code-block:: console
# systemctl enable rsyncd.service
# systemctl start rsyncd.service
Install and configure storage node components
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. include:: shared/note_configuration_vary_by_distribution.rst
.. note::
Perform these steps on each storage node.
#. Install the packages:
.. only:: ubuntu or debian
.. code-block:: console
# apt-get install swift swift-account swift-container swift-object
.. only:: rdo
.. code-block:: console
# yum install openstack-swift-account openstack-swift-container \
openstack-swift-object
.. only:: obs
.. code-block:: console
# zypper install openstack-swift-account \
openstack-swift-container openstack-swift-object python-xml
.. only:: ubuntu or rdo or debian
2. Obtain the accounting, container, object, container-reconciler, and
object-expirer service configuration files from the Object Storage
source repository:
.. code-block:: console
# curl -o /etc/swift/account-server.conf \
https://git.openstack.org/cgit/openstack/swift/plain/etc/account-server.conf-sample?h=stable/kilo
# curl -o /etc/swift/container-server.conf \
https://git.openstack.org/cgit/openstack/swift/plain/etc/container-server.conf-sample?h=stable/kilo
# curl -o /etc/swift/object-server.conf \
https://git.openstack.org/cgit/openstack/swift/plain/etc/object-server.conf-sample?h=stable/kilo
# curl -o /etc/swift/container-reconciler.conf \
https://git.openstack.org/cgit/openstack/swift/plain/etc/container-reconciler.conf-sample?h=stable/kilo
# curl -o /etc/swift/object-expirer.conf \
https://git.openstack.org/cgit/openstack/swift/plain/etc/object-expirer.conf-sample?h=stable/kilo
3. .. include:: swift-storage-node-include1.txt
4. .. include:: swift-storage-node-include2.txt
5. .. include:: swift-storage-node-include3.txt
6. Ensure proper ownership of the mount point directory structure:
.. code-block:: console
# chown -R swift:swift /srv/node
7. Create the :file:`recon` directory and ensure proper ownership of it:
.. code-block:: console
# mkdir -p /var/cache/swift
# chown -R swift:swift /var/cache/swift
.. only:: obs
2. .. include:: swift-storage-node-include1.txt
3. .. include:: swift-storage-node-include2.txt
4. .. include:: swift-storage-node-include3.txt
5. Ensure proper ownership of the mount point directory structure:
.. code-block:: console
# chown -R swift:swift /srv/node
6. Create the :file:`recon` directory and ensure proper ownership of it:
.. code-block:: console
# mkdir -p /var/cache/swift
# chown -R swift:swift /var/cache/swift

View File

@ -1,16 +1,20 @@
Verify operation Verify operation
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
This section describes how to verify operation of the Object Storage Verify operation of the Object Storage service.
service.
.. note:: .. note::
The ``swift`` client requires the ``-V 3`` parameter to use the
Identity version 3 API.
.. note::
Perform these steps on the controller node. Perform these steps on the controller node.
#. In each client environment script, configure the Object Storage
service client to use the Identity API version 3:
.. code-block:: console
$ echo "export OS_AUTH_VERSION=3" \
| tee -a admin-openrc.sh demo-openrc.sh
#. Source the ``demo`` credentials: #. Source the ``demo`` credentials:
.. code-block:: console .. code-block:: console
@ -21,39 +25,43 @@ service.
.. code-block:: console .. code-block:: console
$ swift -V 3 stat $ swift stat
Account: AUTH_c75cafb58f5049b8a976506737210756 Account: AUTH_ed0b60bf607743088218b0a533d5943f
Containers: 0 Containers: 0
Objects: 0 Objects: 0
Bytes: 0 Bytes: 0
X-Put-Timestamp: 1429736713.92936 Containers in policy "policy-0": 0
X-Timestamp: 1429736713.92936 Objects in policy "policy-0": 0
X-Trans-Id: txdea07add01ca4dbdb49a2-0055380d09 Bytes in policy "policy-0": 0
Content-Type: text/plain; charset=utf-8 X-Account-Project-Domain-Id: default
X-Timestamp: 1444143887.71539
X-Trans-Id: tx1396aeaf17254e94beb34-0056143bde
Content-Type: text/plain; charset=utf-8
Accept-Ranges: bytes
#. Upload a test file: #. Upload a test file:
.. code-block:: console .. code-block:: console
$ swift -V 3 upload demo-container1 FILE $ swift upload container1 FILE
FILE FILE
Replace ``FILE`` with the name of a local file to upload to the Replace ``FILE`` with the name of a local file to upload to the
``demo-container1`` container. ``container1`` container.
#. List containers: #. List containers:
.. code-block:: console .. code-block:: console
$ swift -V 3 list $ swift list
demo-container1 container1
#. Download a test file: #. Download a test file:
.. code-block:: console .. code-block:: console
$ swift -V 3 download demo-container1 FILE $ swift download container1 FILE
FILE [auth 0.295s, headers 0.339s, total 0.339s, 0.005 MB/s] FILE [auth 0.295s, headers 0.339s, total 0.339s, 0.005 MB/s]
Replace ``FILE`` with the name of the file uploaded to the Replace ``FILE`` with the name of the file uploaded to the
``demo-container1`` container. ``container1`` container.

View File

@ -10,11 +10,11 @@ Your environment must at least include the Identity service (keystone)
prior to deploying Object Storage. prior to deploying Object Storage.
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 1
common/get_started_object_storage.rst common/get_started_object_storage.rst
swift-controller-node.rst swift-controller-install.rst
swift-storage-node.rst swift-storage-install.rst
swift-initial-rings.rst swift-initial-rings.rst
swift-finalize-installation.rst swift-finalize-installation.rst
swift-verify.rst swift-verify.rst