diff options
| author | diogo464 <[email protected]> | 2025-09-18 14:28:47 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-09-18 14:28:47 +0100 |
| commit | 7cbc2df01d042a1192d10cf64ba831afbf691236 (patch) | |
| tree | e3d6bb455702b99db493ba8159418d33c2cd5e58 /README.md | |
| parent | d5654e92dfeba5bc6f0537b42316e4c0138717e5 (diff) | |
fixed some README examples
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 14 |
1 files changed, 9 insertions, 5 deletions
| @@ -101,17 +101,21 @@ afer having setup the network, how you run the experiments is up to you, but `oa | |||
| 101 | 101 | ||
| 102 | the subcommand is `oar-p2p run` and it requires a "schedule" file to run. a schedule is a json array of objects, where each object describes a container to be executed. here is an example: | 102 | the subcommand is `oar-p2p run` and it requires a "schedule" file to run. a schedule is a json array of objects, where each object describes a container to be executed. here is an example: |
| 103 | ```bash | 103 | ```bash |
| 104 | cat << EOF | oar-p2p run --output-dir logs | 104 | export ADDRESS_0=$(oar-p2p net show | cut -d' ' -f2 | head -n 1) |
| 105 | export ADDRESS_1=$(oar-p2p net show | cut -d' ' -f2 | head -n 2 | tail -n 1) | ||
| 106 | echo "Address 0 = $ADDRESS_0" | ||
| 107 | echo "Address 1 = $ADDRESS_1" | ||
| 108 | cat << EOF | oar-p2p run --signal start:5 --output-dir logs | ||
| 105 | [ | 109 | [ |
| 106 | { | 110 | { |
| 107 | "address": "10.16.0.1", | 111 | "address": "$ADDRESS_0", |
| 108 | "image": "ghcr.io/diogo464/oar-p2p/demo:latest", | 112 | "image": "ghcr.io/diogo464/oar-p2p/demo:latest", |
| 109 | "env": { "ADDRESS": "10.16.0.1", "REMOTE": "10.17.0.1", "MESSAGE": "I am container 1" } | 113 | "env": { "ADDRESS": "$ADDRESS_0", "REMOTE": "$ADDRESS_1", "MESSAGE": "I am container 1" } |
| 110 | }, | 114 | }, |
| 111 | { | 115 | { |
| 112 | "address": "10.17.0.1", | 116 | "address": "$ADDRESS_1", |
| 113 | "image": "ghcr.io/diogo464/oar-p2p/demo:latest", | 117 | "image": "ghcr.io/diogo464/oar-p2p/demo:latest", |
| 114 | "env": { "ADDRESS": "10.17.0.1", "REMOTE": "10.16.0.1", "MESSAGE": "I am container 2" } | 118 | "env": { "ADDRESS": "$ADDRESS_1", "REMOTE": "$ADDRESS_0", "MESSAGE": "I am container 2" } |
| 115 | } | 119 | } |
| 116 | ] | 120 | ] |
| 117 | EOF | 121 | EOF |
