Misc language and markup improvements to swift

Change-Id: Ib35a33d2b6f6702d80bb9a3bcb95da787248e937
This commit is contained in:
Shaun McCance
2013-10-17 09:40:44 -04:00
committed by annegentle
parent 1fbcf5fef7
commit fa04e36ab6
7 changed files with 102 additions and 113 deletions

View File

@@ -23,51 +23,44 @@
<orderedlist>
<listitem>
<para>Install swift-proxy service:</para>
<para><screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install swift-proxy memcached python-keystoneclient python-swiftclient python-webob</userinput></screen>
<screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install swift-proxy memcached python-keystoneclient python-swiftclient python-webob</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install openstack-swift-proxy memcached openstack-utils python-swiftclient python-keystone-auth-token</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-swift-proxy memcached openstack-utils python-swiftclient python-keystoneclient</userinput></screen>
</para>
</listitem>
<listitem>
<para>Create self-signed cert for SSL:</para>
<para>
<screen><prompt>#</prompt> <userinput>cd /etc/swift</userinput>
<screen><prompt>#</prompt> <userinput>cd /etc/swift</userinput>
<prompt>#</prompt> <userinput>openssl req -new -x509 -nodes -out cert.crt -keyout cert.key</userinput></screen>
</para>
</listitem>
<listitem>
<para>Modify memcached to listen on the default interfaces.
Preferably this should be on a local, non-public network.
Edit the following line in <filename>/etc/memcached.conf</filename>,
changing:</para>
<para>
<literallayout class="monospaced">-l 127.0.0.1
to
-l &lt;PROXY_LOCAL_NET_IP&gt;</literallayout>
</para>
<literallayout class="monospaced">-l 127.0.0.1</literallayout>
<para>to</para>
<literallayout class="monospaced">-l &lt;PROXY_LOCAL_NET_IP&gt;</literallayout>
</listitem>
<listitem>
<para>Restart the memcached server:</para>
<para>
<screen><prompt>#</prompt> <userinput>service memcached restart</userinput></screen></para>
<screen><prompt>#</prompt> <userinput>service memcached restart</userinput></screen>
</listitem>
<listitem os="rhel;centos;fedora">
<para>RHEL/CentOS/Fedora only: To set up Object Storage to authenticate tokens we need to set the keystone Admin
token in the swift proxy file with the openstack-config command.
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/swift/proxy-server.conf filter:authtoken admin_token $ADMIN_TOKEN</userinput>
<prompt>#</prompt> sudo <userinput>openstack-config --set /etc/swift/proxy-server.conf filter:authtoken auth_token $ADMIN_TOKEN</userinput></screen>
</para>
token in the swift proxy file with the openstack-config command.</para>
<screen><prompt>#</prompt> <userinput>openstack-config --set /etc/swift/proxy-server.conf \
filter:authtoken admin_token $ADMIN_TOKEN</userinput>
<prompt>#</prompt> sudo <userinput>openstack-config --set /etc/swift/proxy-server.conf \
filter:authtoken auth_token $ADMIN_TOKEN</userinput></screen>
</listitem>
<listitem>
<para>Create <filename>/etc/swift/proxy-server.conf</filename>:</para>
<para>
<literallayout os="rhel;centos;fedora;ubuntu;debian" class="monospaced"><xi:include parse="text" href="../samples/proxy-server.conf.txt" /></literallayout>
<literallayout os="opensuse;sles" class="monospaced"><xi:include parse="text" href="../samples/proxy-server.conf.txt-openSUSE" /></literallayout>
</para>
<programlisting os="rhel;centos;fedora;ubuntu;debian" language="ini"><xi:include parse="text" href="../samples/proxy-server.conf.txt" /></programlisting>
<programlisting os="opensuse;sles" language="ini"><xi:include parse="text" href="../samples/proxy-server.conf.txt-openSUSE" /></programlisting>
<note>
<para>If you run multiple memcache servers, put the multiple
IP:port listings in the [filter:cache] section of
the proxy-server.conf file like:
IP:port listings in the [filter:cache] section of the
<filename>proxy-server.conf</filename> file like:
<literallayout class="monospaced">10.1.2.3:11211,10.1.2.4:11211</literallayout></para>
<para>Only the proxy server uses memcache.</para>
</note>
@@ -75,11 +68,11 @@ to
<listitem>
<para>Create the <parameter class="option"
>signing_dir</parameter> and set its permissions
accordingly.<screen os="ubuntu;debian;rhel;centos;fedora"><prompt>#</prompt> <userinput>mkdir -p /home/swift/keystone-signing</userinput>
accordingly.</para>
<screen os="ubuntu;debian;rhel;centos;fedora"><prompt>#</prompt> <userinput>mkdir -p /home/swift/keystone-signing</userinput>
<prompt>#</prompt> <userinput>chown -R swift:swift /home/swift/keystone-signing</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>mkdir -p /home/swift/keystone-signing</userinput>
<prompt>#</prompt> <userinput>chown -R openstack-swift:openstack-swift /home/swift/keystone-signing</userinput></screen>
</para>
</listitem>
<listitem>
<para>Create the account, container and object rings. The
@@ -92,21 +85,17 @@ to
number of replicas of each object, with the last value
being the number of hours to restrict moving a
partition more than once.</para>
<para>
<screen><prompt>#</prompt> <userinput>cd /etc/swift</userinput>
<screen><prompt>#</prompt> <userinput>cd /etc/swift</userinput>
<prompt>#</prompt> <userinput>swift-ring-builder account.builder create 18 3 1</userinput>
<prompt>#</prompt> <userinput>swift-ring-builder container.builder create 18 3 1</userinput>
<prompt>#</prompt> <userinput>swift-ring-builder object.builder create 18 3 1</userinput></screen>
</para>
</listitem>
<listitem>
<para>For every storage device on each node add entries to each
ring:</para>
<para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder add z&lt;ZONE&gt;-&lt;STORAGE_LOCAL_NET_IP&gt;:6002[R&lt;STORAGE_REPLICATION_NET_IP&gt;:6005]/&lt;DEVICE&gt; 100</userinput>
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder add z&lt;ZONE&gt;-&lt;STORAGE_LOCAL_NET_IP&gt;:6002[R&lt;STORAGE_REPLICATION_NET_IP&gt;:6005]/&lt;DEVICE&gt; 100</userinput>
<prompt>#</prompt> <userinput>swift-ring-builder container.builder add z&lt;ZONE&gt;-&lt;STORAGE_LOCAL_NET_IP_1&gt;:6001[R&lt;STORAGE_REPLICATION_NET_IP&gt;:6004]/&lt;DEVICE&gt; 100</userinput>
<prompt>#</prompt> <userinput>swift-ring-builder object.builder add z&lt;ZONE&gt;-&lt;STORAGE_LOCAL_NET_IP_1&gt;:6000[R&lt;STORAGE_REPLICATION_NET_IP&gt;:6003]/&lt;DEVICE&gt; 100</userinput></screen>
</para>
<note>
<para><literal>STORAGE_REPLICATION_NET_IP</literal> is an
optional parameter which must be omitted if you do not
@@ -118,10 +107,10 @@ to
this partition is /srv/node/sdb1, and the path in
<filename>rsyncd.conf</filename> is /srv/node/,
the DEVICE would be sdb1 and the commands would look
like:
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder add z1-10.0.0.1:6002R10.0.1.1:6005/sdb1 100</userinput>
like:</para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder add z1-10.0.0.1:6002R10.0.1.1:6005/sdb1 100</userinput>
<prompt>#</prompt> <userinput>swift-ring-builder container.builder add z1-10.0.0.1:6001R10.0.1.1:6005/sdb1 100</userinput>
<prompt>#</prompt> <userinput>swift-ring-builder object.builder add z1-10.0.0.1:6000R10.0.1.1:6005/sdb1 100</userinput></screen></para>
<prompt>#</prompt> <userinput>swift-ring-builder object.builder add z1-10.0.0.1:6000R10.0.1.1:6005/sdb1 100</userinput></screen>
<note>
<para>Assuming there are 5 zones with 1 node per zone, ZONE
should start at 1 and increment by one for each
@@ -130,19 +119,15 @@ to
</listitem>
<listitem>
<para>Verify the ring contents for each ring:</para>
<para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder</userinput>
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder</userinput>
<prompt>#</prompt> <userinput>swift-ring-builder container.builder</userinput>
<prompt>#</prompt> <userinput>swift-ring-builder object.builder</userinput></screen>
</para>
</listitem>
<listitem>
<para>Rebalance the rings:</para>
<para>
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder rebalance</userinput>
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder rebalance</userinput>
<prompt>#</prompt> <userinput>swift-ring-builder container.builder rebalance</userinput>
<prompt>#</prompt> <userinput>swift-ring-builder object.builder rebalance</userinput></screen>
</para>
<note>
<para>Rebalancing rings can take some time.</para>
</note>
@@ -156,15 +141,12 @@ to
<listitem>
<para>Make sure all the config files are owned by the swift
user:</para>
<para>
<screen os="ubuntu;debian;rhel;centos;fedora"><prompt>#</prompt> <userinput>chown -R swift:swift /etc/swift</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>chown -R openstack-swift:openstack-swift /etc/swift</userinput></screen>
</para>
</listitem>
<listitem>
<para>Start Proxy services:</para>
<para><screen><prompt>#</prompt> <userinput>service proxy-server start</userinput></screen>
</para>
<screen><prompt>#</prompt> <userinput>service proxy-server start</userinput></screen>
</listitem>
</orderedlist>
</section>

