aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-05-30 17:15:12 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2017-05-30 17:15:12 +0200
commit1d3c450d377207cfd1ef8e583e65d01b67190322 (patch)
tree694f662e880ba07f31c3026712adeea39700fc1f /doc
parenta0536b3b637a1ba6109f9f4b3a3b04a7763582fb (diff)
configuration subsection in manual
Diffstat (limited to 'doc')
-rw-r--r--doc/manual.texi63
1 files changed, 63 insertions, 0 deletions
diff --git a/doc/manual.texi b/doc/manual.texi
index 8a1d7c20..bc4742f1 100644
--- a/doc/manual.texi
+++ b/doc/manual.texi
@@ -741,6 +741,69 @@ reachable. Production systems should be configured to bind
to a UNIX domain socket or properly restrict access to the
port.
+@chapter Configuration in Taler
+
+In Taler realm, any component obeys to the same pattern to get configuration
+values. According to this pattern, once the component has been installed, the
+installation deploys default values in @code{$@{prefix@}/share/taler/config.d/}, in
+@emph{.conf} files. In order to override these defaults, the user can write a custom
+@emph{.conf} file and either pass it to the component at execution time, or name it
+@code{taler.conf} and place it under @code{$HOME/.config/}.
+
+A config file is a text file containing `sections`, and each section contains
+its `values`. The right format follows::
+
+@smallexample
+[section1]
+value1 = string
+value2 = 23
+
+[section2]
+value21 = string
+value22 = /path22
+@end smallexample
+
+Throughout any configuration file, it is possible to use @emph{$}-prefixed variables,
+like @code{$VAR}, especially when they represent filesystem paths.
+It is also possible to provide defaults values for those variables that are unset,
+by using the following syntax: @code{$@{VAR:-default@}}.
+However, there are two ways a user can set @emph{$}-prefixable variables:
+
+by defining them under a @code{[paths]} section, see example below,
+
+@smallexample
+[paths]
+TALER_DEPLOYMENT_SHARED = ${HOME}/shared-data
+..
+[section-x]
+path-x = ${TALER_DEPLOYMENT_SHARED}/x
+@end smallexample
+
+or by setting them in the environment
+
+@smallexample
+$ export VAR=/x
+@end smallexample
+
+The configuration loader will give precedence to variables set under @code{[path]},
+though.
+
+The utility @code{taler-config}, which gets installed along with the exchange,
+serves to get and set configuration values without directly editing the @emph{.conf}.
+The option @code{-f} is particularly useful to resolve pathnames, when they use
+several levels of @emph{$}-expanded variables. See @code{taler-config --help}.
+
+Note that, in this stage of development, the file @code{$HOME/.config/taler.conf}
+can contain sections for @emph{all} the component. For example, both an exchange and
+a bank can read values from it.
+
+The repository @emph{git://taler.net/deployment} contains examples of configuration
+file used in our demos. See under @code{deployment/config}.
+
+Expectably, some components will not work just by using default values, as their
+work is often interdependent. For example, a merchant needs to know an exchange
+URL, or a database name.
+
@node Testing
@chapter Testing