1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
=======================================================
Building and Deploying Custom Debian packages for Swift
=======================================================
This documents setting up the prerequisites, downloading the code and building
Debian packages necessary to deploy the various components of the swift
project code. These steps were done on a server running
*Ubuntu 10.04 LTS (Lucid Lynx)*, but should give a good idea what to do on
other distros.
------------------------------------------
Instructions for Deploying Swift-Core PPAs
------------------------------------------
These packages are built from the current development branch "trunk"
* Add swift-core/ppa repository. As root:::
apt-get install python-software-properties
add-apt-repository ppa:swift-core/trunk
apt-get update
* Install the swift base packages::
apt-get install python-swift
apt-get install swift
* Install the swift packages depending on your implementations::
apt-get install swift-auth
apt-get install swift-proxy
apt-get install swift-account
apt-get install swift-container
apt-get install swift-object
* Copy sample configuration files to `/etc/swift` directory
and rename them to `*.conf files`::
cp -a /usr/share/doc/swift/*.conf-sample /etc/swift/
cd /etc/swift ; rename 's/\-sample$//' *.conf-sample
* For servers running the swift-account, swift-container or
swift-object the rsync.conf file should be moved to
the `/etc` directory::
cd /etc/swift
mv rsyncd.conf /etc
* Modify configuration files to meet your implementation requirements
the defaults have been not been geared to a multi-server implementation.
---------------------------------------------------
Instructions for Building Debian Packages for Swift
---------------------------------------------------
* Add swift-core/ppa repository and install prerequisites. As root::
apt-get install python-software-properties
add-apt-repository ppa:swift-core/release
apt-get update
apt-get install curl gcc bzr python-configobj python-coverage python-dev python-nose python-setuptools python-simplejson python-xattr python-webob python-eventlet python-greenlet debhelper python-sphinx python-all python-openssl python-pastedeploy python-netifaces bzr-builddeb
* As you
#. Tell bzr who you are::
bzr whoami '<Your Name> <youremail@.example.com>'
bzr lp-login <your launchpad id>
#. Create a local bazaar repository for dev/testing::
bzr init-repo swift
#. Pull down the swift/debian files::
cd swift
bzr branch lp:~swift-core/swift/debian
#. If you want to merge in a branch::
cd debian
bzr merge lp:<path-to-branch>
#. Create the debian packages::
cd debian
bzr bd --builder='debuild -uc -us'
#. Upload packages to your target servers::
cd ..
scp *.deb root@<swift-target-server>:~/.
----------------------------------------------------
Instructions for Deploying Debian Packages for Swift
----------------------------------------------------
* On a Target Server, As root:
#. Setup the swift ppa::
add-apt-repository ppa:swift-core/release
apt-get update
#. Install dependencies::
apt-get install rsync python-openssl python-setuptools python-webob
python-simplejson python-xattr python-greenlet python-eventlet
python-netifaces
#. Install base packages::
dpkg -i python-swift_<version>_all.deb
dpkg -i swift_<version>_all.deb
#. Install packages depending on your implementation::
dpkg -i swift-auth_<version>_all.deb
dpkg -i swift-proxy_<version>_all.deb
dpkg -i swift-account_<version>_all.deb
dpkg -i swift-container_<version>_all.deb
dpkg -i swift-object_<version>_all.deb
dpkg -i swift-doc_<version>_all.deb
#. Copy sample configuration files to `/etc/swift` directory
and rename them to `*.conf files`::
cp -a /usr/share/doc/swift/*.conf-sample /etc/swift/
cd /etc/swift
rename 's/\-sample$//' *.conf-sample
#. For servers running the swift-account, swift-container or
swift-object the rsync.conf file should be moved to
the `/etc` directory::
cd /etc/swift/
mv rsyncd.conf /etc
#. Modify configuration files to meet your implementation requirements
the defaults have been not been geared to a multi-server implementation.
|