This document shows how to run the watson-discovery-food-reviews
application in a container running on Red Hat OpenShift.
You will need a running OpenShift cluster, or OKD cluster. You can provision OpenShift on the IBM Cloud.
-
Using the OpenShift web console, select the
Application Console
view. -
Use the
+Create Project
button to create a new project, then click on your project to open it. -
In the
Overview
tab, click onBrowse Catalog
. -
Choose the
Node.js
app container and clickNext
. -
Give your app a name and add
https://github.com/IBM/watson-discovery-food-reviews
for the github repo, then clickCreate
.
To complete the config map instructions below, you will need to gather some key values from your Discovery and Watson Knowledge Studio services. Instructions for how to obtain these are located on the main README page.
Click on the Resources
tab and choose Config Maps
and then click the Create Config Map
button:
Use the Create Config Map
panel to add our application parameters.
- Provide a
Name
for the config map. - Add a key named
DISCOVERY_IAM_APIKEY
and paste in the API Key underEnter a value...
. - Click
Add Item
and add a key namedDISCOVERY_URL
and paste in the URL underEnter a value...
.. - Click
Add Item
and add a key namedPORT
, enter 8080 underEnter a value...
. - Click
Add Item
and add a key namedDISCOVERY_ENVIRONMENT_ID
and paste in the value underEnter a value...
.. - Click
Add Item
and add a key namedDISCOVERY_COLLECTION_ID
and paste in the value underEnter a value...
.. - Click
Add Item
and add a key namedWKS_MODEL_ID
and paste in the value underEnter a value...
.. - Hit the
Create
button. - Click on your new Config Map's name.
- Click the
Add to Application
button. - Select your application from the pulldown.
- Click
Save
.
Go to the Applications
tab, choose Deployments
to view the status of your application.
- From the OpenShift or OKD UI, under
Applications
->Routes
you will see your app. Click on theHostname
to see your Watson Discovery Food Reviews app in action. - Save this URL.