Skip to content

Commit

Permalink
Merge pull request #7299 from mokibit/add-crossbar-configuration-to-docs
Browse files Browse the repository at this point in the history
Add Crossbar configuration example
  • Loading branch information
p12tic committed Dec 21, 2023
2 parents 0556f90 + 92a9490 commit 6f365ee
Showing 1 changed file with 84 additions and 10 deletions.
94 changes: 84 additions & 10 deletions master/docs/manual/configuration/global.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,7 @@ Wamp
This is a MQ implementation using the `wamp <http://wamp.ws/>`_ protocol.
This implementation uses `Python Autobahn <http://autobahn.ws>`_ wamp client library, and is fully asynchronous (no use of threads).
To use this implementation, you need a wamp router like `Crossbar <http://crossbar.io>`_.

Please refer to Crossbar documentation for more details, but the default Crossbar setup will just work with Buildbot, provided you use the example ``mq`` configuration above, and start Crossbar with:

.. code-block:: bash
# of course, you should work in a virtualenv...
pip install crossbar
crossbar init
crossbar start
To use this implementation, you need a wamp router like Crossbar.

The implementation does not yet support wamp authentication.
This MQ allows buildbot to run in multi-master mode.
Expand All @@ -182,6 +173,89 @@ For example, if a change is received, but the master shuts down before the sched
You must use a router with very reliable connection to the master.
If for some reason, the wamp connection is lost, then the master will stop, and should be restarted via a process manager.

.. _mq-Crossbar:

Crossbar
++++++++

The default Crossbar setup will just work with Buildbot, provided you use the example ``mq``
configuration below, and start Crossbar with:

.. code-block:: bash
# of course, you should work in a virtualenv...
pip install crossbar
crossbar init
crossbar start
.crossbar/config.json:

.. code-block:: bash
{
"version": 2,
"controller": {},
"workers": [
{
"type": "router",
"realms": [
{
"name": "test_realm",
"roles": [
{
"name": "anonymous",
"permissions": [
{
"uri": "",
"match": "prefix",
"allow": {
"call": true,
"register": true,
"publish": true,
"subscribe": true
},
"disclose": {
"caller": false,
"publisher": false
},
"cache": true
}
]
}
]
}
],
"transports": [
{
"type": "web",
"endpoint": {
"type": "tcp",
"port": 1245
},
"paths": {
"ws": {
"type": "websocket"
}
}
}
]
}
]
}
Buildbot can be configured to use Crossbar by the following:

.. code-block:: bash
c["mq"] = {
"type" : "wamp",
"router_url": "ws://localhost:1245/ws",
"realm": "test_realm",
"wamp_debug_level" : "warn"
}
Please refer to `Crossbar <https://github.com/crossbario/crossbar/tree/master>`_ documentation for
more details.

.. bb:cfg:: multiMaster
Expand Down

0 comments on commit 6f365ee

Please sign in to comment.