Skip to main content

Azkaban CLI

Project description

Lightweight command line interface (CLI) for Azkaban:

  • Define jobs from a single python file
  • Build projects and upload to Azkaban from the command line

Integration is meant to be as transparent as possible:

  • No additional folders and files
  • No imposed project structure

Installation

Using pip:

$ pip install azkaban

Quickstart

We first create a file to define our project. Let’s call it jobs.py, although any name would work.

In this example, we add a single job and file:

from azkaban import Job, Project

project = Project('foo')

project.add_job('bar', Job({'type': 'command', 'command': 'echo "Hello!"'}))
project.add_file('bax.jar')

if __name__ == '__main__':
  project.main()

From the command line we can now run python jobs.py --help to view the list of all available options (build, upload, etc.). E.g. the following command will create the archive foo.zip containing all the project’s jobs and dependency files:

$ python jobs.py build foo.zip

More

Aliases

To avoid having to enter the server’s URL on every upload (or hard-coding it into our project’s configuration file, ugh), we can define aliases in ~/.azkabanrc:

[foo]
url = http://url.to.foo.server:port
[bar]
url = http://url.to.bar.server:port

We can now upload directly to each of these URLs with the shorthand:

$ python jobs.py upload -a foo

This has the added benefit that we won’t have to authenticate on every upload. The session ID is cached and reused for later connections.

Pig jobs

A PigJob class is provided, which automatically sets the job type and adds the corresponding script file to the project.

from azkaban import PigJob

project.add_job('baz', PigJob('/.../baz.pig', {'dependencies': 'bar'}))

Customization

Any valid python code can go inside the jobs configuration file. This includes using loops to add jobs, subclassing the base Job class to better suit a project’s needs…

Project details


Release history Release notifications

History Node

0.9.7

History Node

0.9.6

History Node

0.9.5

History Node

0.9.4

History Node

0.9.3

History Node

0.9.2

History Node

0.9.1

History Node

0.9.0

History Node

0.8.7

History Node

0.8.6

History Node

0.8.5

History Node

0.8.4

History Node

0.8.3

History Node

0.8.2

History Node

0.8.1

History Node

0.8.0

History Node

0.7.2

History Node

0.7.1

History Node

0.7.0

History Node

0.6.45

History Node

0.6.44

History Node

0.6.43

History Node

0.6.42

History Node

0.6.41

History Node

0.6.40

History Node

0.6.39

History Node

0.6.38

History Node

0.6.37

History Node

0.6.36

History Node

0.6.35

History Node

0.6.34

History Node

0.6.33

History Node

0.6.32

History Node

0.6.31

History Node

0.6.30

History Node

0.6.29

History Node

0.6.28

History Node

0.6.27

History Node

0.6.26

History Node

0.6.25

History Node

0.6.24

History Node

0.6.23

History Node

0.6.22

History Node

0.6.21

History Node

0.6.20

History Node

0.6.19

History Node

0.6.18

History Node

0.6.16

History Node

0.6.15

History Node

0.6.14

History Node

0.6.13

History Node

0.6.12

History Node

0.6.11

History Node

0.6.10

History Node

0.6.9

History Node

0.6.8

History Node

0.6.7

History Node

0.6.6

History Node

0.6.5

History Node

0.6.4

History Node

0.6.3

History Node

0.6.2

History Node

0.6.1

History Node

0.6.0

History Node

0.5.6

History Node

0.5.5

History Node

0.5.4

History Node

0.5.2

History Node

0.5.1

History Node

0.5.0

History Node

0.4.2

History Node

0.4.1

History Node

0.4.0

History Node

0.3.11

History Node

0.3.10

History Node

0.3.9

History Node

0.3.8

History Node

0.3.7

History Node

0.3.6

History Node

0.3.5

History Node

0.3.4

History Node

0.3.3

History Node

0.3.2

History Node

0.3.1

History Node

0.3.0

History Node

0.2.7

History Node

0.2.6

History Node

0.2.5

History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.12

History Node

0.1.11

History Node

0.1.10

History Node

0.1.9

History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

This version
History Node

0.1.0

History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
azkaban-0.1.0.tar.gz (5.7 kB) Copy SHA256 hash SHA256 Source None Oct 18, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page