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

[DPE-3514] Add Apache Kyuubi entrypoint to Charmed Spark base rock image #75

Merged
Merged
Show file tree
Hide file tree
Changes from 5 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
4 changes: 4 additions & 0 deletions files/spark/bin/kyuubi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

pushd /opt/kyuubi
/opt/kyuubi/bin/kyuubi run
2 changes: 2 additions & 0 deletions files/spark/conf/kyuubi-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
export SPARK_HOME="/opt/spark/"
49 changes: 43 additions & 6 deletions rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@ services:
# working-dir: /opt/spark
environment:
SPARK_PROPERTIES_FILE: /etc/spark8t/conf/spark-defaults.conf
thrift-server:
command: "/bin/bash /opt/pebble/thrift-server.sh"
summary: "This is the Spark Thrift Server service"
kyuubi:
command: "/bin/bash /opt/pebble/kyuubi.sh"
summary: "This is the Kyuubi service"
override: replace
startup: disabled
environment:
SPARK_PROPERTIES_FILE: /etc/spark8t/conf/spark-defaults.conf

parts:
spark:
Expand Down Expand Up @@ -95,9 +93,41 @@ parts:
- opt/spark/python
- opt/spark/data

kyuubi:
plugin: dump
after: [ spark ]
source: https://dlcdn.apache.org/kyuubi/kyuubi-1.8.1/apache-kyuubi-1.8.1-bin.tgz
source-checksum: sha512/355ebbc184bbb0ab2fe521dda213a7769dae222a6a278a1fc0b3bf1173fd26091ccbc073038564ea8bb2ad2d5f5d1049c19508201ed710978d2ea79d20cd5726
organize:
beeline-jars: opt/kyuubi/beeline-jars
bin: opt/kyuubi/bin
charts: opt/kyuubi/charts
conf: opt/kyuubi/conf
db-scripts: opt/kyuubi/db-scripts
docker: opt/kyuubi/docker
externals: opt/kyuubi/externals
jars: opt/kyuubi/jars
logs: opt/kyuubi/logs
pid: opt/kyuubi/pid
web-ui: opt/kyuubi/web-ui
work: opt/kyuubi/work
stage:
- opt/kyuubi/beeline-jars
- opt/kyuubi/bin
- opt/kyuubi/charts
- opt/kyuubi/conf
- opt/kyuubi/db-scripts
- opt/kyuubi/docker
- opt/kyuubi/externals
- opt/kyuubi/jars
- opt/kyuubi/logs
- opt/kyuubi/pid
- opt/kyuubi/web-ui
- opt/kyuubi/work
theoctober19th marked this conversation as resolved.
Show resolved Hide resolved

dependencies:
plugin: nil
after: [ spark ]
after: [ kyuubi ]
build-packages:
- wget
overlay-script: |
Expand Down Expand Up @@ -186,9 +216,11 @@ parts:
source: files/spark
organize:
conf/spark-defaults.conf: etc/spark8t/conf/spark-defaults.conf
conf/kyuubi-env.sh: opt/kyuubi/conf/kyuubi-env.sh
bin/sparkd.sh: opt/pebble/sparkd.sh
bin/history-server.sh: opt/pebble/history-server.sh
bin/thrift-server.sh: opt/pebble/thrift-server.sh
bin/kyuubi.sh: opt/pebble/kyuubi.sh
bin/spark-client.pyspark: opt/spark-client/python/bin/spark-client.pyspark
bin/spark-client.spark-sql: opt/spark-client/python/bin/spark-client.spark-sql
bin/spark-client.service-account-registry: opt/spark-client/python/bin/spark-client.service-account-registry
Expand All @@ -199,6 +231,8 @@ parts:
- opt/pebble/sparkd.sh
- opt/pebble/history-server.sh
- opt/pebble/thrift-server.sh
- opt/pebble/kyuubi.sh
- opt/kyuubi/conf/kyuubi-env.sh
- opt/spark-client/python/bin/spark-client.pyspark
- opt/spark-client/python/bin/spark-client.spark-sql
- opt/spark-client/python/bin/spark-client.service-account-registry
Expand Down Expand Up @@ -237,6 +271,9 @@ parts:
chown -R ${SPARK_GID}:${SPARK_UID} opt/spark
chmod -R 750 opt/spark

chown -R ${SPARK_GID}:${SPARK_UID} opt/kyuubi
chmod -R 750 opt/kyuubi

mkdir -p var/lib/spark
mkdir -p var/lib/spark/notebook
chown -R ${SPARK_GID}:${SPARK_UID} var/lib/spark
Expand Down
Loading