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


Download files

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

Source Distribution

mms-stacky-0.0.5.tar.gz (7.1 kB view details)

Uploaded Source

File details

Details for the file mms-stacky-0.0.5.tar.gz.

File metadata

  • Download URL: mms-stacky-0.0.5.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

File hashes

Hashes for mms-stacky-0.0.5.tar.gz
Algorithm Hash digest
SHA256 09e50260858064254ae40cc46fdaac165b9416b27725358cf74327c7842cfe3a
MD5 02ba56a52cb7223aaeeb41a5ae835efa
BLAKE2b-256 5fd1f2ef1d2aabc84d27f0c884182de540b384d2d8762e4465527c6417517872

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page