This document shows how to run the watson-assistant-slots-intro
application in a container running on RedHat OpenShift.
You will need a running OpenShift cluster, or OKD cluster. You can provision OpenShift on the IBM Cloud.
- In your cluster, open your project or click on
+ Create Project
to create one. - 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-assistant-slots-intro
for the github repo, then clickCreate
.
The following instructions will depend on if you are provisioning Assistant from IBM Cloud or from an IBM Cloud Pak for Data cluster. Choose one:
Provision on IBM Cloud
- Find the Assistant service in your IBM Cloud Dashboard.
- Click on the
Manage
tab and then click onLaunch Watson Assistant
. - Go to the
Skills
tab. - Click
Create skill
- Select the
Dialog skill
option and then clickNext
. - Click the
Import skill
tab. - Click
Choose JSON file
, go to your cloned repo dir, andOpen
the workspace.json file indata/watson-pizzeria.json
. - Select
Everything
and clickImport
.
Provision on IBM Cloud Pak for Data
- Find the Assistant service in your list of
Provisioned Instances
in your IBM Cloud Pak for Data Dashboard. - Click on
View Details
from the options menu associated with your Assistant service. - Click on
Open Watson Assistant
. - Go to the
Skills
tab. - Click
Create skill
- Select the
Dialog skill
option and then clickNext
. - Click the
Import skill
tab. - Click
Choose JSON file
, go to your cloned repo dir, andOpen
the workspace.json file indata/watson-pizzeria.json
. - Select
Everything
and clickImport
.
To find the WORKSPACE_ID
for Watson Assistant:
- Go back to the
Skills
tab. - Find the card for the workspace you would like to use. Look for
WatsonPizzeria
. - Click on the three dots in the upper right-hand corner of the card and select
View API Details
. - Copy the
Workspace ID
GUID.
- In the next step, you will need to aadd this
Workspace ID
to your application config map.
-
Back in the OpenShift or OKD UI, click on the
Resources
tab and chooseConfig Maps
and thenCreate Config Map
. -
Add a key for
WORKSPACE_ID
and the value you copied for the Workspace ID. ClickAdd item
to continue. -
Add a key for
PORT
with the value8080
.
The remaining credentials to add will depend on if you provisioned Assistant from IBM Cloud or from an IBM Cloud Pak for Data cluster. Choose one:
Provision on IBM Cloud
- Retrieve the
apikey
andurl
from your Watson Assistant service credentials:
- Add keys for
CONVERSATION_IAM_APIKEY
andCONVERSATION_URL
to store your credentials.
Provision on IBM Cloud Pak for Data
- Retreive the
URL
from your Watson Assistant service details panel:
-
Add the key
CONVERSATION_URL
to store this value. -
Additionally, you will need to add the following keys and values:
CONVERSATION_AUTH_TYPE
and set value tocp4d
CONVERSATION_AUTH_URL
and set value to the URL of your IBM Cloud Pak for Data clusterCONVERSATION_AUTH_DISABLE_SSL
and set value totrue
CONVERSATION_USERNAME
and set value to the IBM Cloud Pak for Data cluser usernameCONVERSATION_PASSWORD
and set value to the IBM Cloud Pak for Data cluser passwordCONVERSATION_DISABLE_SSL
and set value totrue
- Go to the
Applications
tab, chooseDeployments
and theEnvironment
tab. UnderEnvironment From
Config Map/Secret
choose the config map you just created [1]. Save the config [2]. The app will re-deploy automatically, or clickDeploy
to re-deploy manually [3]. To see the variables in the Config Map that will be exported in the app environment, clickView Details
.
- Under
Applications
->Routes
you will see your app. Click on theHostname
to see your Pizza ordering chat bot in action.