Skip to content

Commit

Permalink
build(deps): update Quarkus to 3.8 LTS (cryostatio#609)
Browse files Browse the repository at this point in the history
* build(deps): update Quarkus to 3.8 LTS

* add hibernate format mapper override

* remove no longer necessary lazy init

* disable openapi management / swagger UI unless in dev mode

* remove duplicate healthcheck override

* reduce healthcheck start periods

* correct healthcheck URL

* use authproxy image which contains wget for healthcheck

* correct healthchecks for vertx agent test applications
  • Loading branch information
andrewazores committed Oct 8, 2024
1 parent ada4220 commit ded745d
Show file tree
Hide file tree
Showing 31 changed files with 330 additions and 187 deletions.
21 changes: 12 additions & 9 deletions compose/auth_proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ services:
- "${CRYOSTAT_HTTP_PORT}"
environment:
CRYOSTAT_HTTP_PROXY_HOST: auth
CRYOSTAT_HTTP_PROXY_PORT: '8080'
QUARKUS_HTTP_PROXY_PROXY_ADDRESS_FORWARDING: 'true'
QUARKUS_HTTP_PROXY_ALLOW_X_FORWARDED: 'true'
QUARKUS_HTTP_PROXY_ENABLE_FORWARDED_HOST: 'true'
QUARKUS_HTTP_PROXY_ENABLE_FORWARDED_PREFIX: 'true'
CRYOSTAT_HTTP_PROXY_PORT: "${CRYOSTAT_HTTP_PORT}"
QUARKUS_HTTP_PROXY_PROXY_ADDRESS_FORWARDING: "true"
QUARKUS_HTTP_PROXY_ALLOW_X_FORWARDED: "true"
QUARKUS_HTTP_PROXY_ENABLE_FORWARDED_HOST: "true"
QUARKUS_HTTP_PROXY_ENABLE_FORWARDED_PREFIX: "true"
QUARKUS_HTTP_PROXY_TRUSTED_PROXIES: 127.0.0.1:${CRYOSTAT_HTTP_PORT}
QUARKUS_HTTP_ACCESS_LOG_PATTERN: long
QUARKUS_HTTP_ACCESS_LOG_ENABLED: "true"
healthcheck:
test: curl --fail http://cryostat:8181/health/liveness || exit 1
interval: 10s
Expand All @@ -30,8 +32,9 @@ services:
limits:
cpus: '0.1'
memory: 32m
image: ${OAUTH2_PROXY_IMAGE:-quay.io/oauth2-proxy/oauth2-proxy:latest}
command: --alpha-config=/tmp/auth_proxy_alpha_config.yaml
image: ${OAUTH2_PROXY_IMAGE:-quay.io/oauth2-proxy/oauth2-proxy:latest-alpine}
command:
- --alpha-config=/tmp/auth_proxy_alpha_config.yml
volumes:
- auth_proxy_cfg:/tmp
hostname: auth
Expand All @@ -47,10 +50,10 @@ services:
# OAUTH2_PROXY_SKIP_AUTH_ROUTES: .*
restart: unless-stopped
healthcheck:
test: wget -q --spider http://localhost:8080/ping || exit 1
test: wget --no-check-certificate -q --spider ${CRYOSTAT_PROXY_PROTOCOL}://localhost:${CRYOSTAT_PROXY_PORT}/ping || exit 1
interval: 10s
retries: 3
start_period: 30s
start_period: 10s
timeout: 5s

volumes:
Expand Down
2 changes: 1 addition & 1 deletion compose/cryostat-grafana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ services:
test: curl --fail http://localhost:3000/ || exit 1
retries: 3
interval: 30s
start_period: 30s
start_period: 10s
timeout: 1s
14 changes: 8 additions & 6 deletions compose/cryostat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ services:
CRYOSTAT_DISCOVERY_DOCKER_ENABLED: ${CRYOSTAT_DISCOVERY_DOCKER_ENABLED:-true}
JAVA_OPTS_APPEND: "-XX:+FlightRecorder -XX:StartFlightRecording=name=onstart,settings=default,disk=true,maxage=5m -XX:StartFlightRecording=name=startup,settings=profile,disk=true,duration=30s -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9091 -Dcom.sun.management.jmxremote.rmi.port=9091 -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false"
restart: unless-stopped
healthcheck:
test: curl --fail http://cryostat:${CRYOSTAT_HTTP_PORT}/health/liveness || exit 1
interval: 10s
retries: 3
start_period: 30s
timeout: 5s
# FIXME reenable this check. Somehow after upgrading to Quarkus 3.8, this check fails with 'connection refused',
# but the container comes up successfully without it and shelling into the container later to run curl succeeds
# healthcheck:
# test: curl --fail http://cryostat:${CRYOSTAT_HTTP_PORT}/health/liveness || exit 1
# interval: 10s
# retries: 3
# start_period: 30s
# timeout: 5s

volumes:
jmxtls_cfg:
Expand Down
2 changes: 1 addition & 1 deletion compose/db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
test: pg_isready -U cryostat3 -d cryostat3 || exit 1
interval: 10s
retries: 3
start_period: 30s
start_period: 10s
timeout: 5s

volumes:
Expand Down
2 changes: 1 addition & 1 deletion compose/jfr-datasource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ services:
test: curl --fail http://localhost:8080/ || exit 1
retries: 3
interval: 30s
start_period: 30s
start_period: 10s
timeout: 1s
133 changes: 133 additions & 0 deletions compose/sample_apps/vertx-cryostat-agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
version: "3"
services:
vertx-agent-1:
depends_on:
cryostat:
condition: service_healthy
image: ${VERTX_FIB_DEMO_IMAGE:-quay.io/redhat-java-monitoring/vertx-cryostat-agent:latest}
hostname: vertx-cryostat-agent-1
environment:
HTTP_PORT: 8081
JMX_PORT: 9093
USE_JDP: "true"
CRYOSTAT_AGENT_APP_NAME: vertx-cryostat-agent-1
CRYOSTAT_AGENT_WEBCLIENT_TLS_TRUST_ALL: "true"
CRYOSTAT_AGENT_WEBCLIENT_TLS_VERIFY_HOSTNAME: "false"
CRYOSTAT_AGENT_WEBSERVER_HOST: "vertx-agent-1"
CRYOSTAT_AGENT_WEBSERVER_PORT: "8910"
CRYOSTAT_AGENT_CALLBACK: "http://vertx-agent-1:8910/"
CRYOSTAT_AGENT_BASEURI: "${CRYOSTAT_PROXY_PROTOCOL}://${CRYOSTAT_HTTP_HOST}:${CRYOSTAT_PROXY_PORT}/"
CRYOSTAT_AGENT_BASEURI_RANGE: public
CRYOSTAT_AGENT_TRUST_ALL: "true"
CRYOSTAT_AGENT_AUTHORIZATION_TYPE: basic
CRYOSTAT_AGENT_AUTHORIZATION_VALUE: user:pass
ports:
- "8081:8081"
expose:
- "8910"
restart: always
healthcheck:
test: curl --fail http://localhost:8081 || exit 1
interval: 10s
retries: 3
start_period: 30s
timeout: 5s

vertx-agent-2:
depends_on:
cryostat:
condition: service_healthy
image: ${VERTX_FIB_DEMO_IMAGE:-quay.io/redhat-java-monitoring/vertx-cryostat-agent:latest}
hostname: vertx-cryostat-agent-2
environment:
HTTP_PORT: 8082
JMX_PORT: 9094
USE_JDP: "true"
USE_AUTH: "true"
CRYOSTAT_AGENT_APP_NAME: "vertx-cryostat-agent-2"
CRYOSTAT_AGENT_WEBSERVER_HOST: "vertx-agent-2"
CRYOSTAT_AGENT_WEBSERVER_PORT: "8911"
CRYOSTAT_AGENT_WEBCLIENT_TLS_TRUSTSTORE_CERT[0]_PATH: /auth_certs/certificate.pem
CRYOSTAT_AGENT_WEBCLIENT_TLS_TRUSTSTORE_CERT[0]_TYPE: X.509
CRYOSTAT_AGENT_WEBCLIENT_TLS_TRUSTSTORE_CERT[0]_ALIAS: cryostat
CRYOSTAT_AGENT_CALLBACK: "http://vertx-agent-2:8911/"
CRYOSTAT_AGENT_API_WRITES_ENABLED: "true"
CRYOSTAT_AGENT_BASEURI: "${CRYOSTAT_PROXY_PROTOCOL}://${CRYOSTAT_HTTP_HOST}:${CRYOSTAT_PROXY_PORT}/"
CRYOSTAT_AGENT_BASEURI_RANGE: public
CRYOSTAT_AGENT_TRUST_ALL: "true"
CRYOSTAT_AGENT_AUTHORIZATION_TYPE: basic
CRYOSTAT_AGENT_AUTHORIZATION_VALUE: user:pass
ports:
- "8082:8082"
expose:
- "8911"
restart: always
healthcheck:
test: curl --fail http://localhost:8082 || exit 1
interval: 10s
retries: 3
start_period: 30s
timeout: 5s
volumes:
- ${DIR}/compose/auth_certs:/auth_certs:z

vertx-agent-3:
depends_on:
cryostat:
condition: service_healthy
image: ${VERTX_FIB_DEMO_IMAGE:-quay.io/redhat-java-monitoring/vertx-cryostat-agent:latest}
hostname: vertx-cryostat-agent-3
environment:
HTTP_PORT: 8083
JMX_PORT: 9095
USE_JDP: "true"
USE_AUTH: "true"
USE_SSL: "true"
CRYOSTAT_AGENT_APP_NAME: "vertx-cryostat-agent-3"
CRYOSTAT_AGENT_WEBSERVER_HOST: "vertx-agent-3"
CRYOSTAT_AGENT_WEBSERVER_PORT: "8912"
CRYOSTAT_AGENT_WEBCLIENT_TLS_TRUSTSTORE_CERT[0]_PATH: /auth_certs/certificate.pem
CRYOSTAT_AGENT_WEBCLIENT_TLS_TRUSTSTORE_CERT[0]_TYPE: X.509
CRYOSTAT_AGENT_WEBCLIENT_TLS_TRUSTSTORE_CERT[0]_ALIAS: cryostat
CRYOSTAT_AGENT_CALLBACK: "http://vertx-agent-3:8912/"
CRYOSTAT_AGENT_API_WRITES_ENABLED: "true"
CRYOSTAT_AGENT_BASEURI: "${CRYOSTAT_PROXY_PROTOCOL}://${CRYOSTAT_HTTP_HOST}:${CRYOSTAT_PROXY_PORT}/"
CRYOSTAT_AGENT_BASEURI_RANGE: public
CRYOSTAT_AGENT_TRUST_ALL: "true"
CRYOSTAT_AGENT_AUTHORIZATION_TYPE: basic
CRYOSTAT_AGENT_AUTHORIZATION_VALUE: user:pass
ports:
- "8083:8083"
expose:
- "8912"
restart: always
healthcheck:
test: curl --fail http://localhost:8083 || exit 1
interval: 10s
retries: 3
start_period: 30s
timeout: 5s
volumes:
- ${DIR}/compose/auth_certs:/auth_certs:z

vertx-agent-4:
depends_on:
cryostat:
condition: service_healthy
image: ${VERTX_FIB_DEMO_IMAGE:-quay.io/redhat-java-monitoring/vertx-cryostat-agent:latest}
hostname: vertx-cryostat-agent-4
environment:
HTTP_PORT: 8084
JMX_PORT: 9096
USE_JDP: "true"
USE_AUTH: "false"
USE_SSL: "false"
ports:
- "8084:8084"
restart: always
healthcheck:
test: curl --fail http://localhost:8084 || exit 1
interval: 10s
retries: 3
start_period: 30s
timeout: 5s
23 changes: 8 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,19 @@
<org.openjdk.jmc.version>9.0.0</org.openjdk.jmc.version>

<org.apache.commons.codec.version>1.16.1</org.apache.commons.codec.version>
<org.apache.commons.io.version>2.13.0</org.apache.commons.io.version>
<org.apache.commons.io.version>2.16.1</org.apache.commons.io.version>
<org.apache.commons.collections.version>4.4</org.apache.commons.collections.version>
<org.apache.httpcomponents.version>5.2.1</org.apache.httpcomponents.version>
<org.apache.commons.lang3.version>3.13.0</org.apache.commons.lang3.version>
<org.apache.commons.validator.version>1.7</org.apache.commons.validator.version>
<org.apache.commons.validator.version>1.8.0</org.apache.commons.validator.version>
<org.projectnessie.cel.bom.version>0.4.4</org.projectnessie.cel.bom.version>
<com.google.protobuf-java.version>3.25.5</com.google.protobuf-java.version>
<com.nimbusds.jose.jwt.version>9.37.3</com.nimbusds.jose.jwt.version>
<org.testcontainers.bom.version>1.19.8</org.testcontainers.bom.version>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>3.2.12.Final</quarkus.platform.version>
<quarkus-quinoa.version>2.3.6</quarkus-quinoa.version>
<io.netty.version>4.1.108.Final</io.netty.version>
<quarkus.platform.version>3.8.6</quarkus.platform.version>
<quarkus-quinoa.version>2.3.10</quarkus-quinoa.version>
<org.codehaus.mojo.build.helper.plugin.version>3.6.0</org.codehaus.mojo.build.helper.plugin.version>
<assembly-plugin.version>3.7.1</assembly-plugin.version>

Expand All @@ -72,13 +71,6 @@
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>${io.netty.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>${quarkus.platform.group-id}</groupId>
<artifactId>${quarkus.platform.artifact-id}</artifactId>
Expand Down Expand Up @@ -162,6 +154,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-vertx</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-netty</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-openapi</artifactId>
Expand Down Expand Up @@ -210,12 +206,10 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${org.apache.commons.lang3.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${org.apache.commons.codec.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Expand Down Expand Up @@ -541,7 +535,6 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>${io.netty.version}</version>
<classifier>${io.netty.netty-transport-native-epoll.classifier}</classifier>
<scope>${io.netty.netty-transport-native-epoll.scope}</scope>
</dependency>
Expand Down
17 changes: 7 additions & 10 deletions schema/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ components:
DiscoveryPlugin:
properties:
builtin:
readOnly: true
type: boolean
callback:
format: uri
Expand Down Expand Up @@ -296,6 +297,7 @@ components:
Target:
properties:
agent:
readOnly: true
type: boolean
alias:
pattern: \S
Expand Down Expand Up @@ -347,11 +349,6 @@ components:
meta:
$ref: '#/components/schemas/Meta'
type: object
securitySchemes:
SecurityScheme:
description: Authentication
scheme: basic
type: http
info:
contact:
email: [email protected]
Expand Down Expand Up @@ -913,7 +910,7 @@ paths:
type: string
requestBody:
content:
application/json:
text/plain:
schema:
type: string
responses:
Expand Down Expand Up @@ -1906,7 +1903,7 @@ paths:
responses:
"200":
content:
application/json:
text/plain:
schema:
type: string
description: OK
Expand Down Expand Up @@ -2393,13 +2390,13 @@ paths:
type: integer
requestBody:
content:
application/json:
text/plain:
schema:
type: string
responses:
"200":
content:
application/json:
text/plain:
schema:
type: string
description: OK
Expand Down Expand Up @@ -2429,7 +2426,7 @@ paths:
responses:
"200":
content:
application/json:
text/plain:
schema:
type: string
description: OK
Expand Down
Loading

0 comments on commit ded745d

Please sign in to comment.