Install and configure the controller nodeThis 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.To configure prerequisitesThe 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 . Before
you configure the Object Storage service, you must create service
credentials and an API endpoint.The Object Storage service does not use a 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:$source admin-openrc.shTo create the Identity service credentials, complete these
steps:Create the swift user:$openstack user create --password-prompt swiftUser Password:
Repeat User Password:
+----------+----------------------------------+
| Field | Value |
+----------+----------------------------------+
| email | None |
| enabled | True |
| id | d535e5cbd2b74ac7bfb97db9cced3ed6 |
| name | swift |
| username | swift |
+----------+----------------------------------+Add the admin role to the
swift user:$openstack role add --project service --user swift admin+-------+----------------------------------+
| Field | Value |
+-------+----------------------------------+
| id | cd2cb9a39e874ea69e5d4b896eb16128 |
| name | admin |
+-------+----------------------------------+Create the swift service entity:$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 endpoint:$openstack endpoint create \
--publicurl '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 |
+--------------+----------------------------------------------+
| adminurl | http://controller:8080/ |
| id | af534fb8b7ff40a6acf725437c586ebe |
| internalurl | http://controller:8080/v1/AUTH_%(tenant_id)s |
| publicurl | http://controller:8080/v1/AUTH_%(tenant_id)s |
| region | RegionOne |
| service_id | 75ef509da2c340499d454ae96a2c5c34 |
| service_name | swift |
| service_type | object-store |
+--------------+----------------------------------------------+To install and configure the controller node componentsDefault 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.Install the packages:Complete OpenStack environments already include some of these
packages.#apt-get install swift swift-proxy python-swiftclient python-keystoneclient \
python-keystonemiddleware memcached#yum install openstack-swift-proxy python-swiftclient python-keystone-auth-token \
python-keystonemiddleware memcached#zypper install openstack-swift-proxy python-swiftclient python-keystoneclient \
python-keystonemiddleware python-xml memcachedCreate the /etc/swift directory.Obtain the proxy service configuration file from the Object
Storage source repository:#curl -o /etc/swift/proxy-server.conf \
https://git.openstack.org/cgit/openstack/swift/plain/etc/proxy-server.conf-sample?h=stable/kiloEdit the /etc/swift/proxy-server.conf
file and complete the following actions:In the [DEFAULT] section, configure
the bind port, user, and configuration directory:[DEFAULT]
...
bind_port = 8080
user = swift
swift_dir = /etc/swiftIn the [pipeline:main] section, enable
the appropriate modules:[pipeline:main]
pipeline = catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk ratelimit authtoken keystoneauth container-quotas account-quotas slo dlo proxy-logging proxy-serverFor more information on other modules that enable
additional features, see the
Deployment Guide.In the [app:proxy-server] section, enable
automatic account creation:[app:proxy-server]
...
account_autocreate = trueIn the [filter:keystoneauth] section,
configure the operator roles:[filter:keystoneauth]
use = egg:swift#keystoneauth
...
operator_roles = admin,userIn the [filter:authtoken] section,
configure Identity service access:[filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
...
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = swift
password = SWIFT_PASS
delay_auth_decision = trueReplace SWIFT_PASS with the
password you chose for the swift user in the
Identity service.Comment out or remove any other options in the
[filter:authtoken] section.In the [filter:cache] section, configure
the memcached location:[filter:cache]
...
memcache_servers = 127.0.0.1:11211