3

I am trying to deploy elasticsearch in predix, I tried to push the downloaded elasticsearch folder into predix with the following manifest.

---
applications:
- name: elastic-search-test3
  buildpack: java_buildpack
  # path: target/elstic-search-test-1.0.0.jar
  command: elasticsearch-5.2.2/bin/elasticsearch -f
  #timeout : 180

am getting error like port should not be hard coded, should need to use $PORT.

then I tried to set to set the port and host in elasticsearch config as follows

http.port: ${VCAP_APP_PORT}
network.host: ${VCAP_APP_HOST}

but no luck.

Can someone point to solution to deploy elasticsearch on predix?

kongaraju
  • 9,344
  • 11
  • 55
  • 78
  • 1
    Can you show the full error you get? – Val Mar 30 '17 at 11:55
  • Error restarting application: Start app timeout; Application must be listening on the right port. Instead of hard coding the port, use the $PORT environment variable – kongaraju Mar 30 '17 at 12:00

1 Answers1

0

You should use CF_INSTANCE_* variables instead of depreciated VCAP_APP_* DEA ones on newer CF versions.

More on https://docs.cloudfoundry.org/devguide/deploy-apps/environment-variable.html

Anatoly Kern
  • 621
  • 3
  • 8