summaryrefslogtreecommitdiff
path: root/taler-merchant-manual.rst
diff options
context:
space:
mode:
Diffstat (limited to 'taler-merchant-manual.rst')
-rw-r--r--taler-merchant-manual.rst132
1 files changed, 66 insertions, 66 deletions
diff --git a/taler-merchant-manual.rst b/taler-merchant-manual.rst
index 617cc773..bf69c499 100644
--- a/taler-merchant-manual.rst
+++ b/taler-merchant-manual.rst
@@ -396,7 +396,7 @@ First, unpack the GNU Taler merchant tarball and change into
the resulting directory.
Then, use the following commands to build and install the merchant backend:
- ::
+.. code-block:: console
$ ./configure [--prefix=PFX] \
[--with-gnunet=GNUNETPFX] \
@@ -439,7 +439,7 @@ On Debian stretch, only GNU libmicrohttpd needs to be compiled from
source. To install dependencies on Debian stretch, run the following
commands:
- ::
+.. code-block:: console
# apt-get install \
libltdl-dev \
@@ -461,7 +461,7 @@ commands:
For more recent versions of Debian, you should instead run:
- ::
+.. code-block:: console
# apt-get install \
libltdl-dev \
@@ -547,10 +547,10 @@ the backend to the network.
To run the Taler backend on TCP port 8888, use:
- ::
+.. code-block:: console
- $ taler-config -s MERCHANT -o SERVE -V TCP
- $ taler-config -s MERCHANT -o PORT -V 8888
+ $ taler-config -s MERCHANT -o SERVE -V TCP
+ $ taler-config -s MERCHANT -o PORT -V 8888
@@ -568,9 +568,9 @@ For testing purposes, the currency MUST match “KUDOS” so that tests
will work with the Taler demonstration exchange at
https://exchange.demo.taler.net/:
- ::
+.. code-block:: console
- $ taler-config -s TALER -o CURRENCY -V KUDOS
+ $ taler-config -s TALER -o CURRENCY -V KUDOS
Database
@@ -601,33 +601,33 @@ Postgres database you want to use. Suppose ``$USER`` is the name of
the user who will run the backend process. Then, you need to first
run
- ::
+.. code-block:: console
- $ sudo -u postgres createuser -d $USER
+ $ sudo -u postgres createuser -d $USER
as the Postgres database administrator (usually ``postgres``) to
grant ``$USER`` the ability to create new databases. Next, you should
as ``$USER`` run:
- ::
+.. code-block:: console
- $ createdb $DBNAME
+ $ createdb $DBNAME
to create the backend’s database. Here, ``$DBNAME`` must match the
database name given in the configuration file.
To configure the Taler backend to use this database, run:
- ::
+.. code-block:: console
- $ taler-config -s MERCHANTDB-postgres -o CONFIG \
- -V postgres:///$DBNAME
+ $ taler-config -s MERCHANTDB-postgres -o CONFIG \
+ -V postgres:///$DBNAME
Now you should create the tables and indices. To do this, run as ``$USER``:
- ::
+.. code-block:: console
- $ taler-merchant-dbinit
+ $ taler-merchant-dbinit
You can improve your security posture if you now REVOKE the rights to CREATE,
@@ -650,29 +650,29 @@ section, the following options need to be configured:
- The “EXCHANGE_BASE_URL” option specifies the exchange’s base URL. For example,
to use the Taler demonstrator, specify:
- ::
+ .. code-block:: console
$ taler-config -s MERCHANT-EXCHANGE-demo \
- -o EXCHANGE_BASE_URL \
- -V https://exchange.demo.taler.net/
+ -o EXCHANGE_BASE_URL \
+ -V https://exchange.demo.taler.net/
- The “MASTER_KEY” option specifies the exchange’s master public key
in base32 encoding. For the Taler demonstrator, use:
- ::
+ .. code-block:: console
$ taler-config -s MERCHANT-EXCHANGE-demo \
- -o MASTER_KEY \
- -V CQQZ9DY3MZ1ARMN5K1VKDETS04Y2QCKMMCFHZSWJWWVN82BTTH00
+ -o MASTER_KEY \
+ -V CQQZ9DY3MZ1ARMN5K1VKDETS04Y2QCKMMCFHZSWJWWVN82BTTH00
- The “CURRENCY” option specifies the exchange’s currency.
For the Taler demonstrator, use:
- ::
+ .. code-block:: console
$ taler-config -s MERCHANT-EXCHANGE-demo \
- -o CURRENCY \
- -V KUDOS
+ -o CURRENCY \
+ -V KUDOS
Note that multiple exchanges can be added to the system by using different
tokens in place of ``demo`` in the example above. Note that all of the
@@ -693,29 +693,29 @@ that section, the following options need to be configured:
- The “AUDITOR_BASE_URL” option specifies the auditor’s base URL. For example,
to use the Taler demonstrator's auditor, specify:
- ::
+ .. code-block:: console
$ taler-config -s MERCHANT-AUDITOR-demo \
- -o AUDITOR_BASE_URL \
- -V https://exchange.demo.taler.net/
+ -o AUDITOR_BASE_URL \
+ -V https://exchange.demo.taler.net/
- The “AUDITOR_KEY” option specifies the auditor's public key
in base32 encoding. For the Taler demonstrator, use:
- ::
+ .. code-block:: console
$ taler-config -s MERCHANT-AUDITOR-demo \
- -o AUDITOR_KEY \
- -V FIXMEBADVALUENEEDTOGETTHERIGHTVALUEHEREEVENTUALLY000
+ -o AUDITOR_KEY \
+ -V FIXMEBADVALUENEEDTOGETTHERIGHTVALUEHEREEVENTUALLY000
- The “CURRENCY” option specifies the auditor’s currency.
For the Taler demonstrator, use:
- ::
+ .. code-block:: console
$ taler-config -s MERCHANT-AUDITOR-demo \
- -o CURRENCY \
- -V KUDOS
+ -o CURRENCY \
+ -V KUDOS
Note that multiple auditors can be added to the system by using different
@@ -783,7 +783,7 @@ Launching the backend
Assuming you have configured everything correctly, you can launch the
merchant backend as ``$USER`` using
- ::
+.. code-block:: console
$ taler-merchant-httpd
@@ -794,7 +794,7 @@ system for how to start and stop daemons.
If everything worked as expected, the command
- ::
+.. code-block:: console
$ curl http://localhost:8888/
@@ -883,7 +883,7 @@ For details, see the :ref:`contract terms <contract-terms>` specification.
You can then create the instance using:
- ::
+.. code-block:: console
$ wget --post-file=instance.json http://localhost:8888/private/instances
@@ -916,10 +916,10 @@ Using UNIX domain sockets
To ensure that the merchant backend is not exposed directly to the network,
you *should* bind the backend to a UNIX domain socket:
- ::
+.. code-block:: console
- $ taler-config -s MERCHANT -o SERVE -V UNIX
- $ taler-config -s MERCHANT -o UNIXPATH -V /some/path/here.sock
+ $ taler-config -s MERCHANT -o SERVE -V UNIX
+ $ taler-config -s MERCHANT -o UNIXPATH -V /some/path/here.sock
Do not use a UNIX domain socket path in "/tmp": systemd (or other init
systems) may give Web servers a private "/tmp" thereby hiding UNIX domain
@@ -958,11 +958,11 @@ Apache
In Apache, make sure you have "mod_proxy", "mod_proxy_http" and
"mod_headers" enabled:
- ::
+.. code-block:: console
- a2enmod proxy
- a2enmod proxy_http
- a2enmod headers
+ $ a2enmod proxy
+ $ a2enmod proxy_http
+ $ a2enmod headers
Then configure your Apache reverse proxy like this (you may change the
endpoint):
@@ -1053,9 +1053,9 @@ Apache
For Apache, you should first enable "mod_rewrite":
- ::
+.. code-block:: console
- a2enmod rewrite
+ $ a2enmod rewrite
Then, you can restrict to an access control token using:
@@ -1187,17 +1187,17 @@ manual), and then install the latest version of the code.
If you REVOKED database permissions, ensure that the rights to CREATE,
DROP, and ALTER tables are GRANTed to ``$USER`` again. Then, run:
- ::
+.. code-block:: console
- $ taler-merchant-dbinit
+ $ taler-merchant-dbinit
to upgrade the database to the latest schema. After that, you may again
REVOKE the database permissions. Finally, restart the HTTP service, either via
your systemd or init system, or directly using:
- ::
+.. code-block:: console
- $ taler-merchant-httpd
+ $ taler-merchant-httpd
.. _Tipping-visitors:
@@ -1226,9 +1226,9 @@ First, the reserve must be setup in the merchant backend. A reserve
is always tied to a particular instance. To create a reserve with
10 KUDOS at instance "default" using the demo exchange, use:
- ::
+.. code-block:: console
- $ taler-merchant-setup-reserve \
+ $ taler-merchant-setup-reserve \
-a KUDOS:10 \
-e https://exchange.demo.taler.net/ \
-m http://localhost:8888/instances/default
@@ -1376,7 +1376,7 @@ by defining them under a ``[paths]`` section, see example below,
or by setting them in the environment:
-::
+.. code-block:: console
$ export VAR=/x
@@ -1416,7 +1416,7 @@ file format and can also be edited by hand.
Run
-::
+.. code-block:: console
$ taler-config -s $SECTION
@@ -1424,7 +1424,7 @@ to list all of the configuration values in section ``$SECTION``.
Run
-::
+.. code-block:: console
$ taler-config -s $section -o $option
@@ -1433,7 +1433,7 @@ section ``$section``.
Finally, to change a setting, run
-::
+.. code-block:: console
$ taler-config -s $section -o $option -V $value
@@ -1446,7 +1446,7 @@ their value. To expand the ``$DATADIR`` or other ``$``-variables in the
configuration, pass the ``-f`` option to ``taler-config``. For example,
compare:
-::
+.. code-block:: console
$ taler-config -s PATHS \
-o TALER_DATA_HOME
@@ -1516,10 +1516,10 @@ exist before launching the benchmark. You also
will need to ensure that the Exchange's
details are setup, usually by running
- ::
+.. code-block:: console
- taler-exchange-wire -c $CONFIG_FILE
- taler-exchange-keyup -c $CONFIG_FILE
+ $ taler-exchange-wire -c $CONFIG_FILE
+ $ taler-exchange-keyup -c $CONFIG_FILE
where "$CONFIG_FILE" should be replaced by
the configuration file that is to be used.
@@ -1551,7 +1551,7 @@ Any subcommand is also equipped with the canonical ``--help`` option, so
feel free to issue the following command in order to explore all the
possibilities. For example:
-::
+.. code-block:: console
$ taler-merchant-benchmark corner --help
@@ -1610,14 +1610,14 @@ Because all of the Docker source file are kept in our “deployment“
repository, we start by checking out the ``git://git.taler.net/deployment``
codebase:
-::
+.. code-block:: console
$ git clone git://git.taler.net/deployment
Now we actually build the merchant’s image. From the same directory as
above:
-::
+.. code-block:: console
$ cd deployment/docker/merchant/
$ docker-compose build
@@ -1625,7 +1625,7 @@ above:
If everything worked as expected, the merchant is ready to be launched.
From the same directory as the previous step:
-::
+.. code-block:: console
# Recall: the docker-machine should be up and running.
$ docker-compose up
@@ -1637,7 +1637,7 @@ message from postresql about already existing roles and databases.
To test if everything worked as expected, it suffices to issue a simple
request to the merchant, as:
-::
+.. code-block:: console
$ curl http://$(docker-machine ip)/
# A greeting message should be returned by the merchant.