Henchman is an orchestration and automation tool written in Golang, inspired by Ansible with support for custom transports and inventories.
Check out the wiki to learn more.
Henchman executes a plan (a collection of tasks) on a given set of machines. Currently henchman uses SSH as a transport to execute a plan on hosts specified in an inventory. It will be possible to use custom transports and custom inventory scripts in the future.
$GOPATH/src/github.com/apigee
export $PATH=$PATH:$GOPATH/bin
go get github.com/tools/godep
godep restore
godep go build -o bin/henchman
godep go build -race -o bin/henchman
find modules -name '*.go' | awk -F/ '{print "-o bin/modules/"$2"/"$2" "$0}' | xargs -l1 go build
Just clone or fork from https://github.com/apigee/henchman and off you go! Fixing issues marked easy
in the issue tracker is a great way to get started. Or you can help by creating more modules. Look at the modules section for more details.
HenchmanErrors can be created using the HenchErr(err, map[string]interface{}, "extension message")
call. Creating a HenchmanError as opposed to a standard error allows the user to pass in extra information for logrus. Here are a few key things to note when creating a HenchErr:
err
- place any error
in heremap[string]interface{}
- Place any information about the CURRENT function it's in. For example, plan information, task information, what machine it's onextension message
- Is a string that is prefixed onto the base error message. This extension message should contain information about the function that produced the error. For example, if an err occurred while unmarshalling, the extension message would contain "While unmarshalling".