-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'devel' into refactor-workceptor
- Loading branch information
Showing
24 changed files
with
1,115 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
docs/source/getting_started_guide/creating_a_basic_network.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
|
||
.. _creating_a_basic_network: | ||
|
||
############################### | ||
Creating a basic 3-node network | ||
############################### | ||
|
||
In this section, we will create a three-node network. | ||
The three nodes are: foo, bar, and mal. | ||
|
||
`foo -> bar <- mal` | ||
|
||
foo and mal are directly connected to bar with TCP connections. | ||
|
||
foo can reach mal by sending network packets through bar. | ||
|
||
*********************** | ||
Receptor configurations | ||
*********************** | ||
|
||
1. Create three configuration files, one for each node. | ||
|
||
**foo.yml** | ||
|
||
.. code-block:: yaml | ||
--- | ||
- node: | ||
id: foo | ||
- control-service: | ||
service: control | ||
filename: /tmp/foo.sock | ||
- tcp-peer: | ||
address: localhost:2222 | ||
redial: true | ||
- log-level: debug | ||
... | ||
**bar.yml** | ||
|
||
.. code-block:: yaml | ||
--- | ||
- node: | ||
id: bar | ||
- control-service: | ||
service: control | ||
filename: /tmp/bar.sock | ||
- tcp-listener: | ||
port: 2222 | ||
- log-level: debug | ||
... | ||
**mal.yml** | ||
.. code-block:: yaml | ||
--- | ||
- 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 | ||
... | ||
2. Run the services in separate terminals. | ||
|
||
.. code-block:: bash | ||
./receptor --config foo.yml | ||
.. code-block:: bash | ||
./receptor --config bar.yml | ||
.. code-block:: bash | ||
./receptor --config mal.yml | ||
.. seealso:: | ||
|
||
:ref:`configuring_receptor_with_a_config_file` | ||
Configuring Receptor with a configuration file | ||
:ref:`connecting_nodes` | ||
Detail on connecting receptor nodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
############################# | ||
Getting started with Receptor | ||
############################# | ||
|
||
Receptor is an overlay network intended to ease the distribution of work across | ||
a large and dispersed collection of workers. Receptor nodes establish peer-to- | ||
peer connections with each other via existing networks. Once connected, the re- | ||
ceptor mesh provides datagram (UDP-like) and stream (TCP-like) capabilities to | ||
applications, as well as robust unit-of-work handling with resiliency against | ||
transient network failures. | ||
|
||
.. image:: mesh.png | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Contents: | ||
|
||
introduction | ||
installing_receptor | ||
creating_a_basic_network | ||
trying_sample_commands | ||
|
||
.. seealso:: | ||
|
||
:ref:`interacting_with_nodes` | ||
Further examples of working with nodes | ||
:ref:`connecting_nodes` | ||
Detail on connecting receptor nodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
.. _installing_receptor: | ||
|
||
################### | ||
Installing Receptor | ||
################### | ||
|
||
1. `Download receptor <https://github.com/ansible/receptor/releases>`_ | ||
2. Install receptor (per installation guide below) | ||
3. Install receptorctl | ||
|
||
.. code-block:: bash | ||
pip install receptorctl | ||
.. seealso:: | ||
|
||
:ref:`installing` | ||
Detailed installation instructions | ||
:ref:`using_receptor_containers` | ||
Using receptor in containers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
######################## | ||
Introduction to receptor | ||
######################## | ||
|
||
Receptor is an overlay network. | ||
It eases the work distribution across a large and dispersed collection | ||
of workers | ||
|
||
Receptor nodes establish peer-to-peer connections with each other through | ||
existing networks | ||
|
||
Once connected, the receptor mesh provides: | ||
|
||
* Datagram (UDP-like) and stream (TCP-like) capabilities to applications | ||
* Robust unit-of-work handling | ||
* Resiliency against transient network failures |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions
53
docs/source/getting_started_guide/trying_sample_commands.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
################### | ||
Try Sample Commands | ||
################### | ||
|
||
N.B. The prior steps of network setup and receptor installation | ||
need to be completed in order for these command to work | ||
|
||
1. Show network status | ||
|
||
.. code-block:: bash | ||
receptorctl --socket /tmp/foo.sock status | ||
2. Ping node mal from node foo | ||
|
||
.. code-block:: bash | ||
receptorctl --socket /tmp/foo.sock ping mal | ||
3. Submit work from foo to mal and stream results back to foo | ||
|
||
.. code-block:: bash | ||
seq 10 | receptorctl --socket /tmp/foo.sock work submit --node mal echo --payload - -f | ||
4. List work units | ||
|
||
.. code-block:: bash | ||
receptorctl --socket /tmp/foo.sock work list --node foo | ||
5. Get work unit id using jq | ||
|
||
.. code-block:: bash | ||
receptorctl --socket /tmp/foo.sock work list --node foo | jq --raw-output '.|keys|first' | ||
6. Re-stream the work results from work unit | ||
|
||
.. code-block:: bash | ||
receptorctl --socket /tmp/foo.sock work results work_unit_id | ||
Congratulations, you are now using Receptor! | ||
|
||
.. seealso:: | ||
|
||
:ref:`control_service_commands` | ||
Control service commands | ||
:ref:`creating_a_basic_network` | ||
Creating a Basic Network | ||
:ref:`installing_receptor` | ||
Installing Receptor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.. _connecting_nodes: | ||
Connecting nodes | ||
================ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.