Extending support to Spring Boot for Red Hat OpenShift Application Runtimes

Extending support to Spring Boot for Red Hat OpenShift Application Runtimes

What Red Hat is providing

Red Hat OpenShift Application Runtimes (RHOAR) is a recommended set of products, tools, and components for developing and maintaining cloud-native applications on the Red Hat OpenShift platform. As part of this offering, Red Hat is extending its support to Spring Boot and related frameworks for building modern, production-grade, Java-based cloud-native applications.

Spring Boot lets you create opinionated Spring-based standalone applications. The Spring Boot runtime also integrates with the OpenShift platform, allowing your services to externalize their configuration, implement health checks, provide resiliency and failover, and much more. To learn more about how Spring Boot applications integrate with the wider Red Hat portfolio, check out the following OpenShift Commons Briefing by Thomas Qvarnstrom:

Versioning

Red Hat is initially supporting Spring Boot 1.5.17 on Red Hat OpenShift. Support for Spring Boot 2.1 is planned for early 2019. Spring Boot 2.1 adds additional features and frameworks, but many Spring Boot 1.5.x applications remain in production today, so supporting both is critical for our existing customers and wider development communities.

Support details

The Spring ecosystem contains many popular frameworks for building various application types. When used with RHOAR, support from Red Hat is limited to those frameworks primarily targeting modern cloud-native microservice applications, along with frameworks originating from upstream open source communities that Red Hat actively participates in or leads. The list on this documentation page shows exactly what is included, and it will be updated for 1.5.17 in the coming weeks. Red Hat customers can also refer to the Spring Boot support page on the customer portal for additional detail.

Here’s a quick rundown of the type of support included with this offering:

  • Configuration support. Red Hat will help customers with Spring Boot configuration so it runs properly on OpenShift. This is no different from helping customers properly configure Red Hat products.
  • Workaround support. As with any product, if a Spring Boot application is not working as developers assumed it should, but in reality, it is actually working as defined, then in these cases, Red Hat will work with a customer to help find another means of achieving a solution.
  • Product integration support. RHOAR’s Spring Boot support includes support for many Red Hat–led open source frameworks and platforms. Some examples include OpenShift, Tomcat, Undertow, and Red Hat Single Sign-On/Keycloak. This list continues to grow over time as Red Hat continues to integrate Spring Boot with more of Red Hat’s product portfolio.
  • New feature requests. Red Hat will entertain Red Hat product feature requests to optimize Red Hat product usage with Spring Boot applications. When reasonable to do so, Red Hat will work upstream within the Spring community to advocate on a customer’s behalf for requested Spring Boot functionality.
  • Bug fixes. When bugs have been identified in Spring code, Red Hat will work on addressing those bugs. For non-critical issues, Red Hat will work in the upstream Spring community to address the issue. When an issue is addressed within the Spring community, the fix may be available in a future Spring update. For critical severity 1 issues that Red Hat can immediately address, Red Hat may provide the customer an immediate fix to get them up and running as quickly as possible while also working to address the issue in the Spring community. Red Hat wants to stay true to the Spring community distribution. For issues that cannot be addressed within the Spring community, Red Hat offers Workaround Support (see above).

Additional considerations

Red Hat provides binaries only for those Spring frameworks that it leads and distributes (for example, Undertow, Hibernate, embedded Tomcat, Keycloak, and Apache CXF). Other components are still distributed via their normal channels (for example, Maven Central). These components are consumed via Spring Boot Starters.

Launching into OpenShift

The following figure shows launching Spring Boot applications into OpenShift:

Launching Spring Boot Applications into OpenShift

Using developers.redhat.com/launch you can immediately create and deploy a Spring Boot application directly to Red Hat OpenShift Online or to your own local OpenShift cluster. It provides a hassle-free way of creating example applications, called boosters, as well as an easy way to build and deploy those boosters to OpenShift.

Boosters are available to showcase how developers can use Spring Boot to build fundamental building blocks of cloud-native applications and services, such as creating secured RESTful APIs, implementing health checks, externalizing configuration, or integrating with the OpenShift Service Mesh based on the Istio project.

Test driving a sample app using Spring Boot

Spring Boot is a Java framework, and as such, it can be run using OpenJDK. Let’s test drive one of the Spring Boot boosters on OpenShift. (Here I am using the Red Hat Container Development Kit, but any OpenShift cluster will do.) The following is one set of commands you could use to pull the OpenJDK image to your local system for use with Spring Boot:

oc new-project spring-boot
oc import-image java:8 --from=registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift --confirm

Then, the following commands could be used to build and deploy the Spring Boot application to Red Hat OpenShift:

oc new-app --name rest-example 'java:8~https://github.com/snowdrop/spring-boot-http-booster#1.5.17-4-redhat'
oc expose svc/rest-example

You can watch the build take place:

oc logs -f bc/rest-example

Once the build completes, wait for the deployment to finish:

oc rollout status -w dc/rest-example

And then access the sample app’s UI:

open http://$(oc get route rest-example -o jsonpath='{.spec.host}{"\n"}')

Red Hat customers using the OpenJDK distribution to run Spring Boot applications will be able to keep current with the latest updates, security advisories, knowing when and why containers are updated, and remaining up to date on the latest available tagged OpenJDK image.

Documentation

The RHOAR team has been continuously adding to and improving the official documentation for developers creating Spring Boot applications. This includes updates in the Release Notes, Getting Started Guide, and the new Spring Boot Runtime Guide. (Note that the guide is in the process of being updated for the latest version.)

Everything you need to grow your career.

With your free Red Hat Developer program membership, unlock our library of cheat sheets and ebooks on next-generation application development.

SIGN UP

Developer interactive learning scenarios

These self-paced scenarios provide you with a pre-configured OpenShift instance, accessible from your browser without any downloads or configuration. Use it to experiment with building Spring Boot applications on OpenShift and building applications with various Spring frameworks and Red Hat technologies. The following figure shows interactive learning scenarios on learn.openshift.com:

Interactive learning scenarios on learn.openshift.com

Getting support for Spring Boot

Support for Spring Boot is available to Red Hat customers through a subscription to Red Hat OpenShift Application Runtimes. Contact your local Red Hat representative or Red Hat Sales for details on how you can enjoy world-class support offered from Red Hat and its worldwide partner network.

Moving forward, customers can expect support for Spring Boot and other RHOAR runtimes according to the Red Hat Product Update and Support Lifecycle.

What’s next for Spring Boot support?

The RHOAR Spring Boot team is continually taking feedback from customers and the wider community of open source developers, as well as tracking the upstream Spring Boot releases. They are working to make updates to RHOAR based on that feedback, as well as considering support for additional modules from Red Hat and the very large Java community.

The people behind Red Hat’s Spring Boot support

This offering was produced by Red Hat’s RHOAR product and engineering team and involved many hours of development, testing, writing documentation, testing some more, and working with the wider Red Hat community of customers, partners, and Spring developers to incorporate contributions, both big and small. We are glad you have chosen to use it and hope that it meets or exceeds your expectations!

Spring Boot resources

For more information about Red Hat OpenShift and other related topics, visit: OpenShift, OpenShift Online.

Share