Skip to content

Commit 28cc6aa

Browse files
authored
[DPE-3067] Changes following up entrypoint service refactoring (#57)
1 parent 8eff7ed commit 28cc6aa

File tree

6 files changed

+11
-47
lines changed

6 files changed

+11
-47
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
ARG BASE_IMAGE=base-charmed-spark:latest
22
FROM $BASE_IMAGE
33
# Provide Default Entrypoint for Pebble
4-
ENTRYPOINT [ "/bin/pebble", "enter", "--verbose", "--args", "entrypoint" ]
4+
ENTRYPOINT [ "/bin/pebble", "enter", "--verbose", "--args", "sparkd" ]

README.md

-14
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,6 @@ Charmed Spark Rock Image is delivered with Pebble already included in order to m
7171
docker run ghcr.io/canonical/charmed-spark:3.4.1-22.04_edge \; start history-server
7272
```
7373

74-
#### Starting Jupyter Notebook
75-
76-
```shell
77-
docker run \
78-
-v /path/to/kube/config:/var/lib/spark/.kube/config \
79-
-p <port>:8888
80-
ghcr.io/canonical/charmed-spark:3.4.1-22.04_edge \
81-
\; --args jupyter --username <spark-service-account> --namespace <spark-namespace> \
82-
\; start jupyter
83-
```
84-
85-
Make sure to have created the `<spark-service-account>` in the `<spark-namespace>` with the `spark8t` CLI beforehand.
86-
You should be able to access the jupyter server at `http://0.0.0.0:<port>`.
87-
8874
## Developers and Contributing
8975

9076
Please see the [CONTRIBUTING.md](https://github.com/canonical/charmed-spark-rock/blob/3.4-22.04/edge/CONTRIBUTING.md) for guidelines and for developer guidance.
File renamed without changes.

rockcraft.yaml

+10-32
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ environment:
2222
SPARK_LOG_DIR: /var/log/spark
2323

2424
services:
25-
entrypoint:
26-
command: "/bin/bash /opt/pebble/charmed-spark-entrypoint.sh"
25+
sparkd:
26+
command: "/bin/bash /opt/pebble/sparkd.sh"
2727
summary: "This is the service to startup Spark processes using the Spark entrypoint"
2828
override: replace
2929
startup: enabled
3030
on-success: shutdown
3131
on-failure: shutdown
3232
history-server:
33-
command: "/bin/bash /opt/pebble/charmed-spark-history-server.sh"
33+
command: "/bin/bash /opt/pebble/history-server.sh"
3434
summary: "This is the Spark History Server service"
3535
override: replace
3636
startup: disabled
@@ -39,20 +39,12 @@ services:
3939
environment:
4040
SPARK_PROPERTIES_FILE: /etc/spark8t/conf/spark-defaults.conf
4141
thrift-server:
42-
command: "/bin/bash /opt/pebble/charmed-spark-thrift-server.sh"
42+
command: "/bin/bash /opt/pebble/thrift-server.sh"
4343
summary: "This is the Spark Thrift Server service"
4444
override: replace
4545
startup: disabled
4646
environment:
4747
SPARK_PROPERTIES_FILE: /etc/spark8t/conf/spark-defaults.conf
48-
jupyter:
49-
command: "spark-client.pyspark [ --username spark --namespace spark ]"
50-
summary: "This is the Spark-powered Jupyter service"
51-
override: replace
52-
startup: disabled
53-
environment:
54-
PYSPARK_DRIVER_PYTHON: jupyter
55-
PYSPARK_DRIVER_PYTHON_OPTS: "lab --no-browser --port=8888 --ip=0.0.0.0 --NotebookApp.token='' --notebook-dir=/var/lib/spark/notebook"
5648

5749
parts:
5850
spark:
@@ -146,20 +138,6 @@ parts:
146138
stage:
147139
- opt/spark8t/python/dist
148140

149-
jupyter:
150-
plugin: python
151-
source: .
152-
python-packages:
153-
- jupyterlab
154-
stage-packages:
155-
- python3-venv
156-
organize:
157-
lib: usr/lib
158-
bin: usr/bin
159-
share: usr/share
160-
stage:
161-
- usr
162-
163141
kubectl:
164142
plugin: nil
165143
build-packages:
@@ -187,18 +165,18 @@ parts:
187165
source: files/spark
188166
organize:
189167
conf/spark-defaults.conf: etc/spark8t/conf/spark-defaults.conf
190-
bin/charmed-spark-entrypoint.sh: opt/pebble/charmed-spark-entrypoint.sh
191-
bin/charmed-spark-history-server.sh: opt/pebble/charmed-spark-history-server.sh
192-
bin/charmed-spark-thrift-server.sh: opt/pebble/charmed-spark-thrift-server.sh
168+
bin/sparkd.sh: opt/pebble/sparkd.sh
169+
bin/history-server.sh: opt/pebble/history-server.sh
170+
bin/thrift-server.sh: opt/pebble/thrift-server.sh
193171
bin/spark-client.pyspark: opt/spark-client/python/bin/spark-client.pyspark
194172
bin/spark-client.service-account-registry: opt/spark-client/python/bin/spark-client.service-account-registry
195173
bin/spark-client.spark-shell: opt/spark-client/python/bin/spark-client.spark-shell
196174
bin/spark-client.spark-submit: opt/spark-client/python/bin/spark-client.spark-submit
197175
stage:
198176
- etc/spark8t/conf/
199-
- opt/pebble/charmed-spark-entrypoint.sh
200-
- opt/pebble/charmed-spark-history-server.sh
201-
- opt/pebble/charmed-spark-thrift-server.sh
177+
- opt/pebble/sparkd.sh
178+
- opt/pebble/history-server.sh
179+
- opt/pebble/thrift-server.sh
202180
- opt/spark-client/python/bin/spark-client.pyspark
203181
- opt/spark-client/python/bin/spark-client.service-account-registry
204182
- opt/spark-client/python/bin/spark-client.spark-shell

0 commit comments

Comments
 (0)