-
Notifications
You must be signed in to change notification settings - Fork 535
7980 enhanced dsd #8915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7980 enhanced dsd #8915
Changes from all commits
867c8b8
9e16306
11d6258
8df07cf
59dbdd8
8a1ee7e
e81b20c
8350af2
e9ce81e
b53e6a4
f99f0cb
9cda103
710e505
8106ddf
725348d
6a595f3
b5e2e1b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| ### Default Values for Database Connections Fixed | ||
|
|
||
| Introduced in Dataverse release 5.3 a regression might have hit you: | ||
| the announced default values for the database connection never actually worked. | ||
|
|
||
| With the update to Payara 5.2022.3 it was possible to introduce working | ||
| defaults. The documentation has been changed accordingly. | ||
|
|
||
| Together with this change, you can now enable advanced connection pool | ||
| configurations useful for debugging and monitoring. Of particular interest may be `sslmode=require`. See the docs for details. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -263,6 +263,153 @@ As for the "Remote only" authentication mode, it means that: | |
| - ``:DefaultAuthProvider`` has been set to use the desired authentication provider | ||
| - The "builtin" authentication provider has been disabled (:ref:`api-toggle-auth-provider`). Note that disabling the "builtin" authentication provider means that the API endpoint for converting an account from a remote auth provider will not work. Converting directly from one remote authentication provider to another (i.e. from GitHub to Google) is not supported. Conversion from remote is always to "builtin". Then the user initiates a conversion from "builtin" to remote. Note that longer term, the plan is to permit multiple login options to the same Dataverse installation account per https://github.com/IQSS/dataverse/issues/3487 (so all this talk of conversion will be moot) but for now users can only use a single login option, as explained in the :doc:`/user/account` section of the User Guide. In short, "remote only" might work for you if you only plan to use a single remote authentication provider such that no conversion between remote authentication providers will be necessary. | ||
|
|
||
| .. _database-persistence: | ||
|
|
||
| Database Persistence | ||
| -------------------- | ||
|
|
||
| The Dataverse software uses a PostgreSQL database to store objects users create. | ||
| You can configure basic and advanced settings for the PostgreSQL database connection with the help of | ||
| MicroProfile Config API. | ||
|
|
||
| Basic Database Settings | ||
| +++++++++++++++++++++++ | ||
|
|
||
| 1. Any of these settings can be set via system properties (see :ref:`jvm-options` starting at :ref:`dataverse.db.name`), environment variables or other | ||
| MicroProfile Config mechanisms supported by the app server. | ||
| `See Payara docs for supported sources <https://docs.payara.fish/community/docs/documentation/microprofile/config/README.html#config-sources>`_. | ||
| 2. Remember to protect your secrets. For passwords, use an environment variable (bare minimum), a password alias named the same | ||
| as the key (OK) or use the "dir config source" of Payara (best). | ||
|
|
||
| Alias creation example: | ||
|
|
||
| .. code-block:: shell | ||
|
|
||
| echo "AS_ADMIN_ALIASPASSWORD=changeme" > /tmp/p.txt | ||
| asadmin create-password-alias --passwordfile /tmp/p.txt dataverse.db.password | ||
| rm /tmp/p.txt | ||
|
|
||
| 3. Environment variables follow the key, replacing any dot, colon, dash, etc. into an underscore "_" and all uppercase | ||
| letters. Example: ``dataverse.db.host`` -> ``DATAVERSE_DB_HOST`` | ||
|
|
||
| .. list-table:: | ||
| :widths: 15 60 25 | ||
| :header-rows: 1 | ||
| :align: left | ||
|
|
||
| * - MPCONFIG Key | ||
| - Description | ||
| - Default | ||
| * - dataverse.db.host | ||
| - The PostgreSQL server to connect to. | ||
| - ``localhost`` | ||
| * - dataverse.db.port | ||
| - The PostgreSQL server port to connect to. | ||
| - ``5432`` | ||
| * - dataverse.db.user | ||
| - The PostgreSQL user name to connect with. | ||
| - | ``dataverse`` | ||
| | (installer sets to ``dvnapp``) | ||
| * - dataverse.db.password | ||
| - The PostgreSQL users password to connect with. | ||
|
|
||
| **Please note the safety advisory above.** | ||
| - *No default* | ||
| * - dataverse.db.name | ||
| - The PostgreSQL database name to use for the Dataverse installation. | ||
| - | ``dataverse`` | ||
| | (installer sets to ``dvndb``) | ||
|
Comment on lines
+309
to
+321
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure how to see that the default database user and database are "dataverse". To deploy this branch I used DB_NAME=dvndb I guess I could try changing that script to this... DB_NAME=dataverse ... and then deleting these lines from domain.xml: That is, without these system properties configured, it sounds like the default database user and database name will be "dataverse".
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. Sorry, but for container environments it really is common practice to use the application name for the database name. As the installer sets this explicitly for any installation out there, folks should be fine. |
||
| * - dataverse.db.parameters | ||
| - Connection parameters, such as ``sslmode=require``. See `Postgres JDBC docs <https://jdbc.postgresql.org/documentation/head/connect.html>`_ | ||
| Note: you don't need to provide the initial "?". | ||
| - *Empty string* | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried putting the following in domain.xml... ... and it seems to have worked. Dataverse failed to deploy and I get errors like this in server.log: Connection could not be allocated because: The server does not support SSL. Error in allocating a connection. Cause: Connection could not be allocated because: The server does not support SSL. Exception while invoking class org.glassfish.ejb.startup.EjbApplication start method SQL State : null |
||
|
|
||
| Advanced Database Settings | ||
| ++++++++++++++++++++++++++ | ||
|
|
||
| The following options are useful in many scenarios. You might be interested in debug output during development or | ||
| monitoring performance in production. | ||
|
|
||
| You can find more details within the Payara docs: | ||
|
|
||
| - `User Guide: Connection Pool Configuration <https://docs.payara.fish/community/docs/documentation/user-guides/connection-pools/connection-pools.html>`_ | ||
| - `Tech Doc: Advanced Connection Pool Configuration <https://docs.payara.fish/community/docs/documentation/payara-server/jdbc/advanced-connection-pool-properties.html>`_. | ||
|
|
||
| Connection Validation | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| .. list-table:: | ||
| :widths: 15 60 25 | ||
| :header-rows: 1 | ||
| :align: left | ||
|
|
||
| * - MPCONFIG Key | ||
| - Description | ||
| - Default | ||
| * - dataverse.db.is-connection-validation-required | ||
| - ``true``: Validate connections, allow server to reconnect in case of failure. | ||
| - false | ||
| * - dataverse.db.connection-validation-method | ||
| - | The method of connection validation: | ||
| | ``table|autocommit|meta-data|custom-validation``. | ||
| - *Empty string* | ||
| * - dataverse.db.validation-table-name | ||
| - The name of the table used for validation if the validation method is set to ``table``. | ||
| - *Empty string* | ||
| * - dataverse.db.validation-classname | ||
| - The name of the custom class used for validation if the ``validation-method`` is set to ``custom-validation``. | ||
| - *Empty string* | ||
| * - dataverse.db.validate-atmost-once-period-in-seconds | ||
| - Specifies the time interval in seconds between successive requests to validate a connection at most once. | ||
| - ``0`` (disabled) | ||
|
|
||
| Connection & Statement Leaks | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| .. list-table:: | ||
| :widths: 15 60 25 | ||
| :header-rows: 1 | ||
| :align: left | ||
|
|
||
| * - MPCONFIG Key | ||
| - Description | ||
| - Default | ||
| * - dataverse.db.connection-leak-timeout-in-seconds | ||
| - Specify timeout when connections count as "leaked". | ||
| - ``0`` (disabled) | ||
| * - dataverse.db.connection-leak-reclaim | ||
| - If enabled, leaked connection will be reclaimed by the pool after connection leak timeout occurs. | ||
| - ``false`` | ||
| * - dataverse.db.statement-leak-timeout-in-seconds | ||
| - Specifiy timeout when statements should be considered to be "leaked". | ||
| - ``0`` (disabled) | ||
| * - dataverse.db.statement-leak-reclaim | ||
| - If enabled, leaked statement will be reclaimed by the pool after statement leak timeout occurs. | ||
| - ``false`` | ||
|
|
||
| Logging & Slow Performance | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| .. list-table:: | ||
| :widths: 15 60 25 | ||
| :header-rows: 1 | ||
| :align: left | ||
|
|
||
| * - MPCONFIG Key | ||
| - Description | ||
| - Default | ||
| * - dataverse.db.statement-timeout-in-seconds | ||
| - Timeout property of a connection to enable termination of abnormally long running queries. | ||
| - ``-1`` (disabled) | ||
| * - dataverse.db.slow-query-threshold-in-seconds | ||
| - SQL queries that exceed this time in seconds will be logged. | ||
| - ``-1`` (disabled) | ||
| * - dataverse.db.log-jdbc-calls | ||
| - When set to true, all JDBC calls will be logged allowing tracing of all JDBC interactions including SQL. | ||
| - ``false`` | ||
|
|
||
|
|
||
|
|
||
| .. _file-storage: | ||
|
|
||
| File Storage: Using a Local Filesystem and/or Swift and/or Object Stores and/or Trusted Remote Stores | ||
|
|
@@ -1561,6 +1708,8 @@ dataverse.auth.password-reset-timeout-in-minutes | |
|
|
||
| Users have 60 minutes to change their passwords by default. You can adjust this value here. | ||
|
|
||
| .. _dataverse.db.name: | ||
|
|
||
| dataverse.db.name | ||
| +++++++++++++++++ | ||
|
|
||
|
|
@@ -1570,6 +1719,8 @@ Defaults to ``dataverse`` (but the installer sets it to ``dvndb``). | |
|
|
||
| Can also be set via *MicroProfile Config API* sources, e.g. the environment variable ``DATAVERSE_DB_NAME``. | ||
|
|
||
| See also :ref:`database-persistence`. | ||
|
|
||
| dataverse.db.user | ||
| +++++++++++++++++ | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs are great but I wonder if they should be moved to "Advanced Installation" because the default database setup works fine and the list of steps before "going live" is getting longer and longer. We can defer this doc change for now. I created a dedicated issue for later: