Blue-Green Deployment

Blue-Green Deployment

Guides a coding agent in blue-green deployments for zero-downtime releases, with traffic switching between environments, validation and instant rollback.

Skill files6 files

references/

scripts/

templates/

SKILL.md89 lines
1
---
2
name: blue-green-deployment
3
description: >
4
Implement blue-green deployment strategies for zero-downtime releases with
5
instant rollback capability and traffic switching between environments.
6
---
7
8
# Blue-Green Deployment
9
10
## Table of Contents
11
12
- [Overview](#overview)
13
- [When to Use](#when-to-use)
14
- [Quick Start](#quick-start)
15
- [Reference Guides](#reference-guides)
16
- [Best Practices](#best-practices)
17
18
## Overview
19
20
Deploy applications using blue-green deployment patterns to maintain two identical production environments, enabling instant traffic switching and rapid rollback capabilities.
21
22
## When to Use
23
24
- Zero-downtime releases
25
- High-risk deployments
26
- Complex application migrations
27
- Database schema changes
28
- Rapid rollback requirements
29
- A/B testing with environment separation
30
- Staged rollout strategies
31
32
## Quick Start
33
34
Minimal working example:
35
36
```yaml
37
# blue-green-setup.yaml
38
apiVersion: v1
39
kind: ConfigMap
40
metadata:
41
name: blue-green-config
42
namespace: production
43
data:
44
switch-traffic.sh: |
45
#!/bin/bash
46
set -euo pipefail
47
48
CURRENT_ACTIVE="${1:-blue}"
49
TARGET="${2:-green}"
50
ALB_ARN="arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/myapp-alb/1234567890abcdef"
51
52
echo "Switching traffic from $CURRENT_ACTIVE to $TARGET..."
53
54
# Get target group ARNs
55
BLUE_TG=$(aws elbv2 describe-target-groups \
56
--load-balancer-arn "$ALB_ARN" \
57
--query "TargetGroups[?Tags[?Key=='Name' && Value=='blue']].TargetGroupArn" \
58
--output text)
59
60
GREEN_TG=$(aws elbv2 describe-target-groups \
61
--load-balancer-arn "$ALB_ARN" \
62
// ... (see reference guides for full implementation)
63
```
64
65
## Reference Guides
66
67
Detailed implementations in the `references/` directory:
68
69
| Guide | Contents |
70
|---|---|
71
| [Blue-Green with Load Balancer](references/blue-green-with-load-balancer.md) | Blue-Green with Load Balancer |
72
| [Blue-Green Rollback Script](references/blue-green-rollback-script.md) | Blue-Green Rollback Script |
73
| [Monitoring and Validation](references/monitoring-and-validation.md) | Monitoring and Validation |
74
75
## Best Practices
76
77
### ✅ DO
78
79
- Follow established patterns and conventions
80
- Write clean, maintainable code
81
- Add appropriate documentation
82
- Test thoroughly before deploying
83
84
### ❌ DON'T
85
86
- Skip testing or validation
87
- Ignore error handling
88
- Hard-code configuration values
89

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…