20 October 2015

Tags: java |

blog_post_image

Some time ago I had to run Netflix Eureka server (to be more specific itwas version 1.1.151) not using Spring Boot.

There were several ways:

I decided to go with Webapp Runner.

So, here is the list of steps:

  1. Download eureka-server war from maven central (e.g. http://mvnrepository.com/artifact/com.netflix.eureka/eureka-server/1.1.151). Also, we can clone the Netflix Eureka github repo and perform build locally. But, our intent is just get ready to use war file as quick as possible.
  2. Rename eureka-server-1.1.151.war to eureka-server.war.
  3. Download webapp-runnner jar from maven central (e.g. http://mvnrepository.com/artifact/com.github.jsimone/webapp-runner/8.0.24.0)
  4. I assume that eureka-server.war and webapp-runner-8.0.24.0.jar are located in the same directory. Now we can simply run the eureka-server on port 4000 via runme.bat file:
$ cat runme.bat
java -jar webapp-runner-8.0.24.0.jar eureka.war --path /eureka --port 4000

Local directory should have the next files/folders:

$ dir /b
eureka-server-1.1.151.war
eureka.war
runme.bat
target/
webapp-runner-8.0.24.0.jar

The server is up and running: check Eureka UI http://localhost:4000/eureka/ or registered apps http://localhost:4000/eureka/v2/apps/ XML output.

References


comments powered by Disqus