Anatomy of a DevOps Orchestration Engine: (II) Architecture
Join the DZone community and get the full member experience.Join For Free
the master services include
- maestro rest api
- end user web interface
- composition execution engine (lucee)
- activemq for stomp messaging
- postgresql (or mysql)
maestro rest api
the rest api is a webapp written in java, using spring, packaged with a jetty server. it is documented with swagger annotations that generate a really nice web interface automatically that allows trying all the operations from the browser.
it handles caching, security, based on ldap or database records, and delegates to the composition execution engine (lucee) typically through lucee rest api but also via stomp messaging to avoid continuous polling.
it also implements handlers to execute compositions from github, git, svn,… on commit callbacks.
end user web interface
the end user ui is written in angularjs using the angularjs bootstrap components and less stylesheets. it connects to the rest api, so everything that can be done through the webapp can also be automated using the rest api (automation, automation, automation!). i have found angular really nice to work with besides the service, factory, provider,… complicated abstractions , with good modularity and the ability to reuse third party plugins.
composition execution engine (lucee)
lucee is a webapp that manages the execution of compositions, sending/receiving work to/from the agents through activemq stomp queues, and storing state in the postgresql database. lucee uses the ruote workflow engine for work scheduling, and manages the compositions queue and agent routing, so basically checks what compositions need to be executed and decides in what agent to execute them, based on composition requirements, free agents, and other factors ie. prioritizing previously used agents that would likely have a cached copy of sources and dependencies to speed things up.
it is written in ruby, it was quick to implement a first version, with a simple rest api using sinatra and a stomp connector to send messages to the maestro rest webapp through activemq.
it is packaged as a jruby war with warbler , and both lucee and the rest api wars are run in the same jetty server, all packaged as an rpm for easier deployment.
activemq handles all the comunication between lucee, the rest api webapp, and the agents using multiple stomp queues. all the comunication between lucee and agents such as workloads, agent output, agent status,… is sent over a queue so it can be easily scaled across a high number of agents.
lucee also pushes changes in the database to the rest api webapp so it can update the caches without needing continuous polling.
lucee uses postgresql (or mysql or any other sql database using ruby datamapper) as main storage to save compositions, projects, tasks,… the sql database is also used by the rest api webapp to store permissions and user data when not using ldap.
we found that in order to do more complex dashboards and reports we needed to store all sort of unstructured data from the plugins, from run time or status to anything that a plugin developer may want such as github payload data received or test stacktrace. that data is sent by the agents to lucee and then stored in mongodb, and can be queried directly (all your data belong to you) or through a reporting pane in the webapp.
Published at DZone with permission of Carlos Sanchez, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Authorization: Get It Done Right, Get It Done Early
Replacing Apache Hive, Elasticsearch, and PostgreSQL With Apache Doris
How To Integrate Microsoft Team With Cypress Cloud
Web Development Checklist