diff options
author | Tommy Carpenter <tommy@research.att.com> | 2017-08-23 11:21:44 -0400 |
---|---|---|
committer | Tommy Carpenter <tommy@research.att.com> | 2017-08-23 12:32:45 -0400 |
commit | 81b9ed7a3af1032caa86f316a21e9b2912bb1271 (patch) | |
tree | fe3bb349f501619d3b4df4d4dbb07b9d72adc824 /python-cbs-docker-client/README.md | |
parent | 280af47e5342de6bb4657ad7b85adcc9395ace20 (diff) |
Intiial utils push to ONAP
Issue-Id: DCAEGEN2-80
Change-Id: I1dc8f2d384b0af346fccb86e6767b7e3ca484078
Signed-off-by: Tommy Carpenter <tommy@research.att.com>
Diffstat (limited to 'python-cbs-docker-client/README.md')
-rw-r--r-- | python-cbs-docker-client/README.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/python-cbs-docker-client/README.md b/python-cbs-docker-client/README.md new file mode 100644 index 0000000..3a323a1 --- /dev/null +++ b/python-cbs-docker-client/README.md @@ -0,0 +1,31 @@ +# Python CBS Docker Client + +Used for DCAE Dockerized microservices written in Python. Pulls your configuration from the config_binding_service. Expects that CONSUL_HOST and HOSTNAME are set as env variables, which is true in DCAE. + +# Client Usage + +## Development outside of Docker +To test your raw code without Docker, you will need to set the env variables CONSUL_HOST and HOSTNAME (name of your key to pull from) that are set in DCAEs Docker enviornment. +1. `CONSUL_HOST` is the hostname only of the Consul instance you are talking to +2. HOSTNAME is the name of your component in Consul + +## Usage in your code +``` +>>> from cbs_docker_client import client +>>> client.get_config() +``` + +# Installation + +## Via pip +``` +pip install --extra-index-url https://YOUR_NEXUS_PYPI_SERVER/simple cbs-docker-client +``` + +## Via requirements.txt +Add the following to your requirements.txt file +``` +--extra-index-url https://YOUR_NEXUS_PYPI_SERVER/simple +cbs-docker-client==0.0.1 +``` + |