about summary refs log tree commit diff
path: root/tvix/boot
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-07-30T13·16+0300
committerclbot <clbot@tvl.fyi>2024-07-30T14·14+0000
commit4277aa0db68c2288bb4beba2c2fa0dfcfa23c36c (patch)
treeaa0f03bac8a1b79cf68531420b1adc3d22387c98 /tvix/boot
parentb21ca2ac26d93f5785211ea2702c9514deb8097b (diff)
docs(tvix/boot): update README more r/8430
The environment variables caused both nar-bridge and tvix-store daemon
to try to connect to the same store, which fails due to locking issues.

Pass the config to `tvix-store daemon` directly. Also, add the
`--otlp=false` to the instructions to remove spam, most users don't have
a OTLP collector running.

Explain when to use gRPC in `tvix-store virtiofs` and when not.

Also, point out to be able to boot a NixOS closure, it needs to be
copied into the store first.

Change-Id: If4eda07bba28ad0bbe70e468cb727441a21b0588
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12067
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Diffstat (limited to 'tvix/boot')
-rw-r--r--tvix/boot/README.md39
1 files changed, 28 insertions, 11 deletions
diff --git a/tvix/boot/README.md b/tvix/boot/README.md
index 5d5ab41e7323..b183285b2b37 100644
--- a/tvix/boot/README.md
+++ b/tvix/boot/README.md
@@ -31,21 +31,35 @@ the `tvix` directory:
 export PATH=$PATH:$PWD/target/release-with-debug
 ```
 
-Secondly, configure tvix to use the local backend:
+Now, spin up tvix-daemon, connecting to some (local) backends:
 
 ```
-export BLOB_SERVICE_ADDR=objectstore+file://$PWD/blobs
-export DIRECTORY_SERVICE_ADDR=sled://$PWD/directories.sled
-export PATH_INFO_SERVICE_ADDR=sled://$PWD/pathinfo.sled
+tvix-store --otlp=false daemon \
+  --blob-service-addr=objectstore+file://$PWD/blobs \
+  --directory-service-addr=sled://$PWD/directories.sled \
+  --path-info-service-addr=sled://$PWD/pathinfo.sled &
 ```
 
-Potentially copy some data into tvix-store (via nar-bridge):
+Copy some data into tvix-store (we use `nar-bridge` for this for now):
 
 ```
-mg run //tvix:store -- daemon &
-mg run //tvix:nar-bridge -- &
+mg run //tvix:nar-bridge -- --otlp=false &
 rm -Rf ~/.cache/nix; nix copy --to http://localhost:9000\?compression\=none $(mg build //third_party/nixpkgs:hello)
-pkill nar-bridge; pkill tvix-store
+pkill nar-bridge
+```
+
+By default, the `tvix-store virtiofs` command used in the `runVM` script
+connects to a running `tvix-store daemon` via gRPC - in which case you want to
+keep `tvix-store daemon` running.
+
+In case you want to have `tvix-store virtiofs` open the stores directly, kill
+`tvix-store daemon` too, and export the addresses from above:
+
+```
+pkill tvix-store
+export BLOB_SERVICE_ADDR=objectstore+file://$PWD/blobs
+export DIRECTORY_SERVICE_ADDR=sled://$PWD/directories.sled
+export PATH_INFO_SERVICE_ADDR=sled://$PWD/pathinfo.sled
 ```
 
 #### Interactive shell
@@ -100,9 +114,12 @@ Hello, world!
 [    0.299422] reboot: Power down
 ```
 
-#### Execute a NixOS system closure
-It's also possible to invoke a system closure. To do this, tvix-init honors the
-init= cmdline option, and will switch_root to it.
+#### Boot a NixOS system closure
+It's also possible to boot a system closure. To do this, tvix-init honors the
+init= cmdline option, and will `switch_root` to it.
+
+Make sure to first copy that system closure into tvix-store,
+using a similar `nix copy` comamnd as above.
 
 
 ```