A Sample App that detects dogs
- Kafka instance
- Web application
- Dog detector REST service
- Dog detector Kafka consumer
Prerequesites:
- OpenShift (tested on 4.7)
- Installed Strimzi Operator (tested on 0.23.0)
Customize the .env.local file to include OpenShift login information
# using token
OC_URL=https://api.cluster:6443
OC_TOKEN=sha256~blahblah
OC_PROJECT=dog-detector
or
# using username & password
OC_URL=https://api.cluster:6443
OC_USER=your-username
OC_PASSWORD=your-password
OC_PROJECT=dog-detector
Test with:
$ make loginIf you forked the service/consumer repos, you can edit the .env.local to build from your own source to image repository.
REST_SERVICE_GIT_REPO=https://github.com/your-org/dog-detector-service.git
KAFKA_CONSUMER_GIT_REPO=https://github.com/your-org/dog-detector-kafka-consumer.git
Now execute the deployment scripts.
$ make deployNavigate to the URL in the route dog-detector-app. To find it, you can query:
echo "https://$(oc get route dog-detector-app -o jsonpath='{.spec.host}')"- The first request to Tensorflow is slow as it loads up the model.