Code Monkey home page Code Monkey logo

stacky's Introduction

stacky pipeline statuspypi

A service management tool for local development.

Requirements

  • python 3
  • pipenv

Installation

Development

git clone [email protected]: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": [
    "[email protected]:mega-mac-slice/dev-postgres.git",
    "[email protected]:mega-mac-slice/dev-redis.git",
    "[email protected]:mega-mac-slice/dev-elasticsearch.git"
  ],
  "extra": {
    "kafka": [
       "[email protected]: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

  • ssh - [email protected]:mega-mac-slice/dev-postgres.git
  • https - https://gitlab.com/mega-mac-slice/dev-postgres.git

local

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.