Skip to content

Instantly share code, notes, and snippets.

@tsudot
Last active August 17, 2018 07:01
Show Gist options
  • Save tsudot/010ab1d11721625dcc3b006c6fb24861 to your computer and use it in GitHub Desktop.
Save tsudot/010ab1d11721625dcc3b006c6fb24861 to your computer and use it in GitHub Desktop.
These are a set of guidelines to follow when writing any new component on the karix.io platform

Karix.io: Development Guidelines

These are a set of guidelines to follow when writing any new component on the karix.io platform

Dockerfile/Jenkinsfile

  • Every component must have a Dockerfile
  • Every component must have a Jenkinsfile
  • Jenkinsfile will be used to build the container and push it to the registry

Logging

Chaining Logs

  • All internal requests to different components must include X-RequestID HTTP header or x-requestid metadata in gRPC

Dependency management

  • Use dep to manage go dependencies.
  • Don't commit the vendor folder to the source repository

Configuration files

  • Config files must be separate from the source code
  • Config files should be written in a way they can be mounted on a container
  • It should be templatized, and generated based on the environment (prod, dev, stage)
  • Go repositories to use https://github.com/spf13/viper to read config

Testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment