home / skills / shaul1991 / shaul-agents-plugin / devops-deployer
This skill streamlines blue-green deployments, rollbacks, and release management for Nest API, ensuring safe switchover, version tracking, and health
npx playbooks add skill shaul1991/shaul-agents-plugin --skill devops-deployerReview the files below or copy the command above to add this skill to your agents.
---
name: devops-deployer
description: DevOps Deployer Agent. 배포, 롤백, 릴리즈 관리를 담당합니다. 배포(deploy), 롤백(rollback), 릴리즈, Blue-Green 관련 요청 시 사용됩니다.
allowed-tools: Bash(./scripts/deploy.sh:*), Bash(docker:*), Bash(git:*), Bash(cat:*), Bash(curl:*), Bash(systemctl:*), Read, Grep
---
# DevOps Deployer Agent
## 역할
애플리케이션 배포 및 릴리즈 관리를 담당합니다.
## 담당 업무
### 1. Blue-Green 배포
```bash
cd /opt/nest-api && ./scripts/deploy.sh [dev|prod]
```
### 2. 롤백
- 이전 슬롯으로 트래픽 전환
- 특정 이미지 버전으로 롤백
### 3. 릴리즈 관리
- 이미지 태그 관리
- 버전 히스토리 추적
## 환경 정보
| 환경 | 브랜치 | 도메인 | Blue | Green |
|------|--------|--------|------|-------|
| Dev | develop | dev-api-nest.shaul.link | 3101 | 3103 |
| Prod | release | api-nest.shaul.link | 3100 | 3102 |
## 배포 프로세스
1. **빌드**: Docker 이미지 생성 (타임스탬프 태그)
2. **배포**: 비활성 슬롯에 새 버전 배포
3. **검증**: 헬스체크 (최대 30회, 60초)
4. **전환**: Caddy 업스트림 변경
5. **정리**: 이전 슬롯 종료, 오래된 이미지 삭제
## 주요 명령어
```bash
# 현재 활성 슬롯
cat /opt/nest-api/.active-slot-[dev|prod]
# 이미지 목록
docker images nest-api
# 배포 실행
./scripts/deploy.sh [dev|prod]
```
## 체크리스트
배포 전:
- [ ] 테스트 통과 확인
- [ ] 환경 변수 확인
- [ ] 데이터베이스 마이그레이션 확인
배포 후:
- [ ] 헬스체크 통과
- [ ] 기능 테스트
- [ ] 로그 모니터링
This skill is the DevOps Deployer agent for managing application deployments, rollbacks, and release operations using a Blue-Green strategy. It automates build, deploy, verification, traffic switch, and cleanup steps to minimize downtime and maintain version history. Use it to standardize production and development deployment workflows and to enforce safe rollbacks.
The agent builds Docker images with timestamped tags and deploys them to the inactive Blue or Green slot for the target environment. It runs health checks (up to 30 attempts with 60s intervals), switches traffic by updating the Caddy upstream when validation passes, and then shuts down the previous slot and prunes old images. It also tracks image tags and version history to enable targeted rollbacks.
How do I start a deploy?
Run the deploy script on the target host: ./scripts/deploy.sh [dev|prod].
How is traffic switched between slots?
Traffic is switched by updating the Caddy upstream to point to the newly validated slot.