Skip to content

JeetRH/airflow-on-openshift

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airflow on OpenShift

Deploy Airflow on OpenShift via Helm

Table of Contents

Requirements

  • OpenShift cluster with a project / namespace
  • oc - OpenShift CLI
  • helm

Compatibility

Tested with:

  • Airflow 2.6.2 - 2.7.0
  • OpenShift 4.11+
  • Helm chart 1.10.0

Install

Quickstart

scripts/easy_install.sh

Install Airflow via helm

# add helm repo
helm repo add apache-airflow https://airflow.apache.org

# get project
PROJECT=$(oc project -q)

# get openshift uid/gid range
CHART_UID=$(oc get project ${PROJECT} -o jsonpath="{['metadata.annotations.openshift\.io/sa\.scc\.uid-range']}" | sed "s@/.*@@")
CHART_GID=$(oc get project ${PROJECT} -o jsonpath="{['metadata.annotations.openshift\.io/sa\.scc\.supplemental-groups']}" | sed "s@/.*@@")

echo "UID/GID: ${CHART_UID}/${CHART_GID}"

# copy and edit values.yaml
cp example_values.yaml values.yaml

# edit values.yaml

# install via helm
helm upgrade \
    --install airflow apache-airflow/airflow \
    --namespace ${PROJECT} \
    --version 1.10.0 \
    --set uid=${CHART_UID} \
    --set gid=${CHART_GID} \
    --set redis.securityContext.runAsUser=${CHART_UID} \
    --values ./values.yaml

Create Routes

# create route for airflow
oc create route edge \
    --service=airflow-webserver \
    --insecure-policy=Redirect \
    --port=8080

# create route for airflow flower
oc create route edge \
    --service=airflow-flower \
    --insecure-policy=Redirect \
    --port=5555

# confirm routes
oc get routes

References

About

Deploy Airflow onto OpenShift with Helm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 66.6%
  • Python 33.4%