Ansible Activity Implementation
The com.eurotech.framework.activity.ansible
bundle provides the implementation of the APIs defined in com.eurotech.framework.activity.api
for the Ansible-based Activity model.
The ActivityServiceImpl provides an implementation for the ActivityServiceImpl. It is responsible to manage the Activity instances during framework functioning as well to restore such tracked Activities at reboot or after power loss.
The property files mapping an Activity are persisted in a persistent location of the filesystem (defaults to /var/lib/eth-persisted-activities/). This location is mapped to a service property but not exposed in UI to the user.
The ActivityImpl class implements the Activity interface and represents an Activity request received, for example, from the cloud platform. Each Activity instance, at every time, is defined by a specific ActivityState.
In the provided implementation for Ansible updates, there are 5 different Activity States available:
Name | Description | Next State |
---|---|---|
CreatedState | Initial state of an Activity. It may be used to check on conditions and start the update procedure, when the specified requirements are met | WorkingState CancelledState |
WorkingState | It manages the download of a playbook using the parameters provided in the received Submit request, for example received from the cloud platform. Sends download notification updates. Launches Ansible on the downloaded resources. Sends notification messages on the execution progress | SuccessfulState FailedState |
SuccessfulState | Terminal state | |
FailedState | Terminal state | |
CancelledState | Terminal state |
Updated about 3 years ago