Skip to content

Commit

Permalink
Merge 44d387b into 0b404c8
Browse files Browse the repository at this point in the history
  • Loading branch information
poikilotherm committed Apr 15, 2024
2 parents 0b404c8 + 44d387b commit 98228c4
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 44 deletions.
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/admin/monitoring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Tips:
MicroProfile Metrics endpoint
-----------------------------

Payara provides the metrics endpoint: <https://docs.payara.fish/community/docs/6.2023.9/Technical%20Documentation/MicroProfile/Metrics/Metrics%20Rest%20Endpoint.html>_
Payara provides the metrics endpoint: <https://docs.payara.fish/community/docs/Technical%20Documentation/MicroProfile/Metrics/Metrics%20Rest%20Endpoint.html>_
The metrics you can retrieve that way:
- `index_permit_wait_time_seconds_mean` displays how long does it take to receive a permit to index a dataset.
- `index_time_seconds` displays how long does it take to index a dataset.
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/container/base-image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The base image provides:
- CLI tools necessary to run Dataverse (i. e. ``curl`` or ``jq`` - see also :doc:`../installation/prerequisites` in Installation Guide)
- Linux tools for analysis, monitoring and so on
- `Jattach <https://github.com/apangin/jattach>`__ (attach to running JVM)
- `wait-for <https://github.com/eficode/wait-for>`__ (tool to "wait for" a service to be available)
- `wait4x <https://github.com/atkrad/wait4x>`__ (tool to "wait for" a service to be available)
- `dumb-init <https://github.com/Yelp/dumb-init>`__ (see :ref:`below <base-entrypoint>` for details)

This image is created as a "multi-arch image", see :ref:`below <base-multiarch>`.
Expand Down
6 changes: 3 additions & 3 deletions doc/sphinx-guides/source/developers/classic-dev-env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ On Linux, install ``jq`` from your package manager or download a binary from htt
Install Payara
~~~~~~~~~~~~~~

Payara 6.2023.8 or higher is required.
Payara 6.2024.4 or higher is required.

To install Payara, run the following commands:

``cd /usr/local``

``sudo curl -O -L https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2023.8/payara-6.2023.8.zip``
``sudo curl -O -L https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2024.4/payara-6.2024.4.zip``

``sudo unzip payara-6.2023.8.zip``
``sudo unzip payara-6.2024.4.zip``

``sudo chown -R $USER /usr/local/payara6``

Expand Down
6 changes: 3 additions & 3 deletions doc/sphinx-guides/source/installation/prerequisites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ On RHEL/derivative you can make Java 17 the default with the ``alternatives`` co
Payara
------

Payara 6.2023.8 is recommended. Newer versions might work fine. Regular updates are recommended.
Payara 6.2024.4 is recommended. Newer versions might work fine. Regular updates are recommended.

Installing Payara
=================
Expand All @@ -55,8 +55,8 @@ Installing Payara

- Download and install Payara (installed in ``/usr/local/payara6`` in the example commands below)::

# wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2023.8/payara-6.2023.8.zip
# unzip payara-6.2023.8.zip
# wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2024.4/payara-6.2024.4.zip
# unzip payara-6.2024.4.zip
# mv payara6 /usr/local

If nexus.payara.fish is ever down for maintenance, Payara distributions are also available from https://repo1.maven.org/maven2/fish/payara/distributions/payara/
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx-guides/source/qa/test-automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Go to the end of the log and then scroll up, looking for the failure. A failed A

```
TASK [dataverse : download payara zip] *****************************************
fatal: [localhost]: FAILED! => {"changed": false, "dest": "/tmp/payara.zip", "elapsed": 10, "msg": "Request failed: <urlopen error timed out>", "url": "https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2023.8/payara-6.2023.8.zip"}
fatal: [localhost]: FAILED! => {"changed": false, "dest": "/tmp/payara.zip", "elapsed": 10, "msg": "Request failed: <urlopen error timed out>", "url": "https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2024.4/payara-6.2024.4.zip"}
```

