Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

kerl2 (2) Versions 0.2.0

A Chef cookbook for kerl (https://github.com/kerl/kerl)

Policyfile
Berkshelf
Knife
cookbook 'kerl2', '~> 0.2.0', :supermarket
cookbook 'kerl2', '~> 0.2.0'
knife supermarket install kerl2
knife supermarket download kerl2
README
Dependencies
Changelog
Quality 17%

Kerl cookbook

A Chef cookbook to manage Erlang instances with kerl.

The motivation here was that existing kerl cookbook on the supermarket doesn't provide features to manage different Erlang versions, plus it hasn't been updated since 2011.

Usage

The easiest (and also most likely covering most use cases) way to use this cookbook simply overriding one node attribute: node['kerl2']['erlangs'] to be the list of OTP releases you want to have around, e.g. %w(19.1 19.0 18.3); then run the default recipe that will:
1. install dependencies
2. install kerl
3. install the requested releases
4. install a system-wide wrapper (by default at /usr/local/bin/kerl) around kerl so that all users can use these releases
5. render a shell profile file (/etc/profile.d/kerl.sh by default) to activate the first of these OTP releases

Then it's business as usual with kerl.

Additionally, if you need to use the default kerl-managed erlang in a Chef-templated script, you can simply source that shell profile file in there. For example, if you have a runit service using erlang, its run script template could look something like:

#!/bin/bash

source <%= node['kerl2']['shell_profile']['file'] %>

exec <%= node['runit']['chpst_bin'] %> -u user:group my_erlang_service

For more exotic use cases, simply set node['kerl2']['erlangs'] to an empty array, and use the resources this cookbook provides:

Resources

kerl_instance

An instance of the kerl script.

Available properties:

Name Type Default Explanation
version (name property) String Any git reference from the official kerl repo
url String "https://raw.githubusercontent.com/kerl/kerl/#{version}/kerl" The URL to download kerl from
install_path String "/opt/kerl/instances/kerl_#{version}" Where to install the script
system_wide Boolean True If true, will create a wrapper at node['kerl2']['bin_path'] around this instance of kerl

kerl_build

A kerl build (see kerl's README for more info).

Available properties:

Name Type Default Explanation
name (name property) String
release String name The name of the OTP release
build_env Hash {} Environment variables to use for the build

kerl_erlang

A kerl installation (see kerl's README for more info).

Available properties:

Name Type Default Explanation
build_name (name property) String The name of the kerl build to install - that can be the name of a kerl_build resource, otherwise this resource will also create a build with that name
basedir String node['kerl2']['erlangs_path'] The base directory where to install this erlang
basename String build_name The name of the directory, inside the base directory, to which this erlang will be installed

Example

Example recipe using these resources to get a build with custom options:

build_name = '19.3-with-docs-and-hipe'

kerl_build build_name do
  release '19.3'
  build_env({
    'KERL_BUILD_DOCS' => 'yes',
    'KERL_CONFIGURE_OPTIONS' => '‐‐enable‐hipe'
  })

kerl_erlang build_name

Node attributes' reference

Dependent cookbooks

build-essential >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

CHANGELOG for kerl2

This file is used to list changes made in each version of kerl2.

0.2.0:

  • Added some dependencies needed for crypto

0.1.0:

  • Initial release

Collaborator Number Metric
            

0.2.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.2.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.2.0 failed this metric

FC064: Ensure issues_url is set in metadata: kerl2/metadata.rb:1
FC065: Ensure source_url is set in metadata: kerl2/metadata.rb:1
FC066: Ensure chef_version is set in metadata: kerl2/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: kerl2/metadata.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: kerl2/resources/kerl_build.rb:24
FC085: Resource using new_resource.updated_by_last_action to converge resource: kerl2/resources/kerl_erlang.rb:27
FC108: Resource should not define a property named 'name': kerl2/resources/kerl_build.rb:9
FC115: Custom resource contains a name_property that is required: kerl2/resources/kerl_erlang.rb:10
FC115: Custom resource contains a name_property that is required: kerl2/resources/kerl_instance.rb:6
FC121: Cookbook depends on cookbook made obsolete by Chef 14: kerl2/metadata.rb:1
FC122: Use the build_essential resource instead of the recipe: kerl2/recipes/dependencies.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.2.0 passed this metric

Testing File Metric
            

0.2.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.2.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number