Difficulty: beginner
Estimated Time: 10-15 minutes

In this self paced tutorial you will learn how to build, deploy, and expose container based APIs using JBoss Fuse Integration Services (FIS) 2.0 for OpenShift. This introductory service will expose the People Service API which includes methods for adding, searching, and listing individuals. In addition, the People Service API will publish the associated API Swagger documentation via FIS Camel SWAGGER.

Before you get started

If you are not familiar with the OpenShift Container Platform, it's worth taking a few minutes to understand the basics of the platform as well as the environment that you will be using for this self paced tutorial. Head on over to Learning OpenShift - Getting Started.

What is JBoss FIS

Red Hat JBoss FIS 2.0 is an agile, lightweight, and modern development framework for building and deploying highly scalable and modular APIs. A true hybrid solution, JBoss FIS 2.0 offers best of container based development practices coupled with well known microservices and enterprise integration patterns including: Proxy/Sidecars, Circuit Breakers, Tracing, Routing, Transformations, Auditing and more.

Having this hybrid capability is important as demand grows for scalable cloud native microservice APIs. To simplify the development JBoss FIS components offer a choice of two runtimes:

  • As a standalone Java application (SpringBoot)
  • As a service in Apache Karaf (OSGi)

Also when using the OpenShift Container Platform there are various ways to deploy a JBoss FIS API:

  • Deploy Fuse application from an existing Docker-formatted image.
  • Build Fuse locally and push the build result into OpenShift, a Binary Source-to-Image (s2i) builder.
  • Build and deploy from source code contained in a Git repository using a Source-to-Image builder.

For our introductory lesson we are going to use OpenShifts s2i repository builder to pull in, build and deploy a JBoss FIS API service using the SpringBoot container runtime. So lets get started!

Congratulations! You just finished learning how to deploy your own JBoss Fuse Integration Service to OpenShift. Pretty simple isn't it?

What's next?

Now you are probably interested in expanding your work with OpenShift in a less structured environment. You can start with setting up your own OpenShift environment if you haven't already or if you have maybe expanding on what you have learned to build your own JBoss FIS 2.0 applications. For hints and ideas of where to start next check out the resources below.

Getting Started with Fuse Integration Services

If you are ready for the next step take a look at this detailed guide "Getting Started with Fuse Integration Services". This thorough guide covers the basics from setting up the JBoss Developer suite of tools, the OpenShift CDK, and creating your first Camel project as well as more advanced topics like securing and using OpenShift to configure your applications. Getting Started with Fuse Integration Services covers all the basics.

For additional details or deeper dives please see the list of links and references below.

OpenShift Development Tooling:

OpenShift S2I References:

Scenario Code and Assets:

Don’t stop now! The next scenario will only take about 10 minutes to complete.

Developing APIs using Red Hat OpenShift and JBoss Fuse

Step 1 of 5

Topic 1 - Creating an Initial Project

To get started, first we need to login to OpenShift.

To login to the OpenShift cluster use the following commmand in your Terminal:

oc login -u developer -p developer

This will log you in using the credentials:

  • Username: developer
  • Password: developer

You should see the output:

Login successful.

Now we need to create a Project space in OpenShift for our API.  In OpenShift we can create a new project by running

    oc new-project <projectname>

For out project lets create a project called fuselab by running the command:

oc new-project fuselab

You should see output similar to:

Now using project "fuselab" on server "https://172.17.0.41:8443".

You can add applications to this project with the 'new-app' command. For example, try:

    oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git

to build a new example application in Ruby.

Now switch to the Dashboard and login to the OpenShift web console using the same credentials you used above.

Web Console Login

This should take you to the list of projects you have access to. As we only created the one project, all you should see is fuselab.

List of Projects

Click on fuselab to be taken to the project Overview page for fuselab.

Project Overview

As the project is currently empty, you should be presented with an Add to Project button. Click Continue on to see how to add the first application to this project.