I created a "fargate" plugin

Feedback welcome.

1 Like

The builtin ECS tool deploys to fargate by default. Is there something in that plugin that was missing for you?

The built-in ECS plugin seems to want to create a bunch of AWS resources, like services, target groups, listeners, etc. and requires https (zones, certs, etc). We have existing tooling that uses a library of terraform templates to provision all this stuff. We just wanted a simple waypoint plugin that would work with our existing tools and deploy just the application concerns. Given an existing cluster/service, the plugin simply updates/registers a service’s task definition with the newly built image and tells the service to run it. This approach provides the infrastructure / application separation philosophy that we’ve been following. Does that make sense?

It does, thanks for giving me a better picture. The builtin ECS plugin does support the ability to use an existing ALB and listener, you need just set alb.listener https://www.waypointproject.io/plugins/aws-ecs#alb-listener_arn to use that.

Then you can have it setup in any way you like (certs, HTTP, TCP, whatever).

Additionally the plugin will use a ECS cluster if it already exits.

So I think the only thing missing from your needs are the ability to use an existing service. The reason we don’t do that is that waypoint deploys a new service object on every deploy to allow for proper rollback.

But I think we’d be open to adding the ability to just update an existing service like you’re doing here. If we added that, would that take care of your workflow?

Yes, I think so. That’s interesting about the rollback. How does waypoint handle that?

BTW, I did try using the built-in plugin to deploy something to an existing cluster, passing in as many variables as I could, but it just crashed. Maybe I’ll try again with the latest release.

Our existing tooling can also deploy a docker-compose.yml file to fargate (taking the image, envvars, and secrets from it). I’m considering adding that to our plugin. Curious if others would find that useful.

If you’re getting a crash, that’s certainly a bug. Please let us know in a github issue if so.

As for how the rollback is handled, we create a new ECS service for each deploy and the to rollback, the previous service is still running with it’s own TargetGroup, so we manipulate the weights on the ALB to direct traffic back to the old service’s TG.

As for deploying a docker-compose.yml file, I’m not sure how that would fit into the waypoint model. Perhaps for the deploy phase, you could say extract_docker_compose = true and that would pull things like env vars and secrets, but not image because that comes from the build phase. Does that sound interesting?