diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d6e51c3d..c1b0708f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -20,6 +20,7 @@ Feature - Added logging whenever a sql statement is executed. - Update CI such that the tests are run on Python 3.9 and 3.10, additionally removed the paper draft action. - Added logging when initializing database to contain resultfields and logfields. +- Adapt ssh tunnel usage to be more flexible and user friendly. Fix --- diff --git a/docs/source/usage/database_credential_file.rst b/docs/source/usage/database_credential_file.rst index 88d27ee0..42772202 100644 --- a/docs/source/usage/database_credential_file.rst +++ b/docs/source/usage/database_credential_file.rst @@ -19,7 +19,7 @@ Below is an example of a database credential file, that connects to a server wit server: example.mysqlserver.com However, for security reasons, databases might only be accessible from a specific IP address. In these cases, one can use an ssh jumphost. This means that ``PyExperimenter`` will first connect to the ssh server -that has access to the database and then connect to the database server from there. This is done by adding an additional ``Ssh`` section to the database credential file. +that has access to the database and then connect to the database server from there. This is done by adding an additional ``Ssh`` section to the database credential file, and can be activated either by a PyExperimenter keyword argument or in the :ref:`experimenter configuration file <_experiment_configuration_file>`. The following example shows how to connect to a database server using an SSH server with the address ``ssh_hostname`` and the port ``optional_ssh_port``. .. code-block:: yaml diff --git a/docs/source/usage/experiment_configuration_file.rst b/docs/source/usage/experiment_configuration_file.rst index 6c1de09f..aed584c8 100644 --- a/docs/source/usage/experiment_configuration_file.rst +++ b/docs/source/usage/experiment_configuration_file.rst @@ -14,6 +14,7 @@ The experiment configuration file is primarily used to define the database backe Database: provider: sqlite database: py_experimenter + use_ssh_tunnel: False (Optional Parameter; Defautls to False) table: name: example_general_usage keyfields: