This repository contains the code for the Droplet Execution Agent (DEA) and related components.
The DEA itself is written in Ruby and takes care of managing an application instance's lifecycle. It can be instructed by the Cloud Controller to start and stop application instances. It keeps track of all started instances, and periodically broadcasts messages about their state over NATS (meant to be picked up by the Health Manager).
The advantages of this generation of the DEA over the previous (and first) generation DEA is that is more modular and has better test coverage. A breaking change between the two is that this version of the DEA depends on Warden to run application instances.
The directory server is written in Go and can be found in the go/
directory. It is a replacement for the older directory server that was
embedded in the DEA itself.
Requests for directories/files are handled by the DEA, which responds with a HTTP redirect to a URL that hits the directory server directly. The URL is signed by the DEA, and the directory server checks the validity of the URL with the DEA before serving it.
See staging.rb for staging flow.
-
staging.advertise
: Stagers (now DEA's) broadcast their capacity/capability -
staging.locate
: Stagers respond to any message on this subject with astaging.advertise
message (CC uses this to bootstrap) -
staging.<uuid>.start
: Stagers respond to requests on this subject to stage apps -
staging
: Stagers (in a queue group) respond to requests to stage an app (old protocol)