Skip to content

Commit

Permalink
Development: Add documentation for local multiple Artemis instances s…
Browse files Browse the repository at this point in the history
…etup (#7492)
  • Loading branch information
laurenzfb authored Nov 7, 2023
1 parent 6acca47 commit 5e6fdfb
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/admin/setup/distributed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -502,3 +502,34 @@ It relays message between instances:

.. figure:: distributed/registry.png
:align: center


Running multiple instances locally
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For testing purposes, you can also run multiple instances on the same machine. You can do this by using
different ports and a unique instance ID for each instance.

#. In ``application-local.yml``, add the following configuration:

.. code:: yaml
eureka:
client:
enabled: true
#. Create additional run configurations for each instance. You will have to add CLI arguments to each additional run
configuration to set the instance ID and the port, e.g. ``--server.port=8081 --eureka.instance.instanceId="Artemis:2"``.
Also, make sure that only one instance has the ``scheduling`` profile enabled:

.. figure:: distributed/run-config.png
:align: center


#. Start the registry service, e.g., by running ``docker compose -f docker/broker-registry.yml up``.

#. Start the first instance with the default run configuration (no additional CLI arguments, ``scheduling`` enabled)
and wait until it is up and running.

#. Start the remaining instances.

You should now be able to see all instances in the registry interface at ``http://localhost:8761``.
Binary file added docs/admin/setup/distributed/run-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5e6fdfb

Please sign in to comment.