diff --git a/compose/Containerfile.minecraft b/compose/Containerfile.minecraft deleted file mode 100644 index ad16db60b..000000000 --- a/compose/Containerfile.minecraft +++ /dev/null @@ -1,21 +0,0 @@ -ARG CRYOSTAT_AGENT_VERSION=0.5.0-SNAPSHOT - -FROM registry.access.redhat.com/ubi8/openjdk-11:latest AS agentloader -ARG CRYOSTAT_AGENT_VERSION -USER 0 -RUN mkdir -p /opt/cryostat && \ - mvn dependency:get -Dartifact="io.cryostat:cryostat-agent:${CRYOSTAT_AGENT_VERSION}:jar:shaded" && \ - mvn dependency:copy -Dartifact="io.cryostat:cryostat-agent:${CRYOSTAT_AGENT_VERSION}:jar:shaded" -DoutputDirectory=/opt/cryostat \ - || true -RUN if [ ! -f "/opt/cryostat/cryostat-agent-${CRYOSTAT_AGENT_VERSION}-shaded.jar" ]; then \ - microdnf install git; \ - git clone https://github.com/cryostatio/cryostat-agent; \ - cd cryostat-agent; \ - mvn -DskipTests package; \ - cp "target/cryostat-agent-${CRYOSTAT_AGENT_VERSION}-shaded.jar" /opt/cryostat/; \ - fi - -FROM docker.io/itzg/minecraft-server:java21-jdk -ARG CRYOSTAT_AGENT_VERSION -RUN mkdir -p /opt/cryostat -COPY --from=agentloader /opt/cryostat/cryostat-agent-${CRYOSTAT_AGENT_VERSION}-shaded.jar /opt/cryostat/agent.jar diff --git a/compose/sample-apps-extras.yml b/compose/sample-apps-extras.yml deleted file mode 100644 index 385748eca..000000000 --- a/compose/sample-apps-extras.yml +++ /dev/null @@ -1,39 +0,0 @@ -version: "3" -services: - minecraft-server: - depends_on: - cryostat: - condition: service_healthy - image: ${MINECRAFT_TEST_IMAGE:-localhost/minecraft-server:latest} - build: - context: . - dockerfile: ./Containerfile.minecraft - hostname: minecraft - ports: - - "7091" - - "9494" - - "25565:25565" - environment: - CRYOSTAT_AGENT_APP_NAME: minecraft - CRYOSTAT_AGENT_WEBSERVER_HOST: minecraft - CRYOSTAT_AGENT_WEBSERVER_PORT: 9494 - CRYOSTAT_AGENT_CALLBACK: http://minecraft:9494/ - CRYOSTAT_AGENT_BASEURI: http://${CRYOSTAT_HTTP_HOST}:8080/ - CRYOSTAT_AGENT_BASEURI_RANGE: public - CRYOSTAT_AGENT_SSL_TRUST_ALL: "true" - CRYOSTAT_AGENT_SSL_VERIFY_HOSTNAME: "false" - CRYOSTAT_AGENT_AUTHORIZATION_TYPE: basic - CRYOSTAT_AGENT_AUTHORIZATION_VALUE: user:pass - CRYOSTAT_AGENT_API_WRITES_ENABLED: "true" - CRYOSTAT_AGENT_HARVESTER_TEMPLATE: Profiling - CRYOSTAT_AGENT_HARVESTER_PERIOD_MS: 300000 - 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)" - EULA: "true" - ONLINE_MODE: "false" - OVERRIDE_SERVER_PROPERTIES: "true" - ENABLE_JMX: "true" - JMX_HOST: minecraft - JMX_PORT: "7091" - JVM_OPTS: -javaagent:/opt/cryostat/agent.jar diff --git a/compose/sample-apps.yml b/compose/sample-apps.yml index f103e7984..4eedb75b9 100644 --- a/compose/sample-apps.yml +++ b/compose/sample-apps.yml @@ -95,7 +95,7 @@ services: start_period: 30s timeout: 5s quarkus-test-agent: - image: ${QUARKUS_TEST_IMAGE:-quay.io/andrewazores/quarkus-test:latest} + image: ${QUARKUS_TEST_IMAGE:-quay.io/redhat-java-monitoring/quarkus-cryostat-agent:latest} # do not add a depends_on:cryostat/depends_on:auth here, so that we can test that the agent is tolerant of that state hostname: quarkus-test-agent ports: @@ -139,4 +139,38 @@ services: retries: 3 start_period: 30s timeout: 5s - + gameserver: + depends_on: + cryostat: + condition: service_healthy + image: ${GAMESERVER_TEST_IMAGE:-quay.io/redhat-java-monitoring/gameserver-cryostat-agent:latest} + hostname: gameserver + ports: + - "7091" + - "9494" + - "25565:25565" + environment: + CRYOSTAT_AGENT_APP_NAME: gameserver + CRYOSTAT_AGENT_WEBSERVER_HOST: gameserver + CRYOSTAT_AGENT_WEBSERVER_PORT: 9494 + CRYOSTAT_AGENT_CALLBACK: http://gameserver:9494/ + CRYOSTAT_AGENT_BASEURI: http://${CRYOSTAT_HTTP_HOST}:8080/ + CRYOSTAT_AGENT_BASEURI_RANGE: public + CRYOSTAT_AGENT_SSL_TRUST_ALL: "true" + CRYOSTAT_AGENT_SSL_VERIFY_HOSTNAME: "false" + CRYOSTAT_AGENT_AUTHORIZATION_TYPE: basic + CRYOSTAT_AGENT_AUTHORIZATION_VALUE: user:pass + CRYOSTAT_AGENT_API_WRITES_ENABLED: "true" + CRYOSTAT_AGENT_HARVESTER_TEMPLATE: Profiling + CRYOSTAT_AGENT_HARVESTER_PERIOD_MS: 300000 + 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)" + EULA: "true" + ONLINE_MODE: "false" + OVERRIDE_SERVER_PROPERTIES: "true" + ENABLE_JMX: "true" + JMX_HOST: gameserver + JMX_PORT: "7091" + JVM_OPTS: -javaagent:/opt/cryostat/agent.jar + restart: always diff --git a/smoketest.bash b/smoketest.bash index 253421e92..d19384fae 100755 --- a/smoketest.bash +++ b/smoketest.bash @@ -23,7 +23,6 @@ CRYOSTAT_HTTP_PORT=${CRYOSTAT_HTTP_PORT:-8080} USE_PROXY=${USE_PROXY:-true} DEPLOY_GRAFANA=${DEPLOY_GRAFANA:-true} DRY_RUN=${DRY_RUN:-false} -upFlags=() display_usage() { echo "Usage:" @@ -34,7 +33,6 @@ display_usage() { echo -e "\t-G\t\t\t\t\t\texclude Grafana dashboard and jfr-datasource from deployment." echo -e "\t-r\t\t\t\t\t\tconfigure a cryostat-Reports sidecar instance" echo -e "\t-t\t\t\t\t\t\tinclude sample applications for Testing." - echo -e "\t-T\t\t\t\t\t\tinclude additional sample applications for Testing." echo -e "\t-V\t\t\t\t\t\tdo not discard data storage Volumes on exit." echo -e "\t-X\t\t\t\t\t\tdeploy additional development aid tools." echo -e "\t-c [podman|docker]\t\t\t\tUse Podman or Docker Container Engine (default \"podman\")." @@ -44,7 +42,7 @@ display_usage() { s3=seaweed ce=podman -while getopts "hs:prGtTOVXcbn" opt; do +while getopts "hs:prGtOVXcbn" opt; do case $opt in h) display_usage @@ -62,10 +60,6 @@ while getopts "hs:prGtTOVXcbn" opt; do t) FILES+=("${DIR}/compose/sample-apps.yml") ;; - T) - FILES+=("${DIR}/compose/sample-apps-extras.yml") - upFlags+=("--build") - ;; O) PULL_IMAGES=false ;; @@ -328,7 +322,6 @@ fi docker-compose \ "${CMD[@]}" \ up \ - "${upFlags[@]}" \ --renew-anon-volumes \ --remove-orphans \ --abort-on-container-exit