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

Add Docker-compose setting for IT testing #606

Closed
wants to merge 1 commit into from
Closed
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
76 changes: 76 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
services:
ppl-opensearch-node:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make this generic Docker setup instead of only PPL?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thats is a good idea

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenSearch can only work with EMR Serverless Spark.

image: opensearchproject/opensearch:latest
container_name: ppl-opensearch-node
environment:
- cluster.name=ppl-opensearch-cluster
- node.name=ppl-opensearch-node
- discovery.type=single-node
- bootstrap.memory_lock=true
- OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=pplOSLocal@1
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- ppl-opensearch-data:/usr/share/opensearch/data
ports:
- 9200:9200
networks:
- ppl-opensearch-net
ppl-opensearch-dashboards:
YANG-DB marked this conversation as resolved.
Show resolved Hide resolved
image: opensearchproject/opensearch-dashboards:latest
container_name: ppl-opensearch-dashboards
ports:
- 5601:5601
expose:
- '5601'
environment:
OPENSEARCH_HOSTS: '["https://ppl-opensearch-node:9200"]'
networks:
- ppl-opensearch-net
ppl-spark:
build:
context: docker-compose
environment:
- SPARK_MODE=master
- SPARK_RPC_AUTHENTICATION_ENABLED=no
- SPARK_RPC_ENCRYPTION_ENABLED=no
- SPARK_LOCAL_STORAGE_ENCRYPTION_ENABLED=no
- SPARK_SSL_ENABLED=no
- SPARK_USER=spark
volumes:
- ./docker/spark-defaults.conf:/opt/bitnami/spark/conf/spark-defaults.conf
ports:
- '8080:8080'
networks:
- ppl-opensearch-net
ppl-spark-worker:
build:
context: docker-compose
environment:
- SPARK_MODE=worker
- SPARK_MASTER_URL=spark://ppl-spark:7077
- SPARK_WORKER_MEMORY=1G
- SPARK_WORKER_CORES=1
- SPARK_RPC_AUTHENTICATION_ENABLED=no
- SPARK_RPC_ENCRYPTION_ENABLED=no
- SPARK_LOCAL_STORAGE_ENCRYPTION_ENABLED=no
- SPARK_SSL_ENABLED=no
- SPARK_USER=spark
volumes:
- ./docker/spark-defaults.conf:/opt/bitnami/spark/conf/spark-defaults.conf
ports:
- '8081:8081'
networks:
- ppl-opensearch-net
volumes:
ppl-opensearch-data:

networks:
ppl-opensearch-net:
4 changes: 4 additions & 0 deletions docker-compose/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM bitnami/spark:3.5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started some work on running with the EMR Spark image.

#647 (comment)

If there is interest, I could put up a PR. I would keep what you have here, but add a separate Dockerfile for EMR Spark.

USER root
USER 1001
#TODO: Add additional jars for spark
1 change: 1 addition & 0 deletions docker-compose/spark-defaults.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
spark.sql.extensions org.opensearch.flint.spark.FlintPPLSparkExtensions,org.opensearch.flint.spark.FlintSparkExtensions
Loading