Apache Azkaban with Postgresql

Sunil kumar
2 min readJan 21, 2021

--

Running Apache Azkaban with Postgresql was a blocker for us that made us think about switching to Airflow(not planned so quick). I will cover the following topics explaining how we were able to run Azkaban with Postgresql -

  1. Problem Statement
  2. What did we do?
  3. Resources for quick reference

Problem Statement

We were gladly using Azkaban with MySQL for quite some time and then came the requirement to have Postgresql and

Azkaban does not support Postgresql

We were left with 2 options, either bring our own Scheduler or introduce support with Airflow. Both were asking a good amount of time.

What did we do?

Then we searched Google and landed on this pull request (hot candidate to get merged in master) by mactaggart.
I forked the repo, get the code from the branch postgres-backend, build the docker image, did some configurations, and boom, it worked

Some points to know:

  1. This version of Azkaban does not support the single executor mode
  2. You need to activate the executor(at least I had to do it every time the Azkaban pod restarts)

Docker Image: Create your docker image from README.md of repo

Configuration (under conf directory)

A. In the executor and web configuration, add/update the below properties

database.type=postgresql
postgresql.port=<POSTGRESQL_PORT>
postgresql.host=<POSTGRESQL_HOST>
postgresql.database=<POSTGRESQL_DB>
postgresql.user=<POSTGRESQL_USER>
postgresql.password=<POSTGRESQL_PASSWORD>
postgresql.numconnections=100
postgresql.url.suffix=

B. In the web configuration set the below property to true

azkaban.use.multiple.executors=true

C. Execute all the Postgresql tables from https://github.com/mactaggart/azkaban/blob/postgres-backend/azkaban-db/src/main/sql/create.quartz-tables-all-postgresql.sql

Note: Please use the base image for your docker image considering the vulnerability

Please comment if you find any difficulty, I would be happy to help.

--

--

Sunil kumar
Sunil kumar

Written by Sunil kumar

Co-founder & CTO, Where U Elevate

No responses yet