Skip to content

Commit

Permalink
test(smoketest): Update quarkus-cryostat-agent for truststore setup (c…
Browse files Browse the repository at this point in the history
  • Loading branch information
mwangggg authored Aug 8, 2024
1 parent b927fa8 commit 67a09a5
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 11 deletions.
2 changes: 1 addition & 1 deletion compose/auth_certs/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -xe

CERTS_DIR="$(dirname "$(readlink -f "$0")")"

openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out "${CERTS_DIR}/certificate.pem" -keyout "${CERTS_DIR}/private.key"
openssl req -new -addext "subjectAltName = DNS:auth" -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out "${CERTS_DIR}/certificate.pem" -keyout "${CERTS_DIR}/private.key" -subj "/C=CA/ST=ON/L=Toronto/O=RedHat/OU=JavaMonitoring/CN=Cryostat"
7 changes: 5 additions & 2 deletions compose/sample_apps/gameserver-jdk17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ services:
CRYOSTAT_AGENT_APP_NAME: gameserver-jdk17
CRYOSTAT_AGENT_WEBSERVER_HOST: gameserver-jdk17
CRYOSTAT_AGENT_WEBSERVER_PORT: 9495
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://gameserver-jdk17:9495/
CRYOSTAT_AGENT_BASEURI: ${CRYOSTAT_PROXY_PROTOCOL}://${CRYOSTAT_HTTP_HOST}:${CRYOSTAT_PROXY_PORT}/
CRYOSTAT_AGENT_BASEURI_RANGE: public
CRYOSTAT_AGENT_WEBCLIENT_TLS_TRUST_ALL: "true"
CRYOSTAT_AGENT_WEBCLIENT_TLS_VERIFY_HOSTNAME: "false"
CRYOSTAT_AGENT_AUTHORIZATION_TYPE: basic
CRYOSTAT_AGENT_AUTHORIZATION_VALUE: user:pass
CRYOSTAT_AGENT_API_WRITES_ENABLED: "true"
Expand All @@ -34,3 +35,5 @@ services:
JMX_HOST: gameserver-jdk17
JMX_PORT: "7092"
JVM_OPTS: -javaagent:/opt/cryostat/agent.jar
volumes:
- ${DIR}/compose/auth_certs:/auth_certs:z
7 changes: 5 additions & 2 deletions compose/sample_apps/gameserver-jdk21.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ services:
CRYOSTAT_AGENT_APP_NAME: gameserver-jdk21
CRYOSTAT_AGENT_WEBSERVER_HOST: gameserver-jdk21
CRYOSTAT_AGENT_WEBSERVER_PORT: 9496
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://gameserver-jdk21:9496/
CRYOSTAT_AGENT_BASEURI: ${CRYOSTAT_PROXY_PROTOCOL}://${CRYOSTAT_HTTP_HOST}:${CRYOSTAT_PROXY_PORT}/
CRYOSTAT_AGENT_BASEURI_RANGE: public
CRYOSTAT_AGENT_WEBCLIENT_TLS_TRUST_ALL: "true"
CRYOSTAT_AGENT_WEBCLIENT_TLS_VERIFY_HOSTNAME: "false"
CRYOSTAT_AGENT_AUTHORIZATION_TYPE: basic
CRYOSTAT_AGENT_AUTHORIZATION_VALUE: user:pass
CRYOSTAT_AGENT_API_WRITES_ENABLED: "true"
Expand All @@ -34,3 +35,5 @@ services:
JMX_HOST: gameserver-jdk21
JMX_PORT: "7093"
JVM_OPTS: -javaagent:/opt/cryostat/agent.jar
volumes:
- ${DIR}/compose/auth_certs:/auth_certs:z
7 changes: 5 additions & 2 deletions compose/sample_apps/quarkus-cryostat-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ services:
CRYOSTAT_AGENT_CALLBACK: http://quarkus-cryostat-agent:9977/
CRYOSTAT_AGENT_BASEURI: ${CRYOSTAT_PROXY_PROTOCOL}://${CRYOSTAT_HTTP_HOST}:${CRYOSTAT_PROXY_PORT}/
CRYOSTAT_AGENT_BASEURI_RANGE: public
CRYOSTAT_AGENT_WEBCLIENT_TLS_TRUST_ALL: "true"
CRYOSTAT_AGENT_WEBCLIENT_TLS_VERIFY_HOSTNAME: "false"
CRYOSTAT_AGENT_AUTHORIZATION_TYPE: basic
CRYOSTAT_AGENT_AUTHORIZATION_VALUE: user:pass
CRYOSTAT_AGENT_HARVESTER_PERIOD_MS: 30000
CRYOSTAT_AGENT_HARVESTER_MAX_FILES: 3
CRYOSTAT_AGENT_HARVESTER_EXIT_MAX_AGE_MS: 60000
CRYOSTAT_AGENT_HARVESTER_EXIT_MAX_SIZE_B: 153600 # "$(echo 1024*150 | bc)"
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_API_WRITES_ENABLED: "true"
restart: always
healthcheck:
Expand All @@ -45,3 +46,5 @@ services:
retries: 3
start_period: 30s
timeout: 5s
volumes:
- ${DIR}/compose/auth_certs:/auth_certs:z
17 changes: 13 additions & 4 deletions compose/sample_apps/vertx-cryostat-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ services:
retries: 3
start_period: 30s
timeout: 5s

vertx-agent-2:
depends_on:
cryostat:
Expand All @@ -44,10 +45,11 @@ services:
USE_JDP: "true"
USE_AUTH: "true"
CRYOSTAT_AGENT_APP_NAME: "vertx-cryostat-agent-2"
CRYOSTAT_AGENT_WEBCLIENT_TLS_TRUST_ALL: "true"
CRYOSTAT_AGENT_WEBCLIENT_TLS_VERIFY_HOSTNAME: "false"
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}/"
Expand All @@ -66,6 +68,9 @@ services:
retries: 3
start_period: 30s
timeout: 5s
volumes:
- ${DIR}/compose/auth_certs:/auth_certs:z

vertx-agent-3:
depends_on:
cryostat:
Expand All @@ -79,10 +84,11 @@ services:
USE_AUTH: "true"
USE_SSL: "true"
CRYOSTAT_AGENT_APP_NAME: "vertx-cryostat-agent-3"
CRYOSTAT_AGENT_WEBCLIENT_TLS_TRUST_ALL: "true"
CRYOSTAT_AGENT_WEBCLIENT_TLS_VERIFY_HOSTNAME: "false"
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}/"
Expand All @@ -101,6 +107,9 @@ services:
retries: 3
start_period: 30s
timeout: 5s
volumes:
- ${DIR}/compose/auth_certs:/auth_certs:z

vertx-agent-4:
depends_on:
cryostat:
Expand Down

0 comments on commit 67a09a5

Please sign in to comment.