Skip to main content

A service management tool for local development.

Project description

stacky pipeline status

A service management tool for local development.

Requirements

  • python 3
  • pipenv

Installation

Development

git clone git@gitlab.com:mega-mac-slice/stacky.git
cd stacky
make install

stacky --help

Brew

brew tap mega-mac-slice/tap && brew install stacky

Configuration

A "Stacky File" is a json file in a project directory typically named .stacky.json that looks like:

{
  "name": "dev-application",
  "commands": {
    "start": "make start",
    "status": "make status"
  },
  "stack": [
    "git@gitlab.com:mega-mac-slice/dev-postgres.git",
    "git@gitlab.com:mega-mac-slice/dev-redis.git",
    "git@gitlab.com:mega-mac-slice/dev-elasticsearch.git"
  ],
  "extra": {
    "kafka": [
       "git@gitlab.com:mega-mac-slice/dev-fast-data-dev.git"
    ]
  }
}

Where we defined some commands for the project itself and also the project's dependencies on postgres, redis and elasticsearch.

Usage

Start

stacky start

This will do the following:

  • Iterate through each dependency defined in stack and retrieve it if it doesn't already exist locally.
  • For each dependency, check if it also has a .stacky.json and retrieve those dependencies defined in stack locally.
  • For each dependency, check it's status and start it if needed.

With our example .stacky.json we would begin with:

dev-application \
    .stacky.json
    Makefile

And after running stacky start would have the dependencies checked out locally adjacent to the project.

dev-application \
    .stacky.json
    Makefile
dev-postgres \
    .stacky.json
dev-redis \
    .stacky.json
dev-elasticsearch \ 
    .stacky.json

Status

stacky status

This will iterate through the dependencies and check it's status. Letting you know if the stack for your application is running.

> stacky status
[INFO] dev-application - ok
[INFO] dev-postgres - ok
[INFO] dev-redis - ok
[INFO] dev-elasticsearch - ok

Stop

stacky stop

This will iterate through the dependencies and stop them.

> stacky stop
[INFO] stopping | dev-elasticsearch
[INFO] stopping | dev-redis
[INFO] stopping | dev-postgres

Run

stacky run command-name

Additional commands can be defined in commands and invoked with run.

> stacky run reset
[INFO] dev-postgres - ok
[INFO] dev-redis - ok
[INFO] dev-elasticsearch - ok

With the following possible results:

  • ok - command existed and ran successfully.
  • fail - command existed and ran unsuccessfully.
  • skip - command did not exist.

Paths

stacky paths

Provides porcelain output of dependency paths intended for usage with external tools.

> stacky paths
/dev/src/dev-elasticsearch
/dev/src/dev-redis
/dev/src/dev-postgres

> stacky paths | xargs rm -rf

Command Lifecycle

install - TODO

start

status

stop

Supported Dependencies

git ssh/https

local

http/https - TODO

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mms-stacky, version 0.0.5
Filename, size & hash File type Python version Upload date
mms-stacky-0.0.5.tar.gz (7.1 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page