prodConfigChecker

command module
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

README

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>

Documentation

Overview

Copyright © 2021 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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