From 090c2b372424554f6be1eccf7f11af53bbeb07dc Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Thu, 8 May 2025 14:47:51 +0200 Subject: [PATCH] [bitnami/airflow] Release 3.0.0-debian-12-r4 (#80935) Signed-off-by: Bitnami Bot --- bitnami/airflow/3/debian-12/Dockerfile | 12 +- .../opt/bitnami/.bitnami_components.json | 8 +- .../rootfs/opt/bitnami/scripts/airflow-env.sh | 4 + .../rootfs/opt/bitnami/scripts/libairflow.sh | 41 +++++-- bitnami/airflow/README.md | 108 +++++++++--------- 5 files changed, 103 insertions(+), 70 deletions(-) diff --git a/bitnami/airflow/3/debian-12/Dockerfile b/bitnami/airflow/3/debian-12/Dockerfile index b775593329e0..4ff8e9403be6 100644 --- a/bitnami/airflow/3/debian-12/Dockerfile +++ b/bitnami/airflow/3/debian-12/Dockerfile @@ -8,10 +8,10 @@ ARG TARGETARCH LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ - org.opencontainers.image.created="2025-04-29T13:10:01Z" \ + org.opencontainers.image.created="2025-05-08T11:42:15Z" \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/airflow/README.md" \ - org.opencontainers.image.ref.name="3.0.0-debian-12-r3" \ + org.opencontainers.image.ref.name="3.0.0-debian-12-r4" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/airflow" \ org.opencontainers.image.title="airflow" \ org.opencontainers.image.vendor="Broadcom, Inc." \ @@ -28,10 +28,10 @@ SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"] RUN install_packages ca-certificates curl git krb5-user libbz2-1.0 libcom-err2 libcrypt1 libffi8 libgcc-s1 libgmp10 libgnutls30 libgss-dev libgssapi-krb5-2 libhogweed6 libidn2-0 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5-dev libkrb5support0 libldap-2.5-0 liblzma5 libmariadb3 libncursesw6 libnettle8 libnsl2 libp11-kit0 libreadline8 libsasl2-2 libsasl2-modules libsqlite3-0 libssl3 libstdc++6 libtasn1-6 libtinfo6 libtirpc3 libudev1 libunistring2 locales netbase openssh-client procps tzdata zlib1g RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ || exit 1 ; \ COMPONENTS=( \ - "wait-for-port-1.0.8-15-linux-${OS_ARCH}-debian-12" \ - "python-3.12.10-5-linux-${OS_ARCH}-debian-12" \ - "ini-file-1.4.7-15-linux-${OS_ARCH}-debian-12" \ - "airflow-3.0.0-2-linux-${OS_ARCH}-debian-12" \ + "wait-for-port-1.0.8-16-linux-${OS_ARCH}-debian-12" \ + "python-3.12.10-8-linux-${OS_ARCH}-debian-12" \ + "ini-file-1.4.7-16-linux-${OS_ARCH}-debian-12" \ + "airflow-3.0.0-3-linux-${OS_ARCH}-debian-12" \ ) ; \ for COMPONENT in "${COMPONENTS[@]}"; do \ if [ ! -f "${COMPONENT}.tar.gz" ]; then \ diff --git a/bitnami/airflow/3/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/airflow/3/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json index 2276fa8153ff..fb3d21ef6bb7 100644 --- a/bitnami/airflow/3/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/airflow/3/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json @@ -3,24 +3,24 @@ "arch": "amd64", "distro": "debian-12", "type": "NAMI", - "version": "3.0.0-2" + "version": "3.0.0-3" }, "ini-file": { "arch": "amd64", "distro": "debian-12", "type": "NAMI", - "version": "1.4.7-15" + "version": "1.4.7-16" }, "python": { "arch": "amd64", "distro": "debian-12", "type": "NAMI", - "version": "3.12.10-5" + "version": "3.12.10-8" }, "wait-for-port": { "arch": "amd64", "distro": "debian-12", "type": "NAMI", - "version": "1.0.8-15" + "version": "1.0.8-16" } } \ No newline at end of file diff --git a/bitnami/airflow/3/debian-12/rootfs/opt/bitnami/scripts/airflow-env.sh b/bitnami/airflow/3/debian-12/rootfs/opt/bitnami/scripts/airflow-env.sh index d35d1a54dc9f..524cfc2715d5 100644 --- a/bitnami/airflow/3/debian-12/rootfs/opt/bitnami/scripts/airflow-env.sh +++ b/bitnami/airflow/3/debian-12/rootfs/opt/bitnami/scripts/airflow-env.sh @@ -50,6 +50,8 @@ airflow_env_vars=( AIRFLOW_SKIP_DB_SETUP PYTHONPYCACHEPREFIX AIRFLOW_DB_MIGRATE_TIMEOUT + AIRFLOW_ENABLE_HTTPS + AIRFLOW_EXTERNAL_APISERVER_PORT_NUMBER AIRFLOW_DATABASE_HOST AIRFLOW_DATABASE_PORT_NUMBER AIRFLOW_DATABASE_NAME @@ -144,6 +146,8 @@ export AIRFLOW_WORKER_QUEUE="${AIRFLOW_WORKER_QUEUE:-}" export AIRFLOW_SKIP_DB_SETUP="${AIRFLOW_SKIP_DB_SETUP:-no}" export PYTHONPYCACHEPREFIX="${PYTHONPYCACHEPREFIX:-/opt/bitnami/airflow/venv/tmp}" export AIRFLOW_DB_MIGRATE_TIMEOUT="${AIRFLOW_DB_MIGRATE_TIMEOUT:-120}" +export AIRFLOW_ENABLE_HTTPS="${AIRFLOW_ENABLE_HTTPS:-no}" # only used during the first initialization +export AIRFLOW_EXTERNAL_APISERVER_PORT_NUMBER="${AIRFLOW_EXTERNAL_APISERVER_PORT_NUMBER:-80}" # only used during the first initialization # Airflow database configuration export AIRFLOW_DATABASE_HOST="${AIRFLOW_DATABASE_HOST:-postgresql}" diff --git a/bitnami/airflow/3/debian-12/rootfs/opt/bitnami/scripts/libairflow.sh b/bitnami/airflow/3/debian-12/rootfs/opt/bitnami/scripts/libairflow.sh index 2275b819c2be..3fe7bd72e34c 100644 --- a/bitnami/airflow/3/debian-12/rootfs/opt/bitnami/scripts/libairflow.sh +++ b/bitnami/airflow/3/debian-12/rootfs/opt/bitnami/scripts/libairflow.sh @@ -281,7 +281,7 @@ airflow_generate_config() { [[ ! -f "$AIRFLOW_CONF_FILE" ]] && cp "$(find "$AIRFLOW_BASE_DIR" -name default_airflow.cfg)" "$AIRFLOW_CONF_FILE" [[ ! -f "$AIRFLOW_WEBSERVER_CONF_FILE" ]] && cp "$(find "$AIRFLOW_BASE_DIR" -name default_webserver_config.py)" "$AIRFLOW_WEBSERVER_CONF_FILE" # Setup Airflow base URL - airflow_configure_base_url + airflow_configure_host "${AIRFLOW_APISERVER_HOST}" # Configure Airflow webserver authentication airflow_configure_webserver_authentication ;; @@ -364,21 +364,48 @@ airflow_conf_set() { } ######################## -# Configure Airflow webserver base url +# Return Airflow webserver base url # Globals: # AIRFLOW_* # Arguments: -# None +# $1 - host +# Returns: +# String +######################### +airflow_base_url() { + local host="${1:?missing host}" + local scheme="http" + + if is_boolean_yes "$AIRFLOW_ENABLE_HTTPS"; then + scheme="https" + fi + if [[ "$AIRFLOW_APISERVER_PORT_NUMBER" != "80" ]] && [[ "$AIRFLOW_APISERVER_PORT_NUMBER" != "443" ]]; then + host+=":${AIRFLOW_APISERVER_PORT_NUMBER}" + fi + echo "${scheme}://${host}" +} +######################## +# Configure Airflow webserver host +# Globals: +# AIRFLOW_* +# Arguments: +# $1 - host # Returns: # None ######################### -airflow_configure_base_url() { +airflow_configure_host() { + local -r host="${1:?missing host}" + local base_url + if [[ -z "$AIRFLOW_APISERVER_BASE_URL" ]]; then - airflow_conf_set "webserver" "base_url" "http://${AIRFLOW_APISERVER_HOST}:${AIRFLOW_APISERVER_PORT_NUMBER}" + base_url="$(airflow_base_url "$host")" + info "Configuring Airflow URL to ${base_url}" + airflow_conf_set "webserver" "base_url" "${base_url}" if [[ $(airflow_major_version) -eq 3 ]]; then - airflow_conf_set "api" "base_url" "http://${AIRFLOW_APISERVER_HOST}:${AIRFLOW_APISERVER_PORT_NUMBER}" + airflow_conf_set "api" "base_url" "${base_url}" fi else + info "Configuring Airflow URL to ${AIRFLOW_APISERVER_BASE_URL}" airflow_conf_set "webserver" "base_url" "$AIRFLOW_APISERVER_BASE_URL" if [[ $(airflow_major_version) -eq 3 ]]; then airflow_conf_set "api" "base_url" "$AIRFLOW_APISERVER_BASE_URL" @@ -784,7 +811,7 @@ airflow_wait_for_admin_user() { ######################### is_airflow_admin_created() { local return_code=1 - local airflow_users="$(airflow users list --output plain | grep -v DEBUG)" + local airflow_users="$(airflow users list --output plain | grep -v DEBUG 2>/dev/null)" if echo "${airflow_users}" | grep "${AIRFLOW_USERNAME}"; then return_code=0 fi diff --git a/bitnami/airflow/README.md b/bitnami/airflow/README.md index b8b234176a5e..52ebda5dbd18 100644 --- a/bitnami/airflow/README.md +++ b/bitnami/airflow/README.md @@ -307,59 +307,61 @@ This container supports the installation of additional python modules at start-u #### Customizable environment variables -| Name | Description | Default Value | -|---------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------| -| `AIRFLOW_USERNAME` | Airflow username | `user` | -| `AIRFLOW_PASSWORD` | Airflow password | `bitnami` | -| `AIRFLOW_FIRSTNAME` | Airflow firstname | `Firstname` | -| `AIRFLOW_LASTNAME` | Airflow lastname | `Lastname` | -| `AIRFLOW_EMAIL` | Airflow email | `user@example.com` | -| `AIRFLOW_COMPONENT_TYPE` | Airflow component type. Allowed values: *api-server*, *scheduler*, *dag-processor*, *triggerer*, *webserver* (2.x versions only), *worker*. | `api-server` | -| `AIRFLOW_EXECUTOR` | Airflow executor. | `SequentialExecutor` | -| `AIRFLOW_RAW_FERNET_KEY` | Airflow raw/unencoded Fernet key | `nil` | -| `AIRFLOW_FORCE_OVERWRITE_CONF_FILE` | Force the airflow.cfg config file generation. | `no` | -| `AIRFLOW_FERNET_KEY` | Airflow Fernet key | `nil` | -| `AIRFLOW_WEBSERVER_SECRET_KEY` | Airflow webserver secret key | `airflow-web-server-key` | -| `AIRFLOW_APISERVER_SECRET_KEY` | Airflow API secret key | `airflow-api-server-key` | -| `AIRFLOW_APISERVER_BASE_URL` | Airflow API server base URL. | `nil` | -| `AIRFLOW_APISERVER_HOST` | Airflow API server host | `127.0.0.1` | -| `AIRFLOW_APISERVER_PORT_NUMBER` | Airflow API server port. | `8080` | -| `AIRFLOW_LOAD_EXAMPLES` | To load example tasks into the application. | `yes` | -| `AIRFLOW_HOSTNAME_CALLABLE` | Method to obtain the hostname. | `nil` | -| `AIRFLOW_POOL_NAME` | Pool name. | `nil` | -| `AIRFLOW_POOL_SIZE` | Pool size, required with AIRFLOW_POOL_NAME. | `nil` | -| `AIRFLOW_POOL_DESC` | Pool description, required with AIRFLOW_POOL_NAME. | `nil` | -| `AIRFLOW_STANDALONE_DAG_PROCESSOR` | Enable running Dag Processor in standalone mode | `no` | -| `AIRFLOW_TRIGGERER_DEFAULT_CAPACITY` | How many triggers a single Triggerer can run at once. | `1000` | -| `AIRFLOW_WORKER_QUEUE` | A queue for the worker to pull tasks from. | `nil` | -| `AIRFLOW_SKIP_DB_SETUP` | Skip db init / db migrate actions during the setup | `no` | -| `PYTHONPYCACHEPREFIX` | Configure Python .pyc files cache prefix | `/opt/bitnami/airflow/venv/tmp` | -| `AIRFLOW_DB_MIGRATE_TIMEOUT` | How much time to wait for database migrations | `120` | -| `AIRFLOW_DATABASE_HOST` | Hostname for PostgreSQL server. | `postgresql` | -| `AIRFLOW_DATABASE_PORT_NUMBER` | Port used by PostgreSQL server. | `5432` | -| `AIRFLOW_DATABASE_NAME` | Database name that Airflow will use to connect with the database. | `bitnami_airflow` | -| `AIRFLOW_DATABASE_USERNAME` | Database user that Airflow will use to connect with the database. | `bn_airflow` | -| `AIRFLOW_DATABASE_PASSWORD` | Database password that Airflow will use to connect with the database. | `nil` | -| `AIRFLOW_DATABASE_USE_SSL` | Set to yes if the database is using SSL. | `no` | -| `AIRFLOW_REDIS_USE_SSL` | Set to yes if Redis(R) uses SSL. | `no` | -| `REDIS_HOST` | Hostname for Redis(R) server. | `redis` | -| `REDIS_PORT_NUMBER` | Port used by Redis(R) server. | `6379` | -| `REDIS_USER` | User that Airflow will use to connect with Redis(R). | `nil` | -| `REDIS_PASSWORD` | Password that Airflow will use to connect with Redis(R). | `nil` | -| `REDIS_DATABASE` | Name of the Redis(R) database. | `1` | -| `AIRFLOW_LDAP_ENABLE` | Enable LDAP authentication. | `no` | -| `AIRFLOW_LDAP_URI` | LDAP server URI. | `nil` | -| `AIRFLOW_LDAP_SEARCH` | LDAP search base. | `nil` | -| `AIRFLOW_LDAP_UID_FIELD` | LDAP field used for uid. | `nil` | -| `AIRFLOW_LDAP_BIND_USER` | LDAP user name. | `nil` | -| `AIRFLOW_LDAP_BIND_PASSWORD` | LDAP user password. | `nil` | -| `AIRFLOW_LDAP_USER_REGISTRATION` | User self registration. | `True` | -| `AIRFLOW_LDAP_USER_REGISTRATION_ROLE` | Role name to be assign when a user registers himself. | `nil` | -| `AIRFLOW_LDAP_ROLES_MAPPING` | Mapping from LDAP DN to a list of Airflow roles. | `nil` | -| `AIRFLOW_LDAP_ROLES_SYNC_AT_LOGIN` | Replace ALL the user roles each login, or only on registration. | `True` | -| `AIRFLOW_LDAP_USE_TLS` | Use LDAP SSL. | `False` | -| `AIRFLOW_LDAP_ALLOW_SELF_SIGNED` | Allow self signed certicates in LDAP ssl. | `True` | -| `AIRFLOW_LDAP_TLS_CA_CERTIFICATE` | File that store the CA for LDAP ssl. | `nil` | +| Name | Description | Default Value | +|------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------| +| `AIRFLOW_USERNAME` | Airflow username | `user` | +| `AIRFLOW_PASSWORD` | Airflow password | `bitnami` | +| `AIRFLOW_FIRSTNAME` | Airflow firstname | `Firstname` | +| `AIRFLOW_LASTNAME` | Airflow lastname | `Lastname` | +| `AIRFLOW_EMAIL` | Airflow email | `user@example.com` | +| `AIRFLOW_COMPONENT_TYPE` | Airflow component type. Allowed values: *api-server*, *scheduler*, *dag-processor*, *triggerer*, *webserver* (2.x versions only), *worker*. | `api-server` | +| `AIRFLOW_EXECUTOR` | Airflow executor. | `SequentialExecutor` | +| `AIRFLOW_RAW_FERNET_KEY` | Airflow raw/unencoded Fernet key | `nil` | +| `AIRFLOW_FORCE_OVERWRITE_CONF_FILE` | Force the airflow.cfg config file generation. | `no` | +| `AIRFLOW_FERNET_KEY` | Airflow Fernet key | `nil` | +| `AIRFLOW_WEBSERVER_SECRET_KEY` | Airflow webserver secret key | `airflow-web-server-key` | +| `AIRFLOW_APISERVER_SECRET_KEY` | Airflow API secret key | `airflow-api-server-key` | +| `AIRFLOW_APISERVER_BASE_URL` | Airflow API server base URL. | `nil` | +| `AIRFLOW_APISERVER_HOST` | Airflow API server host | `127.0.0.1` | +| `AIRFLOW_APISERVER_PORT_NUMBER` | Airflow API server port. | `8080` | +| `AIRFLOW_LOAD_EXAMPLES` | To load example tasks into the application. | `yes` | +| `AIRFLOW_HOSTNAME_CALLABLE` | Method to obtain the hostname. | `nil` | +| `AIRFLOW_POOL_NAME` | Pool name. | `nil` | +| `AIRFLOW_POOL_SIZE` | Pool size, required with AIRFLOW_POOL_NAME. | `nil` | +| `AIRFLOW_POOL_DESC` | Pool description, required with AIRFLOW_POOL_NAME. | `nil` | +| `AIRFLOW_STANDALONE_DAG_PROCESSOR` | Enable running Dag Processor in standalone mode | `no` | +| `AIRFLOW_TRIGGERER_DEFAULT_CAPACITY` | How many triggers a single Triggerer can run at once. | `1000` | +| `AIRFLOW_WORKER_QUEUE` | A queue for the worker to pull tasks from. | `nil` | +| `AIRFLOW_SKIP_DB_SETUP` | Skip db init / db migrate actions during the setup | `no` | +| `PYTHONPYCACHEPREFIX` | Configure Python .pyc files cache prefix | `/opt/bitnami/airflow/venv/tmp` | +| `AIRFLOW_DB_MIGRATE_TIMEOUT` | How much time to wait for database migrations | `120` | +| `AIRFLOW_ENABLE_HTTPS` | Whether to enable HTTPS for Airflow by default. | `no` | +| `AIRFLOW_EXTERNAL_APISERVER_PORT_NUMBER` | External HTTP/HTTPS port for Airflow. | `80` | +| `AIRFLOW_DATABASE_HOST` | Hostname for PostgreSQL server. | `postgresql` | +| `AIRFLOW_DATABASE_PORT_NUMBER` | Port used by PostgreSQL server. | `5432` | +| `AIRFLOW_DATABASE_NAME` | Database name that Airflow will use to connect with the database. | `bitnami_airflow` | +| `AIRFLOW_DATABASE_USERNAME` | Database user that Airflow will use to connect with the database. | `bn_airflow` | +| `AIRFLOW_DATABASE_PASSWORD` | Database password that Airflow will use to connect with the database. | `nil` | +| `AIRFLOW_DATABASE_USE_SSL` | Set to yes if the database is using SSL. | `no` | +| `AIRFLOW_REDIS_USE_SSL` | Set to yes if Redis(R) uses SSL. | `no` | +| `REDIS_HOST` | Hostname for Redis(R) server. | `redis` | +| `REDIS_PORT_NUMBER` | Port used by Redis(R) server. | `6379` | +| `REDIS_USER` | User that Airflow will use to connect with Redis(R). | `nil` | +| `REDIS_PASSWORD` | Password that Airflow will use to connect with Redis(R). | `nil` | +| `REDIS_DATABASE` | Name of the Redis(R) database. | `1` | +| `AIRFLOW_LDAP_ENABLE` | Enable LDAP authentication. | `no` | +| `AIRFLOW_LDAP_URI` | LDAP server URI. | `nil` | +| `AIRFLOW_LDAP_SEARCH` | LDAP search base. | `nil` | +| `AIRFLOW_LDAP_UID_FIELD` | LDAP field used for uid. | `nil` | +| `AIRFLOW_LDAP_BIND_USER` | LDAP user name. | `nil` | +| `AIRFLOW_LDAP_BIND_PASSWORD` | LDAP user password. | `nil` | +| `AIRFLOW_LDAP_USER_REGISTRATION` | User self registration. | `True` | +| `AIRFLOW_LDAP_USER_REGISTRATION_ROLE` | Role name to be assign when a user registers himself. | `nil` | +| `AIRFLOW_LDAP_ROLES_MAPPING` | Mapping from LDAP DN to a list of Airflow roles. | `nil` | +| `AIRFLOW_LDAP_ROLES_SYNC_AT_LOGIN` | Replace ALL the user roles each login, or only on registration. | `True` | +| `AIRFLOW_LDAP_USE_TLS` | Use LDAP SSL. | `False` | +| `AIRFLOW_LDAP_ALLOW_SELF_SIGNED` | Allow self signed certicates in LDAP ssl. | `True` | +| `AIRFLOW_LDAP_TLS_CA_CERTIFICATE` | File that store the CA for LDAP ssl. | `nil` | #### Read-only environment variables