-
Notifications
You must be signed in to change notification settings - Fork 1
Developer reference Agent
Deploy agent is a simple service that runs on a target comuter and waits untill it is called by Scheduler to perform a package deployment or any other action it supports.
The agent works as a Windows service. We've used Topshelf as it makes it easier to both debug and deploy such services.
Scheduler calls the agent through API that is implemented using MVC Web API controllers and self-hosted with OWIN.
Packages sent to the agent are unpacked using NuGet core library. Configuration file templates are then transformed using config values defined for the specific agent and Site. PowerShell deploy script is then run on top of the unpacked package - thus, any further actions depend only on deploy manifest inside the package and respective deploy script.
Current values applied on config file templates are saved in the agent itself and therefore configured remotetly through API calls from the web UI. All agent data (configuration, logs, etc.) are stored in file system using Biggy.
As the agent itself is just a container with API that unpacks incoming deploy packages and transforms config file templates, the core deployment logic is done through deploy scripts. Deploy scripts are PowerShell scripts packed in a normal DEF deploy package. That's why any updates to deploy scripts can be done the same way as any other deployment with no need to update the agent executables.