Anuraag-Advani commented on a change in pull request #187: create development guide URL: https://github.com/apache/incubator-openwhisk-package-kafka/pull/187#discussion_r124078542
########## File path: devGuide.md ########## @@ -0,0 +1,62 @@ +# Development and Testing +## Build +Building the Kafka feed provider is a simple matter of running a `docker build` command from the root of the project. I suggest tagging the image with a memorable name, like "KafkaFeedProvider": + +``` sh +docker build -t KafkaFeedProvider . +``` + +## Run +Now we need to start the provider service. This is also a simple matter of running a `docker run` command, but the details are a little tricky. The service relies on a number of environment variables in order to operate properly. They are outlined below: + +### Mandatory Environment Variables +|Name|Type|Description| +|---|---|---| +|DB_URL|URL|The base URL for persistent storage (either CouchDB or Cloudant)| +|DB_USER|String|Username for your DB credentials| +|DB_PASS|String|Password for your DB credentials| + +### Optional Environment Variables +|Name|Type|Description| +|---|---|---| +|INSTANCE|String|A unique identifier for this service. This is useful to differentiate log messages if you run multiple instances of the service| +|PORT|Integer (default=5000)|The internal port on which the provider REST service should listen| +|PAYLOAD_LIMIT|Integer (default=900000)|The maxmimum payload size, in bytes, allowed during message batching. This value should be less than your OpenWhisk deployment's payload limit.| + +With that in mind, starting the feed service might look something like: + +```sh +docker run KafkaFeedProvider -e DB_URL=https://myDbHost -e DB_USER=MyDbUser -e DB_PASS=MySuperSecret -e PORT=8080 -p 80:8080 Review comment: Change to docker run -e DB_URL=https://myDbHost -e DB_USER=MyDbUser -e DB_PASS=MySuperSecret -e PORT=8080 -p 80:8080 kafkafeedprovider ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
