Skip to content

Commit 231504e

Browse files
committed
Split out the SAIO doc and fixed a typo in the README
1 parent 8170d72 commit 231504e

File tree

2 files changed

+57
-20
lines changed

2 files changed

+57
-20
lines changed

README

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To build documentation run `python setup.py build_sphinx`, and then browse to
1010
The best place to get started is the "SAIO - Swift All In One", which will walk
1111
you through setting up a development cluster of Swift in a VM.
1212

13-
For more information, vist us at http://launchpad.net/swift, or come hang out
13+
For more information, visit us at http://launchpad.net/swift, or come hang out
1414
on our IRC channel, #openstack on freenode.
1515

1616
--

doc/source/development_saio.rst

+56-19
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ SAIO - Swift All In One
33
=======================
44

55
------------------------------------
6-
Instructions for setting up a dev VM
6+
Instructions for setting up a development VM
77
------------------------------------
88

99
This documents setting up a virtual machine for doing Swift development. The
@@ -15,9 +15,15 @@ virtual machine will emulate running a four node Swift cluster.
1515
- Ubuntu Live/Install: http://cdimage.ubuntu.com/releases/10.04/release/ubuntu-10.04-dvd-amd64.iso (4.1 GB)
1616
- Ubuntu Mirrors: https://launchpad.net/ubuntu/+cdmirrors
1717

18-
* Create guest virtual machine from the Ubuntu image (if you are going to use
19-
a separate partition for swift data, be sure to add another device when
20-
creating the VM)
18+
* Create guest virtual machine from the Ubuntu image.
19+
20+
----------------
21+
First scenario: partition for storage
22+
----------------
23+
24+
If you are going to use a separate partition for swift data, be sure to add another device when
25+
creating the VM, and follow these instructions.
26+
2127
* As root on guest (you'll have to log in as you, then `sudo su -`):
2228

2329
#. `apt-get install python-software-properties`
@@ -28,21 +34,47 @@ virtual machine will emulate running a four node Swift cluster.
2834
python-xattr sqlite3 xfsprogs python-webob python-eventlet
2935
python-greenlet python-pastedeploy`
3036
#. Install anything else you want, like screen, ssh, vim, etc.
31-
#. If you would like to use another partition for storage:
32-
33-
#. `fdisk /dev/sdb` (set up a single partition)
34-
#. `mkfs.xfs -i size=1024 /dev/sdb1`
35-
#. Edit `/etc/fstab` and add
37+
#. To use another partition for storage:
38+
#. `fdisk /dev/sdb` (set up a single partition)
39+
#. `mkfs.xfs -i size=1024 /dev/sdb1`
40+
#. Edit `/etc/fstab` and add
3641
`/dev/sdb1 /mnt/sdb1 xfs noatime,nodiratime,nobarrier,logbufs=8 0 0`
42+
#. `mkdir /mnt/sdb1`
43+
#. `mount /mnt/sdb1`
44+
#. `mkdir /mnt/sdb1/1 /mnt/sdb1/2 /mnt/sdb1/3 /mnt/sdb1/4 /mnt/sdb1/test`
45+
#. `chown <your-user-name>:<your-group-name> /mnt/sdb1/*`
46+
#. `mkdir /srv`
47+
#. `for x in {1..4}; do ln -s /mnt/sdb1/$x /srv/$x; done`
48+
#. `mkdir -p /etc/swift/object-server /etc/swift/container-server /etc/swift/account-server /srv/1/node/sdb1 /srv/2/node/sdb2 /srv/3/node/sdb3 /srv/4/node/sdb4 /var/run/swift`
49+
#. `chown -R <your-user-name>:<your-group-name> /etc/swift /srv/[1-4]/ /var/run/swift` -- **Make sure to include the trailing slash after /srv/[1-4]/**
50+
#. Add to `/etc/rc.local` (before the `exit 0`)::
3751

38-
#. If you would like to use a loopback device instead of another partition:
52+
mkdir /var/run/swift
53+
chown <your-user-name>:<your-group-name> /var/run/swift
54+
55+
----------------
56+
Second scenario: loopback device for storage
57+
----------------
3958

40-
#. `dd if=/dev/zero of=/srv/swift-disk bs=1024 count=0 seek=1000000`
59+
If you want to use a loopback device instead of another partition, follow these instructions.
60+
61+
62+
* As root on guest (you'll have to log in as you, then `sudo su -`):
63+
64+
#. `apt-get install python-software-properties`
65+
#. `add-apt-repository ppa:swift-core/ppa`
66+
#. `apt-get update`
67+
#. `apt-get install curl gcc bzr memcached python-configobj
68+
python-coverage python-dev python-nose python-setuptools python-simplejson
69+
python-xattr sqlite3 xfsprogs python-webob python-eventlet
70+
python-greenlet python-pastedeploy`
71+
#. Install anything else you want, like screen, ssh, vim, etc.
72+
#. To use a loopback device instead of another partition:
73+
#. `dd if=/dev/zero of=/srv/swift-disk bs=1024 count=0 seek=1000000`
4174
(modify seek to make a larger or smaller partition)
42-
#. `mkfs.xfs -i size=1024 /srv/swift-disk`
43-
#. Edit `/etc/fstab` and add
75+
#. `mkfs.xfs -i size=1024 /srv/swift-disk`
76+
#. Edit `/etc/fstab` and add
4477
`/srv/swift-disk /mnt/sdb1 xfs loop,noatime,nodiratime,nobarrier,logbufs=8 0 0`
45-
4678
#. `mkdir /mnt/sdb1`
4779
#. `mount /mnt/sdb1`
4880
#. `mkdir /mnt/sdb1/1 /mnt/sdb1/2 /mnt/sdb1/3 /mnt/sdb1/4 /mnt/sdb1/test`
@@ -56,6 +88,12 @@ virtual machine will emulate running a four node Swift cluster.
5688
mkdir /var/run/swift
5789
chown <your-user-name>:<your-group-name> /var/run/swift
5890

91+
----------------
92+
Configuring each node
93+
----------------
94+
95+
Sample configuration files are provided with all defaults in line-by-line comments.
96+
5997
#. Create /etc/rsyncd.conf::
6098

6199
uid = <Your user name>
@@ -461,6 +499,10 @@ virtual machine will emulate running a four node Swift cluster.
461499
[object-auditor]
462500

463501
#. Create `~/bin/resetswift`::
502+
.. note::
503+
504+
If you are using a loopback device, substitute `/dev/sdb1` above with
505+
`/srv/swift-disk`
464506

465507
#!/bin/bash
466508

@@ -476,11 +518,6 @@ virtual machine will emulate running a four node Swift cluster.
476518
sudo service rsyslog restart
477519
sudo service memcached restart
478520

479-
.. note::
480-
481-
If you are using a loopback device, substitute `/dev/sdb1` above with
482-
`/srv/swift-disk`
483-
484521
#. Create `~/bin/remakerings`::
485522

486523
#!/bin/bash

0 commit comments

Comments
 (0)