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

릴리스 구성과 부팅 스크립트

sys.config와 부팅 스크립트를 익혀 애플리케이션 환경을 구성하고 Erlang 릴리스의 정확한 시작 순서를 제어하는 방법을 배웁니다.

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

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

What Is Release Configuration?

A release bundles your applications, the Erlang runtime, and configuration. Two files drive runtime behaviour: sys.config for application settings and the boot script for the startup sequence.

The Application Environment

Each OTP application has an environment — a set of key/value parameters. You read them at runtime with application:get_env/2.

application:get_env(my_app, port).

sys.config Structure

sys.config is a single Erlang term: a list of {App, [{Key, Value}]} tuples that override application defaults at boot.

[
  {my_app, [{port, 8080}, {pool_size, 10}]},
  {kernel, [{logger_level, info}]}
].

Overriding Defaults

Values in sys.config override those in each app .app file. This lets one codebase run differently per environment (dev, staging, prod) just by swapping config.

Reading Config at Runtime

Inside a gen_server init, pull configured values so behaviour follows the environment.

init([]) ->
    {ok, Port} = application:get_env(my_app, port),
    {ok, listen(Port)}.

What Is a Boot Script?

The boot script (.script compiled to .boot) lists every application and module to load, and the order to start them. The runtime follows it to bring the system up deterministically.

Generated from the .rel File

You describe a release in a .rel file. Tools like systools or rebar3 turn it into the boot script.

{release,
  {"my_system", "1.0.0"},
  {erts, "13.0"},
  [{kernel, "8.0"}, {stdlib, "4.0"}, {my_app, "1.0.0"}]}.

Start Phases

Applications start in dependency order. If my_app lists kernel and stdlib as dependencies, the boot script guarantees they start first.

Permanent vs Temporary Apps

In the boot script an application can be permanent (its crash takes down the node), transient, or temporary. Choose permanent for core services.

Layered Config with config/0

You can split configuration across files and merge them, or use runtime os:getenv/1 reads for secrets that should not live in sys.config.

init([]) ->
    Url = os:getenv("DATABASE_URL"),
    {ok, connect(Url)}.

Applying a Custom Config File

At node startup you point to a config file with the -config flag, letting one release run with different settings just by swapping the file.

erl -config /etc/my_system/prod.config -boot my_system

Quick Check

Test your release configuration knowledge.

Recap

You learned how releases are configured and started:

  • sys.config sets the application environment per deployment
  • Read values with application:get_env/2
  • The .rel file is compiled into a boot script
  • Boot scripts start applications in dependency order
  • Use permanent apps for core services and env vars for secrets

자주 묻는 질문

“릴리스 구성과 부팅 스크립트” 강의는 무료인가요?

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

“릴리스 구성과 부팅 스크립트”에서 뭘 배우나요?

sys.config와 부팅 스크립트를 익혀 애플리케이션 환경을 구성하고 Erlang 릴리스의 정확한 시작 순서를 제어하는 방법을 배웁니다. 브라우저에서 직접 실행하는 실습 코드로 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개 중 4번째 강의입니다.

“릴리스 구성과 부팅 스크립트” 강의는 얼마나 걸리나요?

대부분의 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(으)로 돌아가기