The keiretsu package

[Tags:program]

Keiretsu is an orchestration manager primarily designed for local development and integration testing.

It allows you to specify dependencies that should be running/available before the start of the local application, triggers setup/teardown hooks, and applies a consistent environment to all child processes ensuring deterministic and repeatable configuration.


[Skip to Readme]

Properties

Versions 0.4.4
Dependencies aeson, ansi-terminal (>=0.6), async, base (>4.6 && <5), bytestring, conduit (==1.1.*), conduit-extra, directory, filepath, hslogger, network, optparse-applicative (==0.11.*), process (==1.2.*), text, unix, unordered-containers, yaml [details]
License OtherLicense
Copyright Copyright (c) 2013-2014 Brendan Hay
Author Brendan Hay
Maintainer Brendan Hay <brendan.g.hay@gmail.com>
Category Development, Testing
Source repository head: git clone git://github.com/brendanhay/keiretsu.git
Uploaded Mon Oct 20 13:23:21 UTC 2014 by BrendanHay
Distributions NixOS:0.4.4
Downloads 260 total (3 in the last 30 days)
Votes
0 []
Status Docs not available [build log]
All reported builds failed as of 2016-12-13 [all 7 reports]
Hackage Matrix CI

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for keiretsu

Readme for keiretsu-0.4.4

Keiretsu

Table of Contents

Introduction

Keiretsu is an orchestration manager primarily designed for local development and integration testing.

It allows you to specify dependencies that should be running/available before the start of the local application, triggers setup/teardown hooks, and applies a consistent environment to all child processes ensuring deterministic and repeatable configuration.

Installation

GHC 7.6.2 or later is required to compile Keiretsu.

cabal install

Configuration

There are 3 configuration file formats which Keiretsu will read, controlling various aspects such as dependencies, processes, and the environment.

An example for a Haskell project named proxy with two dependencies, users and images would look as follows:

+ images/
|   + dist/
|   |   + build/
|   |   |   + images/
|   |   |       + images
|   + src/
|   |   + Main.hs
|   + .env
|   + Intfile
|   + Procfile
+ proxy/
|   + dist/
|   |   + build/
|   |   |   + proxy/
|   |   |       + proxy
|   + src/
|   |   + Main.hs
|   + .env
|   + Intfile
|   + Procfile
+ users/
    + dist/
    |   + build/
    |   |   + users/
    |   |       + users
    + src/
    |   + Main.hs
    + .env
    + Intfile
    + Procfile

Intfile

The Intfile specifies project dependencies with a key: value line based format.

An example Intfile for the proxy service (from above) which specifies two dependencies on users and images:

users: ../users
images: ../images

This will make Keirestu recurse into those sub-directories and continue looking for the various configuration file types.

Procfile

Keiretsu uses an identical format to foreman's Procfile to describe processes.

An example Procfile for the users service (from above) specifying both web and redis proctypes:

redis: redis-server --port $PORT
web: ./dist/build/web/web -p $PORT

This will make Keiretsu will start two processes for this dependency.

Proctypes are simply unique names used to identify the related command within a dependencies' scope. Currently multiline proctypes are not supported.

.env

.env files are used to supplement the process environment with configuration values for a specific dependency.

Again, using the example project layout from above if the images service had a .env file in the project directory with the following:

IMAGES_TMP: /var/tmp/images-service

The key/value pairs would be loaded into the environment and available to all processes.

Contributing

For any problems, comments or feedback please create an issue here on GitHub.

Licence

keiretsu is released under the Mozilla Public License Version 2.0