Custom Liberty server.xml configurations in IBM Bluemix

Share this post:

Bluemix is great because you can simply push your Java EE application (WAR or EAR) and select what services your application needs. You don’t have to worry about the server configuration because it’s generated for you by the Liberty buildpack. Ideally, you should write your application in such a way that this generated configuration works for your application. However, sometimes you may need to modify server.xml in the standard Liberty deployment because you need to:

  • Enable a Liberty <feature> that is not enabled by the generated server.xml
  • Set a generic JVM argument in jvm.options.
  • Provide a shared library that resides outside the WAR defined in your server.xml

For these cases and others, you will need to package your Liberty server and push the package to Bluemix instead of the WAR or EAR. This packaged zip file will include everything in wlp/usr/servers/<yourservername>. It will contain the modified server.xml, your application and some other files.

server.bat package videoServer --include=usr

To package this server issue this command:
cf push MyBluemixApp -p

And then, push the zip to Bluemix:

(The Bluemix Eclipse plug-in makes this even easier.)

To see the command line or the Eclipse method in action, I created a video showing how to modify server.xml, package this server, and push it to Bluemix. The documentation “Options for pushing Liberty applications” provides additional details. Enjoy! If you have questions or comments, please post them below.

IBM Cloud Technical Offering Manager

More stories
May 1, 2019

Two Tutorials: Plan, Create, and Update Deployment Environments with Terraform

Multiple environments are pretty common in a project when building a solution. They support the different phases of the development cycle and the slight differences between the environments, like capacity, networking, credentials, and log verbosity. These two tutorials will show you how to manage the environments with Terraform.

Continue reading

April 29, 2019

Transforming Customer Experiences with AI Services (Part 1)

This is an experience from a recent customer engagement on transcribing customer conversations using IBM Watson AI services.

Continue reading

April 26, 2019

Analyze Logs and Monitor the Health of a Kubernetes Application with LogDNA and Sysdig

This post is an excerpt from a tutorial that shows how the IBM Log Analysis with LogDNA service can be used to configure and access logs of a Kubernetes application that is deployed on IBM Cloud.

Continue reading