Skip to content

Commit a9aab95

Browse files
authored
ci(jupyterhub-keycloak): Add workflow for image build (#225)
* added workflow for image build * added temp pull_request trigger * revert to spark-3.5.2 due to limitation in notebook images * revert to spark-3.5.2 in workflow * removed pull_request trigger and updated screenshot/doc * missed reference
1 parent 48ed7fd commit a9aab95

File tree

6 files changed

+38
-9
lines changed

6 files changed

+38
-9
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Build and publish Spark for jupyterhub-keycloak demo
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
# TODO (@NickLarsenNZ): Also build on release branches, but with a stackable0.0.0-dev or stackableYY.M.X tag.
10+
# The current problem is that we don't know the patch level, so do we always build for `.0`, or just drop that
11+
# (eg: stackableYY.M), but then do we do the same for main (eg: 0.0-dev)?
12+
# - release-*
13+
paths:
14+
- demos/jupyterhub-keycloak/Dockerfile
15+
- .github/workflows/dev_jupyterhub-keycloak-spark.yaml
16+
17+
jobs:
18+
build_image:
19+
name: Reusable Workflow
20+
uses: ./.github/workflows/reusable_build_image.yaml
21+
secrets:
22+
harbor-robot-secret: ${{ secrets.HARBOR_ROBOT_DEMOS_GITHUB_ACTION_BUILD_SECRET }}
23+
slack-token: ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
24+
with:
25+
image-name: spark
26+
# TODO (@NickLarsenNZ): Use a versioned image with stackable0.0.0-dev or stackableXX.X.X so that
27+
# the demo is reproducable for the release and it will be automatically replaced for the release branch.
28+
image-version: 3.5.2-python311
29+
containerfile-path: demos/jupyterhub-keycloak/Dockerfile

stacks/jupyterhub-keycloak/Dockerfile renamed to demos/jupyterhub-keycloak/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# docker build -t oci.stackable.tech/sandbox/spark:3.5.5-python311 -f Dockerfile .
2-
# kind load docker-image oci.stackable.tech/sandbox/spark:3.5.5-python311 -n stackable-data-platform
1+
# docker build -t oci.stackable.tech/demos/spark:3.5.2-python311 -f Dockerfile .
2+
# kind load docker-image oci.stackable.tech/demos/spark:3.5.2-python311 -n stackable-data-platform
33
# or:
4-
# docker push oci.stackable.tech/sandbox/spark:3.5.5-python311
4+
# docker push oci.stackable.tech/demos/spark:3.5.2-python311
55

6-
FROM spark:3.5.5-scala2.12-java17-ubuntu
6+
FROM spark:3.5.2-scala2.12-java17-ubuntu
77

88
USER root
99

Loading

docs/modules/demos/pages/jupyterhub-keycloak.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ This setup is ideal for interactive data processing.
103103

104104
=== Spark Configuration
105105

106-
* **Executor Image**: Uses a custom image `oci.stackable.tech/sandbox/spark:3.5.5-python311` (built on the standard Spark image) for the executors, matching the Python version of the notebook.
106+
* **Executor Image**: Uses a custom image `oci.stackable.tech/demos/spark:3.5.2-python311` (built on the standard Spark image) for the executors, matching the Python version of the notebook.
107107
* **Resource Allocation**: Configures Spark executor instances, memory, and cores through settings defined in the notebook.
108108
* **Hadoop and AWS Libraries**: Includes necessary Hadoop and AWS libraries for S3 operations, matching the notebook image version.
109109

stacks/jupyterhub-keycloak/jupyterhub.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ options:
209209
image:
210210
display_name: Image
211211
choices:
212-
{% for image in ["quay.io/jupyter/pyspark-notebook:python-3.11.9", "quay.io/jupyter/pyspark-notebook:spark-3.5.5"] %}
212+
{% for image in ["quay.io/jupyter/pyspark-notebook:python-3.11.9", "quay.io/jupyter/pyspark-notebook:spark-3.5.2"] %}
213213
"{{image}}":
214214
display_name: "{{image}}"
215215
kubespawner_override:

stacks/jupyterhub-keycloak/process-s3.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
"acts as the driver. It is important that the versions of spark and python match across the driver (running in the juypyterhub image)\n",
5050
"and the executor(s) (running in a separate image, specified below with the `spark.kubernetes.container.image` setting).\n",
5151
"\n",
52-
"The jupyterhub image `quay.io/jupyter/pyspark-notebook:spark-3.5.5` uses a base ubuntu image (like the spark images).\n",
53-
"The versions of java match exactly. Python versions can differ at patch level, and the image used below `oci.stackable.tech/sandbox/spark:3.5.5-python311` is built from a `spark:3.5.2-scala2.12-java17-ubuntu` base image with python 3.11 (the same major/minor version as the notebook) installed.\n",
52+
"The jupyterhub image `quay.io/jupyter/pyspark-notebook:spark-3.5.2` uses a base ubuntu image (like the spark images).\n",
53+
"The versions of java match exactly. Python versions can differ at patch level, and the image used below `oci.stackable.tech/demos/spark:3.5.2-python311` is built from a `spark:3.5.2-scala2.12-java17-ubuntu` base image with python 3.11 (the same major/minor version as the notebook) installed.\n",
5454
"\n",
5555
"## S3\n",
5656
"As we will be reading data from an S3 bucket, we need to add the necessary `hadoop` and `aws` libraries in the same hadoop version as the\n",
@@ -69,7 +69,7 @@
6969
"NAMESPACE = os.environ.get(\"NAMESPACE\", \"default\")\n",
7070
"POD_NAME = os.environ.get(\"HOSTNAME\", f\"jupyter-{os.environ.get('USER', 'default')}-{NAMESPACE}\")\n",
7171
"\n",
72-
"EXECUTOR_IMAGE = \"oci.stackable.tech/sandbox/spark:3.5.5-python311\" \n",
72+
"EXECUTOR_IMAGE = \"oci.stackable.tech/demos/spark:3.5.2-python311\" \n",
7373
"\n",
7474
"spark = (\n",
7575
" SparkSession.builder\n",

0 commit comments

Comments
 (0)