Have you read the announcement of the alpha release of Red Hat OpenShift Application Runtimes (RHOAR)? We also posted an introduction to the component in RHOAR earlier. This post dives into more detail on the Spring Boot certification support that is expected to be included with RHOAR.
First things first, Spring Boot remains part of the Spring Framework that is controlled by Pivotal. Red Hat and Pivotal are not announcing any sort of alliance to alter how elements of the Spring Framework, including Spring Boot, are defined or brought to market.
Instead, with RHOAR, Red Hat is working to certify some technologies and support others (when generally available) that Spring Boot will interoperate with. Conceptually, Red Hat wants to welcome Spring users to the Red Hat ecosystem and enhance their ability to deliver effective cloud native applications on the OpenShift Container Platform (OCP) using the Spring Boot java development framework. So let’s dive into the details a bit more.
First, lets look at some of what RHOAR will offer Spring Boot developers. For starters, if you’re new to working with Spring Boot, Red Hat will be offering a browser based utility to get started with multiple cloud-native runtimes, including Spring Boot. The utility known as a launchpad will create a fully-functional starter application for you. You can download the starter application as a zip file, or interact with an OCP instance. When the later is done, code is pushed to a GitHub namespace, sets up a build pipeline for continuous delivery, and ensures it’s triggered to run on each push to your git repository. Now, the choice of OCP instance is up to you. You could certainly use a centralized public or private OCP deployment. But you could also use a local OCP environment right on your desktop. Pretty cool.
Of course if you don’t want to develop in a cloud environment for day to day work, you don’t have to. You can develop using local builds. In the end though, the whole point of RHOAR is to help you get applications to the cloud. So when your local development is done, can use the various options for getting applications into OCP using binary or source-to-image build strategies.
But there is much more to RHOAR for Spring Boot than a code and build environment generator. Existing Spring Boot developers will be glad to hear that Red Hat will certify Hystrix, Hystrix Dashboard, and Ribbon running on OCP. This will allow Spring Boot users to continue working with cloud technologies for interacting with microservices they may already be familiar with.
In addition, Red Hat will be supporting the use of JBoss Web Server (tomcat), hibernate, and Apache CXF in Spring Boot for RHOAR subscribers. Production support for these technologies is a common request we have heard from Spring Boot users. We are answering that call will support upon GA release of RHOAR.
Now let’s look at using RHOAR features to deploy Spring Boot applications to OCP. OCP provides an alternative to Pivotal Cloud Foundry for running Spring Boot applications. Red Hat believes there are multiple advantages to using OCP including the ability to use docker formatted images and Kubernetes for orchestration. Further advantages are related to software defined networking, load balancing, storage, and other features that are not found in a DIY docker image + Kubernetes cloud, or in some cases, Pivotal Cloud Foundry.
Red Hat anticipates that many OCP advantages will be interest to Spring Boot users. Some of those features will be relatively seamless to get started with. For example, use of Spring Cloud Kubernetes. This will provide an implementation of spring cloud discovery client specifically for Kubernetes that allows you to query Kubernetes endpoints (services) by name simply by adding a dependency inside a Spring Boot project.
Another relatively seamlessly supported RHOAR feature to implement in Spring Boot is EFK logging. The EFK stack is a modified version of the ELK stack and is comprised of:
- Elasticsearch: An object store where all logs are stored.
- Fluentd: Gathers logs from nodes and feeds them to Elasticsearch.
- Kibana: A web UI for Elasticsearch.
Spring Boot developers have multiple well documented options available for wiring fluentd into applications. Once that is done, and an OCP administrator has deployed the EFK stack, application developers can view the logs of the projects for which they have view access. The EFK stack aggregates logs from hosts and applications, whether coming from multiple containers or even deleted pods.
When building Spring Boot applications, RHOAR will include the Fabric8 maven plugin . This plugin makes it easier to work with Docker and Kubernetes or OpenShift from inside an existing Maven project. Specifically the plugin focuses on two tasks: building Docker images, and creating Kubernetes and OpenShift resource descriptors.
For example, you can use the build goal to build a docker formatted image and the push goal to push it to a public or private Docker registry. OpenShift resource descriptors can be created with the resource goal and deployed to a running orchestration platform with the apply goal. Or you can just use the deploy goal for building your docker image, generating the kubernetes resources and deploying them into the OCP cluster. But that only scratches the scope of what the Fabric8 plugin can do with broad variety of build goals available.
For those who want to get started quickly the plugin also provides a zero-config setup mode allows for a quick ramp-up with some opinionated defaults. This is great for starting up things and for keeping quickstart applications small and tidy. For many this will be sufficient. For others who want more control, there are additional options. For example, tuning builds via additional configuration options via the pom.xml file. You can even tune all facets of the OCP deployment with developer provided Kubernetes & OpenShift resource fragments YAML files can be enriched by the plugin. This allows users to add OpenShift specific configuration as part of the code using plain configuration file with all their capabilities, but also to add project specific build information and avoid boilerplate code.
As you can imagine, the fabric8 plugin capabilities are extensive. For more details, please review the documentation at this link.
I hope this article has helped you start to understand the direction Red Hat is taking to certify some technologies and support others that Spring Boot will interoperate with. Keep in mind that RHOAR is currently an alpha release and it is very likely that there will be some changes to before it become a generally available subscription. Keep an eye on this blog for more information about RHOAR as it progresses to GA. Are you excited by the announcement? Lets us know via comment and tweets. We want to hear you #RHOAR!