Skip to main content

Operations

This section covers the operational aspects of DocuStack infrastructure: deployment workflows, cost management, and day-to-day operations.

Why This Matters

DocuStack follows a GitOps-first approach where all infrastructure changes flow through pull requests. Understanding these workflows is essential for:

  • Consistency: Every change is reviewed, tested, and auditable
  • Safety: Automated plans prevent surprises; applies require approval
  • Cost Control: Automated teardown saves ~$100/month in non-production environments
  • Compliance: Full audit trail via Git history and Terrateam logs

Quick Reference

TaskGuideTime
Deploy infrastructure changesDeployment Guide5-30 min
Stop dev resources for the nightTeardown System30 sec
Full weekend teardownTeardown System10 min
Understand Terrateam workflowTerrateam Guide-
Protect internal servicesCloudflare Access15 min

Deployment Methods

                    ┌─────────────────────────────────────────┐
│ Deployment Methods │
└─────────────────────────────────────────┘

┌───────────────────────────┼───────────────────────────┐
│ │ │
▼ ▼ ▼
┌─────────────────────┐ ┌─────────────────────┐ ┌─────────────────────┐
│ TERRATEAM (PR) │ │ MANUAL │ │ SCHEDULED │
│ │ │ │ │ │
│ Primary method for │ │ Bootstrap, debug, │ │ Nightly stop/start │
│ all standard infra │ │ emergency fixes │ │ Weekend teardown │
│ changes │ │ │ │ │
└─────────────────────┘ └─────────────────────┘ └─────────────────────┘

Cost Optimization

The teardown system provides significant savings for non-production environments:

StrategyMonthly SavingsRecovery Time
Nightly stop/start (Tier 1)~$542-5 minutes
Weekend full teardown (Tier 2)~$5315-30 minutes
Combined~$100+Varies

Guides in This Section

Deployment Guide

Comprehensive guide covering initial deployment, PR-based workflows, environment promotion, and rollback procedures.

Terrateam Workflow

Deep dive into how Terrateam orchestrates deployments across our multi-repository architecture, including Lambda code deployment patterns.

Infrastructure Teardown

Automated cost optimization system with Slack ChatOps control for non-production environments.

Repository Migration

Reference documentation for the migration from monolithic repository to the Gruntwork two-repository pattern.

Cloudflare Access Setup

Configuring Zero Trust authentication for internal services using GitHub as the identity provider.

Emergency Procedures

For production incidents, see the Rollback Procedures section of the Deployment Guide.

Emergency Contacts:

IssueContactMethod
Production outageOn-call engineerPagerDuty
Infrastructure issuesInfrastructure teamSlack #infra-alerts
AWS account issuesAWS SupportSupport Console