I have a full stack web application that I want to host on Heroku. I have never deployed a web application so I don't know where to begin. Can anyone help me out? The frontend is HTML/CSS/JS(angular) and the backend is java(spring) if that helps.
This guide pretty much goes through everything that you need to do to deploy to heroku.
Basically, if you have your code hosted on github already, you can just create the app on heroku, add a heroku remote (git add remote 'git#heroku.com:yourapp.git') and push to heroku (git push heroku master). If you are unfamiliar with git, I suggest you start with that.
First and foremost, Heroku has a developer manual here Heroku Java Development Going through that, you will realise that Heroku gives you tomcat/jetty support only, but you must use embedded versions, and fireup everything on your own.
I guess since you have to fireup everything on your own, using even a full-fledged javaee could be possible, the only problem is firing it up, and tomcat/jetty gives you an easier option.
Related
I'm currently running my Java application on a GlassFish server on AWS-EB.
Since our front-end is already running on the Google Cloud Platform, I would like to migrate my back-end to GCP as well.
I tried the Jelastic interface but I was not happy with the speed results.
Now I'm looking to deploy my application on the App Engine but when I deploy my current .war file, I get the following error:
Error 404 - Not Found.
No context on this server matched or handled this request.
Contexts known to this server are:
/ ---> o.e.j.w.WebAppContext#7e0b0338{/,file:///var/lib/jetty/webapps/root/,UNAVAILABLE}{/root.war} [failed]
I guess I'm missing something, since GCP is using Jetty as a server.
I'm a bit lost and I hope you guys can point me in the right direction to make this migration successful.
It's suggested here that Jetty requires two configuration files (web.xml and applicationContext.xml).
As well as this, the original poster in the issue above stated that they solved their issue in this GitHub post by rebuilding their project before deploying.
I have tried to search online for hours but unable to find a correct guide on deploying a web application on softlayer bare metal server.
My web app is developed in JAVA and the web server I use is tomcat7. I already exported the application into a war file from my eclipse IDE.
Now I am not sure how I can proceed. Any help is deeply appreciated! Much thanks in advance!
Cheers.
One thing that can help you, would be to order a VM with MySQL, once it's done you will have to install Tomcat on it and deploy your web app (war file) to it. Also you could buy a certificate to run https since self-certificate are not supported.
There's also some other add ons that you might be interested on, and you can see them when you're placing an order.
The next link can help you with the database:
https://knowledgelayer.softlayer.com/topic/databases
Hope it helps.
I have a Spring MVC project running locally on tomcat right now. What I need to do to be able to run it on my linux server? How can I deploy it? Before I used firezilla(running usual jars) to connect to server using ssh. Please help me by writing easy steps on how to run web application on server, thank you.
There are a lot of answers to this just have to google (i found about 10 in first couple pages that were good).
It all varies based on your environment, build setup etc.
Here is example of deploying with maven to tomcat
http://www.mkyong.com/maven/how-to-deploy-maven-based-war-file-to-tomcat/
and another
http://bitbybitblog.com/deploy-to-tomcat/
Some IDEs also have inbuilt functions that take care of this for you as well.
I have coded a Jersey based java server which is all wrapped in one excecutable jar.
I am looking for a web host service in which i can deploy the jar and run it.
I saw some dedicated servers which can do this but this is overshooting the need, any suggestions?
As per your comment I understand that you created a web application with a Jetty embedded server.
I think the best solution for you in this case is to get a virtual machine host, install JRE, upload your *.jar and run it from there. Given firewall permissions and correct configuration you should be able to receive requests on the 80 port. Cons? It costs. A lot.
Most of the Java hosts have already a servlet container running (almost always Tomcat) and you can only deploy your web application in it. Having an embedded Jetty server messes up everything for you.
I strongly suggest you to detach your web application (or as you called it REST server) from Jetty and deploy the *.war in any of the multiple free Java hosts to test it online.
EDIT
Thanks to you I made a deeper research on the topic and found an interesting guide to deploy a web application with embedded Jetty server in Heroku. I've never tried it nor I know if its free, but maybe you can give a try.
Digital Ocean work pretty well for me. Their basic packages are really cheap and you get root control over your own machine, meaning you can host whatever you want without restrictions. The only downside is that they are pretty old school - you have to set up EVERYTHING yourself, including firewalls etc. There are a lot of guides available on their website though, which makes life a lot easier!
http://www.digitalocean.com
I know this is a touch redundant but I don't have voting or comment rights yet so this is the only method for me to communicate.
Digital Ocean is a solid choice. I am paying 5$ a month for a VM with 512 Mb Ram and 20 gigs of storage (which for my use is just fine.) I am still working on my first proper deploy but as stated above there are tons of tutorials to guide you through it. I have no prior command line experience but I've managed to get the server running, Created an SSH key, uploaded my landing page and have gotten a test project using Spark as the embedded server up and functional in a matter of a few hours. The Droplets are easily scalable from what I've seen. I'm still having trouble deploying an Rest based app with Postgres as the DB but it seems more to do with the ports in play than anything else. Keep getting 404s.
I have a REST service, that uses Jersey, deployed on my local machine. The service does not use an ORM. Instead, it uses the JDBC driver to populate models from my MYSQL database. Everything is working as expected and now, I would like to deploy my service onto Openshift. I have read up on how Openshift works and I'm a little confused. I do not have any experience with GIT, so I found myself getting lost when the Openshift website told me to push my application to their servers via GIT.
I am looking to have my REST service, as well as MYSQL database moved to the Openshift server without making changes to my existing code. This is my first time deploying a web service on something other than localhost so any leads, regarding what to do research on to get what I want would be very much appreciated.
I've been using OpenShift to host some personal projects, and I can feel your pain when you get a little lost with how to do it. I had been using Git for awhile though so that helped.
This page. is what helped me get the tools set up for git correctly. They require ruby, and node, so you'll have to install those as well. Once you get everything set up though, you'll basically "Clone" the repository that open shift gives you which will create a local instance of the repositories contents in your computer. You can then use the commands "git add", "git commit" and "git push" which will push your changes back up to their server.
Good instructions exist on this page describing what I just told you. From what you said it looks like you've completed steps 1 + 2, but steps 3 and 4 are still left. You have to have your command line tools set up first however. Let me know if it helps!