shops is a simple command-line tool written in Go that helps you simplify the way you manage configuration across a set of machines. shops is your configuration management tool of choice when Chef, Puppet, Ansible are all too complicated and all you really want to do is run a bunch of regular shell against a set of hosts.

James Mills 8646052563 Fix race condition in GroupRunner 2 hours ago
testdata 063fdc8bd6 A Pony :D 21 hours ago
.gitignore a1beed24c9 Initial Commit 1 week ago
LICENSE 74cb800218 Updated docs, added LICENSE 1 week ago
README.md 9c5626787d Fix typos 1 week ago
TODO.md e2dcc3466c Update TODO 21 hours ago
config.go 7232ebed81 Add support for copying files and directories 1 week ago
docker-nodes.yml 2eac8b520d A Pony :D 3 days ago
go.mod 7232ebed81 Add support for copying files and directories 1 week ago
go.sum 7232ebed81 Add support for copying files and directories 1 week ago
main.go 063fdc8bd6 A Pony :D 21 hours ago
pony.go 2eac8b520d A Pony :D 3 days ago
runner.go 8646052563 Fix race condition in GroupRunner 2 hours ago
ssh.go 27e2d94351 Optimize ssh connections to each host to just one 1 week ago
utils.go 063fdc8bd6 A Pony :D 21 hours ago
version.go a1beed24c9 Initial Commit 1 week ago

README.md

shops - Shell Operations

shops is a simple command-line tool written in Go that helps you simplify the way you manage configuration across a set of machines. shops is your configuration management tool of choice when Chef, Puppet, Ansible are all too complicated and all you really want to do is run a bunch of regular shell against a set of hosts.

Getting Started

To install shops you can either run go get directly:

go get git.mills.io/prologic/shops

NOTE: Be sure to have $GOBIN in your $PATH. See go env.

Or grab the source code and build:

git clone https://git.mills.io/prologic/shops.git
cd shops
go build

And optionally run go install to place the binary shops in your $GOBIN.

Usage

Using shops is quite simple. The basic usage is as follows:

shops -f /path/to/config.yml <host1> <host2> <hostN>

For example running the included test.yml configuration file at the root of the source code repository here against a typical Linux server:

shops -f test.yml 10.0.0.50:22

Will perform the will perform the following:

  • Copy README.md to /root/README.md on the server
  • Ensure /tmp/foo exists
  • Check the uptime of the server and display it.

Example:

$ ./shops -f test.yml 10.0.0.50:22
10.0.0.50:22:
 Ensure /root/foo exists ✅ -> /root/foo
 Ensure sshbox is running ✅ ->
 Check Uptime ✅ -> 04:01:12 up 19 days,  2:18,  0 users,  load average: 0.00, 0.00, 0.00

Configuration Specification

Currently the configuration specification is a simple YAML file that consists of a number of top-level keys:

  • version -- Which for the moment is ignored, but might be used to version the configuration file for future enhancements in a backwards compatible way.
  • files -- Declares one or more files or directories to be copied to each target host. Directories are copied recursively. Currently no checks are performed, but this is planned.
  • items -- One or more items of configuration to be applied to each target host. Each item declares a "check" and "action". Checks and actions are written in regular shell. If a check fails, the action is run to correct the failed state. If all checks pass, no actions are run.

License

shops is licensed under the terms of the MIT License