Compare commits
1 Commits
main
...
2531885b69
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2531885b69
|
1471
Cargo.lock
generated
1471
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
15
Cargo.toml
15
Cargo.toml
@@ -9,17 +9,4 @@ serde = { version = "1.0.219", features = ["derive"] }
|
|||||||
serde_json = "1.0.143"
|
serde_json = "1.0.143"
|
||||||
tokio = { version = "1.47.1", features = ["full"] }
|
tokio = { version = "1.47.1", features = ["full"] }
|
||||||
tracing = "0.1.41"
|
tracing = "0.1.41"
|
||||||
redis = { version = "0.32.5", features = [
|
redis = { version = "0.25.4", features = ["tokio-comp", "connection-manager"] }
|
||||||
"tokio-comp",
|
|
||||||
"connection-manager",
|
|
||||||
"aio",
|
|
||||||
] }
|
|
||||||
jsonrpsee = { version = "0.26.0", features = ["server", "macros"] }
|
|
||||||
async-trait = "0.1.83"
|
|
||||||
# HTTP client to call Mycelium JSON-RPC
|
|
||||||
reqwest = { version = "0.12.7", features = ["json", "rustls-tls"] }
|
|
||||||
# Base64 encoding for message payloads
|
|
||||||
base64 = "0.22.1"
|
|
||||||
# Error derive for clean error types
|
|
||||||
thiserror = "2.0.16"
|
|
||||||
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "fmt"] }
|
|
||||||
|
|||||||
26
README.md
26
README.md
@@ -1,28 +1,2 @@
|
|||||||
# herocoordinator
|
# herocoordinator
|
||||||
|
|
||||||
## Demo setup
|
|
||||||
|
|
||||||
A python script is provided in the [scripts directory](./scripts/supervisor_flow_demo.py). This script
|
|
||||||
generates some demo jobs to be run by [a supervisor](https://git.ourworld.tf/herocode/supervisor).
|
|
||||||
Communication happens over [mycelium](https://github.com/threefoldtech/mycelium). To run the demo a
|
|
||||||
supervisor must be running, which uses a mycelium instance to read and write messages. A __different__
|
|
||||||
mycelium instance needs to run for the coordinator (the supervisor can run on a different host than
|
|
||||||
the coordinator, so long as the 2 mycelium instances used can reach eachother).
|
|
||||||
|
|
||||||
An example of a local setup:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Run a redis docker
|
|
||||||
docker run -it -d -p 6379:6379 --name redis redis
|
|
||||||
# Spawn mycelium node 1 with default settings. This also creates a TUN interface though that is not
|
|
||||||
# necessary for the messages
|
|
||||||
mycelium
|
|
||||||
# Spawn mycelium node 2, connect to the first node
|
|
||||||
mycelium --key-file key.bin --peers tcp://127.0.0.1:9651 --disable-quic --disable-peer-discovery --api-addr 127.0.0.1:9989 --jsonrpc-addr 127.0.0.1:9990 --no-tun -t 8651
|
|
||||||
# Start the supervisor
|
|
||||||
supervisor --admin-secret admin123 --user-secret user123 --register-secret register123 --mycelium-url http://127.0.0.1:9990 --topic supervisor.rpc
|
|
||||||
# Start the coordinator
|
|
||||||
cargo run # (alternatively if a compiled binary is present that can be run)
|
|
||||||
# Finally, invoke the demo script
|
|
||||||
python3 scripts/supervisor_flow_demo.py
|
|
||||||
```
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user