I have a regular netty application server that runs on port 44080 and is built as a .jar file. I would like to use elastic beanstalk to manage the lifecycle of the application. Is there a way I can deploy the jar or something similar using elastic beanstalk?
It seems netty is currently not supported by elastic beanstalk. If your application can also run on Tomcat, you could do that - with Tomcat, you just need to enter some basic settings in the webinterface and you´ll get a fully working environment where you can upload jar files to.
If you need netty as a platform, you could try using Amazon OpsWorks. I never worked with it myself, but I know you can create your own "environment configurations" there. You´d basically create a few scripts to setup your server and deploy your application and OpsWorks lets you execute those through the web ui and also provides capabilites for auto-scaling, failover, etc. in OpsWorks environments.
There's nothing wrong about using Netty. In fact, one of our archetypes for AWS Elastic Beanstalk contains support for Dropwizard (by using Docker as its stack), thus not being dependent on a Java Web Container.
$ mvn archetype:generate -Dfilter=elasticbeanstalk-docker-dropwizard
It might need a few tweaks, but the overall idea is to package all your dependencies into a zip file and deploy it. Also, make sure your Dockerfile EXPOSEs port 44080.
Related
I have a Spring-Boot Application with REST API (Maven build and MongoDB Database). I will also make a UI with Angular 2 on top of that (npm build).
What i would like to do is, to host this site, with its backend & database on a server. Can i do that on my Synology NAS (DS216j)? Or should i better buy a small computer like Raspberry Pi 3?
I have heard somewhere that we can deploy our apps in Docker, and Synology has a docker app or sth? Will this help me reaching my goal? I would like to have a step by step guide from your similar setups.
As far as I understand, you only want to get your app running on your NAS, so using Docker would be an option, but no requirement.
According to the model-specific download page, your DS216j supports Java8.
So what you have to do:
Install Java on your NAS
Package your application as standalone jar-file: If not yet done, you can do that in your pom.xml (see Spring Boot documentation for details; btw, this standalone mode is one of the best features of Spring Boot)
Now you can upload the jar-file
Run it via the command line with java -jar <jar-file-name>.jar
Just make sure that the port of your app does not conflict with the ports used by your NAS.
You could also create a Docker image from your app and run it on your NAS, it seems like your model supports Docker: https://www.synology.com/en-us/dsm/packages/Docker. But that would create some extra effort, but no added value, from my point of view.
I create maven project with dependencies. Than write simple jetty server which return html page on request. Simple "Hello World" application. Now i want relocate it on jelastic cloud, but can't understand how.
When creating cloud on jelastic you can add jetty server, but i need run my own. Maybe i need connect my servlets or another things. Or maybe i can run server.jar file which assembled by maven.
My google traveling failed. I even not imagine what i must search. Pls help me.
Indeed, you can't up your own servers on the native containers. Moreover, such containers don't provide the root access for a customer.
If you want to run your own server you can use either VPS or Docker solution in Jelastic Cloud.
I need to deploy my Java application on Azure Cloud Service. I don't want the extra overhead that comes with managing my own machines using Azure VM, which is an IaaS, nor do I want to use App Service, since the max cores per machine is 4- My application is very compute intensive and I would like to use at least 16 cores per instance, which Azure Cloud Services provides(D5v2 instances).
My build system is Maven and I would like to use something like Codeship to build my .war and deploy it to Azure Cloud services(rather than using the Azure Eclipse SDK to manually Publish to Azure Cloud Services). I've spent hours on the Azure documentation, but haven't found any way of doing this.(Azure App Service has a simple 'upload a war to deploy' model. I dont know why the same isn't there for cloud services: https://azure.microsoft.com/en-in/documentation/articles/web-sites-java-get-started/).
Remember that Cloud Services are the original deployment mechanism for Azure, dating back to 2010 (ok, 2009 if you want to count pre-production days). The .cspkg format is pretty much the same as it ever has been. The Web Apps deployment mechanism is completely different.
Eclipse (on Windows) has a specific plugin available for constructing .cspkg which you can then automate deploying, via PowerShell or CLI.
Alternatively, you can bundle your .war files within a .cspkg generated by Visual Studio, and then get things started within `OnStart(). Again, you can automate deployment from scripts - no need to ever publish directly from within an IDE.
Also: There's nothing stopping you from your automation process pushing .war files to blob storage (or somewhere else) and then sending your app some type of message letting it know to update itself. At that point, there's no redeployment of a .cspkg - rather, it's just downloading a new .war to running web/worker instances and restarting the java process.
#DylanColaco, As #DavidMakogon said, you can install the plugins named azure-tools-for-java for Eclipse or IntelliJ IDEA to deploy your war file as web/worker role instance into cloud service.
And there is an offical tutorial which shows how to getstarted.
As references, you can refer to the article lists and a very helpful vedio at Channel 9 below.
For Eclipse, https://azure.microsoft.com/en-us/documentation/articles/azure-toolkit-for-eclipse/
For IntelliJ, https://azure.microsoft.com/en-us/documentation/articles/azure-toolkit-for-intellij/
Java Applications in Windows Azure Cloud Services using Eclipse
I need portable container for running web services as server. JSON as a response. The server application must be able to start up using .bat script under Windows. Machine running the server must have only Java Runtime Enviroment installed, no other stuff required.
Axis2 on top of Tomcat do not seem like simple portable web server. What are the other alternatives?
UPDATE:
How come no one offered?
com.sun.net.httpserver.HttpServer;
and
com.sun.jersey.api.container.httpserver.HttpServerFactory;
Jetty is a good option.
Another very lightweight option is fluent-http.
I'm not that familiar with Axis2, but as far as I know you can use embedded tomcat to achieve this with whichever frameworks you please.
Take a look at the tomcat maven plugin which I believe will even generate your application as a jar containing embedded tomcat in the latest version.
I am getting started with AWS plugin for Eclipse (Juno)
I've seen that it is possible to deploy some app on Amazon Elastic BeanStalk, which is great, but I'd prefer to deploy it directly to a specific EC2 instance (mostly for cost optimisation)
Has anyone done that before, or will I have to write my own Eclipse plugin to do so ?
According to :
http://blog.rajithdelantha.com/2011/10/complete-guide-to-deploy-java-web.html , creating an EC2 server (to be used like a Tomcat) is possible, but I can't find the option, I just have Tomcat6/7 for EBS.
With an EC2 server you can run whatever web server you want, it's basically just a VM. You could run Tomcat, Jetty, JBoss, etc. Almost all of those web servers have plugins or tools to enable deployment from Eclipse which are completely independent of Amazon. For example, if you choose to setup Tomcat on your EC2 server then you could follow these (there may be newer) instructions.