운영 Runbook
이 document는 Enterprise New offline application을 기준으로 합니다.
일일 점검
섹션 제목: “일일 점검”- deployment package の root directory で다음 commands를 실행합니다.
Terminal window ./bin/verify.sh --site config/site.conf./bin/smoke-business-emqx.sh --site config/site.conf - 다음 항목을 확인합니다.
- 3 台の Swarm nodes が
Readyである。 APP VIP /healthzと/readyzが200を返す。DB VIP:5432に접속할 수 있다。- PostgreSQL primary、standby、witness topology が정상이다。
backend、redis、emqx、sourceflow、eventflow、marimo、opcua-serverが active application node で모두 running 상태이다。
- 3 台の Swarm nodes が
Application Checks
섹션 제목: “Application Checks”-
active application node で다음 commands를 실행합니다.
Terminal window cd /opt/tier0-enterprise/tier0-deploybash bin/compose.sh psbash bin/compose.sh logs --tail=200 backendcurl -fsS http://127.0.0.1:8088/healthzcurl -fsS http://127.0.0.1:8088/readyz -
Health-check の見方:
healthzfailure: まず backend process、image、container logs 를 확인합니다.readyzfailure: DB VIP、Redis、database migration logs も確認します。- Home page に到達できるが login できない場合:
.envのADMIN_INITIAL_PASSWORDを確認し、その後 backend IAM migration logs と user tables 를 확인합니다.HTTP port だけで deployment success を判断하지 마세요.
Protocol Entry Checks
섹션 제목: “Protocol Entry Checks”nc -vz <APP_VIP> 1883nc -vz <APP_VIP> 8883nc -vz <APP_VIP> 8083nc -vz <APP_VIP> 8084nc -vz <APP_VIP> 4840Database Checks
섹션 제목: “Database Checks”Database nodes で次を실행합니다.
systemctl status tier0-postgresqlsystemctl status tier0-repmgrdsudo -iu postgres psql -Atqc 'select pg_is_in_recovery();'sudo -iu postgres /usr/local/bin/repmgr -f /etc/repmgr.conf cluster showpg_is_in_recovery=falseは primary を의미합니다.pg_is_in_recovery=trueは standby を의미합니다.- DB VIP は current primary のみに配置されている필요합니다.
- standby replication が interrupted した場合、または witness が upstream errors を報告した場合は、まず site を保全してください。full deployment を直接再実行하지 마세요.
APP VIP Failover
섹션 제목: “APP VIP Failover”-
test 前に、現在 VIP を保持している node を記録し、次를 확인합니다.
Terminal window curl -fsS http://<APP_VIP>/healthzcurl -fsS http://<APP_VIP>/readyz -
現在の VIP node で
keepalivedを停止した後、別の application node への VIP takeover を確認し、両方の URLs を再テストします。HAProxy backend は active application node の8088/TCPを指すため、3 台すべての application nodes が active node の port 8088 に到達できる필요합니다. -
keepalivedを復旧した後、verify.shと smoke checks を再실행합니다.drill 中に active application containers を停止하지 마세요.
DB Primary Failure Switchover
섹션 제목: “DB Primary Failure Switchover”Failure drill の前に backup を作成し、replication が healthy であること를 확인합니다.
./bin/backup-db.sh --site config/site.conf現在の primary で tier0-postgresql を停止した後、repmgr が standby を promote し、DB VIP takeover すること를 확인합니다.target RTO は 2 分以内です。同じ architecture での過去の tests は約 59-64 秒でした。
Backup and Restore
섹션 제목: “Backup and Restore”-
Backup:
Terminal window ./bin/backup-db.sh --site config/site.conf -
Restore:
Terminal window ./bin/restore-db.sh --site config/site.conf --restore-file /backup/tier0-db/postgres-YYYYmmddTHHMMSS.dump
Cleanup and Retest
섹션 제목: “Cleanup and Retest”./full-cleanup.sh --env install.env --yes./install.sh --auto --yesCommon Issues
섹션 제목: “Common Issues”Backend Startup Failure
섹션 제목: “Backend Startup Failure”cd /opt/tier0-enterprise/tier0-deploybash bin/compose.sh logs --tail=300 backendbash bin/compose.sh psEMQX Startup Failure
섹션 제목: “EMQX Startup Failure”cd /opt/tier0-enterprise/tier0-deploybash bin/compose.sh logs --tail=200 emqxrepmgrd Repeated Restarts
섹션 제목: “repmgrd Repeated Restarts”systemctl status tier0-repmgrdtail -100 /var/log/repmgr/repmgr.logsudo -iu postgres psql -Atqc 'show shared_preload_libraries;'Material Verification Failure
섹션 제목: “Material Verification Failure”./bin/verify-materials.sh