View File

@@ -18,8 +18,10 @@
<para>Install Storage node packages:</para>
<para>
<screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install swift-account swift-container swift-object xfsprogs</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install openstack-swift-account openstack-swift-container openstack-swift-object xfsprogs</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-swift-account openstack-swift-container openstack-swift-object xfsprogs</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install openstack-swift-account openstack-swift-container \
openstack-swift-object xfsprogs</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-swift-account openstack-swift-container \
openstack-swift-object xfsprogs</userinput></screen>
</para>
</step>
<step>
@@ -30,7 +32,7 @@
operating system which should not be touched in this step. The
other 10 or 11 disks should be partitioned with a single
partition, then formatted in XFS.</para>
<para><screen os="ubuntu;debian;rhel;centos;fedora"><prompt>#</prompt> <userinput>fdisk /dev/sdb</userinput>
<screen os="ubuntu;debian;rhel;centos;fedora"><prompt>#</prompt> <userinput>fdisk /dev/sdb</userinput>
<prompt>#</prompt> <userinput>mkfs.xfs /dev/sdb1</userinput>
<prompt>#</prompt> <userinput>echo "/dev/sdb1 /srv/node/sdb1 xfs noatime,nodiratime,nobarrier,logbufs=8 0 0" &gt;&gt; /etc/fstab</userinput>
<prompt>#</prompt> <userinput>mkdir -p /srv/node/sdb1</userinput>
@@ -42,11 +44,9 @@
<prompt>#</prompt> <userinput>mkdir -p /srv/node/sdb1</userinput>
<prompt>#</prompt> <userinput>mount /srv/node/sdb1</userinput>
<prompt>#</prompt> <userinput>chown -R openstack-swift:openstack-swift /srv/node</userinput></screen>
</para>
</step>
<step>
<para>Create <filename>/etc/rsyncd.conf</filename>:</para>
<para>
<programlisting language="ini" os="ubuntu;debian;rhel;centos;fedora">uid = swift
gid = swift
log file = /var/log/rsyncd.log
@@ -93,28 +93,22 @@ max connections = 2
path = /srv/node/
read only = false
lock file = /var/lock/object.lock</programlisting>
</para>
</step>
<step>
<para>(Optional) If you want to separate rsync and replication
traffic to replication network, set
<literal>STORAGE_REPLICATION_NET_IP</literal> instead of
<literal>STORAGE_LOCAL_NET_IP</literal>:</para>
<para>
<programlisting>
address = &lt;STORAGE_REPLICATION_NET_IP&gt;
</programlisting>
</para>
<programlisting language="ini">address = &lt;STORAGE_REPLICATION_NET_IP&gt;</programlisting>
</step>
<step>
<para>Edit the following line in
<filename>/etc/default/rsync</filename>:</para>
<para>
<literallayout class="monospaced">RSYNC_ENABLE = true</literallayout></para>
<programlisting language="ini">RSYNC_ENABLE = true</programlisting>
</step>
<step>
<para>Start rsync daemon:</para>
<para><screen><prompt>#</prompt> <userinput>service rsync start</userinput></screen></para>
<screen><prompt>#</prompt> <userinput>service rsync start</userinput></screen>
<note>
<title>Note</title>
<para>The rsync daemon requires no authentication, so it should
@@ -123,11 +117,11 @@ address = &lt;STORAGE_REPLICATION_NET_IP&gt;
</step>
<step>
<para>Create the swift recon cache directory and set its
permissions.<screen os="ubuntu;debian;rhel;centos;fedora"><prompt>#</prompt> <userinput>mkdir -p /var/swift/recon</userinput>
permissions.</para>
<screen os="ubuntu;debian;rhel;centos;fedora"><prompt>#</prompt> <userinput>mkdir -p /var/swift/recon</userinput>
<prompt>#</prompt> <userinput>chown -R swift:swift /var/swift/recon</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>mkdir -p /var/swift/recon</userinput>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>mkdir -p /var/swift/recon</userinput>
<prompt>#</prompt> <userinput>chown -R openstack-swift:openstack-swift /var/swift/recon</userinput></screen>
</para>
</step>
</procedure>
</section>

View File

@@ -45,23 +45,25 @@
<procedure>
<step>
<para>Install core Swift files and openSSH.</para>
<screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install swift openssh-server rsync memcached python-netifaces python-xattr python-memcache</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install openstack-swift openstack-swift-proxy openstack-swift-account openstack-swift-container openstack-swift-object memcached</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-swift openstack-swift-proxy openstack-swift-account openstack-swift-container openstack-swift-object memcached</userinput></screen>
<screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install swift openssh-server rsync memcached python-netifaces \
python-xattr python-memcache</userinput></screen>
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install openstack-swift openstack-swift-proxy \
openstack-swift-account openstack-swift-container \
openstack-swift-object memcached</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-swift openstack-swift-proxy \
openstack-swift-account openstack-swift-container \
openstack-swift-object memcached</userinput></screen>
</step>
<step>
<para>Create and populate configuration directories on all nodes:</para>
<para>
<screen os="ubuntu;debian;rhel;centos;fedora"><prompt>#</prompt> <userinput>mkdir -p /etc/swift</userinput>
<screen os="ubuntu;debian;rhel;centos;fedora"><prompt>#</prompt> <userinput>mkdir -p /etc/swift</userinput>
<prompt>#</prompt> <userinput>chown -R swift:swift /etc/swift/</userinput></screen>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>mkdir -p /etc/swift</userinput>
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>mkdir -p /etc/swift</userinput>
<prompt>#</prompt> <userinput>chown -R openstack-swift:openstack-swift /etc/swift/</userinput></screen>
</para>
</step>
<step>
<para>Create /etc/swift/swift.conf on all nodes:</para>
<para><literallayout class="monospaced"><xi:include parse="text" href="../samples/swift.conf.txt" />
</literallayout></para>
<para>Create <filename>/etc/swift/swift.conf</filename> on all nodes:</para>
<programlisting language="ini"><xi:include parse="text" href="../samples/swift.conf.txt" /></programlisting>
</step>
</procedure>
<note>

