Skip to content

Developer reference Agent

Augustin Šulc edited this page Jul 2, 2015 · 1 revision

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.

Runs as Windows service

The agent works as a Windows service. We've used Topshelf as it makes it easier to both debug and deploy such services.

API

Scheduler calls the agent through API that is implemented using MVC Web API controllers and self-hosted with OWIN.

Packages deployment

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.

Configuration

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.

Agent updated

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.