This document shows how to deploy the server using Red Hat OpenShift.
You will need a running OpenShift cluster, or OKD cluster. You can provision OpenShift on the IBM Cloud.
- Create your Watson Assistant service
- Create an OpenShift project
- Create the config map
- Get a secure endpoint
- Click here to go the Watson Assistant create resource page.
- Review the settings. The defaults and a Free plan should work.
- Click
Create
. - Copy/paste the
API Key
andURL
or keep the browser tab open. You'll need these later.
-
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-google-assistant
for the github repo, then clickCreate
.
-
Click on the
Resources
tab and chooseConfig Maps
and then click theCreate Config Map
button.- Provide a
Name
for the config map. - Add a key named
ASSISTANT_APIKEY
and paste in the API Key from step 1 underEnter a value...
. - Click
Add Item
and add a key namedASSISTANT_URL
and paste in the URL from step 1 underEnter a value...
.. - Click
Add Item
and add a key namedPORT
, enter 8080 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
.
- Provide a
-
Go to the
Applications
tab, chooseDeployments
to view the status of your application.
- From the OpenShift or OKD UI, under
Applications
▷Routes
you will see your app.- Click on the application
Name
. - Under
TLS Settings
, click onEdit
. - Under
Security
, check the box forSecure route
. - Hit
Save
.
- Click on the application
- Go back to
Applications
▷Routes
.- Click your app's
Hostname
. You should see the message: "Watson for Google Assistant app is running." - Save this URL to use later in your actions/action.json file. It must start with https.
- Click your app's