Topics

Spring-boot app on tron in devmode

popikyardo
 

Hi!


Is it possible to publish the packaged spring-boot uberJar to the tron in devmode?

I do the following:

1) run docker container: 

docker run -ti --rm  -e TRON_1=--devmode -p 3000:3000 -p 54657:54657 funcatron/tron:v0.2.6

2) compile and package java-spring app from samples

3) do 

wget -O - --post-file=target/java_spring_sample-0.1-SNAPSHOT.jar http://localhost:54657/api/v1/add_func

it fails with this result.

in the tron docker container I get the logs


David "Funcmaster D" Pollak
 

Sorry for the delayed response.

I will look into this issue tomorrow Pacific time.


On Wed, Feb 1, 2017, at 06:27 AM, popikyardo wrote:

Hi!


Is it possible to publish the packaged spring-boot uberJar to the tron in devmode?

I do the following:

1) run docker container: 

docker run -ti --rm  -e TRON_1=--devmode -p 3000:3000 -p 54657:54657 funcatron/tron:v0.2.6

2) compile and package java-spring app from samples

3) do 

wget -O - --post-file=target/java_spring_sample-0.1-SNAPSHOT.jar http://localhost:54657/api/v1/add_func

it fails with this result.

in the tron docker container I get the logs






--
Funcatron, Simply Serverless http://funcatron.org
Lift, the simply functional web framework http://liftweb.net

David "Funcmaster D" Pollak
 




On Wed, Feb 1, 2017, at 03:27 AM, popikyardo wrote:

Hi!


Is it possible to publish the packaged spring-boot uberJar to the tron in devmode?

I do the following:

1) run docker container: 

docker run -ti --rm  -e TRON_1=--devmode -p 3000:3000 -p 54657:54657 funcatron/tron:v0.2.6

2) compile and package java-spring app from samples

3) do 

wget -O - --post-file=target/java_spring_sample-0.1-SNAPSHOT.jar http://localhost:54657/api/v1/add_func


Why would you try to post to port 54657? When running in devmode, port 54657 is the port that your running app uses to talk to the Tron? 

To run in DevMode, main sure your main() method invokes the Register.register() method (see https://github.com/funcatron/starter/blob/master/src/main/resources/archetype-resources/src/main/java/MyFunction.java#L108-L110)

When you run your app in the IDE, it will register with Funcatron and then you'll be able to access the app at http://localhost:3000



it fails with this result.

in the tron docker container I get the logs






--
Funcatron, Simply Serverless http://funcatron.org
Lift, the simply functional web framework http://liftweb.net

popikyardo
 

David, thanks for your reply!

>Why would you try to post to port 54657? When running in devmode, port 54657 is the port that your running app uses to talk to the Tron? 
I thought that 
port 54657 is a port which the tron is listening to accept the incoming uberJar files (isn't it?) 

I'll see if my app uses Register.register(). I plan to create a swagger2 doc manually and then use it in my main() method. I'll provide a detailed answer later (~5-6 hours)

David "Funcmaster D" Pollak
 

I've updated the Spring Boot sample documentation to make clear how to run your Spring Boot app in "devmode" (connected to a local Funcatron instance rather than uploaded to a Funcatron cluster running on Mesos/K8s): https://github.com/funcatron/samples/blob/master/java-spring/README.adoc

Hope this helps.


On Mon, Feb 6, 2017, at 08:14 AM, popikyardo wrote:

David, thanks for your reply!

>Why would you try to post to port 54657? When running in devmode, port 54657 is the port that your running app uses to talk to the Tron? 
I thought that 
port 54657 is a port which the tron is listening to accept the incoming uberJar files (isn't it?) 

I'll see if my app uses Register.register(). I plan to create a swagger2 doc manually and then use it in my main() method. I'll provide a detailed answer later (~5-6 hours)





--
Funcatron, Simply Serverless http://funcatron.org
Lift, the simply functional web framework http://liftweb.net