test-sandbox-compose

Lightweight development enviroments using test-sandbox

Latest on Hackage:0.1.3

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.

BSD3 licensed by Junji Hashimoto

Test-Sandbox-Compose: Fast Development Environments Using Test-Sandbox

Hackage version Build Status

Test-Sandbox-Compose makes development environments for multi-servers using Test-Sandbox. Each server is defined in test-sandbox-compose.yml. test-sandbox-compose.yml provides following functions.

  • Mustache template for accessing each resource
  • Before/After-bash-script for server-setup
  • Tempolary file, directory and TCP-Port which test-sandbox provides

This project is inspired by Docker Compose(Fig).

Getting started

Install this from Hackage.

cabal update && cabal install test-sandbox-compose

test-sandbox-compose.yml reference

<service-name1>:
  cmd: <command-name>
  args:
    - <arg1>
    - <arg2>
  confs:
    <conf1>: <conf1 contents>
    <conf2>: <conf2 contents>
  tempfiles:
    - <temp1>
    - <temp2>
  dirs:
    - <dir1>
    - <dir2>
  ports:
    - <port1>
    - <port2>
  beforescript: <script content>
  afterscript: <script content>
<service-name2>
  ...

Example

zookeeper:
  cmd: '/usr/share/zookeeper/bin/zkServer.sh'
  args:
    - 'start-foreground'
    - '{{zookeeper_conf_conf}}'
  tempfiles: []
  confs:
    conf: |
      dataDir={{zookeeper_dir_data}}
      clientPort={{zookeeper_port_2181}}
      maxClientCnxns=1000
  dirs:
    - 'data'
  ports:
    - '2181'

Commands

Up

test-sandbox-compose up

Status

test-sandbox-compose status

Conf

test-sandbox-compose conf

Kill

test-sandbox-compose kill

Logs

test-sandbox-compose logs

Destroy

test-sandbox-compose destroy

Daemon

test-sandbox-compose daemon

Changes

0.1.3

  • Add lauching order directive for config file(yaml)

0.1.2

  • Update cabal-test (remove setup for running daemon)

0.1.1

  • Fix Changelog.md
comments powered byDisqus