debianmaster / microservices-on-openshift

This project demonstrates how we can deploy micro services built in different languages can deployed on openshift
53 stars 152 forks source link

twitter-api route returning 404 #5

Open naumannt opened 6 years ago

naumannt commented 6 years ago

I tried to set up the twitter-api service to have a quick look at how OpenShift works regarding deployment and routing of services, using the commands in the readme: `oc import-image --from=registry.access.redhat.com/jboss-webserver-3/webserver30-tomcat8-openshift tomcat8 --confirm

oc new-app \ https://github.com/veermuchandi/microservices-on-openshift.git \ --context-dir='java-twitter-feed-api' \ --image-stream='tomcat8' \ --name='twitter-api' -l microservice=twittersvc

oc expose svc/twitter-api` I can see the resulting deployment as service, pod and the route, too. However, when I visit the resulting route, it only returns a 404. Does the twitter-api-example rely on the other examples? What other causes could this have?

debianmaster commented 6 years ago

@naumannt did you pass environment vars TWITTER_CONSUMER_SERVICE TWITTER_OAUTH_ACCESS_TOKEN etc? to access twitter api it expects access token etc

more info here https://github.com/VeerMuchandi/microservices-on-openshift/blob/21215a85af23249aae5c0e51c440f5eceb6100e5/java-twitter-feed-api/src/main/java/com/example/MyResource.java#L39

naumannt commented 6 years ago

I did indeed not, but shouldn't that result in a 401 instead of a 404?

I tried the other applications now, and they are running fine.