One-off or 'Stateless' Deployment Workflows?

Hi,

I’m just getting familiar with Harness. I have managed to get going with a basic workflow that provisions an ECS Fargate service. The end result being that I can run one-off executions of the workflow to generate ‘rolling’ deployments to the ECS service.

I’m wondering however, if there are supported patterns within Harness for workflows that create deployments (in my case, ECS services) in a stateless/detached way? Meaning, whenever I run the workflow, a brand-new ‘instance’ of the service is created, rather than a replacement/rolling update made against the service that was created from the previous workflow run.

Current behavior:

  1. Run workflow for the very first time
  2. ECS service is created and containers are started
  3. Run workflow for the second time
  4. Previously created service is scaled down to 0 containers
  5. A new ECS service is created and containers are started.

Desired behavior:

  1. Run workflow for the very first time
  2. ECS service is created and containers are started
  3. Run workflow for the second time
  4. A brand-new ECS service is created, and the previously created service from the first run is untouched (no longer managed by the workflow)
  5. I now have two similar, but unique services running containers.
  6. Repeat many more times to create many more services.

I understand the primary function of a CD pipeline is to continuously deploy an application to a set of infrastructure (preferably with zero downtime). So, maybe this is an odd request/use case…

Hi @swin12, here are some suggestions that could help your query.

  1. Assuming you create a new service for the existing workflow then:
  • you can edit workflow and refer new service instead of old service in this case. At this point its a new deployment, then we’ll replace older instance and create one…

best option is to have 2 different workflows for each service

  1. If you are using same service and want to keep old instance, then you can make use of the option of instance-old version. It populates in Upgrade container step of ECS