A cookbook to install Elixir with a custom resource.
This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.
- Ubuntu 22.04+
- Debian 12+
- RHEL compatible platforms supported through the
erlangdependency path
- Chef 15.3+
- erlang
- git
Upgrading from older cookbook versions that used node['elixir'] attributes together with include_recipe 'elixir::default' is a breaking change. Those legacy attributes and recipes were removed when the cookbook moved to the elixir_install custom resource.
Before upgrading an existing wrapper cookbook or role, replace recipe-based usage with an explicit elixir_install resource and move any previous attribute values onto resource properties. See migration.md for the required changes.
Use the elixir_install resource in your own cookbook.
elixir_install 'default'This installs Elixir 1.19.5 from the official upstream precompiled archive, links it to /usr/local/lib/elixir, and manages /usr/bin/elixir, /usr/bin/elixirc, /usr/bin/iex, and /usr/bin/mix.
elixir_install 'default' do
install_method :source
end| Property | Type | Default |
|---|---|---|
version |
String | "1.19.5" |
install_method |
Symbol | :package |
install_path |
String | "/usr/local/lib/elixir" |
versions_path |
String | "/opt/elixir" |
otp_major |
String / Integer | "28" |
package_url |
String | "https://builds.hex.pm/builds/elixir/v#{version}-otp-#{otp_major}.zip" |
source_repo |
String | "https://github.com/elixir-lang/elixir.git" |
source_revision |
String | "v#{version}" |
source_path |
String | "/opt/elixir/source" |
manage_erlang |
true / false | true |
erlang_install_method |
Symbol | :esl |
erlang_source_version |
String | "26.2.5.19" |
See documentation/elixir_elixir_install.md for the full resource reference.
- The resource models Elixir package and source installs explicitly. Package installs use the official Hex build archive for a specific Erlang/OTP major version.
- By default, the resource manages Erlang via
erlang::esland installs the Elixir OTP 28 precompiled archive. If you need source-built Erlang instead, seterlang_install_method :sourceand optionally overrideerlang_source_version. - Current platform and dependency caveats are documented in LIMITATIONS.md.
This project exists thanks to all the people who contribute.
Thank you to all our backers!
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.