Upgrade
Container Mode (2026.05+, recommended)
# 자동 (META-INF/VERSION.JSON 의 최신 build_date)
sudo bash /opt/kopens/install/upgrade.sh
# 특정 tag
sudo bash /opt/kopens/install/upgrade.sh --to 2026-20260601
# 직전 tag 로 rollback
sudo bash /opt/kopens/install/upgrade.sh --rollback
# 새 빌드 존재 여부만 확인
sudo bash /opt/kopens/install/upgrade.sh --check
Execution sequence (automatic):
- Compare build_date in META-INF/VERSION.JSON
- pre-snapshot →
/data1/pp-backups/pe-backup-<ts>.tar.zst(calls backup.sh; can be bypassed with SKIP_BACKUP=1) docker pull <new-tag>/etc/kopens/version.envupdate +systemctl restart/api/v1/system/health90-second probe- all UP → success / DEGRADED → automatic rollback + snapshot path guidance
Progress status: cat /etc/kopens/upgrade.status — JSON (idle / running / success / rolling-back / rolled-back / error + snapshot path).
UI / API trigger:
# 컨테이너 안 (ConfigController) 에서 자동
echo '{"target_tag":"2026-20260601"}' > /etc/kopens/upgrade.request
# 호스트의 kopens-upgrade.path (inotify) 감지 → upgrade.sh --from-trigger 실행
Detailed guide: the "OTA Upgrade" section of Container Mode Operations Guide.
(legacy) Native Mode
$PE_HOME/bin/upgrade.sh
Execution sequence:
- Call
backup.sh(automatic) - Download the latest
install.shfromproduct.kopens.io install.shdownloads the artifact (KOPENS_EDGE_V<VER>.tar.zstd) → swaps in/opt/kopens- Call the new
start.sh
Normal output:
[1] BACKUP ... done (/data1/pp-backup/20260508-040215/)
[2] DOWNLOAD install.sh ... 22 KB OK
[3] EXEC install.sh ...
- downloading KOPENS_EDGE_V2026.tar.zstd ... 727 MB OK
- extracting ... OK
- finalizing ...
[4] START ... (start.sh 호출됨)
UPGRADE COMPLETED.
Duration depends on artifact size + line speed + decompression (typically 5–15 minutes).
While upgrade.sh is running, the gateway is stopped. Notify external SCADA / Sparkplug receivers in advance. Run it during a night-time inspection window whenever possible.
2. Pre-checks
Before starting the upgrade:
# 1. 외부 망이 충분히 빠른지 — 회선이 느리면 download 만 수십 분
$PE_HOME/bin/network-speed-test.sh
# 2. 디스크 여유 (산출물 크기의 2–3배는 있어야)
df -h /opt /data1
# 3. 살아있는 백업이 있는지
ls -lt /data1/pp-backup | head -3
3. Verifying the Upgrade Result
$PE_HOME/bin/ps.sh # 모든 컴포넌트 살아있는지
curl -s http://127.0.0.1/api/v1/edge | jq # 버전/엣지 ID 새 값 확인
curl -s http://127.0.0.1/ui/opcua/tree | jq '.data.tree | length' # 사이트/태그 정상
$PE_HOME/bin/log-viewer.sh # 30초 정도 봐서 SEVERE 없는지
# (Ctrl+C)
Also confirm on the external SCADA / Sparkplug receiver side that data is arriving normally.
4. Common Pitfalls
| Symptom | Cause / Resolution |
|---|---|
Stalls at download install.sh | Check the external network / product.kopens.io. Verify directly with curl -v http://product.kopens.io/... |
The new artifact is corrupted after extracting | Download was interrupted. Check disk space and retry |
| Only some components are alive after the upgrade | Step-by-step failure in start.sh — use log-viewer.sh to identify where it stopped |
| Roll back to a previous version after the upgrade | Restore from backup → Backup / Restore |
5. firmware.sh — OS Package Update
$PE_HOME/bin/firmware.sh
Internally:
dnf update -y
dnf clean all
Use this when applying security patches on a quarterly basis. If a kernel update is included, a reboot is required.
$PE_HOME/bin/firmware.sh
needs-restarting -r # 새 커널이 깔렸는지 확인
# 결과가 "Reboot is required" 이면
$PE_HOME/bin/stop.sh
$PE_HOME/bin/reboot.sh
6. Learn More
- Integrated upgrade scenario (safe procedure) → Operational Scenarios — Deploying a New Version
- Artifacts are produced by the GitLab release chain (
edge:libs→edge:deploy-dev→edge:image→edge:staging→edge:version). - Installation / deployment (for developers): Installation / Deployment