Skip to content

getstacker/stacker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

!!! THIS PROJECT IS WIP AND NOT YET READY FOR PUBLIC USE !!!

Join the chat at https://gitter.im/getstacker/stacker

Stacker: Extensible DevOps Toolbelt

Stacker is a flexible task runner with built-in configuration templating and plugin support.

It's compatible with gulp plugins.

Gulp is comprised of two core components:

  1. orchestrator for running tasks concurrently
  2. vinyl-fs for globbing and piping files

Install

Install via npm or install script.

The preferred method is the install script. This is similar to brew where the install script clones the main git repo.

Install Script

Review install script, then...

sh -e <(curl -sS --tlsv1.2 https://raw.githubusercontent.com/getstacker/stacker/master/install)

Installation may take awhile and appear to freeze while installing npm modules. This is due to a bug in npm 2.0.0 when using npm-shrinkwrap. The install script should eventually complete even with the npm ERR! cb() error.

NPM

It's recommended to use the install script.

npm install -g stacker

Common Install Errors

...
flags for v8 3.26.33 cached.
npm ERR! cb() never called!

StackOverflow thread and Github issue

There's a bug in npm that should be fixed in 2.0.2. Rerunning the install script fixes the issues.

Uninstall

curl -sS --tlsv1.2 https://raw.githubusercontent.com/getstacker/stacker/master/uninstall | sh -e

Plugins

Stacker plugins are NPM modules.

Developing a Plugin

Use npm link to add your work-in-progress plugin to stacker.

# Create the plugin directory
mkdir my-new-plugin
cd my-new-plugin

# Setup the package.json file
npm init

# Link the current directory into npm's global node_modules so stacker can find it
npm link

# Add the new plugin link to stacker
stacker link my-new-plugin

API

DESIGN GOALS

  • devops focused task runner
  • simple but expressive DSL for writing scripts
    • better than bash
    • all the power of node and npm modules
    • highly testable
  • pipes and promises
  • not a replacement for ansible or salt
    • much smaller in scope
    • can run ansible or salt commands
  • primarily acts as a developer api
    • wraps other programs
    • simplifies chaining a bunch of programs together

CORE CONCEPTS

Context

Stacker runs tasks in VMs and containers. For security reasons, it does not run anything on the host by default except for core stacker CLI commands.

Context is defined as a colon separated string: "VM:CONTAINER".

"*:*" means run in all VMs and all containers
"-:*" means run in all containers on all VMs but do not run in the VM itself
"*:-" means run in all VMs but not in containers
"/vm-remote-.*/:/*._database/" means run in all VMs and containers matching the regexes

Runners

Runners are defined in plugins. They are functions that register with stacker to run commands in different contexts.

Config

Stacker can parse json and yml config files with optional stacker templating.

Tasks

Tasks are defined within plugins or within a specific project. Task files are similar in concept to rake or make files. They're scripts that define tasks and dependencies.

Logging

TODO

  • setup gulp processor with global injection for task, sh, etc

  • setup config parsing with stacker header support

    • parse all *.stack files in project by default
    • if no header, output file in same dir without the .stack extension
  • add support for injecting common header in output conf file

    • support ini, bash/sh, coffeescript/javascript, ruby, etc. types ...
    • or support comment syntax setting in .stack header
  • create official DSL support with jison

Credits

Stacker logo (Squares) designed by Nicholas Menghini from the Noun Project.

About

Extensible DevOps CLI with plugins for templating, config, Docker, and more.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •