Database Setup

Currently, Azkaban2 only uses MySQL as its data store, although we are evaluating other possible storage systems.


1. Install MySQL

Installation of MySQL DB won't be covered by these instructions, but you can access the instructions on MySQL's Document Site.


2. Setup the Database

# Example database creation command, although the db name doesn't need to be 'azkaban'
mysql> CREATE DATABASE azkaban;
# Example database creation command. The user name doesn't need to be 'azkaban'
mysql> CREATE USER 'username'@'%' IDENTIFIED BY 'password';
  • Set user permission on the database. Create a user for Azkaban if one hasn't been made, and give the user INSERT, SELECT, UPDATE, DELETE permission on all tables in the Azkaban db.
# Replace db, username with the ones created by the previous steps. 
mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON <database>.* to '<username>'@'%' WITH GRANT OPTION;
  • Configure Packet Size may need to be configured. MySQL may have, by default, a ridiculously low allowable packet size. To increase it, you'll need to have the property max_allowed_packet set to something higher, say 1024M.
    • To configure this in linux, open /etc/my.cnf.
    • Somewhere after mysqld, add the following
[mysqld]
...
max_allowed_packet=1024M

To restart MySQL, you can run...

sudo /sbin/service mysqld restart

3. Creating the Azkaban Tables

  1. Download the azkaban-sql-script tarball from the download page. Contained in this archive are table creation scripts.
  2. Run individual table creation scripts on the MySQL instance to create your tables. Alternatively, simply run the create-all-sql script. Any script with 'update' as a prefix can be ignored.

4. Get the JDBC Connector Jar

For various reasons, Azkaban does not distribute the MySQL JDBC connector jar. You can download the jar from this link: http://www.mysql.com/downloads/connector/j/. This jar will be needed for both the web server and the executor server and should be dropped into the /extlib directory for both servers.