7 - ECS Setup in YAML

Updated 2 weeks ago by Michael Cretzman

All of the Harness configuration steps in this guide can be performed using code instead of the Harness user interface. You can view or edit the YAML for any Harness configuration by clicking the </> button on any page.

When you click the button, the Harness code editor appears.

For example, here is the YAML for the Daemon Scheduler, Basic Workflow we set up in this guide.

harnessApiVersion: '1.0'
type: BASIC
envName: stage-ecs
failureStrategies:
- executionScope: WORKFLOW
failureTypes:
- APPLICATION_ERROR
repairActionCode: ROLLBACK_WORKFLOW
retryCount: 0
notificationRules:
- conditions:
- FAILED
executionScope: WORKFLOW
notificationGroupAsExpression: false
notificationGroups:
- Account Administrator
phases:
- type: ECS
computeProviderName: aws-ecs
daemonSet: false
infraMappingName: example -AWS_ECS--Amazon Web Services- aws-ecs- us-west-1
name: Phase 1
phaseSteps:
- type: CONTAINER_SETUP
name: Setup Container
steps:
- type: ECS_DAEMON_SERVICE_SETUP
name: ECS Daemon Service Setup
stepsInParallel: false
- type: VERIFY_SERVICE
name: Verify Service
stepsInParallel: false
- type: WRAP_UP
name: Wrap Up
stepsInParallel: false
provisionNodes: false
serviceName: Default_Daemon
statefulSet: false
rollbackPhases:
- type: ECS
computeProviderName: aws-ecs
daemonSet: false
infraMappingName: example -AWS_ECS--Amazon Web Services- aws-ecs- us-west-1
name: Rollback Phase 1
phaseNameForRollback: Phase 1
phaseSteps:
- type: CONTAINER_SETUP
name: Setup Container
phaseStepNameForRollback: Setup Container
statusForRollback: SUCCESS
steps:
- type: ECS_SERVICE_SETUP_ROLLBACK
name: Rollback Containers
stepsInParallel: false
- type: VERIFY_SERVICE
name: Verify Service
phaseStepNameForRollback: Deploy Containers
statusForRollback: SUCCESS
stepsInParallel: false
- type: WRAP_UP
name: Wrap Up
stepsInParallel: false
provisionNodes: false
serviceName: Default_Daemon
statefulSet: false
templatized: false

For more information, see Configuration as Code and Harness GitOps.


How did we do?