Merge pull request #8 from Rodrigoplp/add-tahoe-lafs

Adding Tahoe-LAFS (concluded).
This commit is contained in:
Rodrigo Pedroso Leite Pinto 2024-11-12 01:25:36 -03:00 committed by GitHub
commit ba00fa4e2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 1052 additions and 8 deletions

4
.gitignore vendored
View file

@ -1 +1,5 @@
.venv .venv
introducer
storage0
storage1
webapp

View file

@ -4,27 +4,25 @@ Private Facts is a web app to track your private info.
[//]: # (Tahoe Logo) [//]: # (Tahoe Logo)
[//]: # (Badges: Build status, UV, Python version, Downloads) [//]: # (Badges: Build status, UV, Python version, Downloads)
#### Why private facts? #### Why private facts?
The project intends to be a demonstration of how to use [Tahoe-lafs]() "provider independent privacy". The project intends to be a demonstration of how to use [Tahoe-lafs]() "provider independent privacy".
## Installation ## Installation
#### Install from source ### Install from source
```bash ```bash
git clone https://github.com/blaisep/private_facts.git && cd private_facts git clone https://github.com/blaisep/private_facts.git && cd private_facts
``` ```
#### Install from (Docker) Image ### Install from (Docker) Image
TBA TBA
#### ###
```bash ```bash
a bash code block a bash code block
@ -34,7 +32,6 @@ a bash code block
### Run using a (OCI) container ### Run using a (OCI) container
```python ```python
A Python code block A Python code block
``` ```
@ -43,7 +40,6 @@ A Python code block
The project issue tracker is getting migrated. For now, feel free to open an issue and let us know how how to improve. The project issue tracker is getting migrated. For now, feel free to open an issue and let us know how how to improve.
## Contributing ## Contributing
Pull requests are welcome. For major changes, please open an issue first Pull requests are welcome. For major changes, please open an issue first
@ -51,6 +47,37 @@ to discuss what you would like to change.
### Set up the developer environment ### Set up the developer environment
Initiate Tahoe-LAFS servers (one introducer, two storage servers and a client server):
Introducer server:
```sh
.venv/bin/tahoe create-introducer --listen=tcp --port=5555 --location=tcp:localhost:5555 ./introducer
.venv/bin/tahoe -d introducer run &>/dev/null &
```
Two storage servers:
```sh
.venv/bin/tahoe create-node --introducer $(cat introducer/private/introducer.furl) --nickname storage0 --webport 6001 --location tcp:localhost:6003 --port 6003 ./storage0
.venv/bin/tahoe create-node --introducer $(cat introducer/private/introducer.furl) --nickname storage1 --webport 6101 --location tcp:localhost:6103 --port 6103 ./storage1
.venv/bin/tahoe -d storage0 run &>/dev/null &
.venv/bin/tahoe -d storage1 run &>/dev/null &
```
Client:
```sh
.venv/bin/tahoe create-client --introducer $(cat introducer/private/introducer.furl) --nickname webapp --webport 6401 --shares-total=3 --shares-needed=2 --shares-happy=3 ./webapp
.venv/bin/tahoe -d webapp run &>/dev/null &
```
The commands should return four PIDs. Note them down to kill them later, when finished, with:
```sh
kill -9 <PID>
```
### Getting ready for your first pull request ### Getting ready for your first pull request
Please make sure to update tests as appropriate. Please make sure to update tests as appropriate.

View file

@ -4,4 +4,9 @@ version = "0.1.0"
description = "Add your description here" description = "Add your description here"
readme = "README.md" readme = "README.md"
requires-python = ">=3.11" requires-python = ">=3.11"
dependencies = [] dependencies = [
"attrs==23.2.0",
"cryptography<42",
"tahoe-lafs>=1.19.0",
"wheel>=0.45.0",
]

1008
uv.lock generated

File diff suppressed because it is too large Load diff