We have a simple app that runs on tomcat7 and has been working for about a year. We're planning to kick the tires on Bluemix and we would like to know if there's any information that can assist us in this effort. I saw a post that discussed migrating apps from WebSphere Application Server v7 to the Liberty profile but I didn't see any reference to Tomcat. Any documentation or samples you could provide would be appreciated.
相关问题
- Tomcat and SSL Client certificate
- Can't configure nginx as a proxy for tomcat wi
- Tomcat 8 how to remove sessionCookieName from URL
- tomcat websocket servlet listening port
- How to configure quartz scheduler with spring-styl
相关文章
- Tomcat的User信息可以存储到数据库中吗?
- tomcat的server.xml支持从Oracle中获取数据吗?
- web项目,Resonse Header发生解析错误,请大牛帮忙看看究竟是哪里的问题?
- Apache+Tomcat+JK实现的集群,如果Apache挂了,是不是整个服务就挂了?
- linux环境部署jpress,创建数据库时提提示连接失败
- Making a two way SSL authentication between apache
- Can't start Tomcat as Windows Service
- How to abort Tomcat startup upon exception in Serv
As others have explained, Bluemix includes the
java_buildpack
buildpack, which includes Tomcat. To use it to create a runtime in Bluemix using this buildpack, run this command:You might wonder: What is this buildpack and what is it doing?
You can see the list of buildpacks avaiable in Bluemix. Run this command:
The output (as of today) is:
As you can see, the
java_buildpack
buildpack is implemented byjava-buildpack-v2.7.1.zip
. That is documented in Java Buildpack v2.7.1. As the docs show, the buildpack includes Tomcat v8.0.20.You can also see that the
liberty-for-java
buildpack, which creates the Liberty for Java runtime in Bluemix, is implemented bybuildpack_liberty-for-java_v1.18-20150519-1642-yp.zip
, which is v1.18 of the buildpack. If you need the previous release, you can use theliberty-for-java_v1-17-20150501-1729
buildpack, which is v1.17 of the buildpack. Options for pushing Liberty applications explains how to use the buildpack.You can also see the buildpacks for Node.js (
nodejs_buildpack
), PHP (php_buildpack
), and so on. There's even a buildpack for ASP.NET 5 (aspnet5-experimental
).I would recommend the below command:
This will use the built-in Java buildpack in Bluemix. The benefit of this approach is that you always get the version of the java buildpack that matches the current CloudFoundry level in Bluemix. If you use the external git master, it may or may not work.
Yes, you can run your application on Bluemix, however, due to config information spread out in a few different xml files (server, content & web come to mind) on Tomcat, I suggest you take a staggered approach to moving your app. You first need to get your app working on the WebSphere Application Server V8.5.5 Liberty Profile, then you can push a server package to Bluemix.
Essentially, you want to do the following:
1) Migrate your Tomcat application and server config to the Liberty profile using the WebSphere Application Server Migration Toolkit - Competitive Migration. The article below provides details on the usage of this tool:
http://www.ibm.com/developerworks/websphere/downloads/migtoolkit/compmig.html
2) Test your app on the Liberty Profile
3) Push the Liberty Server package to bluemix. I've found the article below useful for pushing server packages:
https://developer.ibm.com/bluemix/2015/01/06/modify-liberty-server-xml-configurations-ibm-bluemix/#
Yup. You can use the community Java buildpack to use Tomcat as your Java runtime.
cf push -b https://github.com/cloudfoundry/java-buildpack.gitEdit:
Doc for Tomcat buildpack: https://github.com/cloudfoundry/java-buildpack
The pre-installed buildpack name or external url after
-b
option is the open source java Tomcat buildpack. When pushing a Java application, if you don't specify a buildpack name or url, the default Java buildpack will be chosen. In Bluemix, the default buildpack is the WebSphere Liberty buildpack.Doc for Liberty buildpack: https://www.ng.bluemix.net/docs/#starters/liberty/index.html#optionsforpushinglibertyapplications