View File

@@ -9,33 +9,48 @@
storage network as necessary, this section offers
recommendations and required minimum sizes. Throughput of at
least 1000 Mbps is suggested.</para>
<para>This document refers to three networks. One is a Public Network for
connecting to the Proxy server. The second is a Storage Network that is not
<para>This document refers to three networks. One is a public network for
connecting to the Proxy server. The second is a storage network that is not
accessible from outside the cluster, to which all of the nodes are
connected. Third is a Replication Network that is also isolated from
connected. The third is a replication network that is also isolated from
outside networks and dedicated to replication traffic between Storage nodes.</para>
<para>Public and Storage Networks are mandatory. Replication Network is optional and
must be configured in the Ring.</para>
<para>The public and storage networks are mandatory. The replication network
is optional and must be configured in the Ring.</para>
<para>By default, all of the OpenStack Object Storage services, as well as the
rsync daemon on the Storage nodes are configured to listen on their
rsync daemon on the Storage nodes, are configured to listen on their
<literal>STORAGE_LOCAL_NET</literal> IP addresses.</para>
<para>If Replication Network configured in the Ring, then Account, Container
and Object servers listen on both <literal>STORAGE_LOCAL_NET</literal>
<para>If a replication network is configured in the Ring, then Account, Container
and Object servers listen on both the <literal>STORAGE_LOCAL_NET</literal>
and <literal>STORAGE_REPLICATION_NET</literal>
IP addresses. Rsync daemon will only listen on
IP addresses. The rsync daemon will only listen on the
<literal>STORAGE_REPLICATION_NET</literal> IP
address in this case.</para>
<para>Public Network (Publicly routable IP range): This network is utilized
for providing Public IP accessibility to the API endpoints within the cloud
infrastructure.</para>
<para>Minimum size: one IP address per proxy server (For example, two).</para>
<para>Storage Network (RFC1918 IP Range, not publicly routable):
This network is utilized for all inter-server communications
<variablelist>
<varlistentry>
<term>Public Network (Publicly routable IP range)</term>
<listitem>
<para>This network provides public IP accessibility to the API endpoints
within the cloud infrastructure.</para>
<para>Minimum size: one IP address per proxy server.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Storage Network (RFC1918 IP Range, not publicly routable)</term>
<listitem>
<para>This network is utilized for all inter-server communications
within the Object Storage infrastructure.</para>
<para>Minimum size: one IP address per storage node, and proxy server.</para>
<para>Recommended size: as above, with room for expansion to the largest your cluster will be (For example, 255 or CIDR /24)</para>
<para>Replication Network (RFC1918 IP Range, not publicly routable):
This network is utilized for replication-related communications
<para>Minimum size: one IP address per storage node, and proxy server.</para>
<para>Recommended size: as above, with room for expansion to the largest your
cluster will be (For example, 255 or CIDR /24)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Replication Network (RFC1918 IP Range, not publicly routable)</term>
<listitem>
<para>This network is utilized for replication-related communications
between storage servers within the Object Storage infrastructure.</para>
<para>Recommended size: as for <literal>STORAGE_LOCAL_NET</literal></para>
<para>Recommended size: as for <literal>STORAGE_LOCAL_NET</literal></para>
</listitem>
</varlistentry>
</variablelist>
</section>

