CORDA-307: Initial DemoBench documentation. (#408)

* CORDA-307: Initial DemoBench documentation.
* CORDA-307: Update with review comments.
* CORDA-307: Update local installation instructions and download site.
* CORDA-307: Remove download link because it's not ready yet.
* CORDA-307: Mention that the node.conf files within the profiles can be edited by the user.
* CORDA-307: Add DemoBench section to the appendix.
This commit is contained in:
Chris Rankin 2017-03-31 14:16:32 +01:00 committed by GitHub
parent 341e1acf2a
commit 0bbc330a04
3 changed files with 104 additions and 0 deletions

95
docs/source/demobench.rst Normal file
View File

@ -0,0 +1,95 @@
DemoBench
=========
DemoBench is a standalone desktop application that makes it easy to configure and launch local Corda nodes. It is useful for training sessions, demos or just experimentation.
Downloading
-----------
Installers compatible with the latest Corda release will soon be downloadable from the R3 website.
Running DemoBench
-----------------
Configuring a Node
Each node must have a unique name to identify it to the network map service. DemoBench will also suggest local port numbers to use.
The first node will host the network map service, and therefore *must* be a notary. Hence only notary services will be available to be selected in the ``Services`` list. For subsequent nodes you may also select any of Corda's other built-in services.
.. note:: Press ``Ctrl``/``Cmd`` and then click with the mouse to select multiple services, and also to deselect a service again.
..
Press the ``Create Node`` button to launch the Corda node with your configuration.
Running Nodes
DemoBench launches each new node in a terminal emulator. The ``View Database``, ``Launch Explorer`` and ``Launch WebServer`` buttons will all be disabled until the node has finished booting. DemoBench will then display simple statistics about the node such as its cash balance.
.. warning:: After switching tabs, it may currently be necessary to click on the new tab panel before its contents update correctly. This is a BUG and we're working on it.
..
Exiting DemoBench
When you terminate DemoBench, it will automatically shut down any nodes and explorers that it has launched and then exit.
Profiles
You can save all of DemoBench's currently running nodes into a profile, which is a ``ZIP`` file with the following layout, e.g.:
.. parsed-literal::
notary/
node.conf
plugins/
banka/
node.conf
plugins/
bankb/
node.conf
plugins/
example-cordapp.jar
...
..
When DemoBench reloads this profile it will close any nodes that it is currently running and then launch these new nodes instead. Note that the ``node.conf`` files within each profile are JSON/HOCON format, and so can be extracted and edited as required.
Building the Installers
-----------------------
There are three scripts in the ``tools/demobench`` directory:
#. ``package-demobench-exe.bat`` (Windows)
#. ``package-demobench-dmg.sh`` (MacOS)
#. ``package-demobench-rpm.sh`` (Fedora/Linux)
Each script can only be run on its target platform, and each expects the platform's installation tools already to be available.
#. Windows: `Inno Setup 5+ <http://www.jrsoftware.org/isinfo.php>`_
#. MacOS: The packaging tools should be available automatically. The DMG contents will also be signed if the packager finds a valid ``Developer ID Application`` certificate on the keyring. You can create such a certificate by generating a Certificate Signing Request and then asking your local "Apple team agent" to upload it to the Apple Developer portal. (See `here <https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html>`_.)
#. Fedora/Linux: ``rpm-build`` packages.
You will also need to define the environment variable ``JAVA_HOME`` to point to the same JDK that you use to run Gradle. The installer will be written to the ``tools/demobench/build/javapackage/bundles`` directory, and can be installed like any other application for your platform.
Developer Notes
---------------
Developers wishing to run DemoBench *without* building a new installer each time can install it locally using Gradle:
.. parsed-literal::
$ gradlew tools:demobench:installDist
$ cd tools/demobench/build/install/demobench
$ bin/demobench
..
Unfortunately, DemoBench's ``$CLASSPATH`` may be too long for the Windows shell . In which case you can still run DemoBench as follows:
.. parsed-literal::
> java -Djava.util.logging.config.class=net.corda.demobench.config.LoggingConfig -jar lib/demobench-$version.jar
..

View File

@ -124,6 +124,7 @@ Documentation Contents:
:caption: Appendix
loadtesting
demobench
setting-up-a-corda-network
secure-coding-guidelines
release-process

View File

@ -13,6 +13,14 @@ the node. The Corda Shell is based on the popular `CRaSH project <http://www.cra
be easily added to the node by simply dropping Groovy or Java files into the node's ``shell-commands`` directory.
We have many enhancements planned over time including SSH access, more commands and better tab completion.
There is a new tool "DemoBench", which makes it easy to configure and launch local Corda nodes. It is a standalone desktop app that can be bundled with its own JRE and packaged as either EXE (Windows), DMG (MacOS) or RPM (Linux-based). It has the following features:
#. New nodes can be added at the click of a button. Clicking "Add node" creates a new tab that lets you edit the most important configuration properties of the node before launch, such as its legal name and which Cordapps will be loaded.
#. Each tab contains a terminal emulator, attached to the pty of the node. This lets you see console output.
#. You can launch an Explorer instance for each node at the click of a button. Credentials are handed to the Explorer so it starts out logged in already.
#. Some basic statistics are shown about each node, informed via the RPC connection.
#. Another button launches a database viewer in the system browser.
#. The configurations of all running nodes can be saved into a single ``.profile`` file that can be reloaded later.
Milestone 9
-----------