github.com/VMitov/casper@v0.4.0/README.md (about)

     1  # CASPER
     2  _Configuration Automation for Safe and Painless Environment Releases_
     3  
     4  [![Build Status](https://secure.travis-ci.org/miracl/casper.png?branch=master)](https://travis-ci.org/miracl/casper?branch=master)
     5  [![Coverage Status](https://coveralls.io/repos/miracl/casper/badge.svg?branch=master&service=github)](https://coveralls.io/github/miracl/casper?branch=master)
     6  [![Go Report Card](https://goreportcard.com/badge/github.com/miracl/casper)](https://goreportcard.com/report/github.com/miracl/casper)
     7  
     8  ## Description
     9  
    10  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.
    11  
    12  ## Installation
    13  
    14  ### From source 
    15  
    16  ```
    17  go get -u github.com/miracl/casper/cmd/casper
    18  ```
    19  
    20  ### From [GitHub releases](https://github.com/miracl/casper/releases)
    21  
    22  ## Example
    23  ```
    24  cd examples/
    25  casper build
    26  ```
    27  * [template.yaml](/example/template.yaml)
    28  * [config.yaml](/example/config.yaml)
    29  * [source.yaml](/example/source.yaml)
    30  * [expected output](/example/output.yaml)
    31  
    32  ## Usage
    33  
    34  All configurations can be given on the command line, with file or with environment variables. Check `casper -h` for full list.
    35  
    36  * **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)
    37  * **sources** - Sources are the thing containing the keys for the template. Sources is a list. Currently there are 2 available:
    38  	* Config source is a list of key/value pairs directly in the configuration file. Check ([config.yaml](/example/config.yaml)) for examples. 
    39  		```
    40  		sources:
    41  		- key1=val1
    42  		- key2=val2
    43  		```
    44  	* File source defines key/value pairs in a file. Currently supported formats are `json` and `yaml`.
    45  		```
    46  		sources:
    47  		- file://source.yaml
    48  		```
    49  * **storage** - Storage is the system that Casper menages. Currently there are 2 available:
    50  	* Consul.
    51  		```
    52  		storage: consul
    53  		consul-addr: http://172.17.0.1:8500/?token=acl_token&ignore=_ignore
    54  		```
    55  		* ignore - keys given the value of this setting in configuration will be ignored by Casper. The default such value is `_ignore`
    56  	* File
    57  		```
    58  		storage: file
    59  		file-path: output.yaml
    60  		```