How to install/run Spark Java Framework on AWS Elastic Beanstalk?
Asked Answered
B

2

6

Normally, I build a Java web app using Tomcat or Glassfish into a WAR (web app archive file). This file can easily be deployed into AWS through Elastic Beanstalk with a few clicks. The integration is simple because Elastic Beanstalk allows us to deploy a web app on Tomcat/Glassfish/Java.

I recently started using a lightweight java framework called Spark, www.sparkjava.com . Is it possible to deploy this on Elastic Beanstalk in a few clicks? If not, is there an alternative to easily deploy a Spark Java web app onto AWS? Or, would I need to create an EC2 instance, copy the JAR app, and launch the JAR web app via command line?

Bleachers answered 17/12, 2015 at 2:22 Comment(0)
I
6

Sure you can, either by deploying it as a war via the Tomcat platform, or run it as a fat jar via the Java SE platform.

Ingrained answered 26/1, 2016 at 16:36 Comment(0)
B
0

I published an Archetype for AWS Elastic Beanstalk that uses DropWizard instead of Spark (but both use Jetty) - It should be pretty straightforward to adapt it to Spark. Note it uses the Docker Solution Stack (more flexible and easier to debug locally). This command should get you started:

$ mvn archetype:generate -Dfilter=elasticbeanstalk-docker

Also, AWS allows you to create a custom Java Application, like @k.liakos said in his answer.

Benefice answered 27/1, 2016 at 3:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.