2021 Call for Code Awards: Live from New York, with SNL’s Colin Jost! Learn more

Archived | Build and deploy cloud-native Java applications using IBM Cloud Pak for Applications

Archived content

Archive date: 2021-02-25

This content is no longer being updated or maintained. The content is provided “as is.” Given the rapid evolution of technology, some content, steps, or illustrations may have changed.


IBM Cloud Pak for Applications helps you modernize existing applications and develop new cloud-native applications that can quickly deliver value. This code pattern demonstrates the Accelerators for Teams feature of IBM Cloud Pak for Applications by developing a cloud-native application and deploying it on Red Hat OpenShift using CI/CD features.


Enterprises are moving towards cloud-native development for a host of benefits. However, to realize the benefits of cloud-native development, enterprises must overcome the challenges of retaining enterprise governance and the cost of building new skills and transforming end-to-end development practices.

The Accelerator for Teams for cloud-native solutions are designed to speed up the development of cloud-native applications by providing an end-to-end journey from a business problem to a production application. It provides enterprise governance by bringing together application stacks, integrated DevOps, and a choice of developer tools. Cloud-native services are even faster because Accelerators for Teams automatically generates the development projects, services, and configuration settings that can deploy your application to a Red Hat OpenShift cluster. All your development teams need to do is code your business logic.

Developer experience for IDEs is provided by Codewind, which is used for creating, building, running, and profiling applications. Tekton pipelines provide consistent, managed, and governed CI/CD processes that react to repository events that occur during code development.

In this code pattern, you will develop a simple cloud-native Java weather application with a simple interface that accepts a name or latitude/longitude of a location and provides basic weather details of the location using Open Weather API.

When you have completed this code pattern, you will understand how to:

  • Build a simple Java application using Codewind on Eclipse
  • Use Tekton pipelines to deploy the Java application on OpenShift using CP4A


Architecture diagram for building cloud-native Java apps using IBM Cloud Pak for Applications

  1. User installs Codewind and adds the stack hub provided by IBM Cloud Pak for Applications on an IBM managed OpenShift cluster.
  2. User develops an application using a project template that is available in the added stack hub.
  3. User pushes the developed application code to a GitHub repository.
  4. User configures Tekton Pipeline and defines GitHub Webhook on IBM Cloud Pak for Applications.
  5. Tekton pipeline builds and deploys the application to OpenShift cluster whenever there is code change event in the GitHub repository.
  6. User accesses the deployed application.


Find the detailed steps for this pattern in the readme file. The steps will show you how to:

  1. Install Codewind and Appsody.
  2. Add project templates to Codewind.
  3. Create a project in Codewind.
  4. Get API Key from Open Weather API.
  5. Run the application locally.
  6. Prepare application to be deployed to IBM Cloud Pak for Applications.
  7. Push application code to GitHub repository.
  8. Create token for your Github.
  9. Configure and execute Tekton Pipeline.
  10. Access the deployed application.