Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/production-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ jobs:
script: |
cd ~/snackgame-server/repo
git fetch origin main
git checkout main
git pull origin main --no-recurse-submodules

git checkout -B main origin/main
git pull --ff-only origin main --no-recurse-submodules
chmod +x scripts/deploy-rolling.sh
scripts/deploy-rolling.sh \
${{ secrets.NLB_BACKEND_02_HTTP }} \
Expand Down Expand Up @@ -100,9 +99,8 @@ jobs:
script: |
cd ~/snackgame-server/repo
git fetch origin main
git checkout main
git pull origin main --no-recurse-submodules

git checkout -B main origin/main
git pull --ff-only origin main --no-recurse-submodules
chmod +x scripts/deploy-rolling.sh
scripts/deploy-rolling.sh \
${{ secrets.NLB_BACKEND_01_HTTP }} \
Expand Down
2 changes: 1 addition & 1 deletion scripts/deploy-dev.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#!/bin/bash
set -euo pipefail


Expand Down
13 changes: 3 additions & 10 deletions scripts/deploy-rolling.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#!/bin/bash
set -euo pipefail


Expand All @@ -11,7 +11,6 @@ HTTP_BACKEND="$1"
HTTPS_BACKEND="$2"



export PATH="$HOME/bin:$PATH"

COMPOSE_DIR="$HOME/snackgame-server"
Expand All @@ -38,21 +37,15 @@ set_drain() {
--backend-set-name snackgame-http \
--backend-name "$HTTP_BACKEND" \
--is-drain "$is_drain" \
--is-backup false \
--is-offline false \
--wait-for-state SUCCEEDED \
--force
--wait-for-state SUCCEEDED
Comment on lines 37 to +40
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

백엔드 업데이트 시 --is-backup false--is-offline false 옵션이 제거되었습니다. 이 옵션들은 배포 과정에서 해당 백엔드가 백업용이 아니며 오프라인 상태도 아님을 명시적으로 보장하여, 배포 완료 후 즉시 정상적인 트래픽을 받을 수 있도록 합니다. 만약 관리자가 수동으로 백엔드를 오프라인이나 백업 상태로 설정해 두었다면, 이 옵션들이 없는 현재의 스크립트는 배포 후에도 해당 상태를 그대로 유지하게 되어 서비스 투입이 되지 않을 수 있습니다. 배포의 안정성과 자동화 측면에서 해당 옵션들을 명시적으로 유지하는 것이 좋습니다.

Suggested change
--backend-set-name snackgame-http \
--backend-name "$HTTP_BACKEND" \
--is-drain "$is_drain" \
--is-backup false \
--is-offline false \
--wait-for-state SUCCEEDED \
--force
--wait-for-state SUCCEEDED
--backend-set-name snackgame-http \
--backend-name "$HTTP_BACKEND" \
--is-drain "$is_drain" \
--is-backup false \
--is-offline false \
--wait-for-state SUCCEEDED


oci nlb backend update \
--auth instance_principal \
--network-load-balancer-id "$NLB_ID" \
--backend-set-name snackgame-https \
--backend-name "$HTTPS_BACKEND" \
--is-drain "$is_drain" \
--is-backup false \
--is-offline false \
--wait-for-state SUCCEEDED \
--force
--wait-for-state SUCCEEDED
Comment on lines 45 to +48
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

snackgame-https 백엔드 세트 업데이트 시에도 --is-backup false--is-offline false 옵션을 유지하여, 배포 완료 후 백엔드가 정상적으로 활성화되어 트래픽을 받을 수 있는 상태임을 보장하는 것이 좋습니다.

Suggested change
--backend-set-name snackgame-https \
--backend-name "$HTTPS_BACKEND" \
--is-drain "$is_drain" \
--is-backup false \
--is-offline false \
--wait-for-state SUCCEEDED \
--force
--wait-for-state SUCCEEDED
--backend-set-name snackgame-https \
--backend-name "$HTTPS_BACKEND" \
--is-drain "$is_drain" \
--is-backup false \
--is-offline false \
--wait-for-state SUCCEEDED

}


Expand Down
Loading