• Stars
    star
    694
  • Rank 65,170 (Top 2 %)
  • Language
    Go
  • Created almost 7 years ago
  • Updated almost 6 years ago

Reviews

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

Repository Details

Runs your tasks at maximum concurrency

cr πŸ“‚

The concurrent runner

Build Status

Overview

cr is a job executor concerned with achieving the highest parallel execution possible.

Given a definition of jobs and their dependencies, it builds a graph that outlines the execution plan of these jobs.

For instance, consider the following plan:

Jobs:
  - Id: 'SayFoo'
    Run: 'echo foo'

  - Id: 'SayBaz'
    Run: 'echo baz'
    DependsOn: [ 'SayFoo' ]

  - Id: 'SayCaz'
    Run: 'echo caz'
    DependsOn: [ 'SayFoo' ]

This plan states that we have 3 jobs to be executed: SayFoo, SayBaz and SayCaz but the last two jobs must only be executed after the first one and in case it succeeds.

To visualize the execution plan we can run it with --graph, which validates the plan and prints out a dot digraph.

# Execute CR telling it where the execution
# plan is (execution.yaml) and that it should
# just print the graph and exit.
cr --file ./execution.yaml  --graph

digraph {
	compound = "true"
	newrank = "true"
	subgraph "root" {
		"[root] SayFoo" -> "[root] SayBaz"
		"[root] SayFoo" -> "[root] SayCaz"
		"[root] _root" -> "[root] SayFoo"
	}
}

# If we pipe this to `dot` and than take the output
# of `dot` we can see the visual representation of the 
# digraph.

cr --file ./examples/hello-world.yaml --graph \
        | dot -Tpng > ./assets/hello-world.graph.png

Spec

---
# Configurations that control the runtime environment.
# These are configurations that can be specified via
# the `cr` CLI (cli takes precedence).
Runtime:
  LogDirectory: '/tmp'  # base directory to use to store log files
  Stdout: false         # whether all logs should also go to stdout     
  Directory: './'       # default directory to be used as CWD


# Map of environment variables to include in every job 
# execution.
# This can be be overriden by job-specific environments
Env:
  FOO: 'BAR'


# Jobs is a list of `Job` objects.
# Each job can have its properties templated
# using results of other jobs, even if they
# depend on the result of a job execution.
Jobs: 
  - Id: MyJob           # name of the job being executed.
    Run: 'echo test'    # command to run
    Directory: '/tmp'   # directory to use as cwd in the execution
    CaptureOutput: true # whether the output of the task should be stored in `.Output` variable
    Env:                # Variables to merge into the environment of the command
      FOO: 'BAR'
    DependsOn:          # List of strings specifying jobs that should be executed before this 
      - 'AnotherJob'    # job and that must exit succesfully.
    LogFilepath: '/log' # Path to the file where the logs of this execution should be stored.
                        # By default they're stored under `/tmp/<NameOfTheJob>`.

More Repositories

1

asciinema-edit

asciinema casts post-production tools
Go
316
star
2

qcode-decoder

QR Code decoder using Lazar Laszlo's decoder
JavaScript
241
star
3

gupload

Upload files with gRPC and/or HTTP2
Go
178
star
4

sample-grafana

Automatic Grafana dashboard initialisation example
Shell
119
star
5

pizza-controller

That's right - order that nice pizza πŸ• with `kubectl`
Go
116
star
6

dmesg_exporter

A "dmesg" prometheus exporter - metrics from the kernel messages ring buffer
Go
54
star
7

observer-c

A pure C implementation of the Observer Pattern
C
46
star
8

gulp-converter-tjs

Converts old/new type of OpenCV HaarCascade xml data to trackingJs' internal format.
JavaScript
37
star
9

xfsvol

Local Docker Volumes with XFS Project Quota
Go
28
star
10

sample-rpc-go

An Example of Go RPC Client and Server
Go
27
star
11

stress

