Import existing project to heroku - java

I have an existing Spring MVC project. I want to upload this to heroku but I don't know how.
I installed heroku following this tutorial. Can anyone please point me in right direction, for how can I import my existing Spring MVC project to heroku

I am trying to do a similar thing at the moment, but I am deploying my application to CloudBees. This article explains how to deploy a Spring MVC application to a number of PaaS hosting providers (CloudBees, CloudFoundry, Heroku, Windows Azure, OpenShift, Elastic Beanstalk and Google AppEngine). It was of some help to me. Maybe it will be useful to you too. You could also have a look at this article which compares all these services.
If you decide to go with CloudBees, note that they will host your application on Tomcat 6 by default. If you need another server (Tomcat 7, JBoss, GlassFish, etc.) you can switch it easily, but you need to download their SDK
and deploy your application with the bees app:deploy command-line tool which is a part of the SDK.
They have simple and detailed instructions on deployment, DB configuration etc.
UPDATE:
This answer is not relevant any longer, as CloudBees are going to stop providing application hosting services (both free and paid). I received an email from them which says that they discontinue free accounts on 24 September 2014.

Related

AWS Elastic Beanstalk (single instance) : how to enable HTTPS for a Spring Boot application?

I recently started exploring AWS and have successfully deployed a Spring Boot application on a single Elastic Beanstalk instance.
As a next step, I'd like to have my application use HTTPS. Given that my app is packaged as a jar, I strictly followed this official documentation: Terminating HTTPS on EC2 instances running Java SE.
But my app still works with HTTP only. Did anybody managed to do so ? Any help or link to a working example would be appreciated.
Some technical details about my app: it's a Maven-based Spring Boot project. As explained in the doc, I've created the +.ebextensions+ folder with all the config files at the root of my project. I then used maven-antrun-plugin to include the .ebextensions folder in the jar file.
Thanks in advance for your answers.
Its likely that you are using current version of EB, which is for Amazon Linux 2 (AL2); not stated in the question what is used. The tutorial you've linked uses old version of the EB, which is for Amazon Linux 1 (AL1).
Subsequently, it will not work. Specifically, the nginx settings from the tutorial (.ebextensions/nginx/conf.d/ and .ebextensions/nginx/conf.d/https.conf) will be ignored. The reason is that for AL2, the nginx settings should be provided using .platform/nginx/conf.d and .platform/nginx/nginx.conf.
Also please be aware that there are many differences between AL1 and AL2 in EB, and more changes may be required in the tutorial to make it work on AL2:
Migrating your Elastic Beanstalk Linux application to Amazon Linux 2
Since its not explicitly stated in your question, which version of EB are you using, if this is indeed AL2, you could try running your app using old version of AL1. This at least would enable you to confirm that it actually works. Then you could think of how to port it to AL2.

How Does One Deploy a Jersey Application to a Remote Tomcat Server

I need to state up front that I am not a Java developer. So it is fair to assume that I know very little about the tooling etc. that Java dev's will be naturally familiar with.
So, I have created a Jersey web api (2.25.1) on my home server running Windows 2012. It serves data to a Xamarin application. I need to deploy this to a Linux server (Ubuntu) on AWS which my friend spun up.
At the moment, the only access I have is via SSH (Putty).
Tomcat (and Glassfish) have been installed on the Linux machine.
How do I go about deploying that application to that AWS server?
The official Jersey documentation seems to be MIA, and my Googling efforts don't yield much. There's a lot of SO questions with a similar title to this one. But I have not found any of the answers (and in many cases, questions) helpful to my cause.
Cheers
I assume that you are using maven to create your jersey web app .
Upon build you will get a *.war file .Copy the same to tomcat/webapps folder .
Start your tomcat then.
To take your file there on remote use winscp tool with your ssh credentials.

Deploy Java restful web service to live server

I have just learned to create java rest API using jersey and Oracle database.
I'm developing in eclipse and using weblogic server to run and test web service on localhost.
My question is what are the options of live servers to deploy this service so that I can access this API in my android application or any web application???
You can do that. But you have to make sure that all the dependent jars are packaged with the your WAR project(eg; Oracle db related things).
Some blog entries which give you an idea about what are all these servers and which one to pick for open development and common standards - http://blogs.forrester.com/mike_gualtieri/11-07-15-stop_wasting_money_on_weblogic_websphere_and_jboss_application_servers,
and this one http://zeroturnaround.com/rebellabs/the-great-java-application-server-debate-with-tomcat-jboss-glassfish-jetty-and-liberty-profile/
This will give pretty good idea about what is all these servers :)

linking my java web application to the web?

I am beginner java web developer, now my question is after i developed my application, how to make users see it on the web?
I used JSF,MySQL and GlassFish server in my development stage and now i want to publish it.
I got a domain name and an a web hosting account on goDaddy.com
In other words what to do after i develope my web application?
what steps should i take in server creation and other stuff?
I have searched alot but there is no specific way for it. I am trying to make this dynamic website based on jsf development--and it is already done--become alive and out their like any other web site?
any guide lines and steps should i take in making this steps ?
Either you will need a "Production" server to host the application yourself or use a hosting service of some kind that provides a Java EE container. If you're tied to Glassfish, you can Google for those providers like http://glassfishhosting.com/.
Other options that might be good fits for you are cloud services. Something like either Rackspace or Amazon EC2. Each has their own pricing tiers that scale based on usage. Good luck to you going Live!
Can host the code on Github and push it to Heroku.
http://devcenter.heroku.com/categories/java
I don't know the provider you chose but you need a java application server for your live environment. And optimally this should be the same server as your development server.
For our projects we buy a virtual server and install Glassfish on it. This costs around 15 € per month and we have the same environment for development and production.

How do I migrate a Java webapp to Heroku

I have an app that uses Spring and is run with Jetty. I was hosting it on an Amazon EC2 instance but now I want to put it on Heroku. If found the following link but I don't know if it covers everything and since I'm new to Heroku and, to a lesser extent GIT, it seems overwhelming:
http://blog.neo4j.org/2012/01/spring-onto-heroku.html
Does anyone have experience doing this and if so what is the first step? I do have a test Java app running on Heroku.
The Heroku Dev Center should answer most of your questions:
http://devcenter.heroku.com/categories/java
In particular, the Spring MVC example article should help you get started:
http://devcenter.heroku.com/articles/spring-mvc-hibernate

Categories

Resources