How to mod drone-runner-docker to use AWS Fargate as a task runner?

Hi,

We’d like to run Drone as an AWS Fargate service, but in order to do so, need to write a Drone runner that can run Drone workloads on Fargate by taking pipelines (we’d like to keep the pipeline syntax as similar as possible to Docker pipelines (e.g., image based) and running them as tasks against a Fargate cluster (maybe using something like Amazon EFS for persistence across steps in a pipeline), and tailing output from CloudWatch logs to show on Drone. Maybe it’d even be possible to use IAM role based authentication for the tasks running inside each step.

Looking at GitHub - drone-runners/drone-runner-docker: Drone runner that executes pipelines inside Docker containers, I’m not totally sure where to start (how to read this app and how it works). Could someone point me in the right direction, like a high level overview of how the runner code works, and where are some starting points to try modifying it for Fargate?

We had a similar request to create a Podman runner [1]. Below are some comments that are probably relevant to this discussion:

We provide a framework that lets anyone in the community create a custom runner. There is no difference between an official runner and a community runner other than stewardship. The starter project and framework for creating a customer runner:

GitHub - drone/boilr-runner: boilr template for creating custom pipeline runners

The tooling to create a custom runner is new and has not been formally announced or documented yet, however, a few community members were able to use the starter project and research existing runners to figure it out. I am happy to answer any questions.

Note that a podman runner would need to be its own separate runner, similar to how the kubernetes runner is its own separate runner. We would not combine the docker runner and podman runner into a single codebase.

Similar to our suggestion above, you would need to create a separate Fargate runner. We would not combine a Fargate runner and a docker runner in the same codebase. Instead we would try to create something Fargate-specific, using Fargate-specific configuration options where needed, without having to worry about full syntax compatibility with Docker or Kubernetes pipelines. The starter project should simplify development and will handle most of the boilerplate code, leaving TODO placeholders for you to write code that is specific to Fargate and AWS.

[1] Building using alternative drone.yml