forked from tangled.org/core
Monorepo for Tangled — https://tangled.org

docs: add redis and spindle setup details

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 3f8d4648 ec15a633

verified
Changed files
+41
docs
+41
docs/hacking.md
···
nix run .#watch-tailwind
```
+
To authenticate with the appview, you will need redis and
+
OAUTH JWKs to be setup:
+
+
```
+
# oauth jwks should already be setup by the nix devshell:
+
echo $TANGLED_OAUTH_JWKS
+
{"crv":"P-256","d":"tELKHYH-Dko6qo4ozYcVPE1ah6LvXHFV2wpcWpi8ab4","kid":"1753352226","kty":"EC","x":"mRzYpLzAGq74kJez9UbgGfV040DxgsXpMbaVsdy8RZs","y":"azqqXzUYywMlLb2Uc5AVG18nuLXyPnXr4kI4T39eeIc"}
+
+
# if not, you can set it up yourself:
+
go build -o genjwks.out ./cmd/genjwks
+
export TANGLED_OAUTH_JWKS="$(./genjwks.out)"
+
+
# run redis in at a new shell to store oauth sessions
+
redis-server
+
```
+
## running a knot
An end-to-end knot setup requires setting up a machine with
···
git remote add local-dev git@nixos-shell:user/repo
git push local-dev main
```
+
+
## running a spindle
+
+
The above VM should already be running a spindle on
+
`localhost:6555`. You can head to the spindle dashboard on
+
`http://localhost:3000/spindles`, and register a spindle
+
with hostname `localhost:6555`. It should instantly be
+
verified. You can then configure each repository to use this
+
spindle and run CI jobs.
+
+
Of interest when debugging spindles:
+
+
```
+
# service logs from journald:
+
journalctl -xeu spindle
+
+
# CI job logs from disk:
+
ls /var/log/spindle
+
+
# debugging spindle db:
+
sqlite3 /var/lib/spindle/spindle.db
+
+
# litecli has a nicer REPL interface:
+
litecli /var/lib/spindle/spindle.db
+
```