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

RSS

kerl2 (2) Versions 0.2.0

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

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

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
FC108: Resource should not define a property named 'name': kerl2/resources/kerl_build.rb:9
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.2.0 passed this metric

No Binaries Metric
            

0.2.0 passed this metric

Publish Metric
            

0.2.0 passed this metric

Supported Platforms Metric
            

0.2.0 failed this metric

kerl2 should declare what platform(s) it supports.

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