Multi-process orchestration for development and integration testing
|Latest on Hackage:||0.4.4|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
Table of Contents
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.
7.6.2 or later is required to compile Keiretsu.
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,
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 specifies project dependencies with a
key: value line based format.
Intfile for the
proxy service (from above) which specifies two dependencies on
users: ../users images: ../images
This will make Keirestu recurse into those sub-directories and continue looking for the various configuration file types.
Keiretsu uses an identical format to foreman's
to describe processes.
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 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
.env file in the project directory with the following:
The key/value pairs would be loaded into the environment and available to all processes.
For any problems, comments or feedback please create an issue here on GitHub.
keiretsu is released under the Mozilla Public License Version 2.0