Giter VIP home page Giter VIP logo

cps's Introduction

CPS - Centralized Property Service

Go Report

CPS is a centralized dynamic property service. It serves up the precomputed properties for a service as well as dynamic consul properties in the form of conqueso.service.ips=. It also supports AWS SSM Parameter Store SecureStrings.

See cps-property-generator for generating json property files and uploading them to s3.

configuration

In order to run this project you need to set the following values in cps.json at the root of the project:

{
  "account": "000000000000",
  "region": "us-east-1",
  "s3": {
    "bucket": "mys3propertiesbucket",
    "region": "us-east-1"
  },
  "consul": {
    "host": "localhost:8500"
  }
}

running locally

  • mkdir -p ~/go/src
  • add export GOPATH=~/go to your .bashrc or .zshrc
  • git clone to ~/go/src/cps
  • brew install go consul
  • make
  • consul agent -dev -advertise 127.0.0.1 in another tab.
  • export your awsaml creds
  • ./cps

running on an ec2 instance

  • make build-linux
  • scp binary to the ec2 instance and run

running a dev instance with local files

Sometimes it is desirable to run locally using flat files. You can put your service json files into a directory and point to that directory. Note, when file mode is enabled s3 and consul watchers are both disabled. Here is a basic example of how to set up your config for local files:

{
  "account": "0000000000000",
  "region": "us-east-1",
  "file": {
    "enabled": true,
    "directory": "./local-files"
  }
}

The names of the files in the ./local-files should be the name of the service.

running in docker

There is a Dockerfile at the root of the project that is meant to be used in local file mode. You can modify dockerfiles/cps.json and add/remove services from the dockerfiles/services directory to change what properties are returned. Here are the steps to get started quickly:

  1. Uncomment dockerfiles ADD in Dockerfile
  2. docker build -t cps .
  3. docker run -p 9100:9100 -it cps
  4. curl localhost:9100/v1/properties/your-service

cps's People

Contributors

afergie-r7 avatar asebastian avatar asebastian-r7 avatar dgreene-r7 avatar eromani-r7 avatar fpedrini avatar psimms-r7 avatar simonirwin-r7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cps's Issues

Logging Redux

Remove all logging init()'s. Either pass the log around or make a logging package with exported functions.

Use github import paths

Instead of using relative paths for internal cps packages (which is bad), use github paths (which is good). This will make building and getting the package much easier.

Speed up v2 api

Property ingestion is slow in the v2 api since we did not use goroutines for loading property files from s3. Let's get some concurrency going here.

Move from dep to go modules

All of my go other projects are now on go modules, this is the last remaining. Not enjoying setting my $GOPATH and going to a different location to build them. This comes right after #7 is done.

Change v1/v2 paths

go mod is going to break these versioned paths when we switch over. Use ver1/ver2 instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.