From 8e3bf1347000d945745b319833cf24677e1513ee Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Tue, 24 Sep 2024 15:10:10 +0200 Subject: [PATCH 1/5] Adding libs for OIDC --- superset/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/superset/Dockerfile b/superset/Dockerfile index 57bd52a72..dbd69c7c7 100644 --- a/superset/Dockerfile +++ b/superset/Dockerfile @@ -61,6 +61,8 @@ RUN python3 -m venv /stackable/app \ # by searching first under `TZPATH` (which is empty due to the point above) or for the tzdata python package. # That package is therefore added here (airflow has tzdata in its list of dependencies, but superset does not). tzdata \ + Flask_OIDC==2.2.0 \ + Flask-OpenID==1.3.1\ && pip install \ --no-cache-dir \ --upgrade \ From f9c391262f28be2fa2c075f93e91a1aecad91b38 Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Wed, 9 Oct 2024 15:26:12 +0200 Subject: [PATCH 2/5] Adding oidc support to airflow --- airflow/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/airflow/Dockerfile b/airflow/Dockerfile index ce7fcabd1..5d126de79 100644 --- a/airflow/Dockerfile +++ b/airflow/Dockerfile @@ -4,7 +4,7 @@ ARG GIT_SYNC # For updated versions check https://github.com/kubernetes/git-sync/releases # which should contain a image location (e.g. registry.k8s.io/git-sync/git-sync:v3.6.8) -FROM oci.stackable.tech/sdp/git-sync:${GIT_SYNC} as gitsync-image +FROM oci.stackable.tech/sdp/git-sync:${GIT_SYNC} AS gitsync-image FROM stackable/image/statsd_exporter AS statsd_exporter-builder @@ -48,7 +48,10 @@ RUN python${PYTHON} -m venv --system-site-packages /stackable/app && \ pip install --no-cache-dir apache-airflow[${AIRFLOW_EXTRAS}]==${PRODUCT} --constraint /tmp/constraints.txt && \ # Needed for pandas S3 integration to e.g. write and read csv and parquet files to/from S3 pip install --no-cache-dir s3fs cyclonedx-bom && \ - cyclonedx-py environment --schema-version 1.5 --outfile /stackable/airflow-${PRODUCT}.cdx.json + cyclonedx-py environment --schema-version 1.5 --outfile /stackable/airflow-${PRODUCT}.cdx.json && \ + # Needed for OIDC + pip install --no-cache-dir --upgrade Flask_OIDC==2.2.0 Flask-OpenID==1.3.1 + WORKDIR /stackable COPY --from=statsd_exporter-builder /statsd_exporter/statsd_exporter /stackable/statsd_exporter From 9028daed8f219b11a947015561be46b53a4bc32a Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Wed, 9 Oct 2024 15:33:07 +0200 Subject: [PATCH 3/5] Something went wrong with superset dockerfile, fixing --- superset/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/superset/Dockerfile b/superset/Dockerfile index dbd69c7c7..1c4aa142c 100644 --- a/superset/Dockerfile +++ b/superset/Dockerfile @@ -55,14 +55,17 @@ RUN python3 -m venv /stackable/app \ statsd \ pydruid \ python-ldap \ - trino[sqlalchemy] \ + 'trino[sqlalchemy]' \ + # Add optional dependencies for use in custom Superset configurations. + # Since https://github.com/stackabletech/superset-operator/pull/530 + # admins can add custom configuration to superset_conf.py. + Flask_OIDC==2.2.0 \ + Flask-OpenID==1.3.1\ # Redhat has removed `tzdata` from the ubi-minimal images: see https://bugzilla.redhat.com/show_bug.cgi?id=2223028. # Superset relies on ZoneInfo (https://docs.python.org/3/library/zoneinfo.html#data-sources) to resolve time zones, and this is done # by searching first under `TZPATH` (which is empty due to the point above) or for the tzdata python package. # That package is therefore added here (airflow has tzdata in its list of dependencies, but superset does not). tzdata \ - Flask_OIDC==2.2.0 \ - Flask-OpenID==1.3.1\ && pip install \ --no-cache-dir \ --upgrade \ From 8a2730c58d1981aa75a0f723c10fb3487176bd7a Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Thu, 10 Oct 2024 15:23:08 +0200 Subject: [PATCH 4/5] Moving OIDC libs before cyclonedx --- airflow/Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/airflow/Dockerfile b/airflow/Dockerfile index 43121e069..07c745a5f 100644 --- a/airflow/Dockerfile +++ b/airflow/Dockerfile @@ -48,10 +48,9 @@ RUN python${PYTHON} -m venv --system-site-packages /stackable/app && \ pip install --no-cache-dir apache-airflow[${AIRFLOW_EXTRAS}]==${PRODUCT} --constraint /tmp/constraints.txt && \ # Needed for pandas S3 integration to e.g. write and read csv and parquet files to/from S3 pip install --no-cache-dir s3fs cyclonedx-bom && \ - cyclonedx-py environment --schema-version 1.5 --outfile /stackable/airflow-${PRODUCT}.cdx.json && \ # Needed for OIDC - pip install --no-cache-dir --upgrade Flask_OIDC==2.2.0 Flask-OpenID==1.3.1 - + pip install --no-cache-dir --upgrade Flask_OIDC==2.2.0 Flask-OpenID==1.3.1 && \ + cyclonedx-py environment --schema-version 1.5 --outfile /stackable/airflow-${PRODUCT}.cdx.json WORKDIR /stackable COPY --from=statsd_exporter-builder /statsd_exporter/statsd_exporter /stackable/statsd_exporter From 8662bc268febbb2722bc47a85f744cf9162cd86e Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Mon, 21 Oct 2024 16:05:49 +0200 Subject: [PATCH 5/5] removing --upgrade as not needed --- airflow/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/Dockerfile b/airflow/Dockerfile index 07c745a5f..ae9528313 100644 --- a/airflow/Dockerfile +++ b/airflow/Dockerfile @@ -49,7 +49,7 @@ RUN python${PYTHON} -m venv --system-site-packages /stackable/app && \ # Needed for pandas S3 integration to e.g. write and read csv and parquet files to/from S3 pip install --no-cache-dir s3fs cyclonedx-bom && \ # Needed for OIDC - pip install --no-cache-dir --upgrade Flask_OIDC==2.2.0 Flask-OpenID==1.3.1 && \ + pip install --no-cache-dir Flask_OIDC==2.2.0 Flask-OpenID==1.3.1 && \ cyclonedx-py environment --schema-version 1.5 --outfile /stackable/airflow-${PRODUCT}.cdx.json WORKDIR /stackable