I am new to IBM Bluemix, till now the application (Spring-Hibernate-Rest App) was running on Tomcat Apache server of Oracle ecosystem but because of some requirement changes now it needs to be deployed on Bluemix (IBM), How can I migrate the Apache server to Bluemix ? Please let me know if there is any documentation/blog which I can refer to. Thanks
Edit:
I got this link which helped a lot Liberty for java, still searching for a decent source.
IBM developerWorks hosts numerous tutorials for getting started on Bluemix, such as the following: http://www.ibm.com/developerworks/websphere/library/techarticles/1306_king/1306_king.html and http://www.ibm.com/developerworks/cloud/library/cl-move-java-app-hybrid-cloud-bluemix-trs/index.html. You can also ask product-related questions at the IBM forum: https://developer.ibm.com/answers/smart-spaces/12/bluemix.html. And as Kayaman points out, Google is always a good place to start.
As you probably figured out WebSphere Liberty is the Java app server in Bluemix.
There is a migration toolkit for migrating Tomcat to Liberty: http://www.ibm.com/developerworks/websphere/downloads/migtoolkit/index.html
More about Liberty can be found on http://wasdev.net
Please take a look at this post about the migration from LAMP to Bluemix to have a good starting point.
You should also note that moving from an on-premise solution to a Cloud Foundry-based one requires some considerations regarding the local file system:
Local file system storage is short-lived. When an application instance crashes or stops, the resources assigned to that instance are reclaimed by the platform including any local disk changes made since the app started. When the instance is restarted, the application will start with a new disk image. Although your application can write local files while it is running, the files will disappear after the application restarts.
Instances of the same application do not share a local file system. Each application instance runs in its own isolated container. Thus if your application needs the data in the files to persist across application restarts, or the data needs to be shared across all running instances of the application, the local file system should not be used.
For this reason local file system should not be used.
Moreover, I think you should take a look at IBM Containers: A container is basically an application with all its dependencies, that is stored in a portable, platform-independent module (the container).
These should help. I know this is a couple of years late, but better late than never.
https://console.bluemix.net/docs/runtimes/tomcat/getting-started.html#getting_started
https://console.bluemix.net/docs/runtimes/tomcat/index.html#tomcat_runtime
https://github.com/IBM-Cloud/get-started-tomcat
Related
I'm puzzled and need clever suggestions.
I have this Java 8 web application developed with Spring Boot which runs on an Apache Tomcat server, have a Postgresql database, and make use of a RabbitMq to handle requests made via a JS client, Swagger for the exposed REST API. The main purpose is to exploit common libs like docx4j and ApachePOI to read/write excel/word files on the system.
Everything works like a charm on a local installation.
But moving to a different environment with a central server and multiple hosts (2-3 at least) accessing the client app, makes it troublesome.
The main problem seems related to Tomcat since there is the constant need to restart the main application many times.
Also Tomcat process memory keeps growing. (All streams are properly closed after any use).
No errors are thrown or logged.
Already tried to force garbage collection (even if not recommended) where possible with no improvements.
Already tried to change server (Wildfly) with no improvements.
Tried on different OS environment with no changes.
Any ideas?
Thank you for your time.
-- EDIT
Added APR support to Tomcat for better performance, still nothing. I've found a possible bottleneck in a function which makes intese use of docx4j libs for document merging. But it occurs only in this Windows environment.
I'll answer my own question.
All issues are related to application memory handling, not the environment.
I have replicated the "troublesome" environment to a different machine and still getting errors. So it is the application itself.
Thank you all for your time.
I'm trying to build my own site where initially I will only host my profile and resume but will also build and publish some simple web applications that I can use as coding samples for jobs. The idea is people can see a demo of the apps and then see the code on github.
Can I do all this using only tomcat or should I use another server for this purpose?
I have heard that tomcat should only be used for java web applications but I've tried it locally and it seems to work...
You can totally do it all with tomcat.
Arguably, tomcat is not as efficient as apache or ngnix for serving static assets, 10% less so, and does not scale as well. There's a good article on the subject here:
http://tomcat.apache.org/tomcat-3.2-doc/tomcat-apache-howto.html
This is not not going to be an issue for you with a small site. Go with what gets you up and running the fastest.
If you want, later you can show off your technical prowess by running tomcat behind a web server. You can tell folks at interviews the story.
Could anyone educate me a big piture of the Amazon EC2 Unix instance? I would like to know how Tomcat works in an EC2 instance so that in the future I know how to reconfigure/customize it.
After I create/launch a new EC2 instance running with Tomcat server, everything seems to be well set up. It does not require additional configuration to have the Tomcat running and to deploy.
When I connect to my instance and walk through this UNIX server, I have no idea how the structure is designed. For example, where is Tomcat located and what is linking to the Tomcat so that from AWS managment console UI I can just start/stop the server with a few mouse clicks.
-
Please have me clarify if you found my statement unclear.
I have worked on linux version and in it you can find tomcat home directory(if prior included)
at /usr/share/tomcat .User can use putty to log in to that.
You might want to have a look here
Your best bet is to install Tomcat yourself, from the packages you can find at tomcat.apache.org. You can install it on any OS you want, on any flavor of machine you can launch within EC2. You'll also get patches more quickly than the distro maintainers can, the file layouts will make sense, and you can get all the help you need from the Tomcat community via their users' mailing list without having to first explain that you have no idea where Tomcat is installed, where the configuration files are, etc.
Do you really need point-and-click starting and stopping of Tomcat?
If you just want to deploy a web application into the AWS Magic, consider using Amazon Elastic Beanstalk. I haven't used it, but it if actually does what they claim it does, it's pretty magical.
I have no idea how the structure is designed. For example, where is Tomcat located and what is linking to the Tomcat
Assuming you're referring to Linux instance (again which Linux instance is another question)
but to answer what you want, run below commands on your instance:
# updatedb
# locate tomcat
The output of 2nd command will list you all the files/directories which has tomcat in their name. This way you will be able to figure out the location where Tomcat resides.
I may be barking up the wrong tree here -- it's relatively easy to wrap a vanilla Java app in a daemon/service -- but it'd be really helpful for deployment if we could push pure Java apps onto a Glassfish server and have them start up automatically.
We use JMS to connect this app to several other beans living on the Glassfish server. We are actually using glassfish to "deploy" it to the production machine, but it doesn't start automatically. Have been looking into JCA, but it doesn't seem like quite what I'm looking for.
Thanks!
If your 'pure Java app' is packaged as .war you could add a ServletContextListner to your app that gets called when the application is loaded and that performs the starup of the application...
I'm doing some portlet development for IBM WebSphere Portal 6.1. However, the deployment process is painfully slow. As this is my first time doing portlet development, I'm not too familiar with the various portal servers out there. I'd like some recommendations for a lightweight portal server on which I can deploy quickly for development.
Pluto is the answer!
http://portals.apache.org/pluto/
I'm very happy now. :)
I believe Liferay has become Sun's adopted strategy, if that has any bearing.
If you are using Websphere Portal server, you can use the lazy load of portlet applications at server startup. This would help in less server startup times as it would not start many administrative applications.
For more information, follow this link
http://www-01.ibm.com/support/docview.wss?uid=swg27015437
Hope this help you :)
I'm not familiar with each of their deployment characteristics, but here is a list of open source portals in Java: http://java-source.net/open-source/portals
I was in a similar situation a year or two ago.
The server takes a long time to come up regardless, but it doesn't actually have to be restarted with any little change. You only have to restart the server with major changes, otherwise, restart or redeploy the project to the server.
Nevertheless, the system wasn't snappy until I had three gigs of ram. I'd recommend first upgrading your workstation to support the server. They're called workstation class systems for a reason :) Get yourself an 8gb machine and tell your boss you will be twice as productive :)
I typically use hotdeployment of changes Java classes and JSP pages. This is the fastest way. We shared 1 server with 5 developers using hotdeployment of classes to PortalServer/installedApps/.ear/yourportlet.war and this worked great. However, now and then we did have to restart the server. If you changed deployement descriptors you still need to re-deploy the portlet WAR. Make sure the reloadingEnabled flag is set to false for the wps.war app on your development machine (restart picks up the change).
You can use developer mode explained here:
http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1/index.jsp?topic=/com.ibm.wp.ent.doc_v615/install/chg_dev_mode.html