Enterprise Java

How To Add Cloud Persistent Storage to JBoss Cool Store

We have been discussing why application developers can’t ignore their stack anymore in the  App Dev Cloud Stack series.

App Dev Cloud with JBoss Cool Store
App Dev Cloud with JBoss Cool Store

Last month we brought a full retail example with the JBoss Cool Store running on the OpenShift Enterprise layer of your stack, provided by our Red Hat CDK installation.

You can  leverage a retail example based on JBoss BRMS through the business central web console running containerized on an OSE pod. It was a demo and therefore not leveraging any realistic persistent storage beyond an in memory datasource.

Thanks toShall we add a real instance of persistent storage, configure a working datasource like Postgresql?

Andrew Block, Senior Red Hat Consultant who contributed this project you can explore this solution at your leisure.

rhcs-coolstore-p-build (1)
Automated build of JBoss Cool Store with Cloud ready persistence.

Retail in the Cloud with storage

We will be leveraging previous work that installs the Red Hat CDK. The Red Hat CDK is packaged into a RHEL 7 virtual machine that you can start on your machine after installing this project. There are several choices provided with pre-configured installations, but they all include the basic setup for Docker and the tools needed to start leveraging Docker based containers.

The following container must be started after installing this project for you to get started with the JBoss Cool Store retail application with persistent storage:

  • OpenShift Enterprise – a containerized version of OpenShift Enterprise can be started that can be accesses through a Web console in your browser or via the OpenShift command line tools. Explore your very own private PaaS developer experience with this container.

rhcs-coolstore-p-pods
JBoss Cool Store with a Postgresql instance to provide backing storage in a pod.

Now that the you have the OpenShift Enterprise image up and running, you can start moving the JBoss Cool Store application with persistent storage into the Cloud with the following project:

  1. First complete the installation and start the OpenShift image supplied in the cdk-install-demo.
  2. Install OpenShift Client Tools if you have not done so previously.
  3. Download and unzip this demo.
  4. Add products to installs directory.
  5. Run ‘init.sh’ or ‘init.bat’ file. ‘init.bat’ must be run with Administrative privileges.
  6. Login to Cool Store to start exploring a retail web shopping project:

Now you are up and running with a fully installed, Cloud ready JBoss Cool Store . If you want to learn how to build the Cool Store from the ground up, check out this online workshop:

For more information around containers, a Cloud stack and why you need to care about this containerized stack for your application development, see the App Dev Cloud Stack series that takes you on a tour of the Red Hat Cloud Suite.

Stay tuned for more!

Eric Schabell

Eric is Chronosphere's Director Technical Marketing & Evangelism. He's renowned in the development community as a speaker, lecturer, author and baseball expert. His current role allows him to coach the next generation of technical marketers & evangelists helping the world to understand the challenges with cloud native observability. He brings a unique perspective to the stage with a professional life dedicated to sharing his deep expertise of open source technologies and organizations. Follow on https://www.schabell.org.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
Back to top button