Liberty and Bluemix: Pushing a packaged server

Share this post:

WebSphere Liberty is the next generation application server. Liberty and Eclipse make a great local development environment for developing and deploying Java EE applications to Bluemix, especially to the Liberty for Java instant runtime. Now that we have connected Eclipse to Bluemix, we can use Eclipse to push a packaged server to Bluemix.

In this excerpt from “Java EE, the next inception: Install a local Java EE development environment for Bluemix,” we’ll explore how to push a packaged Liberty server to Bluemix using Eclipse, which enables us to deploy a Liberty application and its server configuration. And with that, we will have reached the end of this series.

To start at the beginning of this series, see WebSphere Liberty: Developing Java EE applications for the cloud.

Pushing a packaged server to Bluemix

When you push an application to Bluemix, you only upload the archive file for an application. For a Java application, this is a WAR or EAR file. When you push a server to Bluemix, you not only upload the Java application’s archive file, you also upload the server configuration. This way, settings you configured in your local Liberty server will also be set in the Liberty for Java server in Bluemix.

Before packaging a server, remove any unneeded features from the feature manager’s list of enabled features to make it as compact as possible.

A server can be pushed using the command line or by using the Eclipse Tools for Bluemix. Either way, you need to specify where to deploy the application and the options for deploying the application.

Eclipse tools: Bluemix

One of the tasks listed earlier that can be performed with the Bluemix tools is pushing a packaged server to Bluemix

To push a server using the Eclipse Tools for Bluemix, you don’t even need to package the server first. Packaging the server and pushing it to Bluemix is all one task. To do this:

  1. Go to the Servers view by selecting Window > Show View > Servers.
  2. Select the server you want to package and deploy.
  3. Expand the server’s tree view to see the Eclipse projects associated with the server. These are the applications that will be packaged with the server, so remove any you don’t want to include. (Typically, you want to include just one application.)
  4. With the server selected, select Utilities > Package Server to IBM Bluemix.
  5. In the Bluemix Server dialog, specify the Bluemix server to which you want to deploy the application (Figure 1) and press OK.
Figure 1. Deploy packaged server

Deploy packaged server

If you do not already have a Bluemix server defined in Eclipse, you need to link Eclipse to one of your spaces in your Bluemix organization.

When Eclipse deploys the application to Bluemix, it begins by opening the Application Deployment Options wizard, which enables you to specify the application deployment options for deploying this application. Figure 2 shows the first page of the wizard.

Figure 2. Application details

Application details

If the application has a manifest file, the wizard uses those values as its defaults. Select Save to manifest file to save your settings for future deployments.

Once you complete the wizard and press Finish, the Console view in Eclipse shows the log as the application is pushed to Bluemix, a runtime is created, and the runtime is bound to its services. If any failures occur during the push process, they’ll be logged and shown in the console. Once the push completes successfully, you can navigate in the Bluemix dashboard to the target organization and space, and you’ll see your application listed.

You have now used the Bluemix Tools in Eclipse to deploy an application by pushing it to Bluemix.

More How-tos stories
May 3, 2019

Kubernetes Tutorials: 5 Ways to Get You Building Fast

Ready to start working with Kubernetes? Want to build your Kubernetes skills? The five tutorials in this post will teach you everything you need to know about how to manage your containerized apps with Kubernetes.

Continue reading

May 3, 2019

Using Portworx to Deploy and Manage an HA MySQL Cluster on IBM Cloud Kubernetes Service

This tutorial is a walkthrough of the steps involved in deploying and managing a highly available MySQL cluster on IBM Cloud Kubernetes Service.

Continue reading

May 2, 2019

Kubernetes v1.14.1 Now Available in IBM Cloud Kubernetes Service

We are excited to announce the availability of Kubernetes v1.14.1 for your clusters that are running in IBM Cloud Kubernetes Service. IBM Cloud Kubernetes Service continues to be the first public managed Kubernetes service to support the latest upstream versions from the community.

Continue reading