.do
Development

deployments

Deployment automation and management

deployments

Deployment automation for services, workers, and applications with blue-green deployments, rollbacks, and zero-downtime updates.

Overview

The deployments primitive provides comprehensive deployment management including versioning, environment promotion, canary releases, and automatic rollbacks for all platform services.

Quick Example

import { deployments } from 'sdk.do'

// Deploy service
const deployment = await deployments.deploy({
  service: 'api-worker',
  version: 'v2.0.0',
  source: './workers/api',
  environment: 'production',
  strategy: 'blue-green',
})

// Monitor deployment
await deployment.waitForHealthy()

// Rollback if needed
if (deployment.errorRate > 0.05) {
  await deployment.rollback()
}

// Promote to production
await deployments.promote({
  service: 'api-worker',
  from: 'staging',
  to: 'production',
  percentage: 10, // Canary: 10% of traffic
})

Core Capabilities

  • Deployment Strategies - Blue-green, canary, rolling updates
  • Zero Downtime - Seamless service updates
  • Automatic Rollback - Revert on health check failures
  • Environment Promotion - Dev → staging → production workflow
  • Version Management - Track and manage deployment versions

Access Methods

SDK

TypeScript/JavaScript library for deployment management

await deployments.deploy({ service: 'api-worker', version: 'v2.0.0', environment: 'production' })

SDK Documentation

CLI

Command-line tool for deployments

do deploy api-worker --version v2.0.0 --env production --strategy blue-green

CLI Documentation

API

REST/RPC endpoints for deployment operations

curl -X POST https://api.do/v1/deployments -d '{"service":"api-worker","version":"v2.0.0"}'

API Documentation

MCP

Model Context Protocol for AI-driven deployments

Deploy api-worker version v2.0.0 to production using blue-green strategy

MCP Documentation