Manages installation of Elixir via packages or source.
Tested on Chef 11.8.2.
Tested on:
- Ubuntu 12.04, 13.04, 13.10, 14.04
- CentOS 5.8, 6.4
Notes: This cookbook has been tested on the listed platforms, but not with the all combinations of parameters. It may work on other platforms with or without modification.
- git
- erlang
As an example, the following berksfile would work.
site :opscode
cookbook 'git'
cookbook 'erlang', git: 'https://github.com/opscode-cookbooks/erlang.git'
cookbook 'elixir', git: 'https://github.com/parroty/chef-cookbook-elixir.git'
By default, it downloads precompiled elixir files and install them in /usr/local path. It can be changed using the following attributes.
node['elixir']['install_path']
- installation path for elixir binaries and librariesdefault['elixir']['install_method']
- installation method, which can besource
,precompiled
orpackage
.default[:elixir][:source][:revision]
- revision tag for the source installation.default[:elixir][:precompiled][:revision]
- revision tag for the precompiled file installation.default[:elixir][:package][:apt][:revision]
- revision tag for the Ubuntu package installation.default[:elixir][:package][:yum][:revision]
- revision tag for the RHEL package installation.
Check the following for the list of the released versions.
It installs the elixir files in to the following directories. In order to uninstall, remove these files.
- /usr/local/bin/
- /usr/local/lib/elixir/
It downloads "elixir/master" by default. For installing specific revisions, check the GitHub page for the available ones.
It may not work on RHEL 5.x, due to the dependency related issue, use source
or precompiled
instead.
- By default, this cookbook tries to install erlang for ensuring elixir's requirement is satisfied (as many of the default packages installs old erlang, yet). If it's not needed, specify
false
fornode[:elixir][:enable_erlang_install]
attribute. - "esl" package is used for erlang installation by default, but it can be changed by changing
node[:elixir][:erlang_install_method]
.- If the OS is RHEL5.x, "source" installation is forced, as esl package is not avialble.
Some Vagrantfile definition exapmles.
- Source installation of elixir (elixir/master)
config.vm.provision :chef_solo do |chef|
chef.add_recipe "elixir::default"
chef.json = {
"elixir" => {
"install_method" => "source"
}
}
- Package installation of elixir
config.vm.provision :chef_solo do |chef|
chef.add_recipe "elixir::default"
chef.json = {
"elixir" => {
"install_method" => "package"
}
}