Skip to content

Commit

Permalink
Revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
welpaolo committed Jul 3, 2024
1 parent fb56bc5 commit 4fe58a6
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 9 deletions.
1 change: 0 additions & 1 deletion images/charmed-spark-gpu/bin-spark

This file was deleted.

6 changes: 6 additions & 0 deletions images/charmed-spark-gpu/bin/history-server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

pushd /opt/spark
mkdir -p /tmp/spark-events
export SPARK_NO_DAEMONIZE="true"
/opt/spark/sbin/start-history-server.sh --properties-file ${SPARK_PROPERTIES_FILE}
3 changes: 3 additions & 0 deletions images/charmed-spark-gpu/bin/spark-client.pyspark
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

python3 -m spark8t.cli.pyspark $*
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

python3 -m spark8t.cli.service_account_registry $*
3 changes: 3 additions & 0 deletions images/charmed-spark-gpu/bin/spark-client.spark-shell
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

python3 -m spark8t.cli.spark_shell $*
3 changes: 3 additions & 0 deletions images/charmed-spark-gpu/bin/spark-client.spark-sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

python3 -m spark8t.cli.spark_sql $*
3 changes: 3 additions & 0 deletions images/charmed-spark-gpu/bin/spark-client.spark-submit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

python3 -m spark8t.cli.spark_submit $*
30 changes: 30 additions & 0 deletions images/charmed-spark-gpu/bin/sparkd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

function finish {
if [ $? -ne 0 ]
then
kill -1 1
sleep 1
fi
}
trap finish EXIT


FLAVOUR=$1

echo "Running script with ${FLAVOUR} flavour"

case "${FLAVOUR}" in
driver|executor)
pushd /opt/spark
./entrypoint.sh "$@"
;;
"")
# Infinite sleep to allow pebble to be running indefinitely
sleep inf
;;
*)
echo "Component \"${FLAVOUR}\" unknown"
exit 1
;;
esac
15 changes: 7 additions & 8 deletions images/charmed-spark-gpu/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,14 @@ parts:
plugin: dump
after: [ spark8t, spark ]
source: .
source-type: local
organize:
bin-spark/sparkd.sh: opt/pebble/sparkd.sh
bin-spark/history-server.sh: opt/pebble/history-server.sh
bin-spark/spark-client.pyspark: opt/spark-client/python/bin/spark-client.pyspark
bin-spark/spark-client.spark-sql: opt/spark-client/python/bin/spark-client.spark-sql
bin-spark/spark-client.service-account-registry: opt/spark-client/python/bin/spark-client.service-account-registry
bin-spark/spark-client.spark-shell: opt/spark-client/python/bin/spark-client.spark-shell
bin-spark/spark-client.spark-submit: opt/spark-client/python/bin/spark-client.spark-submit
bin/sparkd.sh: opt/pebble/sparkd.sh
bin/history-server.sh: opt/pebble/history-server.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
bin/spark-client.spark-shell: opt/spark-client/python/bin/spark-client.spark-shell
bin/spark-client.spark-submit: opt/spark-client/python/bin/spark-client.spark-submit
conf/spark-defaults.conf: etc/spark8t/conf/spark-defaults.conf
bin/getGpusResources.sh: opt/getGpusResources.sh
stage:
Expand Down

0 comments on commit 4fe58a6

Please sign in to comment.