Skip to content
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

Big sweep: migrate codebase to Jakarta EE 10 and use Payara 6 now (third iteration) #9685

Merged
merged 57 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
ed75148
refactor(spi): migrate Dataverse SPI to Jakarta EE 10
poikilotherm Jun 28, 2023
b51d2fc
refactor: migrate main app codebase to Jakarta EE 10
poikilotherm Jun 28, 2023
0d60ef2
refactor(test): migrate application tests to Jakarta EE 10
poikilotherm Jun 28, 2023
27d8467
build!(deps): switch to Primefaces 11 Jakarta Edition #8305
poikilotherm Mar 23, 2022
a1dc896
build(api): align Jersey deps with BOMs #8305
poikilotherm Mar 24, 2022
cbbb561
refactor(webapp): migrate web.xml to Jakarta Faces #8305
poikilotherm Mar 25, 2022
c2c75d8
docs: fix Jakarta occurences in code comments #8305
poikilotherm Mar 25, 2022
83b0ff4
fix(ingest): migrate JMS interface class string to Jakarta #8305
poikilotherm Mar 25, 2022
b74f5d0
refactor(api): make Index API check on most specific exception type o…
poikilotherm Mar 25, 2022
ddda066
style(webapp): switch URL path to Jakarta Faces #8305
poikilotherm Mar 25, 2022
34a421b
fix(webapp): remove deleted Primefaces PushServlet from web.xml #8305
poikilotherm Mar 25, 2022
6bc0330
chore(persistence): migrate persistence.xml to Jakarta EE 10 #8305
poikilotherm Mar 25, 2022
5fad7e2
chore(cdi): migrate beans.xml config to Jakarta EE 10 #8305
poikilotherm Jun 28, 2023
59d38a6
chore(build): update to Payara 6.2023.6 #8305
poikilotherm Jun 28, 2023
56f8ad2
chore(deps): migrate to Jakarta EE 10 dependencies #8305
poikilotherm Jul 20, 2022
8c5fb1e
chore!(spi): update SPI module to version 2.0.0 #8305
poikilotherm Jun 28, 2023
a4a6d23
build(deps): update to Jakartafied JSON-LD library version #8305
poikilotherm Jun 28, 2023
e694643
fix(deps): remove usages of PrettyFaces String utils
poikilotherm Jul 27, 2022
65a4c12
build(deps): add second Maven Central snapshot repo and enable both #…
poikilotherm Nov 2, 2022
f6772d2
build(deps): switch to Prettyfaces 6.0 snapshots for Jakarta EE 10 su…
poikilotherm Jun 28, 2023
610c8fd
build(sword): switch to Jakarta-enabled SWORD2 preview release #8305
poikilotherm Mar 24, 2022
89182c1
fix(sword): as of Payara 6, "attachment; " required to upload files #…
pdurbin May 27, 2022
7b4f827
stop using `@Context HttpServletRequest`, add sleep #8305
pdurbin Jun 3, 2022
77e35a6
Update installer, DockerAIO, Vagrant, some scripts and docs for Payar…
poikilotherm Jun 28, 2023
d882c41
chore(jsf): migrate Faces config and web.xml to Jakarta EE 10 #8305
poikilotherm Mar 25, 2022
b6659d4
fix(ct): optimize base image for Payara 6 #8305
poikilotherm Jun 28, 2023
7ce2cc9
fix(ui): make citation download widget JSF 4 compliant
poikilotherm Jun 28, 2023
de1b79c
Merge branch 'develop' into 8305-payara6-ee10-v3
poikilotherm Jul 18, 2023
f587bfb
chore(deps): update to Payara 6.2023.7
poikilotherm Jul 18, 2023
26e66d8
build(deps): adapt payara api dep because of upstream BOM changes
poikilotherm Jul 18, 2023
c3021b8
update to payara6 #8305
pdurbin Jul 25, 2023
b627319
get script working with postgres in a container, zsh #8305
pdurbin Jul 25, 2023
2da77d3
Merge branch 'develop' into 8305-payara6-ee10-v3 #8305
pdurbin Jul 26, 2023
da5193f
add workaround for FISH-7665: Payara doesn't run #8305
pdurbin Jul 26, 2023
83c55a9
Revert "fix(sword): as of Payara 6, "attachment; " required to upload…
pdurbin Jul 27, 2023
0221006
backward compatible SWORD upload on Payara 6 #8305
pdurbin Jul 28, 2023
8efb964
use com.sun.aas.instanceRoot to find logs dir #8305
pdurbin Aug 1, 2023
b829ca7
remove Perl installer, docker-aio, docker-dcm #8305
pdurbin Aug 2, 2023
aedc4a3
fix link #8305
pdurbin Aug 3, 2023
c18ab9b
explain need to build base image for new Payara #8305
pdurbin Aug 3, 2023
8dcc88e
tiny style change
pdurbin Aug 3, 2023
911775b
cleanup, simplify #8305
pdurbin Aug 3, 2023
b689f67
simplify to just class name, not jakarta namespace #8305
pdurbin Aug 3, 2023
9e4d837
update log message to match (changed) exception #8305
pdurbin Aug 3, 2023
f8d4622
Merge branch 'develop' into 8305-payara6-ee10-v3 #8305
pdurbin Aug 3, 2023
d817a94
add release note #8305
pdurbin Aug 3, 2023
2e322f2
Merge branch 'develop' into 8305-payara6-ee10-v3 #8305
pdurbin Aug 4, 2023
3e36753
Merge branch 'develop' into 8305-payara6-ee10-v3 #8305
pdurbin Aug 4, 2023
a135740
switch dev-env to Docker #9616
pdurbin Aug 7, 2023
b8bf86a
Merge branch '8305-rm-perl-docker-aio' into 8305-payara6-ee10-v3 #8305
pdurbin Aug 7, 2023
078c554
remove Perl installer from Makefile #8305
pdurbin Aug 8, 2023
b798ae9
start docker #9616
pdurbin Aug 8, 2023
3716c5c
fix(ui): make file page citation download widget JSF 4 compliant
poikilotherm Aug 8, 2023
aabc45d
fix(ui): make more file page citation download widget JSF 4 compliant
poikilotherm Aug 8, 2023
0133009
Merge pull request #9761 from IQSS/9616-container-dev
kcondon Aug 9, 2023
44874b3
Merge branch 'develop' into 8305-payara6-ee10-v3 #8305
pdurbin Aug 10, 2023
8993d9a
add no-op editFileMetadata() to FilePage to prevent errors #8305
pdurbin Aug 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions conf/docker-aio/0prep_deps.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just want to point out that we're talking about removing all of docker-aio because it depends on the old Perl installer, which we don't plan to update for Payara 6. Discussion here: #9685 (comment)

Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ if [ ! -d dv/deps ]; then
fi
wdir=`pwd`
poikilotherm marked this conversation as resolved.
Show resolved Hide resolved
poikilotherm marked this conversation as resolved.
Show resolved Hide resolved

