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
go get -d github.com/kevensen/openshift-gochat-client
cd go/src/github.com/kevensen/openshift-gochat-client
glide install -v && go install
These annotations allow for the Gochat Client to communicate to the OpenShift API for user credential verification.
oc annotate sa/default serviceaccounts.openshift.io/oauth-redirectreference.1='{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"gochat"}}' --overwrite
oc annotate sa/default serviceaccounts.openshift.io/oauth-redirecturi.1=auth/callback/openshift --overwrite
cd ~
openshift-gochat-client -host :8080 -chatServer gochat-server.gochat-server.svc.cluster.local:8080 -templatePath go/src/github.com/kevensen/openshift-gochat-client/templates -logtostderr -insecure
Go back to the OpenShift WebUI and click on the “gochat” URL.
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.Send a message!
In the Wetty terminal ctrl+c to stop the server.