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

feat(smoketest): add Opensearch as a sample app #570

Merged
merged 7 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ nb-configuration.xml
.env

.quinoa/
truststore/
templates/
certs/*.p12
certs/*.pass
*.jfr
.quarkus/
compose/auth_certs/*.key
compose/auth_certs/*.pem
truststore/
compose/**/*.key
compose/**/*.pem
compose/**/*.p12
compose/**/*.pass
compose/**/*.cer
6 changes: 5 additions & 1 deletion compose/agent_certs/generate-agent-certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -x

CERTS_DIR="$(realpath "$(dirname "$0")")"
TRUSTSTORE_DIR="$CERTS_DIR/../../truststore/"

SSL_KEYSTORE=agent-keystore.p12

Expand Down Expand Up @@ -57,4 +58,7 @@ keytool \
-storepass "$SSL_KEYSTORE_PASS" \
-file agent_server.cer

cp agent_server.cer "$CERTS_DIR/../../truststore/quarkus-test-agent.cer"


mkdir -p "${TRUSTSTORE_DIR}" && \
cp agent_server.cer "${TRUSTSTORE_DIR}"
36 changes: 36 additions & 0 deletions compose/opensearch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: "3"
services:
opensearch-node:
image: docker.io/opensearchproject/opensearch:latest
hostname: opensearch-node
environment:
discovery.type: single-node
# Reference: https://opensearch.org/docs/latest/security/configuration/demo-configuration/#setting-up-a-custom-admin-password
OPENSEARCH_INITIAL_ADMIN_PASSWORD: password4Opense@rch
OPENSEARCH_JAVA_OPTS: >
-Dcom.sun.management.jmxremote.autodiscovery=true
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9292
-Dcom.sun.management.jmxremote.rmi.port=9292
-Djava.rmi.server.hostname=opensearch-node
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.local.only=false
volumes:
- opensearch-data:/usr/share/opensearch/data
expose:
- "9200" # REST API
# - "9600" # Performance Analyzer

opensearch-dashboards:
image: docker.io/opensearchproject/opensearch-dashboards:latest
hostname: opensearch-dashboards
ports:
- 5601:5601
environment:
OPENSEARCH_HOSTS: '["https://opensearch-node:9200"]'
OPENSEARCH_USERNAME: admin
OPENSEARCH_PASSWORD: password4Opense@rch

volumes:
opensearch-data:
12 changes: 6 additions & 6 deletions smoketest.bash
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ if [ "${DEPLOY_GRAFANA}" = "true" ]; then
fi

if [ "${INCLUDE_SAMPLE_APPS}" = "true" ]; then
FILES+=("${DIR}/compose/sample-apps.yml")
FILES+=("${DIR}/compose/opensearch.yml" "${DIR}/compose/sample-apps.yml")
if [ "${SAMPLE_APPS_USE_TLS}" = "true" ]; then
FILES+=("${DIR}/compose/sample-apps_https.yml")
fi
Expand Down Expand Up @@ -207,13 +207,13 @@ cleanup() {
${container_engine} volume rm auth_proxy_certs || true
fi
if [ "${INCLUDE_SAMPLE_APPS}" = "true" ] && [ "${SAMPLE_APPS_USE_TLS}" = "true" ]; then
rm "${DIR}/compose/agent_certs/agent_server.cer"
rm "${DIR}/compose/agent_certs/agent-keystore.p12"
rm "${DIR}/compose/agent_certs/keystore.pass"
rm "${DIR}/compose/agent_certs/agent_server.cer" || true
rm "${DIR}/compose/agent_certs/agent-keystore.p12" || true
rm "${DIR}/compose/agent_certs/keystore.pass" || true
fi
if [ "${USE_TLS}" = "true" ]; then
rm "${DIR}/compose/auth_certs/certificate.pem"
rm "${DIR}/compose/auth_certs/private.key"
rm "${DIR}/compose/auth_certs/certificate.pem" || true
rm "${DIR}/compose/auth_certs/private.key" || true
fi
if [ "${s3}" = "localstack" ]; then
${container_engine} rm localstack_cfg_helper || true
Expand Down
Loading