Last active
November 13, 2017 05:06
-
-
Save david415/da33d2a9f7090faf2a80 to your computer and use it in GitHub Desktop.
use Ansible to configure a Tails system as a Tahoe-LAFS onion grid client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
step 1: | |
get the latest stable python virtualenv and cryptographically verify it. | |
save it to: ~/Persistent/virtualenv-x.xx.x/ | |
step 2: | |
create a virtual env to run ansible: | |
Persistent/virtualenv-x.xx.x/virtualenv.py --system-site-packages Persistent/virtenv-ansible | |
New python executable in Persistent/virtenv-ansible/bin/python | |
Installing setuptools, pip...done. | |
amnesia@amnesia:~$ | |
step 3: | |
activate the virtual env and install ansible and dependencies: | |
. ~/Persistent/virtenv-ansible/bin/activate | |
sudo apt-get install build-essential python-dev | |
pip install ecdsa markupsafe paramiko PyYAML Jinja2 httplib2 | |
pip install ansible | |
step 4: | |
setup the ansible configs and directory hierarchy: | |
mkdir -p ~/Persistent/ansible-base/roles | |
cd Persistent/ansible-base | |
echo 'localhost' > host-inventory | |
step 5: | |
use my Tahoe-LAFS Tails playbook to configure your Tails system: | |
cd /home/amnesia/Persistent/ansible-base/roles | |
git clone https://github.com/david415/ansible-tahoe-lafs.git | |
cd ansible-tahoe-lafs | |
git checkout tails | |
cp playbook-examples/tails_oniongrid_client.yml /home/amnesia/Persistent/ansible-base/ | |
cd ~/Persistent/ansible-base | |
ansible-playbook -i host-inventory tails_oniongrid_client.yml --ask-sudo-pass | |
step 6: | |
check the Tahoe-LAFS grid status local web page: | |
http://127.0.0.1:7657/ | |
This web ui should soon indicate that your local Tahoe-LAFS client is connected to the | |
onion grid introducer node. A few seconds later it should gradually connect all of the storage nodes | |
that it can connect to. | |
step 7: | |
create tahoe root capability alias and upload a file to the onion grid: | |
~/Persistent/tahoe-base/tahoe-lafs-src/bin/tahoe create-alias tahoe | |
cd ~ | |
echo 'hello onion grid' > onionhello | |
~/Persistent/tahoe-base/tahoe-lafs-src/bin/tahoe create-alias tahoe | |
This last command should have printed out a Tahoe-LAFS read capability URI that looks like this: | |
URI:LIT:nbswy3dpebxw42lpnyqgo4tjmqfa | |
step 8: | |
retreive file via web tahoe web ui: | |
If you go back to the Tails web browser... we have our Tahoe status page open. | |
You can enter this tahoe URI from the previous command into the "Open Tahoe-URI:" | |
form field and submit it. This should redirect the browser to a URL that looks like this: | |
http://127.0.0.1:7657/uri/URI%3ALIT%3Anbswy3dpebxw42lpnyqgo4tjmqfa | |
Your browser should now be displaying the contents of the file. | |
step 9: | |
reboot tails, start tahoe and retreive file again | |
usewithtor ~/Persistent/tahoe-base/tahoe-lafs-src/bin/tahoe start | |
check status page to see when the tahoe client is connected to the introducer storage nodes | |
http://127.0.0.1:7657/ | |
retrieve file via local tahoe web ui: | |
http://127.0.0.1:7657/uri/URI%3ALIT%3Anbswy3dpebxw42lpnyqgo4tjmqfa | |
step 10: | |
reboot tails and run the ansible playbook again | |
. ~/Persistent/virtenv-ansible/bin/activate | |
cd ~/Persistent/ansible-base | |
ansible-playbook -i host-inventory tails_oniongrid_client.yml --ask-sudo-pass | |
Tahoe-LAFS should have been started by ansible... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment