openSUSE instructions for swift

Note that openSUSE uses openstack-swift as user/group

Change-Id: I89a9f71c7c63c28cdf1ebe2e738e0791b8b4e2fb
This commit is contained in:
Andreas Jaeger 2013-10-13 20:56:12 +02:00
parent 570df63f82
commit bcf7f723d1
6 changed files with 117 additions and 21 deletions

View File

@ -10,7 +10,15 @@
enable account management by configuring it in the
<filename>proxy-server.conf</filename> file.</para>
<note>
<para>Swift processes run under a separate user and group, set by configuration options, and referred to as swift:swift. The default user is swift, which may not exist on your system.</para>
<para>Swift processes run under a separate user and group, set
by configuration options, and referred to as <phrase
os="ubuntu;debian;rhel;centos;fedora">swift:swift</phrase><phrase
os="opensuse">openstack-swift:openstack-swift</phrase>. The
default user is <phrase
os="ubuntu;debian;rhel;centos;fedora">swift, which may not
exist on your system.</phrase><phrase
os="opensuse">openstack-swift.</phrase>
</para>
</note>
<orderedlist>
<listitem>
@ -53,7 +61,8 @@ to
<listitem>
<para>Create <filename>/etc/swift/proxy-server.conf</filename>:</para>
<para>
<literallayout class="monospaced"><xi:include parse="text" href="../samples/proxy-server.conf.txt" /></literallayout>
<literallayout os="rhel;centos;fedora;ubuntu;debian" class="monospaced"><xi:include parse="text" href="../samples/proxy-server.conf.txt" /></literallayout>
<literallayout os="opensuse" class="monospaced"><xi:include parse="text" href="../samples/proxy-server.conf.txt-openSUSE" /></literallayout>
</para>
<note>
<para>If you run multiple memcache servers, put the multiple
@ -66,8 +75,10 @@ to
<listitem>
<para>Create the <parameter class="option"
>signing_dir</parameter> and set its permissions
accordingly.<screen><prompt>#</prompt> <userinput>mkdir -p /home/swift/keystone-signing</userinput>
accordingly.<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"><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>
@ -85,7 +96,7 @@ to
<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>
<prompt>#</prompt> <userinput>swift-ring-builder object.builder create 18 3 1</userinput></screen>
</para>
</listitem>
<listitem>
@ -101,7 +112,7 @@ to
optional parameter which must be omitted if you do not
want to use dedicated network for replication</para>
</note>
<para>For example, if you were setting up a storage node with a
<para>For example, if you were setting up a storage node with a
partition in Zone 1 on IP 10.0.0.1. Storage node has address 10.0.1.1 from
replication network. The mount point of
this partition is /srv/node/sdb1, and the path in
@ -145,11 +156,15 @@ to
<listitem>
<para>Make sure all the config files are owned by the swift
user:</para>
<para><screen><prompt>#</prompt> <userinput>chown -R swift:swift /etc/swift</userinput></screen></para>
<para>
<screen os="ubuntu;debian;rhel;centos;fedora"><prompt>#</prompt> <userinput>chown -R swift:swift /etc/swift</userinput></screen>
<screen os="opensuse"><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>
<para><screen><prompt>#</prompt> <userinput>service proxy-server start</userinput></screen>
</para>
</listitem>
</orderedlist>
</section>

View File

