The use of the other components in cartridge agent have been explained as follows:
- Event listenereslisteners
The event listener subscribes to message broker topics, relevant for the Cartridge agent. It then executes operations related to each event.
- Instance/Status topic publisher
All message broker events that are published by the Cartridge Agent are published under the "Instance/Status" sub topic. This includes events such as
- Artifact distribution manager
This component is triggered by the event listeners based on the events such as
InstanceCleanupClusterEvent. Its main responsibility is to clone, pull, push artifacts between a specified remote Git repository. This component is only activated for Cartridge instances that already has a configured repository URL.
- Health statistics publisher
Every instance is required to post its health statistics to the CEP in WSO2 Private PaaS, to determine autoscaling decisions. The Health Statistics Publisher collects statistics such as load average and memory usage, and sends them to a specified CEP via the Apache Thrift Protocol.
The Cartridge Agent's functionality can be extended by writing Shell Script extensions which are executed when their respective events are received.
A Bash Shell Script can be written to run when the CompleteTopologyEvent is received by the Cartridge Agent. In the Python implementation of the Cartridge Agent, an additional Python based plugin system is available which can be mapped to multiple events to be executed.
- Metadata service client
This component is available only in the Python implementation of the Cartridge Agent. It's responsibility is to write to and read from the Private PaaS Metadata Service via REST calls. The Metadata Service Client can be used by any Python based plugin to implement complex application scenarios by interacting with the Metadata Service.
- Log file publisher
The Cartridge Agent can be configured to enable the Log Publisher Component which will periodically check a given set of server log files for new entries and publish them to a given Thrift receiver. The purpose of this is to enable data analysis based on the server logs.