Single-purpose tools to stress resources
C
27
star
12

go-monero

Monero's p2p and RPC in go
Go
27
star
13

react-piano-tiles

A reconstruction of the Piano Tiles mobile game (although not currently optimized for mobile).
JavaScript
25
star
14

monero-exporter

Prometheus exporter for monero metrics.
Go
24
star
15

pidpath

Retrieves the absolute path to the executable of a running process
Go
22
star
16

rawdns

A records resolver from scratch - raw UDP packets
Go
21
star
17

monero-operator

A Kubernetes-native way of deploying Monero nodes and even whole networks: express your intention and let Kubernetes run it for you.
Go
21
star
18

react-matrix

Represents, with SVG, a given Matrix
JavaScript
13
star
19

site-blocker

Chrome extension to block some websites.
JavaScript
12
star
20

tinyc

Tiny container runtime
C
11
star
21

alpine-envsubst

Minimal Docker Alpine:3.6 container with envsubst
Shell
11
star
22

grafana-sync

Keeps your Grafana dashboards in sync
Go
11
star
23

auto53

Automatic Route53 updates based on EC2 Autoscaling state changes
Go
11
star
24

hstatic

An incomplete and small example http server in C - wip
C
10
star
25

l7

Minimal HTTP 1.1 Proxy & Load-balancer
Go
9
star
26

chicken-gun

stressing your system, a chicken at a time
Rust
9
star
27

sample-aws-networking

Example of AWS networking setup using Terraform
HCL
9
star
28

transparencia

Um wrapper javascript sobre a API do transparencia.gov.br
JavaScript
8
star
29

ng-formatphone-br

Angular Filter and Directive for formatting Brazillian phones
JavaScript
8
star
30

l4

Minimal TCP proxy
Go
8
star
31

flight_recorder

A Prometheus exporter for gathering Concourse information from the PostgresSQL DB.
Go
8
star
32

go-sample-udp

Sample UDP Server and Client in Go
Go
8
star
33

pipeline2dot

concourse pipeline dependencies as dot graphs
Go
8
star
34

cartorio

A read-only container image registry
Rust
8
star
35

sample-docker-registry-aws

Sample of how to deploy a Docker registry backed by S3 in AWS EC2 using IAM roles to grant temporary credentials
HCL
8
star
36

react-tree

JavaScript
7
star
37

example-docker-ansible

A minimal ready to use Docker Ansible role with Vagrant provisioning set
Ruby
7
star
38

hello-world-lkm

A "hello-world" loadable kernel module
C
7
star
39

drwho

concurrent recursive whois resolution
Go
7
star
40

slirunner

Concourse SLI probes runner
Go
6
star
41

sample-nginx-http2

NGINX HTTP2 Server Push example
Go
6
star
42

sdns

Minimal A and NS record resolver
Go
6
star
43

lighty-sqlinj-demo

CVE-2014-2323 exploit demonstration
C
6
star
44

efs-locks-sample

Sample showing how easy it is to get to the EFS locks quota
HCL
6
star
45

hello-swagger

Example Hello World Swagger API
Go
6
star
46

dind

A dockerized Docker machine (dind) with SSH and GIT
Shell
5
star
47

travis-triggerer

A single drop-in script to trigger travis-ci builds from other builds.
Shell
5
star
48

syslog-send

Send syslog messages using go's log/syslog package
Go
5
star
49

mylinux

Personal Linux machine configuration
Shell
5
star
50

utea

Toy WebGL 3D Engine
JavaScript
5
star
51

paypal-expresscheckout-python

A simple sdk for perfoming ExpressCheckout with Python
Python
5
star
52

concourse-arm

Concourse on ARMv7 and Arm64
Dockerfile
5
star
53

GCM_sample_APP

Aplicativo exemplo de uma aplicação GCM a ser utilizada com o testador http://apresentae.appspot.com/gcm_testing.
Java
5
star
54

