Hybrid Deployments

Deploy WebSphere Liberty on Cloud Foundry or Kubernetes Environments

Share this post:

Got Cloud Foundry? No problem, Liberty will run there

Given WebSphere’s 20 years of experience in the application server domain, it’s no surprise that Open Liberty was the first app server to support Java EE8 and that it’s one of the biggest supporters of MicroProfile. But did you know that Open Liberty is a great match for your Spring Boot applications? With the Boost plugin, you can easily embed Open Liberty in your Spring Boot application, quickly elevating its robustness and functionality by tapping into an industry-hardened Java app server.

WebSphere family

But after you have this nicely packaged application, how do you deploy it into a Cloud Foundry environment? In IBM Cloud it’s as simple as using the Liberty for Java buildpack, and it’s just as easy in environments like Pivotal Application Service (PAS). Let’s walk through this scenario!

Worry-free Liberty deployments with Pivotal Application Service

If you have chosen to deploy your application in the PAS environment, you want a higher level of abstraction and don’t want to worry about anything else except your application code.

WebSphere on Pivotal Cloud Foundry

For that reason, we have made it very easy for you to enable the WebSphere Liberty Cloud Foundry buildpack. It is now included in PivNet:

WebSphere Liberty Cloud Foundry buildpack on PivNet

Simply follow the instructions to enable this buildpack in your PAS environment, and you’re all set to supercharge your applications with Liberty. You can find more information in the official docs page.

Please note that you must still go through Pivotal’s (or any other third-party Cloud Foundry vendor) support stream first for any issues with your buildpack application. IBM’s support will only be engaged if the third-party vendor has identified and confirmed an issue with the Liberty runtime.

Consistent and controlled Liberty deployments with containers and Kubernetes

While buildpacks offer a very quick way to develop and deploy applications, a lot of enterprises have been adopting containers to gain control over their application’s environment and ensure consistency across deployment pipelines.

When it comes to running Liberty applications in Docker containers, you have a few options. You can choose between our open source Open Liberty image or our commercial WebSphere Liberty image. Customers can usually migrate from Open Liberty’s image to WebSphere Liberty by changing one (yes, just one) word on their Dockerfile.

The tremendous popularity of these Docker images (over 12.5 millions downloads as of February 2019) is largely because they are very simple to extend but also provide top performance, a rich feature-set, and a robust security environment. The WebSphere Liberty Docker image is also available as a Docker Certified image (formerly Docker Store program), which illustrates its best-of-industry design.

Create your own application image by extending Liberty’s Docker image

The best practice pattern is to extend the Liberty Docker images by creating a new image that adds your application (and, if applicable, configuration) instead of deploying the Liberty images directly and mounting volumes with the application. This scenario ensures that new Docker containers can be spawned (i.e., via a Kubernetes Pod restart) and consistently provide the exact same functionality, as they are self-contained and would not depend or mutate based on external factors.

Here’s how to build a Docker image that adds a MicroProfile application:

FROM websphere-liberty:microprofile2
COPY mpApp.war /config/dropins/

If you have a Spring Boot application, the directives are just as easy:

FROM websphere-liberty:springBoot2
COPY springbootApp.jar /config/dropins/spring/

After you have these Application Docker images, you can then push them into your favorite Docker registry:

The most basic way to deploy your Liberty application Docker image is via the basic kubectl flow:

kubectl run --image=your_image_location liberty-app --port=9080
kubectl expose deployment liberty-app --port=9080 --name=liberty-app

Where are these containers supported by IBM?

You can deploy your containerized Liberty application into any container orchestrating platform, but please pay close attention to the support statement which is specified in this document.

In summary, your Liberty container is fully supported when it is run as part of a Cloud Pak (providing extensive production-grade QoS for your container) in IBM Cloud Private or as defined in the Red Hat partnership.

If running the Liberty container natively in third-party Kubernetes, only the middleware (Liberty application) receives IBM support. For more information, please see IBM Software in Containers.

Senior Technical Staff Member | IBM Master Inventor | Application Integration Architect for Hybrid Cloud

More Hybrid Deployments stories
May 7, 2019

We’ve Moved! The IBM Cloud Blog Has a New URL

In an effort better integrate the IBM Cloud Blog with the IBM Cloud web experience, we have migrated the blog to a new URL: www.ibm.com/cloud/blog.

Continue reading

May 6, 2019

Use IBM Cloud Certificate Manager to Obtain Let’s Encrypt TLS Certificates for Your Public Domains

IBM Cloud Certificate Manager now lets you obtain TLS certificates signed by Let’s Encrypt. Let’s Encrypt is an automated, ACME-protocol-based CA that issues free certificates valid for 90 days.

Continue reading

May 6, 2019

Are You Ready for SAP S/4HANA Running on Cloud?

Our clients tell us SAP applications are central to their success and strategy for cloud, with a deadline to refresh the business processes and move to SAP S/4HANA by 2025. Now is the time to assess, plan and execute the journey to cloud and SAP S/4HANA

Continue reading