• This repository has been archived on 11/Dec/2019
  • Stars
    star
    1,048
  • Rank 43,968 (Top 0.9 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pinball is a scalable workflow manager

Attention!

This project is no longer actively maintained by Pinterest.

Pinball

Pinball is a scalable workflow manager.

Design Principles

  • Simple: based on easy to grasp abstractions
  • Extensible: component-based approach
  • Transparent: state stored in a readable format
  • Reliable: stateless computing components
  • Scalable: scales horizontally
  • Admin-friendly: can be upgraded without aborting workflows
  • Feature-rich: auto-retries, per-job-emails, runtime alternations, priorities, overrun policies, etc.

Installation

If you haven't already installed libmysqlclient-dev, graphviz. Please install them, e.g.,

$ sudo apt-get install libmysqlclient-dev
$ sudo apt-get install graphviz

If you want to install Pinball through pypi package, please do

$ sudo pip install pinball

Pinball uses mysql as persistent storage. Please also make sure mysql is available, and properly configured.

Quick Start

Start Pinball

Once Pinball is installed either through pypi package installation or source code clone, we are ready to run it. There are four important components in Pinball.

  • Master: A frontend to a persistent state repository with an interface supporting atomic job token updates. To start master,

    $ python -m pinball.run_pinball -c path/to/pinball/yaml/configuration/file -m master
    
  • UI: A service reading directly from the storage layer used by the Master. To start UI,

    $ python -m pinball.run_pinball -c path/to/pinball/yaml/configuration/file -m ui
    
  • Scheduler: Scheduler is responsible for running workflows on a schedule. To start scheduler,

    $ python -m pinball.run_pinball -c path/to/pinball/yaml/configuration/file -m scheduler
    
  • Worker: A client of the Master. To start worker,

    $ python -m pinball.run_pinball -c path/to/pinball/yaml/configuration/file -m workers
    

Configure Pinball

In order to start Pinball, user needs to provide a pinball configuration file. A sample pinball configuraiton can be retrived at here.

There are a few parameters to configure. For example:

  • MySQL db configuration

    databases:
         default:
             ENGINE:       django.db.backends.mysql
             NAME:         pinball
             USER:         flipper
             PASSWORD:     flipper123
             HOST:         127.0.0.1
             PORT:         "3306"
         pinball.persistence:
             ENGINE:       django.db.backends.mysql
             NAME:         pinball
             USER:         flipper
             PASSWORD:     flipper123
             HOST:         127.0.0.1
             PORT:         "3306"
    
  • Pinball UI configuration

    ui_host:                  pinball
    ui_port:                  8080
    
  • Application Configuration

    parser:                    pinball_ext.workflows.parser.PyWorkflowParser
    

    parser tells Pinball how to interpret your defined workflow and jobs. The above configuration links to a Python parser provided by Pinball. You can also provide your own parser to intepretate your own definition of workflow and jobs. Please check the tutorial for details.

    parser_params:
      workflows_config:       pinball_ext.examples.workflows.WORKFLOWS
      job_repo_dir:           "~"
      job_import_dirs_config: pinball_ext.examples.jobs.JOB_IMPORT_DIRS
    

    parser_params will be taken by parser. Name of the variable that stores workflows config is workflows_config; root dir of the repo that stores all user defined jobs is stored at job_repo_dir; job_import_dirs_config keeps list of dirs where job class should be imported from.

  • Email configuration

    default_email:              [email protected]
    

    default_email configures default sender of email service of Pinball.

Use Pinball

After starting Pinball with the proper configuration, user can access Pinball at pinball:8080. You may find there is no workflow or jobs listed in Pinball UI when you first start Pinball. To import your workflow into Pinball, do the following command.

python -m pinball.tools.workflow_util -c path/to/pinball/yaml/configuration/file -f reschedule

After this, you should be able to see your workflows in Pinball UI. They will be scheduled and run according to the specified schedules.

Workflow Instance View

Detailed Design

Design details are available in Pinball Architecture Overview

User Guide

Detail user guide is available in Pinball User Guide

Admin Guide

Administrator guide is available in Pinball Administrator Guide

License

Pinball is distributed under Apache License, Version 2.0.

Maintainers

Contributing

Help

If you have any questions or comments, you can reach us at [email protected].

More Repositories

1

ktlint

An anti-bikeshedding Kotlin linter with built-in formatter
Kotlin
6,192
star
2

gestalt

A set of React UI components that supports Pinterest’s design language
TypeScript
4,240
star
3

PINRemoteImage

A thread safe, performant, feature rich image fetcher
Objective-C
4,009
star
4

PINCache

Fast, non-deadlocking parallel object cache for iOS, tvOS and OS X
Objective-C
2,660
star
5

querybook

Querybook is a Big Data Querying UI, combining collocated table metadata and a simple notebook interface.
TypeScript
1,923
star
6

secor

Secor is a service implementing Kafka log persistence
Java
1,845
star
7

teletraan

Teletraan is Pinterest's deploy system.
Java
1,807
star
8

knox

Knox is a secret management service
Go
1,229
star
9

mysql_utils

Pinterest MySQL Management Tools
Python
883
star
10

snappass

Share passwords securely
Python
837
star
11

elixometer

A light Elixir wrapper around exometer.
Elixir
827
star
12

pymemcache

A comprehensive, fast, pure-Python memcached client.
Python
771
star
13

bonsai

Understand the tree of dependencies inside your webpack bundles, and trim away the excess.
JavaScript
738
star
14

rocksplicator

RocksDB Replication
C++
662
star
15

esprint

Fast eslint runner
JavaScript
661
star
16

bender

An easy-to-use library for creating load testing applications
Go
658
star
17

DoctorK

DoctorK is a service for Kafka cluster auto healing and workload balancing
Java
633
star
18

plank

A tool for generating immutable model objects
Swift
469
star
19

riffed

Provides idiomatic Elixir bindings for Apache Thrift
Elixir
307
star
20

thrift-tools

thrift-tools is a library and a set of tools to introspect Apache Thrift traffic.
Python
233
star
21

elixir-thrift

A Pure Elixir Thrift Implementation
Elixir
214
star
22

widgets

JavaScript widgets, including the Pin It button.
JavaScript
210
star
23

singer

A high-performance, reliable and extensible logging agent for uploading data to Kafka, Pulsar, etc.
Java
178
star
24

terrapin

Serving system for batch generated data sets
Java
176
star
25

git-stacktrace

Easily figure out which git commit caused a given stacktrace
Python
158
star
26

jbender

An easy-to-use library for creating load testing applications.
Java
156
star
27

ptracer

A library for ptrace-based tracing of Python programs
Python
155
star
28

react-pinterest

JavaScript
151
star
29

pinlater

PinLater is a Thrift service to manage scheduling and execution of asynchronous jobs.
Java
135
star
30

memq

MemQ is an efficient, scalable cloud native PubSub system
Java
129
star
31

api-quickstart

Code that makes it easy to get started with the Pinterest API.
Python
122
star
32

it-cpe-cookbooks

A suite of Chef cookbooks that we use to manage our fleet of client devices
Ruby
118
star
33

psc

PubSubClient (PSC)
Java
117
star
34

pinterest-api-demo

JavaScript
106
star
35

PINOperation

Objective-C
104
star
36

orion

Management and automation platform for Stateful Distributed Systems
Java
101
star
37

soundwave

A searchable EC2 Inventory store
Java
96
star
38

PINFuture

An Objective-C future implementation that aims to provide maximal type safety
Objective-C
83
star
39

kingpin

KingPin is the toolset used at Pinterest for service discovery and application configuration.
Python
69
star
40

arcanist-linters

A collection of custom Arcanist linters
PHP
63
star
41

pagerduty-monit

Wrapper scripts to integrate monit and PagerDuty.
Shell
60
star
42

pinrepo

Pinrepo is a highly scalable solution for storing and serving build artifacts such as debian packages, maven jars and pypi packages.
Python
58
star
43

transformer_user_action

Transformer-based Realtime User Action Model for Recommendation at Pinterest
Python
49
star
44

quasar-thrift

A Thrift server that uses Quasar's lightweight threads to handle connections.
Java
47
star
45

pinterest-python-sdk

An SDK that makes it quick and easy to build applications with Pinterest API.
Python
47
star
46

yuvi

Yuvi is an in-memory storage engine for recent time series metrics data.
Java
45
star
47

atg-research

Python
41
star
48

slackminion

A python bot framework for slack
Python
22
star
49

api-description

OpenAPI descriptions for Pinterest's REST API
18
star
50

l10nmessages

L10nMessages is a library that makes internationalization (i18n) and localization (l10n) of Java applications easy and safe.
Java
17
star
51

thriftcheck

A linter for Thrift IDL files
Go
16
star
52

arcanist-owners

An Arcanist extension for displaying file ownership information
PHP
16
star
53

tiered-storage

Pinterest's simplified and efficient Tiered Storage implementation for Kafka
Java
13
star
54

.github

Pinterest's Open Source Project Template
12
star
55

homebrew-tap

macOS Homebrew formulas to install Pinterest open source software
Ruby
12
star
56

pinterest-python-generated-api-client

This is the auto-generated code using OpenAPI generator. Generated code comprises HTTP requests to various v5 API endpoints.
Python
12
star
57

vscode-gestalt

Visual Studio Code extension for Gestalt, Pinterest's design system
TypeScript
9
star
58

wheeljack

Work with interdependent python repositories seemlessly.
Python
8
star
59

ffffound

FFFFOUND Import tool for Pinterest
HTML
8
star
60

vscode-package-watcher

Watch package lock files and suggest to re-run npm or yarn.
TypeScript
6
star
61

graphql-lint-rules

Pinterest GraphQL Lint Rules
TypeScript
6
star
62

ss-gtm-template

This is a repository to implement the Google Tag Manager server-side tag template for Pinterest Conversions API to be deployed into Google Community Template Gallery.
Smarty
5
star
63

pinterest-magento2-extension

PHP
4
star
64

Pinterest-Salesforce-Commerce-Cartridge

JavaScript
4
star
65

figma-calculations

TypeScript
2
star
66

slate

Resource Lifecycle Management framework
Java
1
star