Services

Services is the core of the software package. It consists of several services:

Event Bus

Event Bus is a service for receiving and desserializing messages from SaltStack. Senders modules are used to process and transmit messages. Interaction between SaltStack and Senders is carried out through the Publisher-Subscriber pattern, where SaltStack is the publisher, SaltStack Event System and Event Bus is the event bus, Sender is the subscriber.

../../../../_images/Event_bus.png

Receiving data from the SaltStack Event System is carried out through the SSE technology. Upon receipt of the message, EventBus deserializes it and notifies Senders. Senders filter, process and send messages.

Senders and Filters

Sender is module for filtering, processing and sending messages. It contains inside Filters for filtering and processing of messages.

../../../../_images/Senders.png

Classes inheriting Filter are:

  • ClientActionFilter generates messages for sending Salt events via MQ.
  • ClientHostInfoFilter generates messages for sending minien monitoring data via MQ.
  • DBActionFilter generates messages for sending Salt events to database.
  • GroupIpFilter returns ip address of the minion after executing the request to determine it.
  • HostFilter generates message for creating/updating a minien in the database.
  • KeyFilter generates message for updating a minien key in the database.
  • LastDistupgradeFilter generates message for updating “last_distupgrade” field of minien in the databases.
  • LastStateApplyFilter generates message for updating “last_stateapply” field of minien in the databases.
  • MinionStartFilter generates message for updating “status” field of minien in the databases.
  • PingFilter generates message for updating “status” field of miniens in the databases.
  • PresenceFilter generates message for updating “status” field of miniens in the databases.
  • CacheHostsFilter generates message for creating/updating miniens in the database.
  • SeedHostsNodegroupFilter generates message for updating “nodegroups” field of miniens in the database.
  • SeedNodegroupFilter generates message for creating nodegroups in database.
  • StateApplyFilter generates message for creating failed-patches on unsuccessful execution “state.apply”.
  • VersionFilter generates message for updating “version” field of minien in the database.

Message Queue Handlers

Message Queue Handlers are handlers for client events received froms backend.

Interaction is carried out through RabbitMQ.

Statistic Collector

Statistic collector is service for collecting statistics. It takes names of the collections from which to collect data as input and sends them to the statistics collection.

DB Sync

DB Sync is service for invoking periodic actions on SaltStack via salt-api.

Task Scheduler

Task Scheduler is service for performing custom tasks. Task is a request to be made to the salt-api. Tasks are fetched from the database via the DB Adapter.