View File

@@ -13,31 +13,28 @@
manner that you set up the first proxy node
but with additional configuration
steps.</para>
<para>Once you have more than two proxies, you also
want to load balance between the two, which
means your storage endpoint (what clients use
to connect to your storage) also changes. You
can select from different strategies for load
balancing. For example, you could use round
robin dns, or a software or hardware load
balancer (like pound) in front of the two
proxies, and point your storage url to the
load balancer.</para>
<para>Once you have more than two proxies, you also want to load
balance between the two, which means your storage
endpoint (what clients use to connect to your storage)
also changes. You can select from different strategies
for load balancing. For example, you could use round
robin DNS, or a software or hardware load balancer (like
pound) in front of the two proxies, and point your
storage URL to the load balancer.</para>
<para>Configure an initial proxy node for the initial
setup, and then follow these additional steps
for more proxy servers.</para>
<orderedlist>
<listitem>
<para>Update the list of memcache
servers in
<filename>/etc/swift/proxy-server.conf</filename> for
all the added proxy servers. If you
run multiple memcache servers, use
this pattern for the multiple
IP:port listings:
<para>Update the list of memcache servers in
<filename>/etc/swift/proxy-server.conf</filename>
for all the added proxy servers. If you
run multiple memcache servers, use this
pattern for the multiple IP:port
listings:
<literallayout class="monospaced">10.1.2.3:11211,10.1.2.4:11211</literallayout>
in each proxy server&#8217;s conf
file.:</para>
file:</para>
<para>
<literallayout class="monospaced">
[filter:cache]

View File

@@ -26,8 +26,8 @@
</note>
</step>
<step><para>Run the following swift command with the correct Identity
Service URL:</para><screen><prompt>$</prompt> <userinput>swift -V 2.0 -A $OS_AUTH_URL -U demo:admin -K $ADMINPASS stat</userinput></screen>
<screen><computeroutput>Account: AUTH_11b9758b7049476d9b48f7a91ea11493
Service URL:</para><screen><prompt>$</prompt> <userinput>swift -V 2.0 -A $OS_AUTH_URL -U demo:admin -K $ADMINPASS stat</userinput>
<computeroutput>Account: AUTH_11b9758b7049476d9b48f7a91ea11493
Containers: 0
Objects: 0
Bytes: 0

View File

@@ -6,8 +6,8 @@
<title>Start the Storage Nodes Services</title>
<para>Now that the ring files are on each storage node, the
services can be started. On each storage node run the
following:
<screen><prompt>#</prompt> <userinput>service swift-object start</userinput>
following:</para>
<screen><prompt>#</prompt> <userinput>service swift-object start</userinput>
<prompt>#</prompt> <userinput>service swift-object-replicator start</userinput>
<prompt>#</prompt> <userinput>service swift-object-updater start</userinput>
<prompt>#</prompt> <userinput>service swift-object-auditor start</userinput>
@@ -21,6 +21,5 @@
<prompt>#</prompt> <userinput>service swift-account-auditor start</userinput>
<prompt>#</prompt> <userinput>service rsyslog restart</userinput>
<prompt>#</prompt> <userinput>service memcached restart</userinput></screen>
</para>
<note os="fedora;rhel;centos"><para>On Fedora you may need to use <userinput>systemctl restart <replaceable>service</replaceable></userinput>.</para></note>
</section>