if [ ! -e dv/deps/payara-5.2022.3.zip ]; then
if [ ! -e dv/deps/payara-6.2023.7.zip ]; then
echo "payara dependency prep"
wget https://s3-eu-west-1.amazonaws.com/payara.fish/Payara+Downloads/5.2022.3/payara-5.2022.3.zip -O dv/deps/payara-5.2022.3.zip
wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2023.7/payara-6.2023.7.zip -O dv/deps/payara-6.2023.7.zip
fi

if [ ! -e dv/deps/solr-8.11.1dv.tgz ]; then
Expand Down
6 changes: 3 additions & 3 deletions conf/docker-aio/c8.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ COPY disableipv6.conf /etc/sysctl.d/
RUN rm /etc/httpd/conf/*
COPY httpd.conf /etc/httpd/conf
RUN cd /opt ; tar zxf /tmp/dv/deps/solr-8.11.1dv.tgz
RUN cd /opt ; unzip /tmp/dv/deps/payara-5.2022.3.zip ; ln -s /opt/payara5 /opt/glassfish4
RUN cd /opt ; unzip /tmp/dv/deps/payara-6.2023.7.zip ; ln -s /opt/payara6 /opt/glassfish4

# this copy of domain.xml is the result of running `asadmin set server.monitoring-service.module-monitoring-levels.jvm=LOW` on a default glassfish installation (aka - enable the glassfish REST monitir endpoint for the jvm`
# this dies under Java 11, do we keep it?
#COPY domain-restmonitor.xml /opt/payara5/glassfish/domains/domain1/config/domain.xml
#COPY domain-restmonitor.xml /opt/payara6/glassfish/domains/domain1/config/domain.xml

RUN sudo -u postgres /usr/pgsql-13/bin/initdb -D /var/lib/pgsql/13/data -E 'UTF-8'

Expand Down Expand Up @@ -59,7 +59,7 @@ EXPOSE 9009
RUN mkdir /opt/dv

# keeping the symlink on the off chance that something else is still assuming /usr/local/glassfish4
RUN ln -s /opt/payara5 /usr/local/glassfish4
RUN ln -s /opt/payara6 /usr/local/glassfish4
COPY dv/install/ /opt/dv/
COPY install.bash /opt/dv/
COPY entrypoint.bash /opt/dv/
Expand Down
2 changes: 1 addition & 1 deletion conf/docker-aio/configure_doi.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

cd /opt/payara5
cd /opt/payara6

# if appropriate; reconfigure PID provider on the basis of environmental variables.
if [ ! -z "${DoiProvider}" ]; then
Expand Down
2 changes: 1 addition & 1 deletion conf/docker-aio/entrypoint.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bin/solr create_core -c collection1 -d server/solr/collection1/conf -force
apachectl -DFOREGROUND &

# TODO: Run Payara as non-root.
cd /opt/payara5
cd /opt/payara6
bin/asadmin start-domain --debug
sleep infinity

4 changes: 2 additions & 2 deletions conf/docker-aio/testscripts/install
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
export HOST_ADDRESS=localhost
export GLASSFISH_ROOT=/opt/payara5
export FILES_DIR=/opt/payara5/glassfish/domains/domain1/files
export GLASSFISH_ROOT=/opt/payara6
export FILES_DIR=/opt/payara6/glassfish/domains/domain1/files
export DB_NAME=dvndb
export DB_PORT=5432
export DB_HOST=localhost
Expand Down
2 changes: 2 additions & 0 deletions conf/docker-aio/testscripts/post
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ psql -U dvnapp dvndb -f doc/sphinx-guides/source/_static/util/createsequence.sql
scripts/search/tests/publish-dataverse-root
#git checkout scripts/api/data/dv-root.json
scripts/search/tests/grant-authusers-add-on-root
echo "exiting post script early (not creating test users, etc.)"
exit
scripts/search/populate-users
scripts/search/create-users
scripts/search/tests/create-all-and-test
Expand Down
2 changes: 1 addition & 1 deletion conf/jhove/jhove.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://hul.harvard.edu/ois/xml/ns/jhove/jhoveConfig"
xsi:schemaLocation="http://hul.harvard.edu/ois/xml/ns/jhove/jhoveConfig
file:///usr/local/payara5/glassfish/domains/domain1/config/jhoveConfig.xsd">
file:///usr/local/payara6/glassfish/domains/domain1/config/jhoveConfig.xsd">
<jhoveHome>/usr/local/src/jhove</jhoveHome>
<defaultEncoding>utf-8</defaultEncoding>
<tempDirectory>/tmp</tempDirectory>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# currently no other option but to have daily logs and have year-month-day format in the name with
# 4-digit year and 2-digit month and day
# /usr/local/payara5/glassfish/domains/domain1/logs/counter_2019-01-11.log
# /usr/local/payara6/glassfish/domains/domain1/logs/counter_2019-01-11.log
#log_name_pattern: sample_logs/counter_(yyyy-mm-dd).log
log_name_pattern: /usr/local/payara5/glassfish/domains/domain1/logs/mdc/counter_(yyyy-mm-dd).log
log_name_pattern: /usr/local/payara6/glassfish/domains/domain1/logs/mdc/counter_(yyyy-mm-dd).log

# path_types regular expressions allow matching to classify page urls as either an investigation or request
# based on specific URL structure for your system.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

set -e

ASADMIN=/usr/local/payara5/bin/asadmin
ASADMIN=/usr/local/payara6/bin/asadmin

case "$1" in
start)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# description: Payara App Server
set -e

ASADMIN=/usr/local/payara5/bin/asadmin
ASADMIN=/usr/local/payara6/bin/asadmin
APP_SERVER_USER=dataverse

case "$1" in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ After = syslog.target network.target

[Service]
Type = forking
ExecStart = /usr/bin/java -jar /usr/local/payara5/glassfish/lib/client/appserver-cli.jar start-domain
ExecStop = /usr/bin/java -jar /usr/local/payara5/glassfish/lib/client/appserver-cli.jar stop-domain
ExecReload = /usr/bin/java -jar /usr/local/payara5/glassfish/lib/client/appserver-cli.jar restart-domain
ExecStart = /usr/bin/java -jar /usr/local/payara6/glassfish/lib/client/appserver-cli.jar start-domain
ExecStop = /usr/bin/java -jar /usr/local/payara6/glassfish/lib/client/appserver-cli.jar stop-domain
ExecReload = /usr/bin/java -jar /usr/local/payara6/glassfish/lib/client/appserver-cli.jar restart-domain
User=dataverse
LimitNOFILE=32768
Environment="LANG=en_US.UTF-8"
Expand Down
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's safe to delete this file because the reference to it (in doc/sphinx-guides/source/installation/installation-main.rst) was already deleted in c645b7a

This file was deleted.

2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/_static/util/clear_timer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# if you'd like to avoid that.

# directory where Payara is installed
PAYARA_DIR=/usr/local/payara5
PAYARA_DIR=/usr/local/payara6

# directory within Payara (defaults)
DV_DIR=${PAYARA_DIR}/glassfish/domains/domain1
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/_static/util/counter_daily.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I vote we ignore all the Shellcheck warnings for this pull request (not just this file). We can circle back to them in the future if we want.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /bin/bash

COUNTER_PROCESSOR_DIRECTORY="/usr/local/counter-processor-0.1.04"
MDC_LOG_DIRECTORY="/usr/local/payara5/glassfish/domains/domain1/logs/mdc"
MDC_LOG_DIRECTORY="/usr/local/payara6/glassfish/domains/domain1/logs/mdc"

# counter_daily.sh

Expand Down
6 changes: 3 additions & 3 deletions doc/sphinx-guides/source/admin/harvestclients.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ For example:

.. code-block:: bash

sudo touch /usr/local/payara5/glassfish/domains/domain1/logs/stopharvest_bigarchive.70916
sudo chown dataverse /usr/local/payara5/glassfish/domains/domain1/logs/stopharvest_bigarchive.70916
sudo touch /usr/local/payara6/glassfish/domains/domain1/logs/stopharvest_bigarchive.70916
sudo chown dataverse /usr/local/payara6/glassfish/domains/domain1/logs/stopharvest_bigarchive.70916

Note: If the application server is stopped and restarted, any running harvesting jobs will be killed but may remain marked as in progress in the database. We thus recommend using the mechanism here to stop ongoing harvests prior to a server restart.


What if a Run Fails?
~~~~~~~~~~~~~~~~~~~~

Each harvesting client run logs a separate file per run to the app server's default logging directory (``/usr/local/payara5/glassfish/domains/domain1/logs/`` unless you've changed it). Look for filenames in the format ``harvest_TARGET_YYYY_MM_DD_timestamp.log`` to get a better idea of what's going wrong.
Each harvesting client run logs a separate file per run to the app server's default logging directory (``/usr/local/payara6/glassfish/domains/domain1/logs/`` unless you've changed it). Look for filenames in the format ``harvest_TARGET_YYYY_MM_DD_timestamp.log`` to get a better idea of what's going wrong.

Note that you'll want to run a minimum of Dataverse Software 4.6, optimally 4.18 or beyond, for the best OAI-PMH interoperability.
5 changes: 2 additions & 3 deletions doc/sphinx-guides/source/admin/make-data-count.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ Enable or Disable Display of Make Data Count Metrics

By default, when MDC logging is enabled (when ``:MDCLogPath`` is set), your Dataverse installation will display MDC metrics instead of it's internal (legacy) metrics. You can avoid this (e.g. to collect MDC metrics for some period of time before starting to display them) by setting ``:DisplayMDCMetrics`` to false.

The following discussion assumes ``:MDCLogPath`` has been set to ``/usr/local/payara6/glassfish/domains/domain1/logs/mdc``
You can also decide to display MDC metrics along with Dataverse's traditional download counts from the time before MDC was enabled. To do this, set the :ref:`:MDCStartDate` to when you started MDC logging.

The following discussion assumes ``:MDCLogPath`` has been set to ``/usr/local/payara5/glassfish/domains/domain1/logs/mdc``

Configure Counter Processor
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -104,7 +103,7 @@ Soon we will be setting up a cron job to run nightly but we start with a single

* If you are running Counter Processor for the first time in the middle of a month, you will need create blank log files for the previous days. e.g.:

* ``cd /usr/local/payara5/glassfish/domains/domain1/logs/mdc``
* ``cd /usr/local/payara6/glassfish/domains/domain1/logs/mdc``

* ``touch counter_2019-02-01.log``

Expand Down
10 changes: 4 additions & 6 deletions doc/sphinx-guides/source/admin/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,13 @@ Long-Running Ingest Jobs Have Exhausted System Resources

Ingest is both CPU- and memory-intensive, and depending on your system resources and the size and format of tabular data files uploaded, may render your Dataverse installation unresponsive or nearly inoperable. It is possible to cancel these jobs by purging the ingest queue.

``/usr/local/payara5/mq/bin/imqcmd -u admin query dst -t q -n DataverseIngest`` will query the DataverseIngest destination. The password, unless you have changed it, matches the username.
``/usr/local/payara6/mq/bin/imqcmd -u admin query dst -t q -n DataverseIngest`` will query the DataverseIngest destination. The password, unless you have changed it, matches the username.

``/usr/local/payara5/mq/bin/imqcmd -u admin purge dst -t q -n DataverseIngest`` will purge the DataverseIngest queue, and prompt for your confirmation.
``/usr/local/payara6/mq/bin/imqcmd -u admin purge dst -t q -n DataverseIngest`` will purge the DataverseIngest queue, and prompt for your confirmation.

Finally, list destinations to verify that the purge was successful:

``/usr/local/payara5/mq/bin/imqcmd -u admin list dst``

If you are still running Glassfish, substitute glassfish4 for payara5 above. If you have installed your Dataverse installation in some other location, adjust the above paths accordingly.
``/usr/local/payara6/mq/bin/imqcmd -u admin list dst``

.. _troubleshooting-payara:

Expand All @@ -73,7 +71,7 @@ Payara
Finding the Payara Log File
~~~~~~~~~~~~~~~~~~~~~~~~~~~

``/usr/local/payara5/glassfish/domains/domain1/logs/server.log`` is the main place to look when you encounter problems (assuming you installed Payara in the default directory). Hopefully an error message has been logged. If there's a stack trace, it may be of interest to developers, especially they can trace line numbers back to a tagged version or commit. Send more of the stack trace (the entire file if possible) to developers who can help (see "Getting Help", below) and be sure to say which version of the Dataverse Software you have installed.
``/usr/local/payara6/glassfish/domains/domain1/logs/server.log`` is the main place to look when you encounter problems (assuming you installed Payara in the default directory). Hopefully an error message has been logged. If there's a stack trace, it may be of interest to developers, especially they can trace line numbers back to a tagged version or commit. Send more of the stack trace (the entire file if possible) to developers who can help (see "Getting Help", below) and be sure to say which version of the Dataverse Software you have installed.

.. _increase-payara-logging:

Expand Down
Loading