Skip to content

Instantly share code, notes, and snippets.

@LincolnBryant
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LincolnBryant/c0d1a9e198b77ca8a76a to your computer and use it in GitHub Desktop.
Save LincolnBryant/c0d1a9e198b77ca8a76a to your computer and use it in GitHub Desktop.
Tahoe-LAFS build & setup under CentOS 6.5

Tahoe-LAFS Build for CentOS 6.5

build requirements

yum install openssl-devel libffi-devel

creating virtualenv

virtualenv tahoe
git clone https://github.com/tahoe-lafs/tahoe-lafs
source tahoe/bin/activate

create requirements.txt

cat << EOF > requirements.txt;
Nevow==0.11.1
Twisted==14.0.0
cffi==0.8.2
cryptography==0.4
foolscap==0.6.4
mock==1.0.1
pyOpenSSL==0.14
pyasn1==0.1.7
pycparser==2.10
pycrypto==2.6.1
pycryptopp==0.6.0.1206569328141510525648634803928199668821045408958
simplejson==3.5.3
six==1.7.3
zbase32==1.1.5
zfec==1.4.24
zope.interface==4.1.1
service-identity
EOF

install requirements

while read line; do easy_install $line; done < requirements.txt

Starting a new Tahoe-LAFS Grid on CentOS 6.5

For my purposes I want to remove any potential bottlenecks, so I've created a ramdisk to store my files. In a production environment you surely would want to point this at a disk.

create ramdisk basedir for testing (as root)

mkdir /mnt/ramdisk
mount -t tmpfs -o size=2g tmpfs /mnt/ramdisk
chown username: /mnt/ramdisk/

create & start the introducer

cd /mnt/ramdisk
tahoe create-introducer introducer
tahoe start introducer

create a node

mkdir /mnt/ramdisk/node
tahoe create-node --basedir /mnt/ramdisk/node

copy the introducer furl to the client

cd /mnt/ramdisk/introducer/private
cat introducer.furl
<copy pasted string into node/tahoe.cfg>

start the node

tahoe start --basedir /mnt/ramdisk/node

(misc) moving the venv around and starting nodes

move the virtualenv over

tar -cvzf tahoe-venv.tar.gz tahoe/
scp r- tahoe-venv.tar.gz node2:~/.
ssh node2
tar -xvzf tahoe-venv.tar.gz
source tahoe/bin/activate

create the ramdisk again (as root)

mkdir /mnt/ramdisk
mount -t tmpfs -o size=2g tmpfs /mnt/ramdisk
chown username: /mnt/ramdisk/

creating a second node

mkdir /mnt/ramdisk/node
tahoe create-node --basedir /mnt/ramdisk/node

As before, copy the introducer furl into node/tahoe.cfg and then

tahoe start --basedir /mnt/ramdisk/node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment