From 44f3902543848db945f8c4ccea60532d1b78860c Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Fri, 29 Jan 2021 20:06:07 -0500 Subject: drop "default database"; rework accordingly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move first mention of LIBEUFIN_{SANDBOX,NEXUS}_DB_CONNECTION prior to first command and say env var must be set before invoking. - Remove "by default the database is ..." (but keep the "reset" sentence in the case of ‘LIBEUFIN_SANDBOX_DB_CONNECTION’. - For nexus, delete one redundant example of ‘libeufin-nexus serve’. - Add post-example explanation for remaining example. --- libeufin/nexus-tutorial.rst | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'libeufin') diff --git a/libeufin/nexus-tutorial.rst b/libeufin/nexus-tutorial.rst index dd850bda..07ef218a 100644 --- a/libeufin/nexus-tutorial.rst +++ b/libeufin/nexus-tutorial.rst @@ -101,20 +101,22 @@ If you don't have access to a real bank account with an EBICS API, you can set up the sandbox. The sandbox is a simplistic and incomplete implementation of a core banking system with EBICS access to bank accounts. +The sandbox relies on a database, which you must specify using a JDBC +connection URI with the ``LIBEUFIN_SANDBOX_DB_CONNECTION`` environment +variable, before invoking any commands. +Only *SQLite* (e.g. ``jdbc:sqlite:/tmp/libeufintestdb``) and *PostgreSQL (via TCP)* +(e.g. ``jdbc:postgresql://localhost:$port/libeufintestdb?user=$username&password=$password``) +are supported right now. + For the following commands, the sandbox service must be running. The sandbox service is started with the following command: .. code-block:: console + $ export LIBEUFIN_SANDBOX_DB_CONNECTION=jdbc:sqlite:/tmp/libeufintestdb $ libeufin-sandbox serve --port 5000 -To reset the state of the sandbox, delete the database. By default, -the database is a SQLite3 file in ``/tmp/libeufin-sandbox.sqlite3``. -A different database can be specified as a JDBC connection URI -with the ``LIBEUFIN_SANDBOX_DB_CONNECTION`` environment variable. -Only *SQLite* (e.g. ``jdbc:sqlite:/tmp/libeufintestdb``) and *PostgreSQL (via TCP)* -(e.g. ``jdbc:postgresql://localhost:$port/libeufintestdb?user=$username&password=$password``) -are supported right now. +To reset the state of the sandbox, delete the database. For invocations of the LibEuFin command-line interface tool (``libeufin-cli``), the following environment variable must be set to the URL of the sandbox @@ -191,25 +193,23 @@ the :ref:`Sandbox API `. Connect Nexus with an EBICS account =================================== -Use the following command to run the nexus service: - -.. code-block:: console - - $ libeufin-nexus serve --port 5001 - -By default, the SQLite3 database ``/tmp/libeufin-nexus.sqlite3`` will be used. -The database can be specified as a JDBC connection URI -with the ``LIBEUFIN_NEXUS_DB_CONNECTION`` environment variable. +Nexus relies on a database, which you must specify using a JDBC +connection URI with the ``LIBEUFIN_NEXUS_DB_CONNECTION`` environment +variable, before invoking any commands. Only *SQLite* (e.g. ``jdbc:sqlite:/tmp/libeufintestdb``) and *PostgreSQL (via TCP)* (e.g. ``jdbc:postgresql://localhost:$port/libeufintestdb?user=$username&password=$password``) are supported right now. -For example: +Use the following command to run the nexus service: .. code-block:: console - $ export LIBEUFIN_NEXUS_DB_CONNECTION=jdbc:postgresql://127.0.0.1:5433/libeufindb?user=foo&password=secret - $ libeufin-nexus serve + $ export LIBEUFIN_NEXUS_DB_CONNECTION=jdbc:postgresql://localhost:5433/libeufindb?user=foo&password=secret + $ libeufin-nexus serve --port 5001 + +This sets up the PostgreSQL database to listen on port 5433, +for internal communication with the nexus service. +The nexus service itself listens on port 5001. At this point a superuser account needs to be created: -- cgit v1.2.3