GithubHelp home page GithubHelp logo

johanlelan / arena Goto Github PK

View Code? Open in Web Editor NEW

This project forked from krazyjakee/arena

0.0 2.0 0.0 764 KB

An interactive UI dashboard for Bee Queue

License: MIT License

JavaScript 52.82% CSS 5.40% HTML 41.77%

arena's Introduction

Arena

An intuitive Web GUI for Bee Queue and Bull. Built on Express so you can run Arena standalone, or mounted in another app as middleware.

For a quick introduction to the motivations for creating Arena, read Interactively monitoring Bull, a Redis-backed job queue for Node.

Screenshots

Features

  • Check the health of a queue and its jobs at a glance
  • Paginate and filter jobs by their state
  • View details and stacktraces of jobs with permalinks
  • Restart and retry jobs with one click

Usage

Prerequisites

Configure your queues in the "queues" key of index.json. Queues take the following format:

{
  "name": "my_queue",
  "port": 6381,
  "host": "127.0.0.1",
  "hostId": "AWS Server 2"
}

The name, port, host, and hostId fields are required. hostId can be given any name, so it is recommended to give it a helpful name for reference. Optionally, you can also pass in db and password to configure redis credentials, or prefix to specify the customized prefix of the queue.

You can also provide a url field instead of host, port db and password.

To specify a custom file location, see "Running Arena as a node module".

Note that if you happen to use Amazon Web Services' Elasticache as your Redis host, check out http://mixmax.com/blog/bull-queue-aws-autodiscovery

Running the server

Run npm install to fetch Arena's dependencies. Then run npm start to start the server.

Note that because Arena is dependent on async/await, Arena only currently supports Node >7.

Running Arena as a node module

Alternatively, you can use Arena as a node module. This has potential benefits:

  • Arena can be configured to use any method of server/queue configuration desired
    • for example, fetching available redis queues from an AWS instance on server start
    • or even just plain old reading from environment variables
  • Arena can be mounted in other express apps as middleware

Usage:

In project folder:

yarn add bull-arena

In router.js:

const Arena = require('bull-arena');

const express = require('express');
const router = express.Router();

const arena = Arena({queues});
router.use('/', arena);

Arena takes two arguments. The first, config, is a plain object containing the queue configuration. The second, listenOpts, is an object that can contain the following optional parameters:

  • port - specify custom port to listen on (default: 4567)
  • basePath - specify custom path to mount server on (default: '/')
  • disableListen - don't let the server listen (useful when mounting Arena as a sub-app of another Express app) (default: false)

Bee Queue support

Arena is dual-compatible with Bull 3.x and Bee-Queue 1.x. To add a Bee queue to the Arena dashboard, include the type: bee attribute with an individual queue's configation object.

Docker image

You can now docker pull Arena from Docker Hub.

To build the image simply run:

docker build -t <name-image> .

To run a container, execute the following command. Note that we need to settle the location of index.json in this container via volume mounting:

docker run -p 4567:4567 -v </local/route/to/index.json>:/opt/arena/src/server/config/index.json <name-image>

Development

Arena is written using Express, with simple jQuery and Handlebars on the front end.

If updating dependencies, please use Yarn and update the yarn.lock file before submitting a pull request.

License

The MIT License.

arena's People

Contributors

randallm avatar bradvogel avatar krazyjakee avatar eddiefletchernz avatar skeggse avatar emilsedgh avatar aztechian avatar wearhere avatar karthikiyengar avatar ritter avatar

Watchers

James Cloos avatar Le Lan Johan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.