0Pricing
Erlang OTP: Distributed & Fault-Tolerant Systems Programming · 강의

릴리스 버전 관리 및 배포

프로덕션 환경에서 릴리스 버전 관리, 업데이트 배포 및 롤백 관리를 위한 모범 사례를 이해합니다.

릴리스 버전 관리 및 배포은(는) CoddyKit의 무료 Erlang OTP: Distributed & Fault-Tolerant Systems Programming 강의입니다. 이것은 4개 중 3번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Erlang OTP: Distributed & Fault-Tolerant Systems Programming 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Erlang OTP: Distributed & Fault-Tolerant Systems Programming 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Why Version Your Releases?

When you build an Erlang application for production, it's bundled into a release. Just like any software, releases need clear version numbers.

Versioning helps you:

  • Track changes over time.
  • Identify specific builds.
  • Manage compatibility with other systems.
  • Plan for upgrades and rollbacks.

Erlang's Versioning System

In Erlang, versioning happens at different levels. Each individual application (an .app file) has its own version. The overall release (the .rel file) also has a version that typically reflects the entire bundle.

The vsn key in an .app file defines an application's version.

% my_app.app file (conceptual)
{application, my_app,
 [{description, "My Erlang Application"},
  {vsn, "1.0.0"},
  {modules, [my_app_app, my_app_sup]},
  {registered, []},
  {applications, [kernel, stdlib]},
  {mod, {my_app_app, []}},
  {env, []}]}.

Semantic Versioning (SemVer)

A widely adopted standard is Semantic Versioning (SemVer), typically formatted as MAJOR.MINOR.PATCH. It's a great practice to follow for your Erlang applications.

  • MAJOR: Incremented for incompatible API changes.
  • MINOR: Incremented for new functionality in a backward-compatible way.
  • PATCH: Incremented for backward-compatible bug fixes.

This helps users understand the impact of an upgrade.

Applying SemVer in Erlang

You'll typically apply SemVer to your application's vsn in the .app file. When you create a release, its version (relvsn) often matches the main application's version or follows a similar scheme.

Tools like rebar3 manage these versions when building releases.

% my_app.app file
{application, my_app,
 [{description, "My Erlang Service"},
  {vsn, "1.2.3"},
  {modules, [my_app_app, my_app_sup]},
  {registered, []},
  {applications, [kernel, stdlib]},
  {mod, {my_app_app, []}},
  {env, []}]}.

Deployment Strategies Overview

Once you have a versioned Erlang release, how do you get it running in production? There are several strategies, depending on your system's requirements for uptime and complexity.

  • Cold Deployment: Simplest, involves downtime.
  • Hot Upgrades: Zero-downtime (covered in previous lesson).
  • Blue/Green or Canary Deployments: More advanced, often used with orchestration tools.

Cold Deployment: Simple Restart

A cold deployment is the most straightforward method. You stop your currently running Erlang system completely, replace its files with the new release, and then start the new version.

This method always incurs downtime, making it suitable for systems where brief interruptions are acceptable.

# Stop the old release
/path/to/my_app/bin/my_app stop

# (Replace files with new release)

# Start the new release
/path/to/my_app/bin/my_app start

Hot Upgrades vs. Full Deployment

Recall from the previous lesson that hot code loading allows you to upgrade a running Erlang system without stopping it.

While powerful for applying patches or minor feature additions, hot upgrades are specific to changing *parts* of a running system. A full deployment often refers to the initial setup or a complete replacement of the entire release, sometimes involving a cold restart or more advanced traffic management.

The Importance of Rollbacks

Even with careful testing, new deployments can introduce unexpected issues. A robust deployment strategy always includes a plan for rollbacks.

A rollback means reverting your system to a previous, stable version if the new deployment fails or causes problems. This minimizes the impact of failures and restores service quickly.

Erlang's Rollback Mechanism

Erlang releases are designed to support rollbacks. When you perform a hot upgrade, Erlang generates an .relup script that describes how to move between versions. Crucially, it also knows how to reverse that script to go back.

Even with cold deployments, you can switch back to a previous release by managing your release directories and restarting the desired version.

# Example of a rollback command using release_handler
# This would typically be part of a custom script or release tool

% release_handler:install_release("my_app-1.1.0").
% release_handler:make_permanent("my_app-1.1.0").

# Alternatively, for cold deployment:
# /path/to/my_app_1.1.0/bin/my_app start

Test Your Understanding

Order the steps for a typical cold deployment of an Erlang release.

Summary: Versioning & Deployment

You've learned about the critical aspects of release versioning and deployment in Erlang:

  • Versioning: Use vsn in .app files, ideally following SemVer (MAJOR.MINOR.PATCH), to track and manage changes.
  • Deployment: Understand cold deployment (with downtime) and its distinction from hot upgrades.
  • Rollbacks: Always plan for reverting to a stable previous version to ensure system resilience.

These practices are key to managing robust Erlang applications in production!

자주 묻는 질문

“릴리스 버전 관리 및 배포” 강의는 무료인가요?

네 — “릴리스 버전 관리 및 배포” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Erlang OTP: Distributed & Fault-Tolerant Systems Programming 강의 전체를 잠금 해제할 수 있습니다. Erlang OTP: Distributed & Fault-Tolerant Systems Programming 강의에는 총 4개의 강의가 포함되어 있습니다.

“릴리스 버전 관리 및 배포”에서 뭘 배우나요?

프로덕션 환경에서 릴리스 버전 관리, 업데이트 배포 및 롤백 관리를 위한 모범 사례를 이해합니다. 브라우저에서 직접 실행하는 실습 코드로 Erlang OTP: Distributed & Fault-Tolerant Systems Programming을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Erlang OTP: Distributed & Fault-Tolerant Systems Programming을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Erlang OTP: Distributed & Fault-Tolerant Systems Programming은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 3번째 강의입니다.

“릴리스 버전 관리 및 배포” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Erlang OTP: Distributed & Fault-Tolerant Systems Programming 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Erlang OTP: Distributed & Fault-Tolerant Systems Programming 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. Erlang 릴리스 만들기
  2. 핫 코드 로딩 및 업그레이드
  3. 릴리스 버전 관리 및 배포
  4. 릴리스 구성과 부팅 스크립트
← Erlang OTP: Distributed & Fault-Tolerant Systems Programming(으)로 돌아가기