aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md14
1 files changed, 9 insertions, 5 deletions
diff --git a/README.md b/README.md
index 25855b1..45d355f 100644
--- a/README.md
+++ b/README.md
@@ -101,17 +101,21 @@ afer having setup the network, how you run the experiments is up to you, but `oa
101 101
102the 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: 102the 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
104cat << EOF | oar-p2p run --output-dir logs 104export ADDRESS_0=$(oar-p2p net show | cut -d' ' -f2 | head -n 1)
105export ADDRESS_1=$(oar-p2p net show | cut -d' ' -f2 | head -n 2 | tail -n 1)
106echo "Address 0 = $ADDRESS_0"
107echo "Address 1 = $ADDRESS_1"
108cat << 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]
117EOF 121EOF