QR code generator, update readme
Added a QR code code generator that might be used for auth. Updated README with better instructions for setting up Tahoe grid.
This commit is contained in:
parent
ec1ed9e487
commit
70a92cb0e6
7 changed files with 75 additions and 236 deletions
61
README.md
61
README.md
|
@ -60,37 +60,66 @@ The project issue tracker is getting migrated. For now, feel free to open an iss
|
|||
Pull requests are welcome. For major changes, please open an issue first
|
||||
to discuss what you would like to change.
|
||||
|
||||
### Set up the developer environment
|
||||
### Install dependencies
|
||||
|
||||
Initiate Tahoe-LAFS servers (one introducer, two storage servers and a client server):
|
||||
```sh
|
||||
uv venv
|
||||
source .venv/bin/activate
|
||||
uv pip install -r pyproject.toml
|
||||
```
|
||||
|
||||
### Set up developer environment
|
||||
|
||||
Setup a grid:
|
||||
|
||||
```sh
|
||||
grid-manager --config ./gm0 create
|
||||
```
|
||||
|
||||
Initiate Tahoe-LAFS servers (one introducer, two storage servers and a client server, each in a separate terminal window):
|
||||
|
||||
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 &
|
||||
.venv/bin/tahoe create-introducer --listen=tcp --port=6001 --location=tcp:localhost:6001 ./introducer
|
||||
.venv/bin/tahoe -d introducer run
|
||||
```
|
||||
|
||||
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 &
|
||||
.venv/bin/tahoe create-node --introducer $(cat introducer/private/introducer.furl) --nickname storage0 --webport 6101 --location tcp:localhost:6102 --port 6102 ./storage0
|
||||
.venv/bin/tahoe create-node --introducer $(cat introducer/private/introducer.furl) --nickname storage1 --webport 6201 --location tcp:localhost:6202 --port 6202 ./storage1
|
||||
.venv/bin/tahoe -d storage0 run
|
||||
.venv/bin/tahoe -d storage1 run
|
||||
```
|
||||
|
||||
Add storage servers to grid and create certificates:
|
||||
|
||||
```sh
|
||||
grid-manager --config ./gm0 add storage0 $(cat storage0/node.pubkey)
|
||||
grid-manager --config ./gm0 add storage1 $(cat storage1/node.pubkey)
|
||||
grid-manager --config ./gm0 sign storage0 > ./storage0/gridmanager.cert 30
|
||||
grid-manager --config ./gm0 sign storage1 > ./storage1/gridmanager.cert 30
|
||||
```
|
||||
|
||||
Edit storage servers to make them announce their certificates to the grid. Edit the `tahoe.cfg` file in `storage0` and `storage1`:
|
||||
|
||||
```sh
|
||||
[storage]
|
||||
grid_management = true
|
||||
|
||||
[grid_manager_certificates]
|
||||
default = gridmanager.cert
|
||||
```
|
||||
|
||||
Re-start storage servers.
|
||||
|
||||
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>
|
||||
.venv/bin/tahoe create-client --introducer $(cat introducer/private/introducer.furl) --nickname webapp --webport 6301 --shares-total=3 --shares-needed=2 --shares-happy=3 ./webapp
|
||||
.venv/bin/tahoe -d webapp run
|
||||
```
|
||||
|
||||
### Getting ready for your first pull request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue