Coder Social home page Coder Social logo

riak-chef-cookbook's Introduction

riak

Cookbook Version Build Status

Description

Riak is an open source, distributed database that focuses on high availability, horizontal scalability, and predictable latency.

This repository is community supported. We both appreciate and need your contribution to keep it stable. For more on how to contribute, take a look at the contribution process.

Thank you for being part of the community! We love you for it.

Requirements

  • Chef 11 or higher

Platform Support

  • Ubuntu 14.04
  • Ubuntu 12.04
  • Debian 7.8
  • CentOS 7.1
  • CentOS 6.6
  • CentOS 5.11
  • FreeBSD 10.1
  • FreeBSD 9.3

Cookbook Dependencies

  • apt
  • build-essential
  • erlang
  • git
  • java
  • sysctl
  • ulimit
  • yum
  • yum-epel

Attributes

  • node['riak']['install_method'] - Method to install Riak (package, enterprise_package, source, custom_repository)
  • node['riak']['platform_bin_dir'] - Base directory for binaries.
  • node['riak']['platform_data_dir'] - Base directory for data files.
  • node['riak']['platform_etc_dir'] - Base directory for configuration files.
  • node['riak']['platform_log_dir'] - Base directory for log files.
  • node['riak']['platform_lib_dir'] - Base directory for libraries.
  • node['riak']['patches'] - List of patches to apply by placing in the basho-patches directory.
  • node['riak']['config']['log.console'] - Where to emit the default log messages (off, file, console, both).
  • node['riak']['config']['log']['console']['level'] - Severity level of the console log (ebug, info, warning, error).
  • node['riak']['config']['log']['console']['file'] - When node['riak']['config']['log.console'] is set to file or both, the file where console messages will be logged.
  • node['riak']['config']['log']['error']['file'] - The file where error messages will be logged.
  • node['riak']['config']['log']['syslog'] - Enables log output to syslog (on, off).
  • node['riak']['config']['log.crash'] - Whether to enable the crash log (on, off).
  • node['riak']['config']['log']['crash']['file'] - The file where its messages will be written.
  • node['riak']['config']['log']['crash']['maximum_message_size'] - Maximum size (in bytes) of individual messages in the crash log.
  • node['riak']['config']['log']['crash']['size'] - Maximum size of the crash log (in bytes), before it is rotated.
  • node['riak']['config']['log']['crash.rotation'] - The schedule on which to rotate the crash log. See here for details.
  • node['riak']['config']['log']['crash']['rotation']['keep'] - The number of rotated crash logs to keep.
  • node['riak']['config']['nodename'] - Name of the Erlang node.
  • node['riak']['config']['distributed_cookie'] - Cookie for distributed node communication.
  • node['riak']['config']['erlang']['async_threads'] - Number of threads in async thread pool (0-1024).
  • node['riak']['config']['erlang']['max_ports'] - Number of concurrent ports/sockets (1024-134217727).
  • node['riak']['config']['ring_size'] - Number of partitions in the cluster (must be a power of 2).
  • node['riak']['config']['transfer_limit'] - Number of concurrent node-to- node transfers allowed.
  • node['riak']['config']['ring']['state_dir'] - Location of ring state.
  • node['riak']['config']['ssl']['certfile'] - Default certificate location for HTTPS.
  • node['riak']['config']['ssl']['keyfile'] - Default key location for HTTPS.
  • node['riak']['config']['ssl']['cacertfile'] - Default signing authority for HTTPS.
  • node['riak']['config']['dtrace'] - Enable DTrace (on, off).
  • node['riak']['config']['strong_consistency'] - Enable consensus subsystem (on, off).
  • node['riak']['config']['listener']['http']['internal'] - IP address and TCP port that the Riak HTTP interface will bind to.
  • node['riak']['config']['listener']['protobuf']['internal'] - IP address and TCP port that the Riak Protocol Buffers interface will bind to.
  • node['riak']['config']['protobuf']['backlog'] - Maximum length of pending connections queue.
  • node['riak']['config']['listener']['https']['internal'] - IP address and TCP port that the Riak HTTPS interface will bind to.
  • node['riak']['config']['anti_entropy'] - Strategy of repairing out-of-sync keys (active, passive, active-debug).
  • node['riak']['config']['storage_backend'] - Storage backend for Riak's key-value and secondary index data (bitcask, leveldb, memory, multi).
  • node['riak']['config']['object']['format'] - Binary representation of a Riak value stored on disk (0, 1).
  • node['riak']['config']['metadata_cache_size'] - Size of the metadata cache for each vnode.
  • node['riak']['config']['object']['size']['warning_threshold'] - Reading or writing objects larger than this size will write a warning in the logs.
  • node['riak']['config']['object']['size']['maximum'] - Writing an object larger than this will send a failure to the client.
  • node['riak']['config']['object']['siblings']['warning_threshold'] - Writing an object with more than this number of siblings will generate a warning in the logs.
  • node['riak']['config']['object']['siblings']['maximum'] - Writing an object with more than this number of siblings will send a failure to the client.
  • node['riak']['config']['bitcask']['data_root'] - A path under which Bitcask data files will be stored.
  • node['riak']['config']['bitcask']['io_mode'] - How Bitcask writes to disk (erlang, nif).
  • node['riak']['config']['riak_control.top_level'] - Enable administrative UI (on, off).
  • node['riak']['config']['riak_control']['auth']['mode'] - Authentication mode used for access to the administrative panel.
  • node['riak']['config']['riak_control']['auth']['user']['user']['password']
    • List of usernames and passwords for access to Riak Control.
  • node['riak']['config']['leveldb']['data_root'] - A path under which LevelDB data files will be stored.
  • node['riak']['config']['leveldb']['maximum_memory']['percent'] - Percentage of total server memory to assign to LevelDB.
  • node['riak']['config']['leveldb']['compaction']['trigger']['tombstone_count']
    • Controls when background LevelDB compaction initiates.
  • node['riak']['config']['jmx'] - Enable JMX monitoring output (on, off).
  • node['riak']['config']['search.top_level'] - Enable Riak Search (on, off).
  • node['riak']['config']['search']['solr']['start_timeout'] - How long Riak will wait for Solr to start.
  • node['riak']['config']['search']['solr']['port'] - Port number Solr will bind to.
  • node['riak']['config']['search']['solr']['jmx_port'] - Port number which Solr JMX binds to.
  • node['riak']['config']['search']['solr']['jvm_options'] - Options to pass to the Solr JVM.
  • node['riak']['config']['search']['anti_entropy']['data_dir'] - Path where Riak Search's Active Anti-Entropy data files will reside.
  • node['riak']['config']['search']['root_dir'] - Path for Riak Search index data.

Package

  • node['riak']['package']['enterprise_key'] - Riak Enterprise key.
  • node['riak']['package']['version']['major'] - Major version number.
  • node['riak']['package']['version']['minor'] - Minor version number.
  • node['riak']['package']['version']['incremental'] - Incremental version number.
  • node['riak']['package']['version']['build'] - Build version number.
  • node['riak']['package']['local']['checksum'] - Checksum for local Riak package.

Source

  • node['riak']['source']['url'] - Base path for downloading Riak source tarballs.
  • node['riak']['source']['version']['major']- Major version number.
  • node['riak']['source']['version']['minor'] - Minor version number.
  • node['riak']['source']['version']['incremental'] - Incremental version number.
  • node['riak']['source']['prefix'] - Installation prefix for source install.
  • node['riak']['source']['checksum'] - Checksum for source tarball.

ulimit

  • node['riak']['limits']['nofile'] - File descriptor limit for user running the Riak service

sysctl

  • node['riak']['sysctl']['vm']['swappiness']
  • node['riak']['sysctl']['net']['core']['somaxconn']
  • node['riak']['sysctl']['net']['ipv4']['tcp_max_syn_backlog']
  • node['riak']['sysctl']['net']['ipv4']['tcp_sack']
  • node['riak']['sysctl']['net']['ipv4']['tcp_window_scaling']
  • node['riak']['sysctl']['net']['ipv4']['tcp_fin_timeout']
  • node['riak']['sysctl']['net']['ipv4']['tcp_keepalive_intvl']
  • node['riak']['sysctl']['net']['ipv4']['tcp_tw_reuse']
  • node['riak']['sysctl']['net']['ipv4']['tcp_moderate_rcvbuf']

Java

  • node['riak']['manage_java'] - Installs and configures Java.

NOTE: If node['riak']['config']['search.top_level'] is set to on then Java must be installed beforehand (either by another recipe or this one) or Riak will fail to start

NOTE: As OpenJDK isn't supported officially and Sun Java for FreeBSD is only 32bit this recipe doesn't work/isn't tested on FreeBSD.

Usage

Attributes

You may notice that some attribute names contain .top_level. This is to aid rendering special configuration settings that have other settings nested beneath them.

A quick example:

search is a setting, but it also has search.solr.start_timeout and search.solr.port beneath it:

default['riak']['config']['search.top_level'] = 'off'
default['riak']['config']['search']['solr']['start_timeout'] = '30s'
default['riak']['config']['search']['solr']['port'] = 8093

These attributes render as:

search = off
search.solr.start_timeout = 30s
search.solr.port = 8093

Installation Methods

There are several installation methods for Riak supported by this cookbook. All require that the node's run_list contain the default riak recipe.

For more precise examples, please see the .kitchen.yml file.

Package

This is the default method of installation. Ensure that node['riak']['install_method'] is set to package.

Enterprise Package

For Riak Enterprise users, installing the Enterprise package requires setting one attribute:

default['riak']['package']['enterprise_key'] = '*******'

Custom Package

If you want to install a custom package of Riak (that isn't available in your operating system's package repository), ensure that the following attributes are set appropriately:

default['riak']['install_method'] = 'custom_package'
default['riak']['package']['local']['checksum'] = '2b28aeabb21488125b7e39f768c8f3b98ac816d1a30c0d618c9f82f99e6e89d9'
default['riak']['package']['local']['url'] = 'http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/ubuntu/trusty'

NOTE: FreeBSD uses custom_package regardless.

Custom Repository

If you have a package repository setup on your operating system (that isn't Basho's) and want to install Riak from there, ensure that node['riak']['install_method'] is set to custom_repository.

NOTE: This will fail unless the package repository is configured beforehand (earlier in run_list)

Source

If you want to install Riak (and Erlang) from source, ensure that node['riak']['install_method'] is set to source.

Optional Recipes

riak::sysctl

This is an optional recipe to set sysctl tunings such that Riak will not emit warnings to the log. As other systems or cookbooks may already configure these tunings, this recipe is optional. It should be placed in the run_list before recipe['riak'] if desired.

##Contributions

Basho Labs repos survive because of community contribution. Here’s how to get started.

  • Fork the appropriate sub-projects that are affected by your change
  • Create a topic branch for your change and checkout that branch git checkout -b some-topic-branch
  • Make your changes and run the test suite if one is provided (see below)
  • Commit your changes and push them to your fork
  • Open a pull request for the appropriate project
  • Contributors will review your pull request, suggest changes, and merge it when it’s ready and/or offer feedback
  • To report a bug or issue, please open a new issue against this repository

Maintainers

You can read the full guidelines for bug reporting and code contributions on the Riak Docs. And thank you! Your contribution is incredibly important to us.

License and Authors

  • Author: Benjamin Black (GitHub)
  • Author: Sean Carey (GitHub)
  • Author: Hector Castro (GitHub)
  • Author: Sean Cribbs (GitHub)
  • Author: Seth Thomas (GitHub)

Copyright (c) 2015 Basho Technologies, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

riak-chef-cookbook's People

Contributors

brandt avatar cheeseplus avatar cmeiklejohn avatar davidx avatar densone avatar dreverri avatar eklein avatar freerobby avatar ghaskins avatar gmaccarone avatar gregkare avatar hectcastro avatar holidayworking avatar ian-plosker avatar jaredmorrow avatar mbbroberg avatar mfischer-zd avatar mikedotson avatar mitchellh avatar seancribbs avatar seidtgeist avatar spulec avatar zquestz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

riak-chef-cookbook's Issues

warning after install ( amazon linux )

2015-06-11 09:27:03.381 [warning] <0.320.0> riak_kv_env: sysctl net.core.wmem_default is 212992, should be at least 8388608)
2015-06-11 09:27:03.381 [warning] <0.320.0> riak_kv_env: sysctl net.core.rmem_default is 212992, should be at least 8388608)
2015-06-11 09:27:03.381 [warning] <0.320.0> riak_kv_env: sysctl net.core.wmem_max is 212992, should be at least 8388608)
2015-06-11 09:27:03.382 [warning] <0.320.0> riak_kv_env: sysctl net.core.rmem_max is 212992, should be at least 8388608)
2015-06-11 09:27:03.382 [warning] <0.320.0> riak_kv_env: sysctl net.core.netdev_max_backlog is 3072, should be at least 10000)

Need be able to configure this settings too.

Can't install Riak Enterprise on AWS Opsworks

Not sure what is going wrong. It appears the recipe to install Riak Enterprise is failing to actually install the .deb package, even though it does not report a failure. When it goes to modify the riak.conf file after installation, it does not exist because riak-ee was not actually installed.

Everything works perfectly when installing Riak non-enterprise.

Here is the error output:

[2016-01-04T20:47:14+00:00] INFO: Processing package[riak-ee] action install (riak::package line 123)
[2016-01-04T20:47:14+00:00] INFO: Processing file[/etc/riak/riak.conf] action create (riak::default line 72)

================================================================================
Error executing action `create` on resource 'file[/etc/riak/riak.conf]'
================================================================================


Chef::Exceptions::EnclosingDirectoryDoesNotExist
------------------------------------------------
Parent directory /etc/riak does not exist.


Resource Declaration:
---------------------
# In /var/lib/aws/opsworks/cache.stage2/cookbooks/riak/recipes/default.rb

72: file "#{node['riak']['platform_etc_dir']}/riak.conf" do
73:   content lazy { Cuttlefish.compile('', node['riak']['config']).join("\n") }
74:   owner 'root'
75:   mode 0644
76:   notifies :restart, "service[#{riak_service}]"
77: end
78: 



Compiled Resource:
------------------
# Declared in /var/lib/aws/opsworks/cache.stage2/cookbooks/riak/recipes/default.rb:72:in `from_file'

file("/etc/riak/riak.conf") do
provider Chef::Provider::File
action "create"
retries 0
retry_delay 2
path "/etc/riak/riak.conf"
backup 5
atomic_update true
cookbook_name "riak"
recipe_name "default"
content #<Chef::DelayedEvaluator:0x007f9d33a3c028@/var/lib/aws/opsworks/cache.stage2/cookbooks/riak/recipes/default.rb:73>
mode 420
owner "root"
end



[2016-01-04T20:47:14+00:00] INFO: Running queued delayed notifications before re-raising exception

Add installing from a local package to the test suite

In this case, a user already has a package for Riak, but it isn't in an apt or yum repository. There should be a way for them to drop off the package and have this cookbook install and configure Riak for them.

changing PB IP and port using Chef

I have two issues with changing PB IP using chef-solo + vagrant

  1. Looks like Documentation is out date. It says that there is pb_ip attribute, but cookbook doesn't have such attribute.
  2. Since Chef always do concatenation for array attributes it's impossible to overwrite default value. Thus ['riak_api']['pb'] ends up as two tuples in app.config: default and new one.

For example:
chef.json = {
:riak => {
:config => {
:riak_api => {
:pb => [["__tuple", "__string_127.0.0.1", 8087]]
}
}
}
}
will produce following app.config
{riak_api, [
{pb, [
{"10.0.2.15", 8087},
{"127.0.0.1", 8087}
]}
]},

String not matched error

We think the attribute node['riak']['config']['riak_control']['auth']['mode'] is not used. Is this an expected behaviour?

@bixu

================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/riak-yetu/attributes/default.rb
================================================================================

IndexError
----------
string not matched

Cookbook Trace:
---------------
  /var/chef/cache/cookbooks/riak-yetu/attributes/default.rb:92:in `[]='
  /var/chef/cache/cookbooks/riak-yetu/attributes/default.rb:92:in `from_file'

Relevant File Content:
----------------------
/var/chef/cache/cookbooks/riak-yetu/attributes/default.rb:

 85:  default['riak']['config']['object']['size']['warning_threshold'] = '5MB'
 86:  default['riak']['config']['object']['size']['maximum'] = '50MB'
 87:  default['riak']['config']['object']['siblings']['warning_threshold'] = 25
 88:  default['riak']['config']['object']['siblings']['maximum'] = 100
 89:  default['riak']['config']['bitcask']['data_root'] = '$(platform_data_dir)/bitcask'
 90:  default['riak']['config']['bitcask']['io_mode'] = 'erlang'
 91:  default['riak']['config']['riak_control.top_level'] = 'off'
 92>> default['riak']['config']['riak_control']['auth']['mode'] = 'off'
 93:  # default['riak']['config']['riak_control']['auth']['user']['user']['password'] = 'pass'
 94:  default['riak']['config']['leveldb']['maximum_memory']['percent'] = 70
 95:  # default['riak']['config']['jmx.top_level'] = 'off'
 96:  default['riak']['config']['search.top_level'] = 'off'
 97:  default['riak']['config']['search']['solr']['start_timeout'] = '30s'
 98:  default['riak']['config']['search']['solr']['port'] = 8093
 99:  default['riak']['config']['search']['solr']['jmx_port'] = 8985
100:  default['riak']['config']['search']['solr']['jvm_options'] = '-d64 -Xms1g -Xmx1g -XX:+UseStringCache -XX:+UseCompressedOops'
101:

[2014-11-04T13:32:13+00:00] DEBUG: Re-raising exception: IndexError - string not matched
/var/chef/cache/cookbooks/riak-yetu/attributes/default.rb:92:in `[]='
  /var/chef/cache/cookbooks/riak-yetu/attributes/default.rb:92:in `from_file'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/mixin/from_file.rb:30:in `instance_eval'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/mixin/from_file.rb:30:in `from_file'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/dsl/include_attribute.rb:39:in `block in include_attribute'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/dsl/include_attribute.rb:31:in `each'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/dsl/include_attribute.rb:31:in `include_attribute'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/run_context/cookbook_compiler.rb:181:in `load_attribute_file'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/run_context/cookbook_compiler.rb:170:in `load_attributes_from_cookbook'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/run_context/cookbook_compiler.rb:110:in `block in compile_attributes'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/run_context/cookbook_compiler.rb:109:in `each'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/run_context/cookbook_compiler.rb:109:in `compile_attributes'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/run_context/cookbook_compiler.rb:72:in `compile'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/run_context.rb:89:in `load'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/policy_builder/expand_node_object.rb:73:in `setup_run_context'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/client.rb:265:in `setup_run_context'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/client.rb:429:in `do_run'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/client.rb:213:in `block in run'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/client.rb:207:in `fork'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/client.rb:207:in `run'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/application.rb:236:in `run_chef_client'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/application/client.rb:338:in `block in run_application'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/application/client.rb:327:in `loop'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/application/client.rb:327:in `run_application'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/lib/chef/application.rb:55:in `run'
  /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.4/bin/chef-client:26:in `<top (required)>'
  /usr/bin/chef-client:23:in `load'
  /usr/bin/chef-client:23:in `<main>'

Can't install from cookbook on ubuntu12.04 VM

I'm trying out the chef recipe. I've set it up to use a vagrant machine running ubuntu 12.04

$ cat Vagrantfile
Vagrant.configure("2") do |config|
  config.vm.hostname = "riak-node"
  config.vm.box = "precise64"
  config.vm.box_url = "http://files.vagrantup.com/precise64.box"

  config.vm.network :private_network, ip: "33.33.33.31"
  config.ssh.max_tries = 40
  config.ssh.timeout   = 120

  config.berkshelf.enabled = true
  config.omnibus.chef_version = "11.4.4"

  config.vm.define :riak_node do |s|
    config.vm.provision :chef_solo do |chef|
      chef.json = {
      }
      chef.run_list = [
                       "recipe[riak_node::default]"
                      ]
    end
  end
end

I have basically nothing in my recipe except a command to install riak.

$ cat metadata.rb
name             'riak_node'
maintainer       'dev'
maintainer_email '[email protected]'
description      'Installs/Configures a riak node'
supports         'ubuntu', ">= 12.04"
version          '0.0.1'

depends "riak", "2.4.0"

$ cat recipes/default.rb
include_recipe "riak"

$ cat attributes/default.rb
$

Yet the recipe fails.

[2013-11-05T14:02:54+00:00] INFO: entered create
[2013-11-05T14:02:54+00:00] INFO: file[/etc/default/riak] owner changed to 0
[2013-11-05T14:02:54+00:00] INFO: file[/etc/default/riak] mode changed to 644
[2013-11-05T14:02:54+00:00] INFO: file[/etc/default/riak] created file /etc/default/riak
[2013-11-05T14:02:54+00:00] INFO: file[/etc/default/riak] not queuing delayed action restart on service[riak] (delayed), as it's already been queued
[2013-11-05T14:02:54+00:00] INFO: Processing service[riak] action enable (riak::default line 66)
[2013-11-05T14:02:54+00:00] INFO: Processing service[riak] action start (riak::default line 66)

================================================================================
Error executing action `start` on resource 'service[riak]'
================================================================================


Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /etc/init.d/riak start ----
STDOUT: Node 'riak@riak-node' not responding to pings.
riak failed to start within 15 seconds,
see the output of 'riak console' for more information.
If you want to wait longer, set the environment variable
WAIT_FOR_ERLANG to the number of seconds to wait.
STDERR:
---- End output of /etc/init.d/riak start ----
Ran /etc/init.d/riak start returned 1


Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/riak/recipes/default.rb

 66: service "riak" do
 67:   supports :start => true, :stop => true, :restart => true
 68:   action [ :enable, :start ]
 69: end



Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/riak/recipes/default.rb:66:in `from_file'

service("riak") do
  action [:enable, :start]
  supports {:start=>true, :stop=>true, :restart=>true}
  retries 0
  retry_delay 2
  service_name "riak"
  enabled true
  pattern "riak"
  startup_type :automatic
  cookbook_name :riak
  recipe_name "default"
end



[2013-11-05T14:03:13+00:00] INFO: Running queued delayed notifications before re-raising exception
[2013-11-05T14:03:13+00:00] INFO: file[/etc/riak/app.config] sending restart action to service[riak] (delayed)
[2013-11-05T14:03:13+00:00] INFO: Processing service[riak] action restart (riak::default line 66)
[2013-11-05T14:03:31+00:00] INFO: service[riak] restarted
[2013-11-05T14:03:31+00:00] ERROR: Running exception handlers
[2013-11-05T14:03:31+00:00] ERROR: Exception handlers complete
[2013-11-05T14:03:31+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-11-05T14:03:31+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: service[riak] (riak::default line 66) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /etc/init.d/riak start ----
STDOUT: Node 'riak@riak-node' not responding to pings.
riak failed to start within 15 seconds,
see the output of 'riak console' for more information.
If you want to wait longer, set the environment variable
WAIT_FOR_ERLANG to the number of seconds to wait.
STDERR:
---- End output of /etc/init.d/riak start ----
Ran /etc/init.d/riak start returned 1
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

I was following the instructions at http://docs.basho.com/riak/latest/ops/building/installing/with-chef/

It didn't mention any attributes that need to be set. Should I set them?

Riak fails to start if hostname is not a fqdn

Ran into this testing on digital ocean:

[2014-10-11T16:58:47-04:00] ERROR: service[riak] (riak::default line 97) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [
0], but received '1'
---- Begin output of /etc/init.d/riak start ----
STDOUT: Node 'riak@defaultubuntu14-cheeseplus-zebra-6g9ko3h' not responding to pings.
riak failed to start within 15 seconds,
see the output of 'riak console' for more information.
If you want to wait longer, set the environment variable
WAIT_FOR_ERLANG to the number of seconds to wait.
STDERR:
---- End output of /etc/init.d/riak start ----

The easy solution is to just do what the basho/riak-cs-chef-cookbook does and use node['ipaddress'] to form the Erlang node name. The other option is doing something like this in the recipe.

# validate the fqdn and if probalo then use IP address
unless /(?=^.{4,255}$)(^((?!-)[a-zA-Z0-9-]{1,63}(?<!-)\.)+[a-zA-Z]{2,63}$)/.match("#{node['fqdn']}")
  node.default['riak']['args']['-name'] = "riak@#{node['ipaddress']}"
end

I know using regexes to validate domains is generally a Bad Thing™ to do the but the above seems to work in testing. Opinions?

Starting the Riak service

Hi!

I ran into an issue today that I don't really understand why it hasn't been a problem for me before.

It seems that the riak init-script for in the rpm-packages returns 1 if riak is already running. Thus doing:

service "riak" do
   supports :start => true, :stop => true, :restart => true
   action [ :enable, :start ]
end

fails if riak is already running. Do you know of any way to get around this?

Thanks
Thomas

EDIT:
This happens when I run chef-client more than once, not because I start riak from somewhere else

Can't set ulimit

I found a previous pull request/issue on this that never seemed to have gotten merged/fixed but I was unable to open that issue again(#2).

Problem: Can't set ulimit
Expected behavior: Be able to specify ulimit for when riak start.

README updates

It seems the community site now displays the README on the cookbook page. The README includes a number of outdated or broken sections and should be updated.

  • DETS is no longer a valid backend
  • merge_index, not "Index Merge" (also need to comment on enabling/disabling search)
  • Riak Control is missing
  • etc...

(riak-1.x) riak::package can fetch a valid package for Ubuntu 14.04

V 2.4.18 uses apt.basho.com to fetch riak packages, but there's no riak 1.x there for Ubuntu 14.04.

There's two possible solutions:

  • Refactor riak-1.x branch to use packagecloud.io and upload a riak-1.x packages there.
  • Upload riak-1.x packages into apt.basho.com and leave riak-1.x branch untouched.

ulimit attribute changes ineffective on Debian/Ubuntu installations

In commit 26f21f9 a file resource was added for /etc/default/riak that sets the ulimit to establish the maximum number of file descriptors used. However, instead of action :create, action :create_if_missing was used. This only creates the file if it's missing; it won't be updated if the value of the attribute changes.

version constraints keep breaking my berkshelf

Unable to satisfy constraints on package build-essential due to solution constraint (riak = 2.4.11). Solution constraints that may result in a constraint on build-essential

can we be less pessimistic about version constraints?

Can't install from corporate repo [JIRA: TOOLS-82]

I'm trying to install 2.0.5-1 on RHEL 6.5 behind a firewall

my cookbook Berkshelf contains:
cookbook 'riak', "~> 3.1.0"

had to add to avoid berks error:
cookbook 'pkg_add', github: 'wanelo-chef/pkg_add'

I'm setting:

default['riak']['install_method'] = 'custom_package'
default['riak']['package']['local']['checksum'] = 'thechecksum'
default['riak']['package']['local']['url'] = 'internal_url_to_fetch_rpm'

Is this even supported with this cookbook?

Getting a nil reference in:

       Relevant File Content:
       ----------------------
       /tmp/kitchen/cache/cookbooks/riak/recipes/package.rb:

        88:      when 9
        89:        package_file = "#{oss_or_ee}-#{version_str}-FreeBSD-amd64.tbz"
        90:        ee_url_suffix = "/freebsd/9.2/#{package_file}"
        91:      end
        92:    end
        93:  
        94:    if node['riak']['package']['enterprise_key'].empty?
        95>>     checksum_val = node['riak']['package']['local']['checksum'][node['platform']][plat_ver_int.to_s]
        96:      pkg_url = "#{node['riak']['package']['local']['url']}/#{package_file}"
        97:    elsif node['riak']['package']['enterprise_key'].length > 0 && node['riak']['package']['local']['url'].length > 0
        98:      checksum_val = node['riak']['package']['enterprise']['checksum'][node['platform']][plat_ver_int.to_s]
        99:      pkg_url = "#{node['riak']['package']['local']['url']}/#{package_file}"
       100:    else
       101:      checksum_val = node['riak']['package']['enterprise']['checksum'][node['platform']][plat_ver_int.to_s]
       102:      pkg_url = ee_url_prefix + ee_url_suffix
       103:    end
       104:  

Latest chef changed API again

Chef version 10.0.4

Discussion:
<_hoodoos> who written chef reciept for riak? :) i have a question about DelegateClass used in Helper class. I'm not a ruby pro, but I replaced it with usual subclass
<_hoodoos> cuz, I got an error on chef reload saying that ERROR: TypeError: superclass mismatch for class TTuple
<_seancribbs> i felt like using the DelegateClass at the time
<_hoodoos> well, it doesn't work for some reason
<_seancribbs> give me a backtrace
<_hoodoos> something like https://gist.github.com/1151831
<_seancribbs> that should only happen if it's being loaded twice :(
<_seancribbs> hoodoos: it doesn't need to be a delegate class, i will fix and push a new version
<_seancribbs> ok, well clearly it needs to be changed
<hoodoos> https://gist.github.com/1151920 look at lines 102-107
<hoodoos> riak['sasl']['sasl_error_logger'] draws Array instead of {file, "/var/log/riak/sasl-error.log"}
<chip
> I would do HANDSTANDS if the chef cookbook was chef 0.10.x compatible
<_seancribbs> i would do handstands if chef quit changing its api

Tag Cookbooks

We have recently been bit by a version mismatch issue between Riak and Riak CS introduced in the HEAD of the riak and riak-cs cookbooks that got pulled in by Berkshelf. Tagging releases of the cookbook would avoid these types of issues -- allowing us to reference stable versions of the cookbook while development progresses. My thought would be to tag it <riak|riak-cs release>- (e.g. 1.3.0-1) with cookbook revision incrementing when new refinements for a release's cookbook are introduced.

/cc: @hectcastro @drewkerrigan @dankerrigan

Cookbook dependencies are too tight

The dependencies on cookbooks listed in metadata.rb are more restrictive than necessary, leading to an high risk of unsolvable conflicts with other cookbooks. The declarations currently listed prevent users from using newer versions of the prerequisite cookbooks, even if the newer cookbooks are still compatible with this one.

Can you please loosen the restrictions to >= syntax instead of ~>?

Riak fails to start on CentOS with riak_cs_kv_multi_backend

When the riak_cs_kv_multi_backend is selected, the associated ebin doesn't exist (unless you installed Riak CS first):

https://github.com/basho/riak-chef-cookbook/blob/master/attributes/default.rb#L105-L111

This causes the :start action against the riak service to fail:

https://github.com/basho/riak-chef-cookbook/blob/master/recipes/default.rb#L120-L123

The error wasn't being triggered prior to 3c9057d because instead of explicitly starting Riak, the service was subscribing to configuration files changes via :delayed.

iptables.erb looks for :handoff_port in the wrong place

iptables.erb looks for the :handoff_port in node[:riak][:kv], but it appears it's in node[:riak][:core].

I'd be happy to provide a fix, but before I do that I thought I'd ask—should :handoff_port be in :core or :kv?

can't modify platform_log_dir

I'm writing a wrapper for this cookbook and testing it with test kitchen using chef_zero. I'm not sure what is going on, but there seems to be some caching occurring so that the /etc/riak/riak.conf file is not getting modified when I change the platform_log_dir attribute after I have already run it once and installed riak. Is this a feature or a bug?

# move the default log directory when the riak cookbook installs riak
node.set['riak']['platform_log_dir'] = '/var/log/foobar/riak'

# Installs riak on this node. Do not do a Java install.
include_recipe 'riak'

Shouldn't there be a way to modify config file contents without uninstalling riak? Wouldn't using a template for riak.conf prevent this from occurring?

chef-client in daemon mode fails due to try to redeclare the Tuple class

When chef-client is running in daemon mode it returns this error:

TypeError: superclass mismatch for class Tuple
/var/cache/chef/cookbooks/riak/libraries/riak_template_helper.rb:21
/usr/lib/ruby/vendor_ruby/chef/run_context.rb:82:in load' /usr/lib/ruby/vendor_ruby/chef/run_context.rb:82:inload_libraries'
/usr/lib/ruby/vendor_ruby/chef/run_context.rb:120:in call' /usr/lib/ruby/vendor_ruby/chef/run_context.rb:120:inforeach_cookbook_load_segment'
/usr/lib/ruby/vendor_ruby/chef/run_context.rb:119:in each' /usr/lib/ruby/vendor_ruby/chef/run_context.rb:119:inforeach_cookbook_load_segment'
/usr/lib/ruby/vendor_ruby/chef/run_context.rb:117:in each' /usr/lib/ruby/vendor_ruby/chef/run_context.rb:117:inforeach_cookbook_load_segment'
/usr/lib/ruby/vendor_ruby/chef/run_context.rb:80:in load_libraries' /usr/lib/ruby/vendor_ruby/chef/run_context.rb:57:inload'
/usr/lib/ruby/vendor_ruby/chef/client.rb:199:in setup_run_context' /usr/lib/ruby/vendor_ruby/chef/client.rb:162:inrun'
/usr/lib/ruby/vendor_ruby/chef/application/client.rb:254:in run_application' /usr/lib/ruby/vendor_ruby/chef/application/client.rb:241:inloop'
/usr/lib/ruby/vendor_ruby/chef/application/client.rb:241:in run_application' /usr/lib/ruby/vendor_ruby/chef/application.rb:70:inrun'
/usr/bin/chef-client:25

Debian version: 6.0.5
chef-client varsion: 10.12.0
chef debian package version: 10.12.0-1
riak cookbook version: 1.1.0

Chef puts the node in a bad state if riak cookie name/address change

Should node['riak']['args']['-name'] change between runs, Chef will put the node in a bad state. To repro, replace #{node['ipaddress']} with 127.0.0.1 in attributes/default.rb

[Fri, 24 Aug 2012 14:18:17 -0400] ERROR: service[riak] (riak::default line 155) has had an error
[Fri, 24 Aug 2012 14:18:17 -0400] ERROR: Running exception handlers
[Fri, 24 Aug 2012 14:18:17 -0400] ERROR: Exception handlers complete
[Fri, 24 Aug 2012 14:18:17 -0400] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[Fri, 24 Aug 2012 14:18:17 -0400] FATAL: Chef::Exceptions::Exec: service[riak] (riak::default line 155) had an error: /sbin/service riak restart returned 1, expected 0
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

Erlang doesn't die during the restart:

ps -u riak
  PID TTY          TIME CMD
 2366 ?        00:00:00 epmd
 2588 ?        00:00:00 run_erl
 2589 pts/0    00:00:19 beam
 2715 ?        00:00:00 sh
 2716 ?        00:00:00 memsup
 2717 ?        00:00:00 cpu_sup

The riak console gives this error:

sudo riak console
Attempting to restart script through sudo -H -u riak
Exec: /usr/lib64/riak/erts-5.9.1/bin/erlexec -boot /usr/lib64/riak/releases/1.2.0/riak             -embedded -config /etc/riak/app.config             -pa /usr/lib64/riak/basho-patches             -args_file /etc/riak/vm.args -- console
Root: /usr/lib64/riak
{error_logger,{{2012,8,24},{14,20,55}},"Protocol: ~p: register error: ~p~n",["inet_tcp",{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1,[{file,"inet_tcp_dist.erl"},{line,70}]},{net_kernel,start_protos,4,[{file,"net_kernel.erl"},{line,1314}]},{net_kernel,start_protos,3,[{file,"net_kernel.erl"},{line,1307}]},{net_kernel,init_node,2,[{file,"net_kernel.erl"},{line,1197}]},{net_kernel,init,1,[{file,"net_kernel.erl"},{line,357}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}]}
{error_logger,{{2012,8,24},{14,20,55}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},{error_info,{exit,{error,badarg},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,320}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}},{ancestors,[net_sup,kernel_sup,<0.10.0>]},{messages,[]},{links,[#Port<0.195>,<0.17.0>]},{dictionary,[{longnames,true}]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,24},{reductions,681}],[]]}
{error_logger,{{2012,8,24},{14,20,55}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[['[email protected]',longnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2012,8,24},{14,20,55}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,shutdown},{offender,[{pid,undefined},{name,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2012,8,24},{14,20,55}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}

Crash dump was written to: /var/log/riak/erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})

Don't use pam_limits for file descriptor limits

The use of pam_limits for Enterprise Linux variants isn't needed. Explicit ulimit declarations should always be made in the startup scripts (or scripts they source, such as /etc/default/service or /etc/sysconfig/service) for daemons. pam_limits should be used only for interactive user sessions, which is irrelevant for a service such as Riak.

Riak EE 2.0.8 package fails to install due to new download location

With the release of Riak EE 2.0.8, the major/minor check here produces a link including the major_minor string prior to the version string.

However, with Riak EE 2.0.8 and forward, the packages will be available via the standard link location as found on line 31.

Proposing the change of the code to something similar:

# Enterprise download URL changed with release of 2.0.8
if Gem::Version.new(version_str) >= Gem::Version.new('2.0.8')
  ee_url_prefix = "http://private.downloads.basho.com/riak_ee/#{node['riak']['package']['enterprise_key']}/#{version_str}"
else
  ee_url_prefix = "http://private.downloads.basho.com/riak_ee/#{node['riak']['package']['enterprise_key']}/#{major_minor}/#{version_str}"
end

able to set global data path

hey folks,
sorry if I'm reading this wrong, but it would be helpful to set a global data directory instead of overloading every data store or index location. The default seems to be "/var/lib/riak/", and I would like to move that to "/mnt/data/riak" (I'm on EC2).

I'm setting the riak_core.platform_data_dir = "/mnt/data/riak", but I still needs to update a half-dozen file locations. can chef use the riak-core.platform_data_dir as an attribute to set riak_kv.mapred_queue_dir, bitcask.data_root, etc

thanks!

Automatic Deep Merging of Attributes causing issues

I am wondering how to get rid of the default user for riak_control... I've added riak_control with one user (name: foo, password: bar) but after running chef-client there are two users (default user + my new user) in userlist.

[riak-chef-cookbook] /attributes/default.rb

...
default['riak']['config']['riak_control']['userlist'] = [
  ["user".to_erl_string,"pass".to_erl_string].to_erl_tuple
]the 
...

[chef-server] /roles/riak.json

{
  ...
  "override_attributes": {
    "riak": {
      "config": {
        "riak_control": {
          "userlist": [
            ["__tuple", "foo", "bar"]
          ]
        }
      }
    }
  }
  ...
}

[server] /etc/riak/app.config

[
  ...
  {riak_control, [
    {userlist, [
      {"user", "pass"}, % <--- ???
      {"foo", "bar"}
    ]}
  ]}
  ...
].

FreeBSD Support

This was started in #122 but abandoned due to a number of circumstances. Ideally this would support FreeBSD 9 and 10.

when using random_cluster_member, make sure it is up

hey folks,
first off, this cookbook kicks a**. SO glad you put the time into doing this.

I ran into an interesting situation where I started an new node, using recipe[riak::autoconf], and it failed because when autoconf picked a random node, it picked one where the node was not online...but other instances in the cluster were.

I could see this being an issue if during recovery i try to bring up another instance under a different node_name (perhaps riak3.west.ec2 rather than riak2.east.ec2), at which point it could then fail and I would have to ssh in and manually add it in. Not the end of the world but it is an extra step.

so what do you think of making random_cluster_member a bit smarter, and doing a ping and if it is up returning it, and if not, going to a different node?

Cookbook Doesn't work with the 1.0.0rc package

There are two small problems that prevent the cookbook from working with the 1.0.0rc package:

  1. The URL/Filename scheme is slightly different between the older releases and the 1.0.0rc (the incremental part of the version string is included in the download path and filename when it wasn't for previous releases)
  2. The new "platform_data_dir" setting isn't set by default which results in an error whenever a write operation is performed.

configuring multiple backend

Hi,

I need to configure multiple backends as quoted below, but i haven't seen them in attributes section.

What should I do to have a result like this:

storage_backend = multi

multi_backend.bitcask_mult.storage_backend = bitcask
multi_backend.leveldb_mult.storage_backend = leveldb

multi_backend.bitcask_mult.bitcask.open_timeout = 10s
multi_backend.bitcask_mult.bitcask.sync.strategy = interval
multi_backend.bitcask_mult.bitcask.sync.interval = 30s

multi_backend.default = bitcask_mult

I saw examples for search options, but i am not sure if is it the proper way to configure multiple backend.

Does something like that works?

default['riak']['config']['multi_backend']['bitcask_mult']['storage_backend'] = 'bitcask'
default['riak']['config']['multi_backend']['leveldb_mult']['storage_backend'] = 'leveldb'

default['riak']['config']['multi_backend']['bitcask_mult']['bitcask']['open_timeout'] = '10s'
default['riak']['config']['multi_backend']['bitcask_mult']['bitcask']['sync']['strategy'] = 'interval'
default['riak']['config']['multi_backend']['bitcask_mult']['bitcask']['sync']['interval'] = '30s'

default['riak']['config']['multi_backend']['default'] = 'bitcask_mult'

Thanks.

RuntimeError with Vagrant/Chef-solo

I am getting a runtime error when trying to install Riak onto a Vagrant VirtualBox VM using Chef-solo and Berkshelf.

The Vagrantfile is:

Vagrant.configure("2") do |config|
  config.berkshelf.enabled = true
  config.vm.box = "precise64"
  config.vm.box_url = "http://files.vagrantup.com/precise64.box"

  config.vm.provision :chef_solo do |chef|
    chef.add_recipe "riak"
  end
end

The Berksfile is:

cookbook "riak"

Host OS: Mac OS X 10.8.3
Guest OS: Ubuntu 12.04
Vagrant: 1.2.2
Chef: 10.14.2

I may be missing something obvious, but am kind of new to Chef.

The chef output when running vagrant up is:

[2013-05-23T19:33:23+00:00] INFO: *** Chef 10.14.2 ***
[2013-05-23T19:33:24+00:00] INFO: Setting the run_list to ["recipe[riak]"] from JSON
[2013-05-23T19:33:24+00:00] INFO: Run List is [recipe[riak]]
[2013-05-23T19:33:24+00:00] INFO: Run List expands to [riak]
[2013-05-23T19:33:24+00:00] INFO: Starting Chef Run for precise64
[2013-05-23T19:33:24+00:00] INFO: Running start handlers
[2013-05-23T19:33:24+00:00] INFO: Start handlers complete.
[2013-05-23T19:33:24+00:00] INFO: Processing template[/etc/pam.d/su] action create (ulimit::default line 12)
[2013-05-23T19:33:24+00:00] INFO: template[/etc/pam.d/su] backed up to /var/chef/backup/etc/pam.d/su.chef-20130523193324
[2013-05-23T19:33:24+00:00] INFO: template[/etc/pam.d/su] updated content
[2013-05-23T19:33:24+00:00] INFO: Processing execute[apt-get-update] action run (apt::default line 22)
[2013-05-23T19:33:34+00:00] INFO: execute[apt-get-update] ran successfully
[2013-05-23T19:33:34+00:00] INFO: Processing execute[apt-get update] action nothing (apt::default line 29)
[2013-05-23T19:33:34+00:00] INFO: Processing execute[apt-get autoremove] action nothing (apt::default line 36)
[2013-05-23T19:33:34+00:00] INFO: Processing execute[apt-get autoclean] action nothing (apt::default line 42)
[2013-05-23T19:33:34+00:00] INFO: Processing package[update-notifier-common] action install (apt::default line 48)
[2013-05-23T19:33:37+00:00] INFO: package[update-notifier-common] sending run action to execute[apt-get-update] (immediate)
[2013-05-23T19:33:37+00:00] INFO: Processing execute[apt-get-update] action run (apt::default line 22)
[2013-05-23T19:33:40+00:00] INFO: execute[apt-get-update] ran successfully
[2013-05-23T19:33:40+00:00] INFO: Processing execute[apt-get-update-periodic] action run (apt::default line 52)
[2013-05-23T19:33:40+00:00] INFO: Processing directory[/var/cache/local] action create (apt::default line 62)
[2013-05-23T19:33:40+00:00] INFO: directory[/var/cache/local] created directory /var/cache/local
[2013-05-23T19:33:40+00:00] INFO: directory[/var/cache/local] owner changed to 0
[2013-05-23T19:33:40+00:00] INFO: directory[/var/cache/local] group changed to 0
[2013-05-23T19:33:40+00:00] INFO: directory[/var/cache/local] mode changed to 755
[2013-05-23T19:33:40+00:00] INFO: Processing directory[/var/cache/local/preseeding] action create (apt::default line 62)
[2013-05-23T19:33:40+00:00] INFO: directory[/var/cache/local/preseeding] created directory /var/cache/local/preseeding
[2013-05-23T19:33:40+00:00] INFO: directory[/var/cache/local/preseeding] owner changed to 0
[2013-05-23T19:33:40+00:00] INFO: directory[/var/cache/local/preseeding] group changed to 0
[2013-05-23T19:33:40+00:00] INFO: directory[/var/cache/local/preseeding] mode changed to 755
[2013-05-23T19:33:40+00:00] INFO: Processing apt_repository[basho] action add (riak::default line 50)

================================================================================
Error executing action `add` on resource 'apt_repository[basho]'
================================================================================

RuntimeError
------------
The repository file to create is nil, cannot continue.

Cookbook Trace:
---------------
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/apt/providers/repository.rb:127:in `class_from_file'

Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/riak/recipes/default.rb

 49:     
 50:     apt_repository "basho" do
 51:       uri "http://apt.basho.com"
 52:       distribution node['lsb']['codename']
 53:       components ["main"]
 54:       key "http://apt.basho.com/gpg/basho.apt.key"
 55:     end
 56: 

Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/riak/recipes/default.rb:50:in `from_file'

apt_repository("basho") do
  uri "http://apt.basho.com"
  retry_delay 2
  distribution "precise"
  retries 0
  recipe_name "default"
  action :add
  cookbook_name :riak
  key "http://apt.basho.com/gpg/basho.apt.key"
  components ["main"]
end

[2013-05-23T19:33:40+00:00] ERROR: Running exception handlers
[2013-05-23T19:33:40+00:00] ERROR: Exception handlers complete
[2013-05-23T19:33:40+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-05-23T19:33:40+00:00] FATAL: RuntimeError: apt_repository[basho] (riak::default line 50) had an error: RuntimeError: The repository file to create is nil, cannot continue.
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

Riak source install won't build on CentOS 6.5

For some reason building Erlang R16B02 from source doesn't pick up OpenSSL. Riak cannot be built from source without OpenSSL support in Erlang:

 ---- Begin output of make clean locked-deps all rel ----
 STDOUT: ./rebar clean
 Uncaught error in rebar_core: {'EXIT',
                         {undef,
                          [{crypto,start,[],[]},
                           {rebar,run_aux,2,[]},
                           {rebar,main,1,[]},
                           {escript,run,2,
                            [{file,"escript.erl"},{line,747}]},
                           {escript,start,1,
                            [{file,"escript.erl"},{line,277}]},
                           {init,start_it,1,[]},
                           {init,start_em,1,[]}]}}

 =ERROR REPORT==== 6-Feb-2014::16:48:26 ===
 Unable to load crypto library. Failed with error:
 "load_failed, Failed to load NIF library: '/usr/local/lib/erlang/lib/crypto-3.1/priv/lib/crypto.so: undefined symbol: EC_GROUP_new_curve_GF2m'"

(This failure occurs with Riak 2.0 and the 2.0 branch of this cookbook.)

Single quotes?

We use override_attributes at the role level to configure the "config/riak_api/pb_ip" and "config/riak_core/http".
Unfortunately, it looks like Chef uses single quotes when writing to /etc/riak/app.config which prevents riak from starting :/

Any clue on how to fix/avoid that?

Old build-essential dependency

Because of riak cookbook has dependency on build-essential '~> 1.4.2' it's often has problem with other cookbooks which uses fresh build-essential package (which is 2.1.2 for now).
Could you please update your dependency on build-essential to at least '>= 2.0'?

Add aae_throttle_sleep_time defaults

I noticed the new setting is not available as part of the cookbook attributes. It feels like it should be, but maybe there's a better way to make things reasonable.

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.