Page MenuHomeDevCentral

airflow.sh.jinja
No OneTemporary

airflow.sh.jinja

#!/bin/sh
# -------------------------------------------------------------
# PaaS Docker
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# Description: Wrapper for airflow command (local instance)
# Source file: roles/paas-docker/containers/files/airflow/airflow.sh.jinja
# Realm: {{ realm }}
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
set -e
COMMAND=$1
shift
EXTRA_ARGS=""
if [ -n "$_AIRFLOW_WWW_USER" ]; then
# Used by initialization to create a default first user
user="$(credential $_AIRFLOW_WWW_USER username)"
password="$(credential $_AIRFLOW_WWW_USER)"
EXTRA_ARGS="$EXTRA_ARGS \
-e _AIRFLOW_WWW_USER_CREATE=true \
-e _AIRFLOW_WWW_USER_USERNAME=$user \
-e _AIRFLOW_WWW_USER_PASSWORD=$password"
fi
if [ "$COMMAND" = "upgrade" ]; then
EXTRA_ARGS="$EXTRA_ARGS \
-e _AIRFLOW_DB_UPGRADE=true"
COMMAND=version
fi
if [ "$COMMAND" = "shell" ]; then
PROGRAM=bash
COMMAND=
COMMAND_ARGS=
else
PROGRAM=airflow
COMMAND_ARGS=$@
fi
docker run -it --rm \
--network {{ network }} \
-v /srv/airflow/{{ realm }}/dags:/opt/airflow/dags \
-v /srv/airflow/{{ realm }}/logs:/opt/airflow/logs \
-v /srv/airflow/{{ realm }}/plugins:/opt/airflow/plugins \
-v /srv/airflow/{{ realm }}/workspace:/home/airflow/workspace \
-v /srv/airflow/{{ realm }}/airflow.cfg:/opt/airflow/airflow.cfg \
-e _PIP_ADDITIONAL_REQUIREMENTS="" \
-e CONNECTION_CHECK_MAX_COUNT=0 \
$EXTRA_ARGS \
nasqueron/airflow $PROGRAM $COMMAND $COMMAND_ARGS

File Metadata

Mime Type
text/x-shellscript
Expires
Sun, Oct 12, 00:15 (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3064294
Default Alt Text
airflow.sh.jinja (1 KB)

Event Timeline