From b5beb6119cd204d6241cd27e373557452844e1f9 Mon Sep 17 00:00:00 2001 From: Ryan Fowler Date: Wed, 20 Nov 2019 14:39:29 +0000 Subject: [PATCH] CORDA-3158: Update docs with info about CAPSULE_CACHE_DIR (#5735) * CORDA-3158: Update docs with info about CAPSULE_CACHE_DIR for capsule cache home * CORDA-3158: Update docs with info about CAPSULE_CACHE_DIR for capsule cache home --- docs/source/deploying-a-node.rst | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/source/deploying-a-node.rst b/docs/source/deploying-a-node.rst index 85d0fed967..2f50b1e958 100644 --- a/docs/source/deploying-a-node.rst +++ b/docs/source/deploying-a-node.rst @@ -7,6 +7,12 @@ Deploying a node to a server whether they have developed and tested a CorDapp following the instructions in :doc:`generating-a-node` or are deploying a third-party CorDapp. +.. note:: When deploying multiple nodes in parallel the package tool (Capsule) that Corda uses can encounter + issues retrieving dependencies. This is due to each node trying to download the dependencies in a common + location. In these cases it is recommended to set the environment variable ``CAPSULE_CACHE_DIR`` which + will allow the Capsule to maintain a separate cache for each node. This is used in the example descriptions + below. See the `Capsule documentation `_ for more details. + Linux: Installing and running Corda as a system service ------------------------------------------------------- We recommend creating system services to run a node and the optional test webserver. This provides logging and service @@ -90,6 +96,7 @@ handling, and ensures the Corda service is run at boot. WorkingDirectory=/opt/corda ExecStart=/usr/bin/java -jar /opt/corda/corda.jar Restart=on-failure + Environment="CAPSULE_CACHE_DIR=./capsule" [Install] WantedBy=multi-user.target @@ -244,17 +251,20 @@ at boot, and means the Corda service stays running with no users connected to th .. code-block:: batch - nssm install cordanode1 C:\ProgramData\Oracle\Java\javapath\java.exe + nssm install cordanode1 java.exe + nssm set cordanode1 AppParameters "-jar corda.jar" nssm set cordanode1 AppDirectory C:\Corda nssm set cordanode1 AppStdout C:\Corda\service.log nssm set cordanode1 AppStderr C:\Corda\service.log + nssm set cordanode1 AppEnvironmentExtra CAPSULE_CACHE_DIR=./capsule nssm set cordanode1 Description Corda Node - Bank of Breakfast Tea nssm set cordanode1 Start SERVICE_AUTO_START sc start cordanode1 9. Modify the batch file: - * If you are installing multiple nodes, use a different service name (``cordanode1``) for each node + * If you are installing multiple nodes, use a different service name (``cordanode1``), and modify + `AppDirectory`, `AppStdout` and `AppStderr` for each node accordingly * Set an informative description 10. Provision the required certificates to your node. Contact the network permissioning service or see