talek icon indicating copy to clipboard operation
talek copied to clipboard

Add docker-compose testnet

Open mixmasala opened this issue 1 year ago • 5 comments

This adds Makefile targets to start and stop a local talek deployment using docker-compose and podman or docker. It provides a docker-compose.yml and writes a client configuration file for use with talekclient.

mixmasala avatar Mar 08 '24 08:03 mixmasala

After manually editing talek.json to point at the frontend instance listening on :8080 I wasn't able to read/write data using talekclient. For example:

root@e6d0b67b79b7:/talek_net# talekclient --config talek.json --verbose --read
Connection to RPC established.
[Client] INFO: 2024/03/08 08:10:44 client.go:258: Reading bucket 163
[Client] INFO: 2024/03/08 08:10:45 client.go:258: Reading bucket 164
[Client] INFO: 2024/03/08 08:10:46 client.go:258: Reading bucket 163
[Client] INFO: 2024/03/08 08:10:47 client.go:258: Reading bucket 164
[Client] INFO: 2024/03/08 08:10:48 client.go:258: Reading bucket 163
Timed out waiting for new message.
root@e6d0b67b79b7:/talek_net# talekclient --config talek.json --verbose --write "hello"
Connection to RPC established.
[Client] INFO: 2024/03/08 08:10:54 client.go:258: Reading bucket -1
[Client] INFO: 2024/03/08 08:10:54 client.go:128: Wrote [91 153 108 182](1024) to 163,164.
root@e6d0b67b79b7:/talek_net# talekclient --config talek.json --verbose --read
Connection to RPC established.
[Client] INFO: 2024/03/08 08:10:56 client.go:258: Reading bucket 944
[Client] INFO: 2024/03/08 08:10:57 client.go:258: Reading bucket 63
[Client] INFO: 2024/03/08 08:10:58 client.go:258: Reading bucket 944
[Client] INFO: 2024/03/08 08:10:59 client.go:258: Reading bucket 63
[Client] INFO: 2024/03/08 08:11:00 client.go:258: Reading bucket 944
Timed out waiting for new message.
root@e6d0b67b79b7:/talek_net# 

mixmasala avatar Mar 08 '24 08:03 mixmasala

You should be able to replicate this by using the Makefile target testnet-start and testnet-cli, where the client configuration is written to /talek_net/talek.json inside the container

mixmasala avatar Mar 08 '24 08:03 mixmasala

Is this a a point that's ready for a review?

willscott avatar May 05 '24 20:05 willscott

Is this a a point that's ready for a review?

Yes please. Note that this has the fix from the other open PR (#110) merged to make the write-and-read integration test work.

Let me know if you're actually running travis somewhere and I could add it to .travis.yml too (or if you want to setup github CI to run it i could do that also/instead).

leif avatar May 15 '24 11:05 leif

  • I am not aware of a travis instance running somewhere
  • happy to get github CI set up as well

willscott avatar May 15 '24 16:05 willscott