Deployment Readiness
Assess deployment readiness, analyze environment drift, and make data-driven canary rollout decisions using Harness MCP.
Instructions
Step 1: Establish Scope
Confirm the service, target environment, and deployment type.
Call MCP tool: harness_list
Parameters:
resource_type: "service"
org_id: "<organization>"
project_id: "<project>"
Step 2: Identify the Readiness Task
Determine which assessment the user needs:
- Deployment Readiness Check -- Comprehensive pre-deploy validation with go/no-go
- Environment Drift Analysis -- Differences between source and target environments
- Canary Rollout Decision -- Data-driven promote, pause, or rollback recommendation
Step 3: Run Deployment Readiness Check
Gather from the user:
- Service name and target environment
- Deployment type (rolling, blue-green, canary)
- Change summary (what is being deployed)
Execute readiness checks:
Pipeline Health:
Call MCP tool: harness_list
Parameters:
resource_type: "execution"
org_id: "<organization>"
project_id: "<project>"
pipeline_id: "<pipeline_identifier>"
- Last N pipeline executions: pass rate and failure patterns
- All required stages passed (build, test, security scan)
Dependency Verification:
- All referenced connectors, secrets, and infrastructure are accessible
- Required approvals are configured for the target environment
Artifact Readiness:
- Container image exists and has passed security scanning
- SBOM is generated and signed (if required)
- Image tag matches the expected version
Environment Health:
- Target environment is not frozen or in maintenance
- No active incidents on the target cluster
- Resource capacity is sufficient for the deployment
Security Gates:
- No critical or high CVEs above threshold
- OPA policies pass for the target environment
- Required compliance attestations are present
Present a structured report with PASS/FAIL/WARNING for each check and a final GO/NO-GO recommendation.
Step 4: Analyze Environment Drift
Gather from the user:
- Service name, source environment, and target environment
Compare environments using harness_get for each:
Call MCP tool: harness_get
Parameters:
resource_type: "environment"
resource_id: "<source_env>"
org_id: "<organization>"
project_id: "<project>"
Check for drift in:
- Configuration: Environment variables, feature flags, config maps
- Infrastructure: Resource limits, replica counts, node pools
- Secrets: Secret versions and rotation status
- Manifests: Kubernetes manifest differences
- Dependencies: External service versions and endpoints
Classify each difference by risk:
- CRITICAL: Could cause outage (missing secrets, wrong endpoints)
- WARNING: May cause behavioral differences (different resource limits)
- INFO: Cosmetic or expected differences (environment-specific values)
Step 5: Canary Rollout Decision
Gather from the user:
- Service name, canary traffic percentage, and duration
- Canary version vs. baseline version
- Key metrics to evaluate (error rate, latency, throughput)
Analyze canary health:
Call MCP tool: harness_list
Parameters:
resource_type: "execution"
org_id: "<organization>"
project_id: "<project>"
Evaluate:
- Error rate: Canary vs. baseline (threshold: no more than 1.1x baseline)
- Latency: P50, P95, P99 comparison
- Throughput: Requests handled without errors
- Resource usage: CPU and memory vs. baseline
- Business metrics: Conversion rate, transaction success rate
Provide a recommendation:
- PROMOTE -- All metrics within thresholds, recommend increasing traffic or full rollout
- HOLD -- Some metrics borderline, recommend extending observation window
- ROLLBACK -- Metrics degraded beyond thresholds, recommend immediate rollback
Examples
- "Is our payment-service ready to deploy to production?" -- Run full readiness check with go/no-go recommendation
- "Compare staging and production environments before deploying" -- Analyze configuration, infrastructure, and secret drift
- "Should we promote the canary or roll back?" -- Evaluate canary metrics and recommend promote/hold/rollback
- "Run a pre-deploy checklist for the checkout service" -- Validate pipeline health, artifacts, security gates, and environment
Performance Notes
- Readiness checks should run against the actual target environment, not a cached state -- environments change between checks.
- Environment drift analysis is most valuable right before deployment -- running it hours early may miss recent changes.
- Canary decisions need sufficient traffic volume to be statistically meaningful -- low-traffic services may need longer observation windows.
- Include business metrics in canary analysis when available -- technical metrics alone may miss user-facing issues.
Troubleshooting
Readiness Check Returns False Negatives
- Verify connectors and secrets are accessible from the readiness check runner
- Check that security scan results are available for the specific image tag being deployed
- Ensure environment freeze status is up to date
Drift Analysis Shows Too Many Differences
- Filter out expected differences (environment-specific variables like URLs, credentials)
- Focus on infrastructure and manifest drift first -- these are most likely to cause issues
- Use environment overrides in Harness to manage expected per-environment configuration
Canary Metrics Inconclusive
- Increase traffic percentage to get more data points
- Extend the observation window to capture more traffic patterns
- Check that metric collection is working correctly for the canary pods
1---2name: deployment-readiness3description: Assess deployment readiness via Harness MCP. Run pre-deployment readiness checks with go/no-go recommendations, analyze environment drift between source and target environments, and provide data-driven canary rollout decisions. Use when asked to check if a service is ready to deploy, compare environments before deployment, or decide whether to promote a canary. Do NOT use for running pipelines (use run-pipeline instead) or debugging failures (use debug-pipeline instead). Trigger phrases: deployment readiness, ready to deploy, pre-deploy check, environment drift, canary decision, promote canary, rollback canary, go no-go, deployment checklist, production readiness, canary analysis.4license: Apache-2.05---67# Deployment Readiness89Assess deployment readiness, analyze environment drift, and make data-driven canary rollout decisions using Harness MCP.1011## Instructions1213### Step 1: Establish Scope1415Confirm the service, target environment, and deployment type.1617```18Call MCP tool: harness_list19Parameters:20 resource_type: "service"21 org_id: "<organization>"22 project_id: "<project>"23```2425### Step 2: Identify the Readiness Task2627Determine which assessment the user needs:28291. **Deployment Readiness Check** -- Comprehensive pre-deploy validation with go/no-go302. **Environment Drift Analysis** -- Differences between source and target environments313. **Canary Rollout Decision** -- Data-driven promote, pause, or rollback recommendation3233### Step 3: Run Deployment Readiness Check3435Gather from the user:36- Service name and target environment37- Deployment type (rolling, blue-green, canary)38- Change summary (what is being deployed)3940Execute readiness checks:4142**Pipeline Health:**43```44Call MCP tool: harness_list45Parameters:46 resource_type: "execution"47 org_id: "<organization>"48 project_id: "<project>"49 pipeline_id: "<pipeline_identifier>"50```51- Last N pipeline executions: pass rate and failure patterns52- All required stages passed (build, test, security scan)5354**Dependency Verification:**55- All referenced connectors, secrets, and infrastructure are accessible56- Required approvals are configured for the target environment5758**Artifact Readiness:**59- Container image exists and has passed security scanning60- SBOM is generated and signed (if required)61- Image tag matches the expected version6263**Environment Health:**64- Target environment is not frozen or in maintenance65- No active incidents on the target cluster66- Resource capacity is sufficient for the deployment6768**Security Gates:**69- No critical or high CVEs above threshold70- OPA policies pass for the target environment71- Required compliance attestations are present7273Present a structured report with PASS/FAIL/WARNING for each check and a final GO/NO-GO recommendation.7475### Step 4: Analyze Environment Drift7677Gather from the user:78- Service name, source environment, and target environment7980Compare environments using harness_get for each:8182```83Call MCP tool: harness_get84Parameters:85 resource_type: "environment"86 resource_id: "<source_env>"87 org_id: "<organization>"88 project_id: "<project>"89```9091Check for drift in:92- **Configuration:** Environment variables, feature flags, config maps93- **Infrastructure:** Resource limits, replica counts, node pools94- **Secrets:** Secret versions and rotation status95- **Manifests:** Kubernetes manifest differences96- **Dependencies:** External service versions and endpoints9798Classify each difference by risk:99- CRITICAL: Could cause outage (missing secrets, wrong endpoints)100- WARNING: May cause behavioral differences (different resource limits)101- INFO: Cosmetic or expected differences (environment-specific values)102103### Step 5: Canary Rollout Decision104105Gather from the user:106- Service name, canary traffic percentage, and duration107- Canary version vs. baseline version108- Key metrics to evaluate (error rate, latency, throughput)109110Analyze canary health:111112```113Call MCP tool: harness_list114Parameters:115 resource_type: "execution"116 org_id: "<organization>"117 project_id: "<project>"118```119120Evaluate:121- **Error rate:** Canary vs. baseline (threshold: no more than 1.1x baseline)122- **Latency:** P50, P95, P99 comparison123- **Throughput:** Requests handled without errors124- **Resource usage:** CPU and memory vs. baseline125- **Business metrics:** Conversion rate, transaction success rate126127Provide a recommendation:128- **PROMOTE** -- All metrics within thresholds, recommend increasing traffic or full rollout129- **HOLD** -- Some metrics borderline, recommend extending observation window130- **ROLLBACK** -- Metrics degraded beyond thresholds, recommend immediate rollback131132## Examples133134- "Is our payment-service ready to deploy to production?" -- Run full readiness check with go/no-go recommendation135- "Compare staging and production environments before deploying" -- Analyze configuration, infrastructure, and secret drift136- "Should we promote the canary or roll back?" -- Evaluate canary metrics and recommend promote/hold/rollback137- "Run a pre-deploy checklist for the checkout service" -- Validate pipeline health, artifacts, security gates, and environment138139## Performance Notes140141- Readiness checks should run against the actual target environment, not a cached state -- environments change between checks.142- Environment drift analysis is most valuable right before deployment -- running it hours early may miss recent changes.143- Canary decisions need sufficient traffic volume to be statistically meaningful -- low-traffic services may need longer observation windows.144- Include business metrics in canary analysis when available -- technical metrics alone may miss user-facing issues.145146## Troubleshooting147148### Readiness Check Returns False Negatives149- Verify connectors and secrets are accessible from the readiness check runner150- Check that security scan results are available for the specific image tag being deployed151- Ensure environment freeze status is up to date152153### Drift Analysis Shows Too Many Differences154- Filter out expected differences (environment-specific variables like URLs, credentials)155- Focus on infrastructure and manifest drift first -- these are most likely to cause issues156- Use environment overrides in Harness to manage expected per-environment configuration157158### Canary Metrics Inconclusive159- Increase traffic percentage to get more data points160- Extend the observation window to capture more traffic patterns161- Check that metric collection is working correctly for the canary pods