Giter Site home page Giter Site logo

enryuu2 / piezo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lucidsoftware/piezo

0.0 1.0 0.0 2.14 MB

Piezo is a set of tools for operating a quartz scheduling cluster.

License: Apache License 2.0

Scala 6.24% HTML 42.44% Shell 0.24% Makefile 0.08% JavaScript 48.68% CSS 0.31% PHP 2.02%

piezo's Introduction

Piezo

Piezo is a system for operating and managing a Quartz Scheduler cluster. The first component is the Worker, which is a driver or main class for running a Quartz instance. The second is the Admin, which is a web interface for administrating a Quartz cluster, including managing which jobs run, and viewing a history of what processing the cluster has completed. The third project in the diagram below is your library containing the actual jobs to run.

Piezo project architecture

##Worker Worker is a process that runs a Quartz Scheduler instance.

Worker provides a java main() function for running a quartz scheduler as a daemon. It writes a PID file for help with start and stop (e.g. init.d) scripts. It handles the runtime shutdown event and graceful exits when it receives a shutdown signal (ctrl-c/SIGINT).

Worker also expands the set of tables that quartz uses with additional tables to track historical job execution data.

###Setup

  1. Create a database. Piezo includes a sample database creation script
  2. Create the standard job store using ONE of the following methods:
    1. Use the sample script included as worker/src/main/resources/tables_mysql.sql (easiest method).
    2. See the quartz job store documentation for the complete set of options.
    3. From the documentation: "JDBCJobStore works with nearly any database, it has been used widely with Oracle, PostgreSQL, MySQL, MS SQLServer, HSQLDB, and DB2. To use JDBCJobStore, you must first create a set of database tables for Quartz to use. You can find table-creation SQL scripts in the 'docs/dbTables' directory of the Quartz distribution. If there is not already a script for your database type, just look at one of the existing ones, and modify it in any way necessary for your DB."
  3. Create the Piezo job history tables.
  4. Modify the included sample quartz.properties to point to your database (see Quartz scheduler library config file).
  5. Run Piezo as specified in Running.

###Building You must have sbt version 0.13.0 or higher to build the worker project.

To compile the project run

make compile.

To package the project into a jar run

make package.

To collect all dependencies into a single folder (target/staged) run

make stage

###Configuration ####JVM properties

###Running The project includes a sample script for running a worker process. It depends on make stage having been run. It launches with the sample worker quartz.properties file included in the project.

./worker/src/main/resources/run.sh

Here also is a sample java command for running a single worker instance:

java -Dlogback.configurationFile=<path to logback config> -Dorg.quartz.properties=<path to quartz properties> -Dpidfile.path=<path to pid file> -Dnetworkaddress.cache.ttl=10 -Dnetworkaddress.cache.negative.ttl=10 -cp <path to jars> com.lucidchart.piezo.Worker

###Stats Worker reports statistics to a StatsD server if available.

It also stores historical job execution data in a pair of database tables defined in create_history_tables.sql. These tables should be added to the same datasource as the standard quartz tables.

##Admin

Admin is a web interface for viewing and managing the scheduled jobs.

###Setup

  1. Follow the steps for the Worker Setup above.

###Building You must have play version 2.3 or higher to build the admin project.

To compile the project run

sbt compile.

To collect all dependencies into a single folder (target/staged) run

make stage

###Configuration ####JVM properties

####org.quartz.properties The sample admin quartz.properties file includes the following property which needs to be included in the configured properties file that the admin is run with. org.quartz.scheduler.classLoadHelper.class: com.lucidchart.piezo.GeneratorClassLoader

###Running The project includes a sample script for running a worker process. It depends on make stage having been run. It launches with the sample admin quartz.properties file included in the project.

./admin/bin/run.sh

After running the above script, go to http://localhost:8001/ to view the admin tool.

Here also is a sample java command for running a single admin instance:

java -Dlogback.configurationFile=<path to logback config> -Dorg.quartz.properties=<path to quartz properties> -Dpidfile.path=<path to pid file> -Dnetworkaddress.cache.ttl=10 -Dnetworkaddress.cache.negative.ttl=10 -Dhttp.port=<port> -cp <path to jars> play.core.server.NettyServer

piezo's People

Contributors

disaacson avatar pauldraper avatar gregghz avatar pablote avatar bravefoot avatar matthew-lucidchart avatar margkam avatar krjackso avatar timsama avatar keslert avatar lucidchart avatar

Watchers

 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.