In the example above, if Payara can't be downloaded, we're obviously going to have problems deploying Dataverse to it!
Expand Down
37 changes: 22 additions & 15 deletions modules/container-base/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ ENV PATH="${PATH}:${PAYARA_DIR}/bin:${SCRIPT_DIR}" \
### PART 1: SYSTEM ###
ARG UID=1000
ARG GID=1000
# Auto-populated by BuildKit / buildx
#ARG TARGETARCH="amd64"
ARG TARGETARCH
USER root
WORKDIR /
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
Expand All @@ -90,10 +93,10 @@ RUN <<EOF

EOF

ARG JATTACH_VERSION="v2.1"
ARG JATTACH_CHECKSUM="07885fdc782e02e7302c6d190f54c3930afa10a38140365adf54076ec1086a8e"
ARG WAIT_FOR_VERSION="v2.2.3"
ARG WAIT_FOR_CHECKSUM="70271181be69cd2c7265b2746f97fccfd7e8aa1059894138a775369c23589ff4"
ARG JATTACH_VERSION="v2.2"
ARG JATTACH_TGZ_CHECKSUM_AMD64="acd9e17f15749306be843df392063893e97bfecc5260eef73ee98f06e5cfe02f"
ARG JATTACH_TGZ_CHECKSUM_ARM64="288ae5ed87ee7fe0e608c06db5a23a096a6217c9878ede53c4e33710bdcaab51"
ARG WAIT4X_VERSION="v2.14.0"
ARG PKGS="jq imagemagick curl unzip wget acl dirmngr gpg lsof procps netcat dumb-init"

# Installing the packages in an extra container layer for better caching
Expand All @@ -103,15 +106,21 @@ RUN <<EOF
apt-get install -qqy --no-install-recommends ${PKGS}
rm -rf "/var/lib/apt/lists/*"

# Install jattach
curl -sSfL -o /usr/bin/jattach "https://github.com/apangin/jattach/releases/download/${JATTACH_VERSION}/jattach"
echo "${JATTACH_CHECKSUM} /usr/bin/jattach" | sha256sum -c -
chmod +x /usr/bin/jattach

# Install wait-for
curl -sSfL -o /usr/bin/wait-for "https://github.com/eficode/wait-for/releases/download/${WAIT_FOR_VERSION}/wait-for"
echo "${WAIT_FOR_CHECKSUM} /usr/bin/wait-for" | sha256sum -c -
chmod +x /usr/bin/wait-for
# Install jattach & wait4x
if [ "${TARGETARCH}" = "amd64" ]; then
curl -sSfL -o /usr/bin/jattach.tgz "https://github.com/jattach/jattach/releases/download/${JATTACH_VERSION}/jattach-linux-x64.tgz"
echo "${JATTACH_TGZ_CHECKSUM_AMD64} /usr/bin/jattach.tgz" | sha256sum -c -
elif [ "${TARGETARCH}" = "arm64" ]; then
curl -sSfL -o /usr/bin/jattach.tgz "https://github.com/jattach/jattach/releases/download/${JATTACH_VERSION}/jattach-linux-arm64.tgz"
echo "${JATTACH_TGZ_CHECKSUM_ARM64} /usr/bin/jattach.tgz" | sha256sum -c -
fi
tar -xzf /usr/bin/jattach.tgz -C /usr/bin && chmod +x /usr/bin/jattach

# Install wait4x
curl -sSfL -o /usr/bin/wait4x.tar.gz "https://github.com/atkrad/wait4x/releases/download/${WAIT4X_VERSION}/wait4x-linux-${TARGETARCH}.tar.gz"
curl -sSfL -o /tmp/w4x-checksum "https://github.com/atkrad/wait4x/releases/download/${WAIT4X_VERSION}/wait4x-linux-${TARGETARCH}.tar.gz.sha256sum"
echo "$(cat /tmp/w4x-checksum | cut -f1 -d" ") /usr/bin/wait4x.tar.gz" | sha256sum -c -
tar -xzf /usr/bin/wait4x.tar.gz -C /usr/bin && chmod +x /usr/bin/wait4x
EOF

### PART 2: PAYARA ###
Expand Down Expand Up @@ -166,8 +175,6 @@ RUN <<EOF
${ASADMIN} create-jvm-options '-XX\:MetaspaceSize=${ENV=MEM_METASPACE_SIZE}'
${ASADMIN} create-jvm-options '-XX\:MaxMetaspaceSize=${ENV=MEM_MAX_METASPACE_SIZE}'
${ASADMIN} create-jvm-options '-XX\:+IgnoreUnrecognizedVMOptions'
# Workaround for FISH-7722: Failed to deploy war with @Stateless https://github.com/payara/Payara/issues/6337
${ASADMIN} create-jvm-options --add-opens=java.base/java.io=ALL-UNNAMED
# Disable autodeploy and hot reload
${ASADMIN} set configs.config.server-config.admin-service.das-config.dynamic-reload-enabled="false"
${ASADMIN} set configs.config.server-config.admin-service.das-config.autodeploy-enabled="false"
Expand Down
14 changes: 1 addition & 13 deletions modules/dataverse-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<argLine>-Duser.timezone=${project.timezone} -Dfile.encoding=${project.build.sourceEncoding} -Duser.language=${project.language} -Duser.region=${project.region}</argLine>

<!-- Major system components and dependencies -->
<payara.version>6.2023.8</payara.version>
<payara.version>6.2024.4</payara.version>
<postgresql.version>42.7.2</postgresql.version>
<solr.version>9.3.0</solr.version>
<aws.version>1.12.290</aws.version>
Expand Down Expand Up @@ -386,18 +386,6 @@
<enabled>false</enabled>
</snapshots>
</repository>
<!-- This repository is about to being phased out. See https://github.com/payara/Payara_PatchedProjects/issues/366 -->
<repository>
<id>payara-patched-externals</id>
<name>Payara Patched Externals</name>
<url>https://raw.github.com/payara/Payara_PatchedProjects/master</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>central-repo</id>
<name>Central Repository</name>
Expand Down
3 changes: 0 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,6 @@
<groupId>fish.payara.api</groupId>
<artifactId>payara-api</artifactId>
<scope>provided</scope>
<!-- Note: The version was provided by Payara BOM till 6.2023.7, when they removed the Core BOM from it as
meant for internal use only. Simply referencing the version property here solves the problem. -->
<version>${payara.version}</version>
</dependency>

<!-- JSON-P -->
Expand Down
3 changes: 0 additions & 3 deletions scripts/installer/as-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ function preliminary_setup()

./asadmin $ASADMIN_OPTS create-jvm-options "-Ddataverse.timerServer=true"

# Workaround for FISH-7722: Failed to deploy war with @Stateless https://github.com/payara/Payara/issues/6337
./asadmin $ASADMIN_OPTS create-jvm-options --add-opens=java.base/java.io=ALL-UNNAMED

# enable comet support
./asadmin $ASADMIN_OPTS set server-config.network-config.protocols.protocol.http-listener-1.http.comet-support-enabled="true"

Expand Down
2 changes: 1 addition & 1 deletion src/main/docker/scripts/init_3_wait_dataverse_db_host.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#It was reported on 9949 that on the first launch of the containers Dataverse would not be deployed on payara
#this was caused by a race condition due postgress not being ready. A solion for docker compose was prepared
#but didn't work due a compatibility issue on the Maven pluggin [https://github.com/fabric8io/docker-maven-plugin/issues/888]
wait-for "${DATAVERSE_DB_HOST:-postgres}:${DATAVERSE_DB_PORT:-5432}" -t 120
wait4x tcp "${DATAVERSE_DB_HOST:-postgres}:${DATAVERSE_DB_PORT:-5432}" -t 120s

0 comments on commit 98228c4

Please sign in to comment.