casper

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

README

CASPER

Configuration Automation for Safe and Painless Environment Releases

Build Status Coverage Status Go Report Card

Description

Casper is a simple tool for managing configurations as code where the structure of the configurations is separated from the values themselves. That way you can use the same structure for different environments. The structure of the configurations is described in a template file. Overall the tool combines the template file with all the values, serializes it to a format applicable for the configuration storage and pushes the changes to the storage.

Installation

go get -u github.com/miracl/casper

Example

cd examples/
casper build

config.yaml

  • template - The template file is a golang template. The end product of the template file and the values should be of a format applicable for the configuration storage (e.g: json, yaml for key/value stores)
  • format - Format of the template. It depends on the storage configures.
  • sources - Sources are the thing containing the keys for the template. Sources is a list of sources defined with type and keys that are specific to each particular source. Currently there are 2 available:
    • config - key/value pairs directly in the configuration file
      • vals - list of key/value pairs
    • file - key/value pairs in file
      • format - format of the file (json, yaml)
      • file - path to file containing key/value pairs
  • storage - Storage is the system that Casper menages. Storage will have two keys - type and config where config contains all the configurations for the storage specified by type. Currently there are 2 available:
    • consul - Consul (Formats: json, yaml)
      • addr - address of the consul instance e.g: localhost:8500
      • ignore - keys given the value of this setting in configuration will be ignored by Casper. The default such value is "_ignore"
    • file - File (Formats: string)
      • path - path to the file

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
lib
consul
Package consul contains helper functions for consul storage
Package consul contains helper functions for consul storage
diff
Package diff is a utility to create visual diffs for key/value changes
Package diff is a utility to create visual diffs for key/value changes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL