3494e584fb
Update swift configuration for Mitaka. 1) Change configuration file branch from liberty to mitaka. 2) Change keystone middleware to use domain name instead of domain ID. 3) Use OpenStack client instead of swift client to download object. Considerably slower, but works. 4) Remove workaround for using the Identity v3 API because the entire guide continues to use "versioned" endpoints. Implements: bp installguide-mitaka Change-Id: I3115c11b55764dc321459d7e9f11b49982cdd11e
199 lines
7.7 KiB
ReStructuredText
199 lines
7.7 KiB
ReStructuredText
.. _swift-controller:
|
|
|
|
Install and configure the controller node
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
This section describes how to install and configure the proxy service that
|
|
handles requests for the account, container, and object services operating
|
|
on the storage nodes. For simplicity, this guide installs and configures
|
|
the proxy service on the controller node. However, you can run the proxy
|
|
service on any node with network connectivity to the storage nodes.
|
|
Additionally, you can install and configure the proxy service on multiple
|
|
nodes to increase performance and redundancy. For more information, see the
|
|
`Deployment Guide <http://docs.openstack.org/developer/swift/deployment_guide.html>`__.
|
|
|
|
Prerequisites
|
|
-------------
|
|
|
|
The proxy service relies on an authentication and authorization mechanism such
|
|
as the Identity service. However, unlike other services, it also offers an
|
|
internal mechanism that allows it to operate without any other OpenStack
|
|
services. However, for simplicity, this guide references the Identity service
|
|
in :doc:`keystone`. Before you configure the Object Storage service, you must
|
|
create service credentials and an API endpoint.
|
|
|
|
.. note::
|
|
|
|
The Object Storage service does not use an SQL database on the controller
|
|
node. Instead, it uses distributed SQLite databases on each storage node.
|
|
|
|
#. Source the ``admin`` credentials to gain access to admin-only CLI commands:
|
|
|
|
.. code-block:: console
|
|
|
|
$ . admin-openrc
|
|
|
|
#. To create the Identity service credentials, complete these steps:
|
|
|
|
* Create the ``swift`` user:
|
|
|
|
.. code-block:: console
|
|
|
|
$ openstack user create --domain default --password-prompt swift
|
|
User Password:
|
|
Repeat User Password:
|
|
+-----------+----------------------------------+
|
|
| Field | Value |
|
|
+-----------+----------------------------------+
|
|
| domain_id | e0353a670a9e496da891347c589539e9 |
|
|
| enabled | True |
|
|
| id | d535e5cbd2b74ac7bfb97db9cced3ed6 |
|
|
| name | swift |
|
|
+-----------+----------------------------------+
|
|
|
|
* Add the ``admin`` role to the ``swift`` user:
|
|
|
|
.. code-block:: console
|
|
|
|
$ openstack role add --project service --user swift admin
|
|
|
|
.. note::
|
|
|
|
This command provides no output.
|
|
|
|
* Create the ``swift`` service entity:
|
|
|
|
.. code-block:: console
|
|
|
|
$ openstack service create --name swift \
|
|
--description "OpenStack Object Storage" object-store
|
|
+-------------+----------------------------------+
|
|
| Field | Value |
|
|
+-------------+----------------------------------+
|
|
| description | OpenStack Object Storage |
|
|
| enabled | True |
|
|
| id | 75ef509da2c340499d454ae96a2c5c34 |
|
|
| name | swift |
|
|
| type | object-store |
|
|
+-------------+----------------------------------+
|
|
|
|
#. Create the Object Storage service API endpoints:
|
|
|
|
.. code-block:: console
|
|
|
|
$ openstack endpoint create --region RegionOne \
|
|
object-store public http://controller:8080/v1/AUTH_%\(tenant_id\)s
|
|
+--------------+----------------------------------------------+
|
|
| Field | Value |
|
|
+--------------+----------------------------------------------+
|
|
| enabled | True |
|
|
| id | 12bfd36f26694c97813f665707114e0d |
|
|
| interface | public |
|
|
| 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 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
|
|
|
|
#. 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-keystoneclient python-keystonemiddleware \
|
|
memcached
|
|
|
|
.. only:: obs
|
|
|
|
.. code-block:: console
|
|
|
|
# zypper install openstack-swift-proxy python-swiftclient \
|
|
python-keystoneclient python-keystonemiddleware \
|
|
python-xml memcached
|
|
|
|
.. note::
|
|
|
|
Complete OpenStack environments already include some of these
|
|
packages.
|
|
|
|
.. only:: ubuntu or debian
|
|
|
|
2. Create the ``/etc/swift`` directory.
|
|
|
|
3. Obtain the proxy service configuration file from the Object Storage
|
|
source repository:
|
|
|
|
.. code-block:: console
|
|
|
|
# curl -o /etc/swift/proxy-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/proxy-server.conf-sample?h=stable/mitaka
|
|
|
|
.. only:: rdo
|
|
|
|
2. Obtain the proxy service configuration file from the Object Storage
|
|
source repository:
|
|
|
|
.. code-block:: console
|
|
|
|
# curl -o /etc/swift/proxy-server.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/proxy-server.conf-sample?h=stable/mitaka
|
|
|
|
.. only:: obs
|
|
|
|
2. .. include:: swift-controller-include.txt
|
|
|
|
.. only:: rdo
|
|
|
|
3. .. include:: swift-controller-include.txt
|
|
|
|
.. only:: ubuntu
|
|
|
|
4. .. include:: swift-controller-include.txt
|