Skip to content

raditpan/prodConfigChecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prodConfigChecker

gopherbadger-tag-do-not-edit Go Report Card

Command line tool for checking diff between prod and qa config, to help reduce human error when working with config files in multiple environments. It also generates HTML diff report to share with others for reviewing process.

Config repo's folder structure that is supported:

config-repo
├── production
│   └── <app-name>
│       └── <config files>
├── qa
│   └── <app-name>
│       └── <config files>

or (*** using -e option)

config-repo
├── th
│   └── prod
│       └── <app-name>
│           └── <config files>
│           └── vault
│   └── staging
│       └── <app-name>
│           └── <config files>

Prepare Go enviroment

These are steps to setup your environment to install and run Go package easily. First, install Go in your machine:

brew install go

Add below GOPATH var in your ~/.zshrc or ~/.bash_profile:

export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export PATH=${PATH}:$GOBIN

How to run

Install the command line tool:

go get github.com/raditpan/prodConfigChecker

Create .prodConfigChecker.yaml file in your home directoy with path to your local config repo:

configRepoPath: "<absolute path to your config repo>"

Run the command:

prodConfigChecker run <app_name>

// run with repo path option
prodConfigChecker run <app_name> --repo <absolute path to your config repo>

// run with custom config file
prodConfigChecker run <app_name> --config custom-config.yaml

// run with silent mode, no files diff in console output
prodConfigChecker run <app_name> -s

// run with ECS repo config path
prodConfigChecker run <app_name> -e

Check the diff output in terminal console. HTML output file is also generated in your current directory, in case you want to share the result with others.

Build/run from source

Go to the directory you clone the project to. You can run the app with these commands:

// get all the dependencies
go get -d ./...

// run the main app
go run main.go run <app_name>

About

Command line for checking diff between prod and qa config

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages