Installation

Oban.Pro is delivered as a hex package named oban_pro, which is published privately to our self-hosted package repository.

Prerequisites

Ensure Oban is installed for your application. It's probably there already, but just in case, follow these instructions to get started.

Authentication

You need to add a new oban hex repo before you can pull the package into your application. Grab the OBAN_LICENSE_KEY from your account page and plug it into the mix hex.repo command:

mix hex.repo add oban https://repo.oban.pro \
  --fetch-public-key SHA256:4/OSKi0NRF91QVVXlGAhb/BIMLnK8NHcx/EWs+aIWPc \
  --auth-key $OBAN_LICENSE_KEY

Authenticating Other Systems

You'll also need to authenticate on any other development machines, build servers, and CI/CD instances.

There are guides to help with CI/CD tooling:

And guides for deploying to production:

Configuration

Now that you're authenticated you're ready to add oban_pro as a dependency for your application. Open mix.exs and add the following line:

{:oban_pro, "~> 1.5.0-rc.5", repo: "oban"}

Then fetch your dependencies:

$ mix deps.get

Migrations

After the oban_pro package is installed you must run a database migration to add the necessary tables and indexes to your database:

mix ecto.gen.migration add_oban_pro

Open the generated migration and delegate the up/0 and down/0 functions to Oban.Pro.Migration:

defmodule MyApp.Repo.Migrations.AddObanPro do
  use Ecto.Migration

  def up, do: Oban.Pro.Migration.up()

  def down, do: Oban.Pro.Migration.down()
end

This will run all of the necessary migrations for your database. Like Oban, migrations are versioned and you may need to run the migration again when new oban_pro versions are released.

Now, run the migration to create the table:

mix ecto.migrate

Pro is installed! Continue on to adoption and learn how to get the most out of Pro's extensions and plugins.