Q

Quick Prepare Operator

Boost productivity using this prepare, validate, release, packages. Includes structured workflows, validation checks, and reusable patterns for deployment.

CommandClipticsdeploymentv1.0.0MIT
0 views0 copies

Quick Prepare Operator

Prepare deployment environments with pre-flight checks, dependency verification, and configuration validation.

When to Use This Command

Run this command when you need to:

  • Validate that all prerequisites are satisfied before triggering a deployment
  • Run environment readiness checks including credentials, services, and infrastructure
  • Generate a deployment preparation report with actionable items for any failures

Consider alternatives when:

  • You are already mid-deployment and need to monitor rather than prepare
  • Your CI/CD pipeline already handles all pre-flight validation automatically

Quick Start

Configuration

name: quick-prepare-operator type: command category: deployment

Example Invocation

claude command:run quick-prepare-operator --env production --checks all

Example Output

Environment: production
Timestamp: 2026-03-15T10:32:00Z

Pre-flight Check Results:
  [PASS] Git branch is clean, no uncommitted changes
  [PASS] All tests pass (284/284)
  [PASS] Build completes successfully
  [PASS] Docker image builds and passes health check
  [PASS] Database connection verified
  [PASS] Redis connection verified
  [WARN] SSL certificate expires in 21 days
  [PASS] Environment variables: 18/18 present
  [PASS] Disk space: 42GB available (minimum: 10GB)
  [FAIL] API key for payment gateway is expired

Summary: 9 passed, 1 warning, 1 failure
Action Required: Renew payment gateway API key before deploying.
Deployment readiness: NOT READY

Core Concepts

Pre-flight Validation Overview

AspectDetails
Code ChecksClean git state, passing tests, successful build
InfrastructureDatabase, cache, queue, and storage service connectivity
CredentialsAPI keys, tokens, and certificates validity and expiration
ResourcesDisk space, memory, CPU capacity for deployment process
ConfigurationEnvironment variables, feature flags, and secrets completeness

Preparation Workflow

  Trigger Preparation
        |
        v
  +-------------------+
  | Code Validation   |---> Tests, lint, build
  +-------------------+
        |
        v
  +-------------------+
  | Infra Connectivity|---> DB, Redis, queues
  +-------------------+
        |
        v
  +-------------------+
  | Credential Audit  |---> Keys, tokens, certs
  +-------------------+
        |
        v
  +-------------------+
  | Resource Check    |---> Disk, memory, CPU
  +-------------------+
        |
        v
  +-------------------+
  | Report Generation |---> PASS / WARN / FAIL
  +-------------------+

Configuration

ParameterTypeDefaultDescription
envstringstagingTarget environment to validate: staging, production, dev
checksstringallCheck categories to run: all, code, infra, creds, resources
fail_fastbooleanfalseStop on first failure instead of running all checks
outputstringterminalOutput format: terminal, json, or markdown report file
cert_warn_daysinteger30Warn when SSL certificates expire within this many days

Best Practices

  1. Run Preparation Before Every Deploy - Make pre-flight checks a mandatory gate in your deployment workflow. Catching a missing environment variable before deploy is far cheaper than debugging it in production.

  2. Treat Warnings Seriously - An SSL certificate expiring in 21 days is not urgent today, but it will be if you forget. Track warnings as tickets and resolve them before they become failures.

  3. Validate Credential Rotation - Check not just that credentials exist but that they are valid and not expiring soon. Expired API keys cause silent failures that are difficult to diagnose under pressure.

  4. Include Dependency Service Health - Verify that external APIs, databases, and message queues are reachable and responding. A deploy that succeeds but cannot connect to its database is still a failure.

  5. Version Lock External Dependencies - Record the exact versions of database engines, Redis, and other infrastructure components. Version mismatches between environments cause subtle bugs that pass staging but fail production.

Common Issues

  1. Check Hangs on Network Timeout - A connectivity check to an unreachable service blocks the entire run. Set explicit timeouts (5-10 seconds) on all network checks and report the failure rather than waiting indefinitely.

  2. False Failure on Feature Flag Service - The feature flag service may be optional in some environments. Mark non-critical checks as warnings rather than failures so they do not block deployment unnecessarily.

  3. Stale Cached Results - Running preparation checks against cached test results or old build artifacts gives false confidence. Always force a fresh build and test run as part of the preparation sequence.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates