Skip to content

Commit

Permalink
Update multi-platform-rabbitmq-deployment.rst
Browse files Browse the repository at this point in the history
Removing reference to Datamover agent
  • Loading branch information
shwethanidd authored Jun 4, 2021
1 parent 6cf8905 commit 250c68a
Showing 1 changed file with 0 additions and 115 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -566,118 +566,3 @@ Please note that each instance should have a unique instance name.
interface. If you need to rerun the federation command again for the same setup, then a fresh CSR request is made to the remote instance.
The remote admin has to approve the new request as before.
DataMover Communication
-----------------------
The DataMover historian running on one instance makes RPC call to platform historian running on remote
instance to store data on remote instance. Platform historian agent returns response back to DataMover
agent. For such a request-response behavior, shovels need to be created on both instances.
1. Please ensure that preliminary steps for multi-platform communication are completed (namely,
steps 1-3 described above) .
2. To setup a data mover to send messages from local instance (say v1) to remote instance (say v2)
and back, we would need to setup shovels on both instances.
Example of RabbitMQ shovel configuration on v1
.. code-block:: json
shovel:
# hostname of remote machine
rabbit-2:
port: 5671
certificates:
private_cert: "path to private key" # For example, /home/volttron/vhome/test_shovel/certificates/private/volttron1.shovelvolttron2.pem
public_cert: "path to public cert" # For example, /home/volttron/vhome/test_shovel/certificates/shovels/volttron2.volttron1.shovelvolttron2.crt
remote_ca: "path to CA cert" # For example, /home/volttron/vhome/test_shovel/certificates/shovels/volttron2_ca.crt
rpc:
# Remote instance name
v2:
# List of pair of agent identities (local caller, remote callee)
- [data.mover, platform.historian]
virtual-host: v1
This says that DataMover agent on v1 wants to make RPC call to platform historian on v2.
.. code-block:: bash
vcfg rabbitmq shovel [--config optional path to rabbitmq_shovel_config.yml] [--max-retries optional maximum CSR retry attempt]
Example of RabbitMQ shovel configuration on v2
.. code-block:: json
shovel:
# hostname of remote machine
rabbit-1:
port: 5671
rpc:
# Remote instance name
v1:
# List of pair of agent identities (local caller, remote callee)
- [platform.historian, data.mover]
virtual-host: v2
This says that platform historian on v2 wants to make RPC call to DataMover agent on v1.
a. On v1, run below command to setup a shovel from v1 to v2.
.. code-block:: bash
vcfg rabbitmq shovel [--config optional path to rabbitmq_shovel_config.yml] [--max-retries optional maximum CSR retry attempt]
b. Create a user on v2 with username set to remote agent's username
( for example, v1.data.mover i.e., <instance_name>.<agent_identity>) and allow
the shovel access to the virtual host of v2.
.. code-block:: bash
cd $RABBITMQ_HOME
vctl rabbitmq add-user <username> <password>
c. On v2, run below command to setup a shovel from v2 to v1
.. code-block:: bash
vcfg rabbitmq shovel [--config optional path to rabbitmq_shovel_config.yml] [--max-retries optional maximum CSR retry attempt]
3. Start Platform driver agent on v1
.. code-block:: bash
./stop-volttron
vcfg --agent platform_driver
./start-volttron
vctl start --tag platform_driver
4. Install DataMover agent on v1. Contents of the install script can look like below.
.. code-block:: bash
#!/bin/bash
export CONFIG=$(mktemp /tmp/abc-script.XXXXXX)
cat > $CONFIG <<EOL
{
"destination-vip": "",
"destination-serverkey": "",
"destination-instance-name": "volttron2",
"destination-message-bus": "rmq"
}
EOL
python scripts/install-agent.py -s services/core/DataMover -c $CONFIG --start --force -i data.mover
Execute the install script.
5. Start platform historian of your choice on v2. Example shows starting SQLiteHistorian
.. code-block:: bash
./stop-volttron
vcfg --agent platform_historian
./start-volttron
vctl start --tag platform_historian
6. Observe data getting stored in sqlite historian on v2.

0 comments on commit 250c68a

Please sign in to comment.