Git Product home page Git Product logo

elixir's Introduction

elixir Cookbook

Cookbook Version CI State OpenCollective OpenCollective License

A cookbook to manage an installation of Elixir.

Maintainers

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.

Requirements

Platforms

  • Debian/Ubuntu
  • RHEL/CentOS/Scientific/Amazon/Oracle

Chef

  • Chef 15.3+

Cookbooks

  • git
  • github
  • erlang
  • libarchive

Attributes

Key Type Description Default
node[:elixir][:install_path] String Path that Elixir will reside in "/usr/local/lib/elixir"
node[:elixir][:install_method] String Method of installation: "package" or "source" "package"
node[:elixir][:source][:repo] String Git source repository location "https://github.com/elixir-lang/elixir.git"
node[:elixir][:version] String Version of Elixir to compile "v1.4.2"

Usage

Include elixir in your node's run_list

{
  "run_list": [
    "recipe[elixir::default]"
  ]
}

elixir::default

This will install Elixir and Erlang on the node. By default, Elixir and Erlang will be installed from packages. If you want to install from source you can set the node[:elixir][:install_method] attribute.

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website

elixir's People

Contributors

cmluciano avatar damacus avatar gamepoet avatar kisoku avatar kitchen-porter avatar pwelch avatar ramereth avatar renovate[bot] avatar reset avatar tas50 avatar xorima avatar xorimabot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elixir's Issues

Libarchive dependency breaks Chef v12

Cookbook version

1.0.1

Chef-client version

12.22.5

Platform Details

Amazon Linux 2016.09

Scenario:

Trying to run elixir::default recipe.

Steps to Reproduce:

Add elixir::default to your run_list on a system running chef-client v12.

Expected Result:

I expect the recipe to install elixir and erlang on the system.

Actual Result:

---- Begin output of bundle install ----
STDOUT: Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching gem metadata from https://rubygems.org/.............
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Using aws-sigv4 1.0.2
Using jmespath 1.4.0
Using ffi 1.9.25
Using bundler 1.12.5
Using aws-sdk-core 2.11.67
Installing ffi-libarchive 0.4.1

Gem::InstallError: ffi-libarchive requires Ruby version >= 2.4.0.
Using aws-sdk-resources 2.11.67
An error occurred while installing ffi-libarchive (0.4.1), and Bundler cannot
continue.
Make sure that `gem install ffi-libarchive -v '0.4.1'` succeeds before bundling.
STDERR: 
---- End output of bundle install ----

This seems to happen because the latest version of libarchive cookbook was released with a gem dependency that is not compatible with the default version of Ruby embedded with Chef 12. Either bump the min chef version requirement or lock the libarchive dependency at v1.

CHEF 13: NoMethodError: undefined method `root_filenames' when provisioning

Cookbook version

1.0.0

Chef-client version

13.0.118

Platform Details

I'm using Vagrant 1.9.3 on OS X (10.11.6) to provision the default Hashicorp ubuntu/trusty64 box.

System info outputted by Chef when provisioning fails:

==> default:     System Info:
==> default:     ------------
==> default:     chef_version=13.0.118
==> default:     platform=ubuntu
==> default:     platform_version=14.04
==> default:     ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
==> default:     program_name=chef-solo worker: ppid=1461;start=04:05:03;
==> default:     executable=/opt/chef/bin/chef-solo

Scenario:

I'm trying to use Vagrant and Chef to auto-provision a VM for developing an Elixir project.

However, when I try to provision the VM, Chef fails:

NoMethodError: ruby_block[attribute-validation for 'elixir' (convergence time)] (elixir::default line 40) had an error: NoMethodError: undefined method `root_filenames' for #<Chef::CookbookVersion:0x00000002a90fe0>

See below for more debug information.

Steps to Reproduce:

I have a custom cookbook for my project with depends 'elixir' in <mycookbook>/metadata.rb and include_recipe 'elixir' in <mycookbook>/recipes/default.rb.

