Git Product home page Git Product 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 dep consul
  • dep ensure
  • 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. docker build -t cps .
  2. docker run -p 9100:9100 -it cps
  3. curl localhost:9100/v1/properties/your-service

cps's People

Contributors

asebastian avatar asebastian-r7 avatar

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.