[install-guide] make Swift workable for kilo

* specify version 3.0 for authentication
* use correct URLs for sample configuration files
* update/add output of commands
* add modules to improve functionality
* update keystone middleware to use identity v3 api

Partially implements bp installguide-kilo

Co-Authored-By: Matt Kassawara <mkassawara@gmail.com>
Change-Id: I185b3110260ca2fb1d42a3612ac6c074f63fd4cc
This commit is contained in:
Christian Berendt
2015-04-22 22:26:12 +02:00
committed by Matthew Kassawara
parent f38e5de7a8
commit d49150f21f
5 changed files with 114 additions and 72 deletions

View File

@@ -23,10 +23,11 @@
any other OpenStack services. However, for simplicity, this guide
references the Identity service in <xref linkend="ch_keystone"/>. Before
you configure the Object Storage service, you must create service
credentials and API endpoints.</para>
credentials and an API endpoint.</para>
<note>
<para>The Object Storage service does not use a SQL database on
the controller node.</para>
the controller node. Instead, it uses distributed SQLite databases
on each storage node.</para>
</note>
<step>
<para>To create the Identity service credentials, complete these
@@ -75,7 +76,7 @@ Repeat User Password:
</substeps>
</step>
<step>
<para>Create the Object Storage service API endpoints:</para>
<para>Create the Object Storage service API endpoint:</para>
<screen><prompt>$</prompt> <userinput>openstack endpoint create \
--publicurl 'http://<replaceable>controller</replaceable>:8080/v1/AUTH_%(tenant_id)s' \
--internalurl 'http://<replaceable>controller</replaceable>:8080/v1/AUTH_%(tenant_id)s' \
@@ -98,6 +99,13 @@ Repeat User Password:
</procedure>
<procedure>
<title>To install and configure the controller node components</title>
<note>
<para>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.</para>
</note>
<step>
<para>Install the packages:</para>
<note>
@@ -137,7 +145,7 @@ swift_dir = /etc/swift</programlisting>
<para>In the <literal>[pipeline:main]</literal> section, enable
the appropriate modules:</para>
<programlisting language="ini">[pipeline:main]
pipeline = authtoken cache healthcheck keystoneauth proxy-logging proxy-server</programlisting>
pipeline = catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk ratelimit authtoken keystoneauth container-quotas account-quotas slo dlo proxy-logging proxy-server</programlisting>
<note>
<para>For more information on other modules that enable
additional features, see the
@@ -147,10 +155,9 @@ pipeline = authtoken cache healthcheck keystoneauth proxy-logging proxy-server</
</step>
<step>
<para>In the <literal>[app:proxy-server]</literal> section, enable
account management:</para>
automatic account creation:</para>
<programlisting language="ini">[app:proxy-server]
...
allow_account_management = true
account_autocreate = true</programlisting>
</step>
<step>
@@ -160,9 +167,6 @@ account_autocreate = true</programlisting>
use = egg:swift#keystoneauth
...
operator_roles = admin,_member_</programlisting>
<note os="ubuntu;debian;rhel;centos;fedora">
<para>You might need to uncomment this section.</para>
</note>
</step>
<step>
<para>In the <literal>[filter:authtoken]</literal> section,
@@ -170,23 +174,21 @@ operator_roles = admin,_member_</programlisting>
<programlisting language="ini">[filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
...
auth_uri = http://<replaceable>controller</replaceable>:5000/v2.0
identity_uri = http://<replaceable>controller</replaceable>:35357
admin_tenant_name = service
admin_user = swift
admin_password = <replaceable>SWIFT_PASS</replaceable>
auth_uri = http://<replaceable>controller</replaceable>:5000
auth_url = http://<replaceable>controller</replaceable>:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = swift
password = <replaceable>SWIFT_PASS</replaceable>
delay_auth_decision = true</programlisting>
<para>Replace <replaceable>SWIFT_PASS</replaceable> with the
password you chose for the <literal>swift</literal> user in the
Identity service.</para>
<note os="ubuntu;debian;rhel;centos;fedora">
<para>You might need to uncomment this section.</para>
</note>
<note>
<para>Comment out any <literal>auth_host</literal>,
<literal>auth_port</literal>, and
<literal>auth_protocol</literal> options because the
<literal>identity_uri</literal> option replaces them.</para>
<para>Comment out or remove any other options in the
<literal>[filter:authtoken]</literal> section.</para>
</note>
</step>
<step>

View File

@@ -7,6 +7,13 @@
<title>Finalize installation</title>
<procedure>
<title>Configure hashes and default storage policy</title>
<note>
<para>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.</para>
</note>
<step os="ubuntu;debian;rhel;centos;fedora">
<para>Obtain the <filename>/etc/swift/swift.conf</filename> file from
the Object Storage source repository:</para>

View File

@@ -31,6 +31,9 @@
<step>
<para>Create the base <filename>account.builder</filename> file:</para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder create 10 3 1</userinput></screen>
<note>
<para>This command provides no output.</para>
</note>
</step>
<step>
<para>Add each storage node to the ring:</para>
@@ -48,28 +51,31 @@
<para>Repeat this command for each storage device on each storage
node. In the example architecture, use the command in four variations:</para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder add r1z1-10.0.0.51:6002/sdb1 100</userinput>
<computeroutput>Device d0r1z1-10.0.0.51:6002R10.0.0.51:6002/sdb1_"" with 100.0 weight got id 0</computeroutput>
<prompt>#</prompt> <userinput>swift-ring-builder account.builder add r1z2-10.0.0.51:6002/sdc1 100</userinput>
<computeroutput>Device d1r1z2-10.0.0.51:6002R10.0.0.51:6002/sdc1_"" with 100.0 weight got id 1</computeroutput>
<prompt>#</prompt> <userinput>swift-ring-builder account.builder add r1z3-10.0.0.52:6002/sdb1 100</userinput>
<prompt>#</prompt> <userinput>swift-ring-builder account.builder add r1z4-10.0.0.52:6002/sdc1 100</userinput></screen>
<computeroutput>Device d2r1z3-10.0.0.52:6002R10.0.0.52:6002/sdb1_"" with 100.0 weight got id 2</computeroutput>
<prompt>#</prompt> <userinput>swift-ring-builder account.builder add r1z4-10.0.0.52:6002/sdc1 100</userinput>
<computeroutput>Device d3r1z4-10.0.0.52:6002R10.0.0.52:6002/sdc1_"" with 100.0 weight got id 3</computeroutput></screen>
</step>
<step>
<para>Verify the ring contents:</para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder</userinput>
<computeroutput>account.builder, build version 4
1024 partitions, 3.000000 replicas, 1 regions, 1 zones, 4 devices, 0.00 balance
1024 partitions, 3.000000 replicas, 1 regions, 4 zones, 4 devices, 100.00 balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 1
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 768 0.00
1 1 1 10.0.0.51 6002 10.0.0.51 6002 sdc1 100.00 768 0.00
2 1 1 10.0.0.52 6002 10.0.0.52 6002 sdb1 100.00 768 0.00
3 1 1 10.0.0.52 6002 10.0.0.52 6002 sdc1 100.00 768 0.00</computeroutput></screen>
The overload factor is 0.00% (0.000000)
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
1 1 2 10.0.0.51 6002 10.0.0.51 6002 sdc1 100.00 0 -100.00
2 1 3 10.0.0.52 6002 10.0.0.52 6002 sdb1 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>
</step>
<step>
<para>Rebalance the ring:</para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder rebalance</userinput></screen>
<note>
<para>This process can take a while.</para>
</note>
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder rebalance</userinput>
<computeroutput>Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00</computeroutput></screen>
</step>
</procedure>
</section>
@@ -89,6 +95,9 @@ Devices: id region zone ip address port replication ip replication
<para>Create the base <filename>container.builder</filename>
file:</para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder container.builder create 10 3 1</userinput></screen>
<note>
<para>This command provides no output.</para>
</note>
</step>
<step>
<para>Add each storage node to the ring:</para>
@@ -106,28 +115,31 @@ Devices: id region zone ip address port replication ip replication
<para>Repeat this command for each storage device on each storage
node. In the example architecture, use the command in four variations:</para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder container.builder add r1z1-10.0.0.51:6001/sdb1 100</userinput>
<computeroutput>Device d0r1z1-10.0.0.51:6001R10.0.0.51:6001/sdb1_"" with 100.0 weight got id 0</computeroutput>
<prompt>#</prompt> <userinput>swift-ring-builder container.builder add r1z2-10.0.0.51:6001/sdc1 100</userinput>
<computeroutput>Device d1r1z2-10.0.0.51:6001R10.0.0.51:6001/sdc1_"" with 100.0 weight got id 1</computeroutput>
<prompt>#</prompt> <userinput>swift-ring-builder container.builder add r1z3-10.0.0.52:6001/sdb1 100</userinput>
<prompt>#</prompt> <userinput>swift-ring-builder container.builder add r1z4-10.0.0.52:6001/sdc1 100</userinput></screen>
<computeroutput>Device d2r1z3-10.0.0.52:6001R10.0.0.52:6001/sdb1_"" with 100.0 weight got id 2</computeroutput>
<prompt>#</prompt> <userinput>swift-ring-builder container.builder add r1z4-10.0.0.52:6001/sdc1 100</userinput>
<computeroutput>Device d3r1z4-10.0.0.52:6001R10.0.0.52:6001/sdc1_"" with 100.0 weight got id 3</computeroutput></screen>
</step>
<step>
<para>Verify the ring contents:</para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder container.builder</userinput>
<computeroutput>container.builder, build version 4
1024 partitions, 3.000000 replicas, 1 regions, 1 zones, 4 devices, 0.00 balance
1024 partitions, 3.000000 replicas, 1 regions, 4 zones, 4 devices, 100.00 balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 1
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 768 0.00
1 1 1 10.0.0.51 6001 10.0.0.51 6001 sdc1 100.00 768 0.00
2 1 1 10.0.0.52 6001 10.0.0.52 6001 sdb1 100.00 768 0.00
3 1 1 10.0.0.52 6001 10.0.0.52 6001 sdc1 100.00 768 0.00</computeroutput></screen>
The overload factor is 0.00% (0.000000)
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
1 1 2 10.0.0.51 6001 10.0.0.51 6001 sdc1 100.00 0 -100.00
2 1 3 10.0.0.52 6001 10.0.0.52 6001 sdb1 100.00 0 -100.00
3 1 4 10.0.0.52 6001 10.0.0.52 6001 sdc1 100.00 0 -100.00</computeroutput></screen>
</step>
<step>
<para>Rebalance the ring:</para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder container.builder rebalance</userinput></screen>
<note>
<para>This process can take a while.</para>
</note>
<screen><prompt>#</prompt> <userinput>swift-ring-builder container.builder rebalance</userinput>
<computeroutput>Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00</computeroutput></screen>
</step>
</procedure>
</section>
@@ -146,6 +158,9 @@ Devices: id region zone ip address port replication ip replication
<step>
<para>Create the base <filename>object.builder</filename> file:</para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder object.builder create 10 3 1</userinput></screen>
<note>
<para>This command provides no output.</para>
</note>
</step>
<step>
<para>Add each storage node to the ring:</para>
@@ -163,28 +178,31 @@ Devices: id region zone ip address port replication ip replication
<para>Repeat this command for each storage device on each storage
node. In the example architecture, use the command in four variations:</para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder object.builder add r1z1-10.0.0.51:6000/sdb1 100</userinput>
<computeroutput>Device d0r1z1-10.0.0.51:6000R10.0.0.51:6000/sdb1_"" with 100.0 weight got id 0</computeroutput>
<prompt>#</prompt> <userinput>swift-ring-builder object.builder add r1z2-10.0.0.51:6000/sdc1 100</userinput>
<computeroutput>Device d1r1z2-10.0.0.51:6000R10.0.0.51:6000/sdc1_"" with 100.0 weight got id 1</computeroutput>
<prompt>#</prompt> <userinput>swift-ring-builder object.builder add r1z3-10.0.0.52:6000/sdb1 100</userinput>
<prompt>#</prompt> <userinput>swift-ring-builder object.builder add r1z4-10.0.0.52:6000/sdc1 100</userinput></screen>
<computeroutput>Device d2r1z3-10.0.0.52:6000R10.0.0.52:6000/sdb1_"" with 100.0 weight got id 2</computeroutput>
<prompt>#</prompt> <userinput>swift-ring-builder object.builder add r1z4-10.0.0.52:6000/sdc1 100</userinput>
<computeroutput>Device d3r1z4-10.0.0.52:6000R10.0.0.52:6000/sdc1_"" with 100.0 weight got id 3</computeroutput></screen>
</step>
<step>
<para>Verify the ring contents:</para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder object.builder</userinput>
<computeroutput>object.builder, build version 4
1024 partitions, 3.000000 replicas, 1 regions, 1 zones, 4 devices, 0.00 balance
1024 partitions, 3.000000 replicas, 1 regions, 4 zones, 4 devices, 100.00 balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 1
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 768 0.00
1 1 1 10.0.0.51 6000 10.0.0.51 6000 sdc1 100.00 768 0.00
2 1 1 10.0.0.52 6000 10.0.0.52 6000 sdb1 100.00 768 0.00
3 1 1 10.0.0.52 6000 10.0.0.52 6000 sdc1 100.00 768 0.00</computeroutput></screen>
The overload factor is 0.00% (0.000000)
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
1 1 2 10.0.0.51 6000 10.0.0.51 6000 sdc1 100.00 0 -100.00
2 1 3 10.0.0.52 6000 10.0.0.52 6000 sdb1 100.00 0 -100.00
3 1 4 10.0.0.52 6000 10.0.0.52 6000 sdc1 100.00 0 -100.00</computeroutput></screen>
</step>
<step>
<para>Rebalance the ring:</para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder object.builder rebalance</userinput></screen>
<note>
<para>This process can take a while.</para>
</note>
<screen><prompt>#</prompt> <userinput>swift-ring-builder object.builder rebalance</userinput>
<computeroutput>Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00</computeroutput></screen>
</step>
</procedure>
</section>

View File

@@ -161,6 +161,13 @@ lock file = /var/lock/object.lock</programlisting>
</procedure>
<procedure>
<title>Install and configure storage node components</title>
<note>
<para>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.</para>
</note>
<note>
<para>Perform these steps on each storage node.</para>
</note>
@@ -176,11 +183,11 @@ lock file = /var/lock/object.lock</programlisting>
<para>Obtain the accounting, container, and object service configuration
files from the Object Storage source repository:</para>
<screen><prompt>#</prompt> <userinput>curl -o /etc/swift/account-server.conf \
https://git.openstack.org/cgit/openstack/swift/plain/etc/account-server.conf?h=stable/kilo</userinput></screen>
https://git.openstack.org/cgit/openstack/swift/plain/etc/account-server.conf-sample?h=stable/kilo</userinput></screen>
<screen><prompt>#</prompt> <userinput>curl -o /etc/swift/container-server.conf \
https://git.openstack.org/cgit/openstack/swift/plain/etc/container-server.conf?h=stable/kilo</userinput></screen>
https://git.openstack.org/cgit/openstack/swift/plain/etc/container-server.conf-sample?h=stable/kilo</userinput></screen>
<screen><prompt>#</prompt> <userinput>curl -o /etc/swift/object-server.conf \
https://git.openstack.org/cgit/openstack/swift/plain/etc/object-server.conf?h=stable/kilo</userinput></screen>
https://git.openstack.org/cgit/openstack/swift/plain/etc/object-server.conf-sample?h=stable/kilo</userinput></screen>
</step>
<step>
<para>Edit the
@@ -301,10 +308,11 @@ pipeline = healthcheck recon object-server</programlisting>
</step>
<step>
<para>In the <literal>[filter:recon]</literal> section, configure
the recon (metrics) cache directory:</para>
the recon (metrics) cache and lock directories:</para>
<programlisting language="ini">[filter:recon]
...
recon_cache_path = /var/cache/swift</programlisting>
recon_cache_path = /var/cache/swift
recon_lock_path = /var/lock</programlisting>
</step>
</substeps>
</step>

View File

@@ -8,40 +8,47 @@
<para>This section describes how to verify operation of the Object
Storage service.</para>
<procedure>
<note>
<para>The <literal>swift</literal> client requires the
<literal>-V 3</literal> parameter to use the Identity version 3
API.</para>
</note>
<note>
<para>Perform these steps on the controller node.</para>
</note>
<step>
<para>Source the <literal>demo</literal> tenant credentials:</para>
<para>Source the <literal>demo</literal> credentials:</para>
<screen><prompt>$</prompt> <userinput>source demo-openrc.sh</userinput></screen>
</step>
<step>
<para>Show the service status:</para>
<screen><prompt>$</prompt> <userinput>swift stat</userinput>
<computeroutput>Account: AUTH_11b9758b7049476d9b48f7a91ea11493
Containers: 0
Objects: 0
Bytes: 0
Content-Type: text/plain; charset=utf-8
X-Timestamp: 1381434243.83760
X-Trans-Id: txdcdd594565214fb4a2d33-0052570383
X-Put-Timestamp: 1381434243.83760</computeroutput></screen>
<screen><prompt>$</prompt> <userinput>swift -V 3 stat</userinput>
<computeroutput>Account: AUTH_c75cafb58f5049b8a976506737210756
Containers: 0
Objects: 0
Bytes: 0
X-Put-Timestamp: 1429736713.92936
X-Timestamp: 1429736713.92936
X-Trans-Id: txdea07add01ca4dbdb49a2-0055380d09
Content-Type: text/plain; charset=utf-8</computeroutput></screen>
</step>
<step>
<para>Upload a test file:</para>
<screen><prompt>$</prompt> <userinput>swift upload demo-container1 <replaceable>FILE</replaceable></userinput></screen>
<screen><prompt>$</prompt> <userinput>swift -V 3 upload demo-container1 <replaceable>FILE</replaceable></userinput>
<computeroutput><replaceable>FILE</replaceable></computeroutput></screen>
<para>Replace <replaceable>FILE</replaceable> with the name of a local
file to upload to the <literal>demo-container1</literal>
container.</para>
</step>
<step>
<para>List containers:</para>
<screen><prompt>$</prompt> <userinput>swift list</userinput>
<screen><prompt>$</prompt> <userinput>swift -V 3 list</userinput>
<computeroutput>demo-container1</computeroutput></screen>
</step>
<step>
<para>Download a test file:</para>
<screen><prompt>$</prompt> <userinput>swift download demo-container1 <replaceable>FILE</replaceable></userinput></screen>
<screen><prompt>$</prompt> <userinput>swift -V 3 download demo-container1 <replaceable>FILE</replaceable></userinput>
<computeroutput><replaceable>FILE</replaceable> [auth 0.295s, headers 0.339s, total 0.339s, 0.005 MB/s]</computeroutput></screen>
<para>Replace <replaceable>FILE</replaceable> with the name of the
file uploaded to the <literal>demo-container1</literal>
container.</para>