Can I run my Tomcat app on Bluemix?

前端 未结 4 1512
忘掉有多难
忘掉有多难 2020-12-11 20:56

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 info

4条回答
  •  轮回少年
    2020-12-11 21:34

    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:

    cf push  -b java_buildpack -p 
    

    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:

    cf buildpacks
    

    The output (as of today) is:

    Getting buildpacks...
    
    buildpack                              position   enabled   locked   filename
    liberty-for-java                       1          true      false    buildpack_liberty-for-java_v1.18-20150519-1642-yp.zip
    sdk-for-nodejs                         2          true      false    buildpack_sdk-for-nodejs_v1.18-20150519-1759-yp.zip
    noop-buildpack                         3          true      false    noop-buildpack-20140311-1519.zip
    java_buildpack                         4          true      false    java-buildpack-v2.7.1.zip
    ruby_buildpack                         5          true      false    ruby_buildpack-cached-v1.3.0.zip
    nodejs_buildpack                       6          true      false    nodejs_buildpack-cached-v1.2.0.zip
    go_buildpack                           7          true      false    go_buildpack-cached-v1.2.0.zip
    python_buildpack                       8          true      false    python_buildpack-cached-v1.2.0.zip
    php_buildpack                          9          true      false    php_buildpack-offline-v3.1.0.zip
    aspnet5-experimental                   10         true      false    buildpack_aspnet5-experimental_v0.1.5-20150508-1205.zip
    liberty-for-java_v1-17-20150501-1729   11         true      false    buildpack_liberty-for-java_v1.17-20150501-1729-yp.zip
    sdk-for-nodejs_v1-17-1-20150519-0951   12         true      false    buildpack_sdk-for-nodejs_v1.17.1-20150519-0951-yp.zip
    

    As you can see, the java_buildpack buildpack is implemented by java-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 by buildpack_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 the liberty-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).

提交回复
热议问题