View Source AntikytheraCore.Version.History (antikythera v0.5.1)
Functions to get information from "history" files.
Antikythera uses history files to detect new deployable versions of antikythera instance and gears.
Each of antikythera instance and gears has its own history file.
The files reside in AntikytheraCore.Path.history_dir/0
.
When deploying a new version, after successfully generated a compiled artifact (tarball), antikythera's deploy script instructs the ErlangVM nodes by appending a line to the history file of the target OTP application. Each line takes either of the following forms:
format of line | installable | upgradable | |
deploy with hot code upgrade | <version> | true | true |
deploy with hot code upgrade (canary) | <version> canary=<hosts> | false | host in hosts |
deploy without hot code upgrade | <version> noupgrade | true | false |
deploy without hot code upgrade (canary) | <version> noupgrade_canary=<deadline> | now < deadline | false |
- "installable" means that the version can be installed into a node that doesn't have the OTP application.
- See also
script/in_cloud/erl/boot_impl.sh
, which chooses an appropriate version of OTP release of the antikythera instance at startup of a newly created host.
- See also
- "upgradable" means that the version can be applied by hot code upgrade to a node that has a previous version of the OTP application.
Versions in a history file are expected to monotonically increase.
Summary
Functions
@spec all_deployable_gear_names() :: [Antikythera.GearName.t()]
@spec find_all_modified_history_files(Antikythera.SecondsSinceEpoch.t()) :: {boolean(), [Antikythera.GearName.t()]}
@spec latest_installable_gear_version(Antikythera.GearName.t()) :: nil | Antikythera.VersionStr.t()
@spec next_upgradable_version( :antikythera | Antikythera.GearName.t(), Antikythera.VersionStr.t() ) :: nil | Antikythera.VersionStr.t()