Skip to content

Commit

Permalink
docs: ucan invocation reasonable defaults (#253)
Browse files Browse the repository at this point in the history
* fix: ucan invvocation reasonable defaults

* fix: docs generic endpoint publisher spec
  • Loading branch information
debuggingfuture committed Jun 20, 2023
1 parent 5ab5fa3 commit 4742b5d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
44 changes: 26 additions & 18 deletions docs/all-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,26 +135,37 @@ There is no support for sharding, concurrency or minimum bidding for these jobs.
#### Examples
Refers to example models at balcalhau repository under [pkg/model/tasks](https://github.com/bacalhau-project/bacalhau/tree/main/pkg/model/tasks)
An example UCAN Invocation that runs the same job as the above example would look like:
```json
{
"with": "ubuntu",
"do": "docker/run",
"inputs": {
"entrypoint": ["echo", "hello", "world"],
"workdir": "/",
"mounts": {},
"outputs": {
"/outputs": ""
},
},
"meta": {
"bacalhau/config": {
"verifier": 1,
"publisher": 4,
}
"with": "ubuntu",
"do": "docker/run",
"inputs": {
"entrypoint": ["echo", "hello", "world"],
"workdir": "/",
"mounts": {},
"outputs": {
"/outputs": ""
}
},
"meta": {
"bacalhau/config": {
"verifier": 1,
"publisher": 4,
"annotations": ["hello"],
"resources": {
"cpu": 1,
"disk": 1073741824,
"memory": 1073741824,
"gpu": 0
},
"timeout": 300e9,
"dnt": false
}
}
}
```

Expand All @@ -178,9 +189,6 @@ An example UCAN Invocation that runs a WebAssembly job might look like:
}
},
"meta": {
"bacalhau/config": {
"verifier": 2,
"publisher": 4,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/running-node/networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ You can use the `--host` flag to restrict network access to the REST api.
You can call [http://dashboard.bacalhau.org:1000/api/v1/run](http://dashboard.bacalhau.org:1000/api/v1/run) with the POST body as a JSON serialized spec

```bash
curl -XPOST -d '{"Engine": "Docker", "Docker": {"Image": "ubuntu", "Entrypoint": ["echo", "hello"]}, "Deal": {"Concurrency": 1}, "Verifier": "Noop", "Publisher": "IPFS"}' 'http://dashboard.bacalhau.org:1000/api/v1/run'; echo
curl -XPOST -d '{"Engine": "Docker", "Docker": {"Image": "ubuntu", "Entrypoint": ["echo", "hello"]}, "Deal": {"Concurrency": 1}, "Verifier": "Noop", "PublisherSpec":{"Type":"IPFS"}}' 'http://dashboard.bacalhau.org:1000/api/v1/run';
```

Once you run the command above, you'll get a CID output:
Expand Down

0 comments on commit 4742b5d

Please sign in to comment.