sample-collect-docker-metrics

Example of how to integrate Prometheus, Grafana and Docker Daemon metrics
Shell
5
star
55

talks

Content from my talks :))
JavaScript
4
star
56

hugo-utils

Extra tools for managing Hugo websites.
Go
4
star
57

matrix-snake

Snake game on javascript Matrices!
JavaScript
4
star
58

nfsvol

Docker Volume Plugin for managing NFS storage - WIP
Go
4
star
59

devents

Docker Events Collector
Go
4
star
60

memman

A MMU simulator in C
C
3
star
61

ApresentAE

Source code for https://apresentae.appspot.com , the webpage where i put all my presentations stuff.
JavaScript
3
star
62

go-mod-dep-source-finder

Get direct links to your Go dependencies sources.
Go
3
star
63

ingress_ipvs_exporter

Exports Docker's ingress IPVS metrics
Go
3
star
64

storage-utils-js

Some utils for webstorage
JavaScript
3
star
65

perfer

A wrapper on top of `perf` and `flamegraphs` to generate flamegraphs on demand.
Go
3
star
66

execsnoopvis

visualize system-wide process execution
Go
3
star
67

containerd-install

a "minimal" containerd install (ubuntu)
Makefile
3
star
68

yarenderer

yet another rendering engine in c++
C++
3
star
69

docker-ubuntu

Ubuntu-based docker image with base minimum systemd and SSH
Shell
3
star
70

angular-tutorial-following

A project that follows the official AngularJS Tutorial but with a lot of comments
JavaScript
3
star
71

llb

[wip] The low-level load balancer
C
2
star
72

similar-to

A deepEqual a like that doesn't checks values. It's all about similarity :)
JavaScript
2
star
73

estaleiro

building container images with bill of materials
Go
2
star
74

concourse-worker-health-checker

A sidecar that introduces minimum load into a Concourse worker to probe its health
Go
2
star
75

concourse-crds

A set of custom resource definitions that aim at controlling Concourse.
Go
2
star
76

oklog-docker-plugin

OKLog forwarder that sends your container logs to OKLog ingestors
Go
2
star
77

humanb

Bytes to Human bytes
JavaScript
2
star
78

yaspm

yet another serialport manager
JavaScript
2
star
79

gyr

Go
2
star
80

expose-edns

Exposes docker embedded DNS
Shell
2
star
81

pasquale

Checks for spelling errors in a given sentence
JavaScript
2
star
82

poliglota

Translates a given text to a given language.
JavaScript
2
star
83

heapvis

visualizing heap profile diffs over time
Go
2
star
84

stacksearch

discover callstacks in which functions of interest are called.
Go
2
star
85

monero-builds

probably the fastest way of getting a full linux build of monero and related projects
Dockerfile
2
star
86

yascm

A toy scheme compiler
C++
2
star
87

slowhttp

A slow HTTP static server for simulating slow (but constant) responses from a server.
Go
1
star
88

ootb-tce

Shell
1
star
89

influx-stresser

Hits influxdb with a bunch of batch requests
Go
1
star
90

yahttp-parser

A naive C++ HTTP parser implementation using Bison and Flex
HTML
1
star
91

vai

Single script that wraps a list of scripts in a directory as a CLI
Shell
1
star
92

yairc

simplistic irc client and server
C
1
star
93

scm-controller

Go
1
star
94

intro-prometheus-talk

a very quick intro to prometheus (lightning!)
1
star
95

dagger-notes

nothing to see here - wip
Dockerfile
1
star
96

docker-ec2-metadata-block

Example of EC2 Metadata service blocking for Docker container
HCL
1
star
97

certgen

Utility for generating certificates with SAN set
Shell
1
star
98

yacss-parser

Yet Another toy CSS parser
C++
1
star
99

buildkit-task

Shell
1
star
100

iot-sdk-python

Minimum SDK for the IoT device provided by Telefonica
Python
1
star