FlyDeploy.Upgrader (FlyDeploy v0.4.2)

Copy Markdown

Downloads and applies hot code upgrades on individual machines.

This module handles the actual upgrade process:

  1. Download tarball from S3
  2. Extract and copy .beam files
  3. Suspend processes, load new code, upgrade processes, resume

Summary

Functions

Normal hot upgrade on a running system.

Replay a hot upgrade on application startup.

Functions

hot_upgrade(tarball_url, app, opts \\ [])

Normal hot upgrade on a running system.

Uses suspend/resume for safe process upgrades.

Options

  • :suspend_timeout - Timeout in ms for suspending each process (default: 10_000)

replay_upgrade_startup(tarball_url, app)

Replay a hot upgrade on application startup.

This is called when a machine restarts and needs to reapply a hot upgrade that was previously deployed. Unlike hot_upgrade/2, this:

  1. Pre-loads all changed modules AFTER copying beam files
  2. Doesn't need to suspend/resume processes (they don't exist yet)