Note: A nearly identical cookbook was working successfully a few weeks ago, and I don't think I changed anything significant on my end.

I suspect this may be some sort of versioning problem. If it's obvious, I apologize, I'm new to both Vagrant and Chef.

Expected Result:

I expect the Elixir Chef cookbook to run successfully and have elixir, mix, and related tools installed on the Vagrant VM after provisioning.

Actual Result:

When I run vagrant up (the first time) or vagrant reload --provision I see the following error:

==> default: NoMethodError
==> default:
==> default: -------------
==> default:
==> default: undefined method `root_filenames' for #<Chef::CookbookVersion:0x0000000309f918>
==> default:
==> default:
==> default:     Cookbook Trace:
==> default:     ---------------
==> default:     /var/chef/cache/cookbooks/validation/definitions/validate_attributes.rb:42:in `block (3 levels) in from_file'
==> default:
==> default:     Resource Declaration:
==> default:     ---------------------
==> default:     # In /var/chef/cache/cookbooks/validation/definitions/validate_attributes.rb
==> default:
==> default:      40:       ruby_block "attribute-validation for '#{cookbook}' (convergence time)" do
==> default:      41:         block do
==> default:      42:           errors = Chef::Validation.validate(node, cookbook)
==> default:      43:           unless errors.empty?
==> default:      44:             formatted = Chef::Validation::Formatter.format_errors(errors)
==> default:      45:             Chef::Application.fatal!(formatted)
==> default:      46:           end
==> default:      47:         end
==> default:      48:       end
==> default:
==> default:     Compiled Resource:
==> default:     ------------------
==> default:     # Declared in /var/chef/cache/cookbooks/validation/definitions/validate_attributes.rb:40:in `block in from_file'
==> default:
==> default:     ruby_block("attribute-validation for 'elixir' (convergence time)") do
==> default:       params {:mode=>:converge, :cookbook=>nil, :name=>"elixir"}
==> default:       action [:run]
==> default:       default_guard_interpreter :default
==> default:       block_name "attribute-validation for 'elixir' (convergence time)"
==> default:       declared_type :ruby_block
==> default:
==> default:   cookbook_name "elixir"
==> default:
==> default:
==> default:   recipe_name "default"
==> default:
==> default:
==> default:   block #<Proc:0x000000046c3690@/var/chef/cache/cookbooks/validation/definitions/validate_attributes.rb:41>
==> default:
==> default:     end

And in /var/chef/cache/chef-stacktrace.out in the VM:

NoMethodError: ruby_block[attribute-validation for 'elixir' (convergence time)] (elixir::default line 40) had an error: NoMethodError: undefined method `root_filenames' for #<Chef::CookbookVersion:0x0000000309f918>
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-validation-0.2.3/lib/chef/validation.rb:45:in `reload_metadata'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-validation-0.2.3/lib/chef/validation.rb:65:in `validate_one'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-validation-0.2.3/lib/chef/validation.rb:37:in `validate'
/var/chef/cache/cookbooks/validation/definitions/validate_attributes.rb:42:in `block (3 levels) in from_file'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.0.118/lib/chef/provider/ruby_block.rb:31:in `block in action_run'
...
>>>> Caused by NoMethodError: undefined method `root_filenames' for #<Chef::CookbookVersion:0x0000000309f918>
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-validation-0.2.3/lib/chef/validation.rb:45:in `reload_metadata'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-validation-0.2.3/lib/chef/validation.rb:65:in `validate_one'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-validation-0.2.3/lib/chef/validation.rb:37:in `validate'
/var/chef/cache/cookbooks/validation/definitions/validate_attributes.rb:42:in `block (3 levels) in from_file'

Thank you very much in advance for your time!

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • sous-chefs/.github 3.1.1
  • actions/checkout v4
  • actionshub/chef-install 3.0.0
  • actionshub/test-kitchen 3.0.0
.github/workflows/stale.yml
  • actions/stale v9

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.