Local Dev Craft: Scaling a Python Worker with SeaweedFS, RabbitMQ, and KEDA (Part 2)

In part 1 we used kind, KEDA, and LocalStack to run an S3-triggered worker on a laptop. This time we’ll use SeaweedFS for object storage and RabbitMQ for the queue. We’ll upload a file through the S3 API, see what SeaweedFS sends to RabbitMQ, and watch KEDA start a Python worker to pick it up.

When I went back to test part 1, localstack/localstack:latest refused to start without an auth token. Pinning an older image got the demo running again. For the rest of the series I wanted services we could run directly in the cluster, with pinned versions. MinIO was on my list for S3, but its community edition moved to source-only distribution. SeaweedFS ships a container image with an S3 gateway and can publish file changes to RabbitMQ. I also looked at NATS JetStream. I went with RabbitMQ because I wanted to inspect messages in its management UI and configure dead-letter routing when we add retries. LocalStack’s image change and MinIO’s source-only distribution have the details.

[Read More]

Local Dev Craft: A Dive into Kubernetes with kind, KEDA, and LocalStack AWS (Part 1)

In this first post of my new Local Dev Craft series, we will be setting up a local Kubernetes cluster using kind, KEDA, and LocalStack AWS in order to build a development/debugging environment that is similar to production. But first, let’s get familiar with the tools we are going to use here:

  • Kubernetes: An open-source platform designed to automate deploying, scaling, and operating application containers.
  • kind (Kubernetes in Docker): A tool for running local Kubernetes clusters using Docker container “nodes”.
  • KEDA (Kubernetes Event-Driven Autoscaling): A set of components that extends Kubernetes to provide event-driven autoscaling for every container.
  • LocalStack AWS: A fully functional local AWS cloud stack for testing and mocking AWS services locally.

Now that we know what we’re dealing with, let’s move on and create our local development environment that mimics our cloud setup. This setup will be a set of stateless jobs that will be spawned by KEDA events, exit after execution, and scale to zero.

[Read More]
Categories: local-dev  Tags: local-dev kubernetes kind keda aws localstack