I've just started with creation of the demo predix time-series application by following the steps given in the tutorial. I'm using DevBox for the same. Also, my work PC is not making use of a proxy server, so do I still need to set up environment variables, port variable? I'm bit confused about this. In which cases is it necessary to set environment, port variables ??
On running - cf env NAME_OF_APP_OR_SERVICE
At the end, I get -
No running env variables have been set
No staging env variables have been set
Answer by Greg Stroup · Jul 12, 2017 at 11:52 AM
No, you don't need to set those variables in the Predix cloud. Cloud foundry will assign a port to your app/service.
Hi Greg, I'd raised a ticket with the Predix forum - INC0036793. There it was explained to me that to safely deploy my app to cloud foundry environment variables were mandatory. Please clarify, I'm quite confused about this.
Hi Greg, also how can I find the value of the port which Cloud foundry assigns to my app/service ?
Answer by Greg Stroup · Jul 13, 2017 at 01:28 PM
There might be some confusion here about which environment you're running on. For your laptop (or devbox) you might need to set up some environment variables to allow your laptop to connect to predix, if your laptop is sitting behind a proxy server. (HTTP_PROXY environment variables.)
When your app is running in the cloud, you don't need to specify any port environment variables. If you check cloud foundry logs at startup, you'll see the port assigned to your app. Right after startup, run this command: cf logs my-app-name --recent
Hi Greg, my pc is not connected to a proxy server, I've double checked to confirm this. Yet when I raised the ticket I was asked to set up environment variables hence the confusion at my end. :(
Hi Greg, I looked through the logs of the app that I had at my end. There I found only 1 reference to a port, as indicated below. Is this the port you are referring to ?
2017-07-14T04:43:32.97+0000 [App/0] OUT 2017-07-14 04:43:32.970 INFO 29 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 62988 (http)
Yes. That might be it.
However for most practical purposes, you don't need to know the port. You can refer to it programmatically from your application.
Predix-Webapp-Starter modification for displaying my own Time Series Info 1 Answer
Does anyone know how to decipher database files stored at predix_machine/appdata/storeforward? 1 Answer
How to stream data that is generated by an IoT gateway application to predix cloud? 2 Answers
Does Predix support angular JS 2? 2 Answers