The Linux Foundation Projects
Skip to main content
Blog | Mentorship

Open Mainframe Service Broker Project

By | June 13, 2018

The Open Mainframe Foundation sponsored a Virginia Commonwealth University (VCU) Capstone Senior Design project to build a Service Broker using Docker on the Linux One Community Cloud. The project was made up of three VCU students, Jacob Roberts, Kevin Richmond, and Justin Gardner and mentored by Leonard Santalucia (Project Sponsor) and Robert Dahlberg (VCU faculty advisor.) It was a two semesters project spanning over 9 months (August 2017 to May 2018.)  The final result was a functional proof of concept capable of launching and managing micro services using Docker containers.

A continuous integration framework is key to doing agile development.  Without the ability to dynamically add or modify application services, Agile development is just a project management concept.  Service Oriented Architecture is a software development methodology where application services are broken down into small parts (micro services) which an application communicates with through a service broker to perform general functions. This project containerizes these micro services using Docker, an application can call these micro services managed by the Docker service broker.. The interface to the Docker service broker was created in a web application with both an administrative and standard user interface, allowing an application to call services and an administrator to launch, remove, and manage Docker-ized micro services.

The Docker service broker enables administrators to create an environment of Docker micro services, and to organize them into groups.  These Docker-ized micro services can be started as a group for use by an application (or applications).  The groups of Docker micro services can be started as multiple instances, for instance as a production, QA or multiple development environments.  Each instance of a Docker micro service can be dynamically updated with a new or replacement micro service by adding a new micro service Docker container to the group or group instance or deleting an old micro service Docker container and replacing it with a new one.

There are 3 components to the project: (1) The front end, which includes both the administrative panel and the standard user panel, (2) the API, which controls interactions with the database, and (3) the worker, which launches and performs actions on the Docker containers.

The front end allows the administrator to view and manage micro services and groups through the Docker service broker.  The administrator can view which service broker environments are running and the status of each micro service, including which port is the service is communicating.  It is a Vue.js application with segmented parts for administration vs standard user interfaces. The application displays some great features of Vue.js like components and a reactive UI. The functionality is provided to the back end through a REST JSON API which is implemented via the use of the axios library.

The API translates service broker calls on behalf of the administrator(s) and applications requesting micro services (i.e. worker containers).  It processes configuration definitions and service calls to the service broker and micro services.  The API is built on Node.js and also makes use of the axios library for parsing and simplifying JSON API interactions. The API manages interactions with the database for both the worker and the front end. When a service is launched, for example, an entry is placed on a queue in the database with the state “initializing.” The worker then claims that entry and performs the required activity.

Finally, the worker simply queries the API for any services in the “initializing” state and then performs the desired action on the local system accordingly. The worker (micro service) performs the specific function requested by the application through the service broker.  The worker was designed to allow a server that implements the Docker instances to be different from the server running the API or the front end.

You can find the Github repo here: https://github.com/openmainframeproject/docker-service-broker