C.W.K.
Stream
Lesson 05 of 06 · published

Cloud 워크플로우와 GitHub Actions

~16 min · remote, cicd, github-actions, cloud, spot-instances

Level 0🌱 입문자
0 XP0/70 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

로컬 prototype, cloud 실행, context 손실 X

Remote 가 CI/CD 에서 흔한 패턴 뒤집어 빛나. CI runner 에 raw prompt push X; 풀 context 로 로컬 prototype, 그 다음 확립된 세션을 runner 에 hand off. Heavy 작업이 compute 싼 데 run; 생각이 iteration 빠른 데 일어남.

패턴: claude 로컬, 작업이 잘 모양 잡힐 때까지 iterate, claude remote handoff ci-runner, CI runner 가 확립된 context 로 heavy 작업 끝, 결과 pull back. 또는 완전 무인: cron + claude exec + --output-last-message.

비용 레버: Spot/Preemptible VM 을 Remote target 으로. preemption 전 세션이 로컬로 hand back 가능 → 60–90% 비용 절감, 워크플로우 disruption X. Docker 와 결합해 reproducible target 환경 → 프로덕션급 경제성.

Code

Provision an EC2 Remote target·bash
aws ec2 run-instances \
  --image-id ami-0abcdef1234567890 \
  --instance-type c6i.2xlarge \
  --key-name my-key \
  --security-group-ids sg-0abc123 \
  --tag-specifications 'ResourceType=instance,Tags=[{Key=Purpose,Value=claude-remote}]' \
  --user-data '#!/bin/bash
    apt-get update -y
    curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
    apt-get install -y nodejs git
    npm install -g @anthropic-ai/claude-code
  '

# Add to SSH config
echo "
Host claude-ci
    HostName \$(aws ec2 describe-instances ...)
    User ubuntu
    IdentityFile ~/.ssh/my-key.pem
" >> ~/.ssh/config

claude remote add claude-ci
Overnight cron + Spot instance·bash
# crontab -e (on the always-on Remote target)
0 23 * * 1-5 /usr/local/bin/claude exec \
  --path /workspace/myproject \
  "Run full test suite, fix failures you can, update deps, \
   write a summary report." \
  --output-last-message \
  >> /var/log/claude-nightly.log 2>&1

# Or trigger from your local machine
claude remote handoff --resume claude-ci
# Walk away. Job runs on Spot. Comes back on local hand-back.

External links

Exercise

작은 cloud VM provision (free tier 또는 가장 싼 Spot). Claude Code 설치, SSH 설정, Remote target 등록. 진짜 handoff-worthy 작업 (긴 test suite) hand off, 원격에서 run 동안 로컬에서 절약 확인.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.