https://github.com/ansible/receptor/releases
foo -> bar <- mal
foo and mal are directly connected to bar with TCP connections.
foo can reach mal by sending network packets through bar.
copy and paste these into local files
foo.yml
---
- node:
id: foo
- control-service:
service: control
filename: /tmp/foo.sock
- tcp-peer:
address: localhost:2222
redial: true
- log-level: debug
bar.yml
---
- node:
id: bar
- control-service:
service: control
filename: /tmp/bar.sock
- tcp-listener:
port: 2222
- log-level: debug
mal.yml
---
- node:
id: mal
- control-service:
service: control
filename: /tmp/mal.sock
- tcp-peer:
address: localhost:2222
redial: true
- log-level: debug
- work-command:
workType: echo
command: bash
params: "-c \"while read -r line; do echo $line; sleep 1; done\""
allowruntimeparams: true
run the services in three separate shell terminals
./receptor -c foo.yml
./receptor -c bar.yml
./receptor -c mal.yml
pip install receptorctl
To show network status
receptorctl --socket /tmp/foo.sock status
Ping node mal from node foo
receptorctl --socket /tmp/foo.sock ping mal
Submit work from foo to mal, and stream results back to foo.
seq 10 | receptorctl --socket /tmp/foo.sock work submit --node mal echo --payload - -f
List work units
receptorctl --socket /tmp/foo.sock work list
Re-stream the work results from work unit
receptorctl --socket /tmp/foo.sock work results 7FJHdF45
This is a good start. My one question -why is pip install later and not up with the download? (and do users really need to download or can they just run pip install to get receptor?
You'll want to add more descriptions in some of this. See https://docs.ansible.com/ansible/devel/getting_started/index.html for a great getting started guide to help you see what I mean. There's also the ee getting started at that similar location for another example.