Skip to content

Commit

Permalink
Update release docs for upgrading, enhanced with the DB mangling. IQS…
Browse files Browse the repository at this point in the history
  • Loading branch information
poikilotherm committed Nov 9, 2020
1 parent d97b6ee commit dfd39b1
Showing 1 changed file with 41 additions and 12 deletions.
53 changes: 41 additions & 12 deletions doc/release-notes/6819-update-db-conn.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,55 @@ details. For an overview of supported options, please see the
[installation guide](https://guides.dataverse.org/en/5.2/installation/config.html#jvm-options).

### Upgrading from earlier releases
If you are running a classic, non-container-based installation, you'll have
to set a few JVM options:

1. Undeploy the previous version.
```
asadmin create-system-properties "dataverse.db.user=${DB_USER}"
asadmin create-system-properties "dataverse.db.host=${DB_HOST}"
asadmin create-system-properties "dataverse.db.port=${DB_PORT}"
asadmin create-system-properties "dataverse.db.name=${DB_NAME}"
<payara install path>/asadmin list-applications
<payara install path>/asadmin undeploy dataverse-<version>
```

(where `<payara install path>` is where Payara 5 is installed, for example: `/usr/local/payara5`)

2. Update your database connection before updating.

Please configure your connection details, replacing all the `${DB_...}`.
(If you are using a PostgreSQL server on `localhost:5432`, you can omit `dataverse.db.host` and `dataverse.db.port`.)

```
<payara install path>/asadmin create-system-properties "dataverse.db.user=${DB_USER}"
<payara install path>/asadmin create-system-properties "dataverse.db.host=${DB_HOST}"
<payara install path>/asadmin create-system-properties "dataverse.db.port=${DB_PORT}"
<payara install path>/asadmin create-system-properties "dataverse.db.name=${DB_NAME}"
echo "AS_ADMIN_ALIASPASSWORD=${DB_PASS}" > /tmp/password.txt
asadmin create-password-alias --passwordfile /tmp/password.txt dataverse.db.password
<payara install path>/asadmin create-password-alias --passwordfile /tmp/password.txt dataverse.db.password
rm /tmp/password.txt
```

asadmin set configs.config.server-config.ejb-container.ejb-timer-service.timer-datasource=java:global/jdbc/dataverse
After switching EJB timers to the new data source, you are safe to delete the old alias and DB pool:
```
<payara install path>/asadmin set configs.config.server-config.ejb-container.ejb-timer-service.timer-datasource=java:global/jdbc/dataverse
<payara install path>/asadmin delete-jdbc-connection-pool --cascade=true dvnDbPool
<payara install path>/asadmin delete-password-alias db_password_alias
```

If you are using a PostgreSQL server on `localhost:5432`, you can omit `dataverse.db.host` and `dataverse.db.port`.
3. Stop payara and remove the generated directory, start.
```
service payara stop
# remove the generated directory:
rm -rf <payara install path>/payara/domains/domain1/generated
service payara start
```

You are safe to delete the old alias and DB pool afterwards:
3. Deploy this version.
```
asadmin delete-jdbc-connection-pool --cascade=true dvnDbPool
asadmin delete-password-alias db_password_alias
<payara install path>/bin/asadmin deploy dataverse-5.2.war
```

4. Restart Payara
```
service payara stop
service payara start
```


0 comments on commit dfd39b1

Please sign in to comment.