Lab - Run the App

Return to Workshop

Step 1 - Create a Route to the Gochat Service

First we expose the pod with a service.

oc expose dc wetty --port=8080 --target-port=8080 --name=gochat

Then we expose the service with a route.

oc expose svc gochat

Step 2 - Download the App Source

go get -d

Step 3 - Build the App

cd go/src/
glide install -v && go install

Step 4 - Annotate the Service Account to Use OpenShift Authorization

These annotations allow for the Gochat Client to communicate to the OpenShift API for user credential verification.

oc annotate sa/default'{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"gochat"}}' --overwrite
oc annotate sa/default --overwrite

Step 5 - Run the App

cd ~
openshift-gochat-client -host :8080 -chatServer gochat-server.gochat-server.svc.cluster.local:8080 -templatePath go/src/ -logtostderr -insecure

Step 6 - Access the App

Go back to the OpenShift WebUI and click on the “gochat” URL.

Step 7 - Sign in to the App

Click the blue “Login” button.

Log in to the app with your OpenShift credentials. The workshop moderator will provide you with the URL, your username, and password.

Step 8 - Test the App

Send a message!

Step 9 - Logout

Step 10 - Quit the App

In the Wetty terminal ctrl+c to stop the server.

Workshop Details

Domain Red Hat Logo
Student ID

Return to Workshop