Skip to content

Commit

Permalink
Replace example crossbar config with links to files in repo
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianJKoopman committed Oct 28, 2020
1 parent b535003 commit 42fc334
Showing 1 changed file with 15 additions and 96 deletions.
111 changes: 15 additions & 96 deletions docs/user/crossbar_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,102 +18,21 @@ the interface to the crossbar server.

Example Config
--------------
Here is the default OCS crossbar config that is bundled into
``simonsobs/ocs-crossbar``:

.. code-block:: json
{
"version": 2,
"workers": [
{
"type": "router",
"options": {
"pythonpath": [
".."
]
},
"realms": [
{
"name": "test_realm",
"roles": [
{
"name": "iocs_agent",
"permissions": [
{
"uri": "observatory.",
"match": "prefix",
"allow": {
"call": true,
"register": true,
"publish": true,
"subscribe": true
},
"disclose": {
"caller": false,
"publisher": false
},
"cache": true
}
]
},
{
"name": "iocs_controller",
"permissions": [
{
"uri": "observatory.",
"match": "prefix",
"allow": {
"call": true,
"register": false,
"publish": true,
"subscribe": true
},
"disclose": {
"caller": false,
"publisher": false
},
"cache": true
}
]
}
]
}
],
"transports": [
{
"type": "web",
"endpoint": {
"type": "tcp",
"port": 8001
},
"paths": {
"ws": {
"type": "websocket",
"auth": {
"anonymous": {
"type": "static",
"role": "iocs_agent"
}
}
},
"call": {
"type": "caller",
"realm": "test_realm",
"role": "iocs_controller",
"options": {
}
}
}
}
]
}
]
}
The unique parts of this to OCS are the realm name, "test_realm", and defined
roles of "iocs_agent" and "iocs_controller. These include the uri prefix of
"observatory.". Additionally we run on port 8001.
An example of the default OCS crossbar config that is bundled into
``simonsobs/ocs-crossbar`` can be found in the repository at
`ocs/docker/crossbar/config.json`_. This is based on the template in
`ocs/ocs/support/crossbar_config.json`_.

The unique parts of this to OCS are the realm name, "test_realm", defined
roles of "iocs_agent" and "iocs_controller, and "address_root" of
"observatory.". Additionally, we run on port 8001.

For further details on crossbar server configuration, see the crossbar `Router
Configuration`_ page.

.. _`ocs/docker/crossbar/config.json`: https://github.com/simonsobs/ocs/blob/develop/docker/crossbar/config.json
.. _`ocs/ocs/support/crossbar_config.json`: https://github.com/simonsobs/ocs/blob/develop/ocs/support/crossbar_config.json
.. _`Router Configuration`: https://crossbar.io/docs/Router-Configuration/

Generating a New Config File
----------------------------
Expand Down

0 comments on commit 42fc334

Please sign in to comment.