@ -30,18 +30,24 @@
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><prompt>#</prompt> <userinput>fdisk /dev/sdb</userinput></screen>
<programlisting>mkfs.xfs /dev/sdb1
echo "/dev/sdb1 /srv/node/sdb1 xfs noatime,nodiratime,nobarrier,logbufs=8 0 0" &gt;&gt; /etc/fstab
mkdir -p /srv/node/sdb1
mount /srv/node/sdb1
chown -R swift:swift /srv/node</programlisting>
<para><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>
<prompt>#</prompt> <userinput>mount /srv/node/sdb1</userinput>
<prompt>#</prompt> <userinput>chown -R swift:swift /srv/node</userinput></screen>
<screen os="opensuse"><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>
<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>uid = swift
<programlisting language="ini" os="ubuntu;debian;rhel;centos;fedora">uid = swift
gid = swift
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
@ -59,6 +65,29 @@ 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</programlisting>
<programlisting language="ini" os="opensuse">uid = openstack-swift
gid = openstack-swift
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
address = &lt;STORAGE_LOCAL_NET_IP&gt;
[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/
@ -94,8 +123,10 @@ address = &lt;STORAGE_REPLICATION_NET_IP&gt;
</step>
<step>
<para>Create the swift recon cache directory and set its
permissions.<screen><prompt>#</prompt> <userinput>mkdir -p /var/swift/recon</userinput>
permissions.<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"><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>

View File

@ -45,14 +45,17 @@
<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="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"><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><prompt>#</prompt> <userinput>mkdir -p /etc/swift</userinput>
<prompt>#</prompt> <userinput>chown -R swift:swift /etc/swift/</userinput> </screen>
<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"><prompt>#</prompt> <userinput>mkdir -p /etc/swift</userinput>
<prompt>#</prompt> <userinput>chown -R openstack-swift:openstack-swift /etc/swift/</userinput></screen>
</para>
</step>
<step>

View File

@ -22,7 +22,7 @@
<para>The sample <filename>proxy-server.conf</filename> file uses "swift" for <replaceable>ADMIN_PASS</replaceable>. If you do not wish to have the swift admin
password stored in your shell's history, you can
run the following command:</para>
<screen><prompt>$</prompt> <userinput>export SWIFT_PROXY_CONF="/etc/swift/proxy-server.conf export OS_PASSWORD=$( grep admin_password ${SWIFT_PROXY_CONF} | awk '{ print $NF }' )</userinput></screen>
<screen><prompt>$</prompt> <userinput>export SWIFT_PROXY_CONF=/etc/swift/proxy-server.conf export OS_PASSWORD=$( grep admin_password ${SWIFT_PROXY_CONF} | awk '{ print $NF }' )</userinput></screen>
</note>
</step>
<step><para>Run the following swift command with the correct Identity

View File

@ -22,5 +22,5 @@
<prompt>#</prompt> <userinput>service rsyslog restart</userinput>
<prompt>#</prompt> <userinput>service memcached restart</userinput></screen>
</para>
<note><para>On Fedora you may need to use <userinput>systemctl restart <replaceable>service</replaceable></userinput>.</para></note>
<note os="fedora;rhel;centos"><para>On Fedora you may need to use <userinput>systemctl restart <replaceable>service</replaceable></userinput>.</para></note>
</section>

View File

@ -0,0 +1,47 @@
[DEFAULT]
bind_port = 8888
user = openstack-swift
[pipeline:main]
pipeline = healthcheck cache authtoken keystoneauth proxy-server
[app:proxy-server]
use = egg:swift#proxy
allow_account_management = true
account_autocreate = true
[filter:keystoneauth]
use = egg:swift#keystoneauth
operator_roles = Member,admin,swiftoperator
[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
# Delaying the auth decision is required to support token-less
# usage for anonymous referrers ('.r:*').
delay_auth_decision = true
# cache directory for signing certificate
signing_dir = /home/swift/keystone-signing
# auth_* settings refer to the Keystone server
auth_protocol = http
auth_host = 192.168.56.3
auth_port = 35357
# the same admin_token as provided in keystone.conf
admin_token = 012345SECRET99TOKEN012345
# the service tenant and swift userid and password created in Keystone
admin_tenant_name = service
admin_user = swift
admin_password = swift
[filter:cache]
use = egg:swift#memcache
[filter:catch_errors]
use = egg:swift#catch_errors
[filter:healthcheck]
use = egg:swift#healthcheck