Giter VIP home page Giter VIP logo

ey-cloud-recipes's People

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

ey-cloud-recipes's Issues

Monit to check Solr status via its API

It should be possible to extend Monit configuration for Solr by adding an HTTP query. A HTTP response other than 200 should mean it's down, although processing the output will be nicer :)

Solr-test-host ~ # curl "http://localhost:8983/solr/admin/ping?wt=json&indent=on"
{
  "responseHeader":{
    "status":0,
    "QTime":3,
    "params":{
      "q":"solrpingquery",
      "indent":"on",
      "wt":"json",
      "echoParams":"all",
      "distrib":"false",
      "df":"text",
      "rows":"10"}},
  "status":"OK"}
Solr-test-host ~ #

enable_package doesn't work with nil version declarations

Looks like this task was never tested with no version declaration.

  • throws a nil error outright
  • writes an inappropriate line to the portage keywords file for an unversioned package

I've been working to fix this today so I can upgrade ImageMagick (extra sticky since it comes installed already). The two relevant commits that fix this error are:
http://github.com/Scoutmob/ey-cloud-recipes/commit/2331f7874173abc49b241bfe730b454d9090fd20
http://github.com/Scoutmob/ey-cloud-recipes/commit/f2fae2ade03efb8d23bdc0f850d7249d2885af60

But I'm also seeing an idempotency problem with the enable_package task, ie every time it's run it adds lines to the keywords file again. Not sure if this is me being a n00b or if its an actual bug in the task, the not_if "grep..." declaration looks solid...

Happy to figure out a pull request for this if I'm on the right track!

Magento Recipe is broken on non-solo instances

This line in the Magento recipe breaks with the following error if you're not using a solo instance and don't have a redis instance:

/usr/local/ey_resin/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require': iconv will be deprecated in the future, use String#encode instead.

================================================================================
Recipe Compile Error in /etc/chef-custom/recipes/cookbooks/main/recipes/default.rb
================================================================================

NoMethodError
-------------
undefined method `[]' for nil:NilClass

Cookbook Trace:
---------------
  /etc/chef-custom/recipes/cookbooks/magento/recipes/default.rb:7:in `from_file'
  /etc/chef-custom/recipes/cookbooks/main/recipes/default.rb:2:in `from_file'

Relevant File Content:
----------------------
/etc/chef-custom/recipes/cookbooks/magento/recipes/default.rb:

  1:  #
  2:  # Cookbook Name:: magento
  3:  # Recipe:: default
  4:  #
  5:  
  6:  if app_server?
  7>>   redis_host = solo? ? "localhost" : node[:utility_instances].find { |instance| instance[:name] == 'redis' }[:hostname]
  8:    
  9:    node[:applications].each do |app_name, data|
 10:      template "/data/#{app_name}/shared/config/local.xml" do
 11:      owner node[:owner_name]
 12:      group node[:owner_name]
 13:      mode 0644
 14:      source "local.xml.erb"
 15:      variables({
 16:          :app_name => app_name,

[2015-03-23T19:24:14+00:00] ERROR: Running exception handlers
[2015-03-23T19:24:14+00:00] ERROR: Exception handlers complete
[2015-03-23T19:24:14+00:00] FATAL: Stacktrace dumped to /etc/chef-custom/recipes/chef-stacktrace.out
[2015-03-23T19:24:14+00:00] FATAL: NoMethodError: undefined method `[]' for nil:NilClass

Improve the DelayedJob 4 recipe

For the current version of DelayedJob (4.x) these checks are not necessary because the modules are already integrated with the DJ gem:

https://github.com/engineyard/ey-cloud-recipes/blob/master/cookbooks/delayed_job/templates/default/dj.erb#L117-L118

https://github.com/engineyard/ey-cloud-recipes/blob/master/cookbooks/delayed_job/templates/default/dj.erb#L126-L127

The DJ4 recipe should:

  1. Remove the checks above - each check loads the Rails environment (slow!) just to determine if a module is available. On DJ4 it's guaranteed to be available so there is no need to check. Removing the check also simplifies the code.
  2. Write out the script to /engineyard/bin/dj instead of /engineyard/custom/dj
  3. Document in the README that it is for DJ4 or later only. Customers using older versions of DJ should use the original DJ recipe.

Resque-Scheduler recipe doesn't work

From customer ticket:

I am trying to use the Engine Yard resque-scheduler Chef recipe on my Trinidad/jRuby instance, but it doesn't seem to work. When I upload, apply and try to start it with Monit, it fails. Monit status says that execution failed. Log file says: /usr/bin/env: bundle: No such file or directory. That's an odd error, since Resque workers themselves are able to start just fine.

exim_main.log 2gb file limit causes exim start failure

if exim_main.log hits the 2gb file limit (limitation on ey-stack since it doesn't not have >2gb file support enabled) exim will fail to restart/start and will output no error message other than [!!]

would be wise to have a logrotate on /etc/exim/exim_main.log

Sphinx monit does not apply correct app framework environment on utility instance

When deploying sphinx on a dedicated utility instance for an app, node[:environment][:framework_env] is not passed into the monit template. Causing starting and indexing of the sphinx index for an app to fail if you're not using production.

I am using a staging framework_env in my case.

The recipe is configured correctly for sphinx-on-app instance.

Sidekiq worker memory limit in attributes file

Currently, the sidekiq worker memory limit (enforced by monit) is defined and hardcoded in cookbooks/sidekiq/recipes/setup.rb.

    # monit
    template "/etc/monit.d/sidekiq_#{app_name}.monitrc" do 
      mode 0644 
      source "sidekiq.monitrc.erb" 
      backup false
      variables({ 
        :app_name => app_name, 
        :workers => node[:sidekiq][:workers],
        :rails_env => node[:environment][:framework_env],
        :memory_limit => 400 # MB
      })
      notifies :run, resources(:execute => "restart-sidekiq-for-#{app_name}")
    end

This should be moved to the attributes file.

monit: Cannot connect to the monit daemon. Did you start it with http support?

Us server error after we applied a changed configuration.
and this is custom log

<application> instead of name of my application

/usr/local/ey_resin/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require': iconv will be deprecated in the future, use String#encode instead.

================================================================================
Error executing action `run` on resource 'execute[restart-sidekiq-for-<application>]'
================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of monit reload && sleep 1 && monit restart all -g <application>_sidekiq ----
STDOUT: 
STDERR: Reinitializing monit daemon
monit: Cannot connect to the monit daemon. Did you start it with http support?
monit: Cannot connect to the monit daemon. Did you start it with http support?
---- End output of monit reload && sleep 1 && monit restart all -g <application>_sidekiq ----
Ran monit reload && sleep 1 && monit restart all -g <application>_sidekiq returned 1

Resource Declaration:
---------------------
# In /etc/chef-custom/recipes/cookbooks/sidekiq/recipes/setup.rb

 22:     execute "restart-sidekiq-for-#{app_name}" do
 23:       command "monit reload && sleep 1 && monit restart all -g #{app_name}_sidekiq"
 24:       action :nothing
 25:     end
 26:     

Compiled Resource:
------------------
# Declared in /etc/chef-custom/recipes/cookbooks/sidekiq/recipes/setup.rb:22:in `block in from_file'

execute("restart-sidekiq-for-<application>") do
  action [:nothing]
  retries 0
  retry_delay 2
  command "monit reload && sleep 1 && monit restart all -g <application>_sidekiq"
  backup 5
  returns 0
  cookbook_name :sidekiq
  recipe_name "setup"
end

t reload]: /etc/chef-custom/recipes/cookbooks/elasticsearch/recipes/default.rb:164:in `from_file'
[2016-07-22T11:42:36+00:00] INFO: Processing remote_file[/tmp/phantomjs-1.9.2-linux-x86_64.tar.bz2] action create (phantomjs::default line 12)
[2016-07-22T11:42:36+00:00] INFO: Processing bash[unzip phantomjs] action run (phantomjs::default line 18)
[2016-07-22T11:42:36+00:00] INFO: Processing bash[copy phantomjs] action run (phantomjs::default line 25)
[2016-07-22T11:42:36+00:00] INFO: Processing template[/etc/monit.d/rpush_<application>.monitrc] action create (rpush::default line 7)
[2016-07-22T11:42:36+00:00] INFO: Processing remote_file[/data/<application>/shared/bin/rpush] action create (rpush::default line 17)
[2016-07-22T11:42:36+00:00] WARN: remote_file is deprecated for fetching files from cookbooks. Use cookbook_file instead
[2016-07-22T11:42:36+00:00] WARN: From remote_file[/data/<application>/shared/bin/rpush] on /etc/chef-custom/recipes/cookbooks/rpush/recipes/default.rb:17:in `block in from_file'
[2016-07-22T11:42:36+00:00] WARN: remote_file is deprecated for fetching files from cookbooks. Use cookbook_file instead
[2016-07-22T11:42:36+00:00] WARN: From remote_file[/data/<application>/shared/bin/rpush] on /etc/chef-custom/recipes/cookbooks/rpush/recipes/default.rb:17:in `block in from_file'
[2016-07-22T11:42:36+00:00] INFO: Processing execute[ensure-rpush-is-setup-with-monit] action run (rpush::default line 26)
[2016-07-22T11:42:36+00:00] INFO: execute[ensure-rpush-is-setup-with-monit] ran successfully
[2016-07-22T11:42:36+00:00] INFO: Processing execute[reload-monit] action nothing (sidekiq::cleanup line 7)
[2016-07-22T11:42:36+00:00] INFO: Processing execute[reporting for sidekiq] action run (sidekiq::cleanup line 3)
[2016-07-22T11:42:38+00:00] INFO: execute[reporting for sidekiq] ran successfully
[2016-07-22T11:42:38+00:00] INFO: Processing file[/etc/monit.d/sidekiq_<application>.monitrc] action delete (sidekiq::cleanup line 22)
[2016-07-22T11:42:38+00:00] INFO: file[/etc/monit.d/sidekiq_<application>.monitrc] backed up to /var/chef/backup/etc/monit.d/sidekiq_<application>.monitrc.chef-20160722114238
[2016-07-22T11:42:38+00:00] INFO: file[/etc/monit.d/sidekiq_<application>.monitrc] removed backup at /var/chef/backup/./etc/monit.d/sidekiq_<application>.monitrc.chef-20160707110233
[2016-07-22T11:42:38+00:00] INFO: file[/etc/monit.d/sidekiq_<application>.monitrc] deleted file at /etc/monit.d/sidekiq_<application>.monitrc
[2016-07-22T11:42:38+00:00] INFO: Processing file[/data/<application>/shared/config/sidekiq_0.yml] action delete (sidekiq::cleanup line 29)
[2016-07-22T11:42:38+00:00] INFO: file[/data/<application>/shared/config/sidekiq_0.yml] backed up to /var/chef/backup/data/<application>/shared/config/sidekiq_0.yml.chef-20160722114238
[2016-07-22T11:42:38+00:00] INFO: file[/data/<application>/shared/config/sidekiq_0.yml] removed backup at /var/chef/backup/./data/<application>/shared/config/sidekiq_0.yml.chef-20160707110233
[2016-07-22T11:42:38+00:00] INFO: file[/data/<application>/shared/config/sidekiq_0.yml] deleted file at /data/<application>/shared/config/sidekiq_0.yml
[2016-07-22T11:42:38+00:00] INFO: Processing file[/data/<application>/shared/config/sidekiq_1.yml] action delete (sidekiq::cleanup line 29)
[2016-07-22T11:42:38+00:00] INFO: file[/data/<application>/shared/config/sidekiq_1.yml] backed up to /var/chef/backup/data/<application>/shared/config/sidekiq_1.yml.chef-20160722114238
[2016-07-22T11:42:38+00:00] INFO: file[/data/<application>/shared/config/sidekiq_1.yml] removed backup at /var/chef/backup/./data/<application>/shared/config/sidekiq_1.yml.chef-20160707110233
[2016-07-22T11:42:38+00:00] INFO: file[/data/<application>/shared/config/sidekiq_1.yml] deleted file at /data/<application>/shared/config/sidekiq_1.yml
[2016-07-22T11:42:38+00:00] INFO: Processing file[/data/<application>/shared/config/sidekiq_2.yml] action delete (sidekiq::cleanup line 29)
[2016-07-22T11:42:38+00:00] INFO: file[/data/<application>/shared/config/sidekiq_2.yml] backed up to /var/chef/backup/data/<application>/shared/config/sidekiq_2.yml.chef-20160722114238
[2016-07-22T11:42:38+00:00] INFO: file[/data/<application>/shared/config/sidekiq_2.yml] removed backup at /var/chef/backup/./data/<application>/shared/config/sidekiq_2.yml.chef-20160707110233
[2016-07-22T11:42:38+00:00] INFO: file[/data/<application>/shared/config/sidekiq_2.yml] deleted file at /data/<application>/shared/config/sidekiq_2.yml
[2016-07-22T11:42:38+00:00] INFO: Processing file[/engineyard/bin/sidekiq] action delete (sidekiq::cleanup line 36)
[2016-07-22T11:42:38+00:00] INFO: file[/engineyard/bin/sidekiq] backed up to /var/chef/backup/engineyard/bin/sidekiq.chef-20160722114238
[2016-07-22T11:42:38+00:00] INFO: file[/engineyard/bin/sidekiq] removed backup at /var/chef/backup/./engineyard/bin/sidekiq.chef-20160707110233
[2016-07-22T11:42:38+00:00] INFO: file[/engineyard/bin/sidekiq] deleted file at /engineyard/bin/sidekiq
[2016-07-22T11:42:38+00:00] INFO: Processing execute[kill-sidekiq] action run (sidekiq::cleanup line 41)
[2016-07-22T11:42:38+00:00] INFO: execute[kill-sidekiq] ran successfully
[2016-07-22T11:42:38+00:00] INFO: Processing execute[reporting for sidekiq] action run (sidekiq::setup line 3)
[2016-07-22T11:42:39+00:00] INFO: execute[reporting for sidekiq] ran successfully
[2016-07-22T11:42:39+00:00] INFO: Processing remote_file[/engineyard/bin/sidekiq] action create (sidekiq::setup line 13)
[2016-07-22T11:42:39+00:00] WARN: remote_file is deprecated for fetching files from cookbooks. Use cookbook_file instead
[2016-07-22T11:42:39+00:00] WARN: From remote_file[/engineyard/bin/sidekiq] on /etc/chef-custom/recipes/cookbooks/sidekiq/recipes/setup.rb:13:in `from_file'
[2016-07-22T11:42:39+00:00] WARN: remote_file is deprecated for fetching files from cookbooks. Use cookbook_file instead
[2016-07-22T11:42:39+00:00] WARN: From remote_file[/engineyard/bin/sidekiq] on /etc/chef-custom/recipes/cookbooks/sidekiq/recipes/setup.rb:13:in `from_file'
[2016-07-22T11:42:39+00:00] INFO: remote_file[/engineyard/bin/sidekiq] mode changed to 755
[2016-07-22T11:42:39+00:00] INFO: remote_file[/engineyard/bin/sidekiq] created file /engineyard/bin/sidekiq
[2016-07-22T11:42:39+00:00] INFO: Processing execute[restart-sidekiq-for-<application>] action nothing (sidekiq::setup line 22)
[2016-07-22T11:42:39+00:00] INFO: Processing template[/etc/monit.d/sidekiq_<application>.monitrc] action create (sidekiq::setup line 28)
[2016-07-22T11:42:40+00:00] INFO: template[/etc/monit.d/sidekiq_<application>.monitrc] updated content
[2016-07-22T11:42:40+00:00] INFO: template[/etc/monit.d/sidekiq_<application>.monitrc] mode changed to 644
[2016-07-22T11:42:40+00:00] INFO: Processing execute[update-database-yml-pg-pool-for-<application>] action run (sidekiq::setup line 42)
[2016-07-22T11:42:40+00:00] INFO: execute[update-database-yml-pg-pool-for-<application>] ran successfully
[2016-07-22T11:42:40+00:00] INFO: execute[update-database-yml-pg-pool-for-<application>] not queuing delayed action run on execute[restart-sidekiq-for-<application>] (delayed), as it's already been queued
[2016-07-22T11:42:40+00:00] INFO: Processing template[/data/<application>/shared/config/sidekiq_0.yml] action create (sidekiq::setup line 52)
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_0.yml] updated content
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_0.yml] owner changed to 1000
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_0.yml] group changed to 1000
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_0.yml] mode changed to 644
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_0.yml] not queuing delayed action run on execute[restart-sidekiq-for-<application>] (delayed), as it's already been queued
[2016-07-22T11:42:40+00:00] INFO: Processing template[/data/<application>/shared/config/sidekiq_1.yml] action create (sidekiq::setup line 52)
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_1.yml] updated content
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_1.yml] owner changed to 1000
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_1.yml] group changed to 1000
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_1.yml] mode changed to 644
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_1.yml] not queuing delayed action run on execute[restart-sidekiq-for-<application>] (delayed), as it's already been queued
[2016-07-22T11:42:40+00:00] INFO: Processing template[/data/<application>/shared/config/sidekiq_2.yml] action create (sidekiq::setup line 52)
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_2.yml] updated content
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_2.yml] owner changed to 1000
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_2.yml] group changed to 1000
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_2.yml] mode changed to 644
[2016-07-22T11:42:40+00:00] INFO: template[/data/<application>/shared/config/sidekiq_2.yml] not queuing delayed action run on execute[restart-sidekiq-for-<application>] (delayed), as it's already been queued
[2016-07-22T11:42:40+00:00] INFO: Processing template[/data/<application>/shared/config/redis.yml] action create (redis-yml::default line 11)
[2016-07-22T11:42:40+00:00] INFO: Processing execute[remove-vm.overcommit_memory-in-sysctl] action run (redis::default line 7)
[2016-07-22T11:42:40+00:00] INFO: execute[remove-vm.overcommit_memory-in-sysctl] ran successfully
[2016-07-22T11:42:40+00:00] INFO: Processing file[add-vm.overcommit_memory-to-sysctl] action create (redis::default line 9)
[2016-07-22T11:42:40+00:00] INFO: Processing ruby_block[append-to-/etc/sysctl.conf (46caddf70cab055e6437aaa5167eafd1)] action create (redis::default line 29)
[2016-07-22T11:42:40+00:00] INFO: ruby_block[append-to-/etc/sysctl.conf (46caddf70cab055e6437aaa5167eafd1)] called
[2016-07-22T11:42:40+00:00] INFO: Processing execute[reload-sysctl] action run (redis::default line 18)
[2016-07-22T11:42:40+00:00] INFO: execute[reload-sysctl] ran successfully
[2016-07-22T11:42:40+00:00] INFO: Processing file[unmasking dev-db/redis-2.6.16] action create (redis::default line 9)
[2016-07-22T11:42:40+00:00] INFO: Processing ruby_block[append-to-/etc/portage/package.keywords/local (8a63e5ed57e56c6ae77adde6c3b783c2)] action create (redis::default line 29)
[2016-07-22T11:42:40+00:00] INFO: Processing file[overriding hard mask for dev-db/redis-2.6.16] action create (redis::default line 9)
[2016-07-22T11:42:40+00:00] INFO: Processing ruby_block[append-to-/etc/portage/package.unmask/engineyard_overrides (8a63e5ed57e56c6ae77adde6c3b783c2)] action create (redis::default line 29)
[2016-07-22T11:42:40+00:00] INFO: Processing package[dev-db/redis] action upgrade (redis::default line 19)
[2016-07-22T11:42:43+00:00] INFO: Processing directory[/data/redis] action create (redis::default line 24)
[2016-07-22T11:42:43+00:00] INFO: Processing template[/etc/redis_util.conf] action create (redis::default line 32)
[2016-07-22T11:42:43+00:00] INFO: Processing template[/data/monit.d/redis_util.monitrc] action create (redis::default line 60)
[2016-07-22T11:42:43+00:00] INFO: Processing execute[monit reload] action run (redis::default line 75)
[2016-07-22T11:42:43+00:00] INFO: execute[monit reload] ran successfully
[2016-07-22T11:42:43+00:00] INFO: Processing execute[Remove existing redis_instance mapping from /etc/hosts] action run (redis::default line 89)
[2016-07-22T11:42:43+00:00] INFO: execute[Remove existing redis_instance mapping from /etc/hosts] ran successfully
[2016-07-22T11:42:43+00:00] INFO: Processing execute[Add redis_instance mapping to /etc/hosts] action run (redis::default line 94)
[2016-07-22T11:42:43+00:00] INFO: execute[Add redis_instance mapping to /etc/hosts] ran successfully
[2016-07-22T11:42:43+00:00] INFO: Processing remote_file[/tmp/elasticsearch-1.4.4.zip] action create (elasticsearch::default line 25)
[2016-07-22T11:42:43+00:00] INFO: Processing user[elasticsearch] action create (elasticsearch::default line 32)
[2016-07-22T11:42:43+00:00] INFO: Processing file[unmasking dev-java/icedtea-bin-7.2.3.3-r1] action create (elasticsearch::default line 9)
[2016-07-22T11:42:43+00:00] INFO: Processing ruby_block[append-to-/etc/portage/package.keywords/local (05334d3ea4843d74f5a0c4558399e631)] action create (elasticsearch::default line 29)
[2016-07-22T11:42:43+00:00] INFO: Processing package[dev-java/icedtea-bin] action upgrade (elasticsearch::default line 45)
[2016-07-22T11:43:30+00:00] INFO: package[dev-java/icedtea-bin] upgraded from uninstalled to 7.2.3.3-r1
[2016-07-22T11:43:30+00:00] INFO: Processing execute[Set the default Java version to 7.2.3.3-r1] action run (elasticsearch::default line 50)
[2016-07-22T11:43:30+00:00] INFO: execute[Set the default Java version to 7.2.3.3-r1] ran successfully
[2016-07-22T11:43:30+00:00] INFO: Processing directory[/usr/lib/elasticsearch-1.4.4] action create (elasticsearch::default line 55)
[2016-07-22T11:43:30+00:00] INFO: Processing directory[/var/log/elasticsearch] action create (elasticsearch::default line 62)
[2016-07-22T11:43:30+00:00] INFO: Processing directory[/var/lib/elasticsearch] action create (elasticsearch::default line 62)
[2016-07-22T11:43:30+00:00] INFO: Processing directory[/var/run/elasticsearch] action create (elasticsearch::default line 62)
[2016-07-22T11:43:30+00:00] INFO: Processing bash[unzip elasticsearch] action run (elasticsearch::default line 69)
[2016-07-22T11:43:30+00:00] INFO: Processing bash[copy elasticsearch root] action run (elasticsearch::default line 76)
[2016-07-22T11:43:30+00:00] INFO: Processing directory[/usr/lib/elasticsearch-1.4.4/plugins] action create (elasticsearch::default line 83)
[2016-07-22T11:43:30+00:00] INFO: Processing link[/usr/lib/elasticsearch] action create (elasticsearch::default line 89)
[2016-07-22T11:43:30+00:00] INFO: Processing directory[/data/elasticsearch] action create (elasticsearch::default line 93)
[2016-07-22T11:43:30+00:00] INFO: directory[/data/elasticsearch] owner changed to 61021
[2016-07-22T11:43:30+00:00] INFO: directory[/data/elasticsearch] group changed to 65533
[2016-07-22T11:43:30+00:00] INFO: Processing directory[/usr/lib/elasticsearch-1.4.4/data] action create (elasticsearch::default line 99)
[2016-07-22T11:43:30+00:00] INFO: directory[/usr/lib/elasticsearch-1.4.4/data] owner changed to 0
[2016-07-22T11:43:30+00:00] INFO: directory[/usr/lib/elasticsearch-1.4.4/data] group changed to 0
[2016-07-22T11:43:30+00:00] INFO: Processing mount[/usr/lib/elasticsearch-1.4.4/data] action mount (elasticsearch::default line 107)
[2016-07-22T11:43:30+00:00] INFO: mount[/usr/lib/elasticsearch-1.4.4/data] mounted
[2016-07-22T11:43:30+00:00] INFO: Processing template[/usr/lib/elasticsearch-1.4.4/config/logging.yml] action create (elasticsearch::default line 114)
[2016-07-22T11:43:30+00:00] INFO: Processing directory[/usr/share/elasticsearch] action create (elasticsearch::default line 119)
[2016-07-22T11:43:30+00:00] INFO: Processing template[/usr/share/elasticsearch/elasticsearch.in.sh] action create (elasticsearch::default line 126)
[2016-07-22T11:43:30+00:00] INFO: Processing template[/usr/lib/elasticsearch-1.4.4/config/elasticsearch.yml] action create (elasticsearch::default line 137)
[2016-07-22T11:43:30+00:00] INFO: Processing template[/etc/monit.d/elasticsearch_live.monitrc] action create (elasticsearch::default line 155)
[2016-07-22T11:43:30+00:00] INFO: Processing execute[monit reload] action run (elasticsearch::default line 164)
[2016-07-22T11:43:30+00:00] INFO: execute[monit reload] ran successfully
[2016-07-22T11:43:30+00:00] INFO: Processing template[/data/<application>/shared/config/elasticsearch.yml] action create (elasticsearch::default line 180)
[2016-07-22T11:43:30+00:00] INFO: file[/etc/monit.d/sidekiq_<application>.monitrc] sending run action to execute[reload-monit] (delayed)
[2016-07-22T11:43:30+00:00] INFO: Processing execute[reload-monit] action run (sidekiq::cleanup line 7)
[2016-07-22T11:43:30+00:00] INFO: execute[reload-monit] ran successfully
[2016-07-22T11:43:30+00:00] INFO: template[/etc/monit.d/sidekiq_<application>.monitrc] sending run action to execute[restart-sidekiq-for-<application>] (delayed)
[2016-07-22T11:43:30+00:00] INFO: Processing execute[restart-sidekiq-for-<application>] action run (sidekiq::setup line 22)
[2016-07-22T11:43:31+00:00] ERROR: Running exception handlers
[2016-07-22T11:43:31+00:00] ERROR: Exception handlers complete
[2016-07-22T11:43:32+00:00] FATAL: Stacktrace dumped to /etc/chef-custom/recipes/chef-stacktrace.out
[2016-07-22T11:43:32+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: execute[restart-sidekiq-for-<application>] (sidekiq::setup line 22) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of monit reload && sleep 1 && monit restart all -g <application>_sidekiq ----
STDOUT: 
STDERR: Reinitializing monit daemon
monit: Cannot connect to the monit daemon. Did you start it with http support?
monit: Cannot connect to the monit daemon. Did you start it with http support?
---- End output of monit reload && sleep 1 && monit restart all -g <application>_sidekiq ----
Ran monit reload && sleep 1 && monit restart all -g <application>_sidekiq returned 1

How to fix it ?

How to configure engineyard account ?

Hi all,

I have two accounts in engineyard.
I used ey recipe upload command in my old account once.
If i execute the ey recipe upload --account newaccountname it is failing. it is saying no account/environment found.

I think my old account details is being referred all the times. Where it will be caches in windows os? or how to change the new account details?

Kindly help me out.

Thanks and Regards,
Malligarjunan S.

redis dbfilename setting seems incorrect

I think this could be a critical issue, as it may affect Redis's ability to persist the data to disk.

I'm not 100% sure, but I think the dbfilename setting in the redis.conf template is incorrect. It specifies an absolute path to a file, when I think it should only be the name of a file.

From antirez's config:
http://github.com/antirez/redis/blob/master/redis.conf#L79

Compare to EY redis config template:
http://github.com/engineyard/ey-cloud-recipes/blob/master/cookbooks/redis/templates/default/redis.conf.erb#L79

Elastic Search should terminate & restart gracefully

From one of our customers John Paul:

check process elasticsearch_9080 
  with pidfile /var/run/elasticsearch.pid
  start program = "/usr/lib/elasticsearch/bin/elasticsearch -p /var/run/elasticsearch.pid" with timeout 90 seconds 
  stop program = "/bin/bash -c '/bin/kill `cat /var/run/elasticsearch.pid`'" with timeout 90 seconds 
  group elasticsearch

kill is just program sends a TERM signal to a process by default. it does not guarantee the shutdown process, so after a Kill, Monit thinks that ES is off. but > in reality it is not so!

Next, monit starts a new process elasticsearch. Together with the old process, they form a cluster. New shard begins to process and download the data from the old shard, but do not have time, as the old process shutdowned by kill.

This can cause vanishing indexes

This situation can be avoided by using standard upstart or systemd as supervisor of demons.

exim recipe causes a "Cannot find a preferred file for exim!" error

I commented out the exim_auth portion of main/recipes/default.rb, filled in my credentials and updated the environment, but I get the following error:

[Tue, 23 Aug 2011 17:24:03 -0700] INFO: Starting Chef Solo Run
[Tue, 23 Aug 2011 17:24:04 -0700] INFO: Deleting directory[/etc/ssmtp] recursively at /etc/ssmtp
[Tue, 23 Aug 2011 17:24:04 -0700] INFO: Creating a symbolic link from /data/ssmtp -> /etc/ssmtp for link[/etc/ssmtp]
[Tue, 23 Aug 2011 17:24:04 -0700] INFO: Updating remote_file[/etc/logrotate.d/nginx] at /etc/logrotate.d/nginx
[Tue, 23 Aug 2011 17:24:04 -0700] INFO: Setting mode to 655 for remote_file[/etc/logrotate.d/nginx]
[Tue, 23 Aug 2011 17:24:04 -0700] INFO: Added cron 'logrotate -f /etc/logrotate.d/nginx'
[Tue, 23 Aug 2011 17:24:05 -0700] INFO: Ran execute[touch /etc/ssmtp/ssmtp.conf] successfully
[Tue, 23 Aug 2011 17:24:06 -0700] ERROR: remote_file[/etc/logrotate.d/exim] (/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/recipe.rb line 187) had an error:
Cannot find a preferred file for exim!
/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/mixin/find_preferred_file.rb:91:in `find_preferred_file'/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/provider/remote_file.rb:120:in `get_from_local_cookbook'/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/provider/remote_file.rb:55:in `do_remote_file'/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/provider/remote_file.rb:34:in `action_create'/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/runner.rb:87:in `send'/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/runner.rb:87:in `converge'/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/runner.rb:85:in `each'/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/runner.rb:85:in `converge'/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/resource_collection.rb:58:in `each'/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/resource_collection.rb:57:in `each'/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/runner.rb:63:in `converge'/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/client.rb:348:in `converge'/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/client.rb:96:in `run_solo'/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/bin/chef-solo:94/usr/local/ey_resin/ruby/bin/chef-solo:19:in `load'/usr/local/ey_resin/ruby/bin/chef-solo:19
/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/mixin/find_preferred_file.rb:91:in `find_preferred_file': Cannot find a preferred file for exim! (Chef::Exceptions::FileNotFound)
  from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/provider/remote_file.rb:120:in `get_from_local_cookbook'
  from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/provider/remote_file.rb:55:in `do_remote_file'
  from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/provider/remote_file.rb:34:in `action_create'
  from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/runner.rb:87:in `send'
  from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/runner.rb:87:in `converge'
  from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/runner.rb:85:in `each'
  from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/runner.rb:85:in `converge'
  from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/resource_collection.rb:58:in `each'
  from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/resource_collection.rb:57:in `each'
  from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/runner.rb:63:in `converge'
  from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/client.rb:348:in `converge'
  from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/lib/chef/client.rb:96:in `run_solo'
  from /usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.2/bin/chef-solo:94
  from /usr/local/ey_resin/ruby/bin/chef-solo:19:in `load'
  from /usr/local/ey_resin/ruby/bin/chef-solo:19

delayed job recipe and readme out of sync on restarting

README says:

## Restarting your workers

This recipe does NOT restart your workers. The reason for this is that shipping your application and
rebuilding your instances (i.e. running chef) are not always done at the same time. It is best to 
restart your Delayed Job workers when you ship (deploy) your application code. To do this, add a
deploy hook to perform the following:

recipe does:

    execute "monit-reload-restart" do
       command "sleep 30 && monit reload && monit restart all -g dj_#{app_name}"
       action :run
    end

Redis recipe doesn't handle upgrading the version.

When upgrading the version of Redis, the daemon should be restarted.
The recipe doesn't handle it, and probably shouldn't since Redis is a database. If the later is the case then a note should be added on the recipe's Readme for manually restarting the daemon.

How to config Mongodb 2.6, It not works

Here is my logs. My step is
Step 1: modify ey-cloud-recipes/cookbooks/mongodb/attributes/default.rb

default[:mongo_version] = "2.6.4"
Step 2: execute this shell ey recipes upload -e ENVIRONMENT
Step 3: execute this shell ey recipes apply -e ENVIRONMENT

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 45.9M 0 17642 0 0 17523 0 0:45:50 0:00:01 0:45:49 20902 0 45.9M 0 135k 0 0 67278 0 0:11:56 0:00:02 0:11:54 73073 0 45.9M 0 238k 0 0 80632 0 0:09:57 0:00:03 0:09:54 85206 0 45.9M 0 390k 0 0 98400 0 0:08:09 0:00:04 0:08:05 100k 1 45.9M 1 595k 0 0 117k 0 0:06:39 0:00:05 0:06:34 121k 2 45.9M 2 1070k 0 0 177k 0 0:04:25 0:00:06 0:04:19 209k 3 45.9M 3 1751k 0 0 248k 0 0:03:09 0:00:07 0:03:02 323k 5 45.9M 5 2770k 0 0 345k 0 0:02:16 0:00:08 0:02:08 506k 8 45.9M 8 4182k 0 0 463k 0 0:01:41 0:00:09 0:01:32 763k 12 45.9M 12 6051k 0 0 603k 0 0:01:17 0:00:10 0:01:07 1097k 18 45.9M 18 8686k 0 0 788k 0 0:00:59 0:00:11 0:00:48 1527k 25 45.9M 25 11.8M 0 0 1010k 0 0:00:46 0:00:12 0:00:34 2095k 35 45.9M 35 16.3M 0 0 1286k 0 0:00:36 0:00:13 0:00:23 2802k 48 45.9M 48 22.3M 0 0 1631k 0 0:00:28 0:00:14 0:00:14 3749k 65 45.9M 65 29.9M 0 0 2040k 0 0:00:23 0:00:15 0:00:08 4927k 86 45.9M 86 39.9M 0 0 2555k 0 0:00:18 0:00:16 0:00:02 6444k 100 45.9M 100 45.9M 0 0 2807k 0 0:00:16 0:00:16 --:--:-- 7351k Setting up ey-resin env >>> Regenerating /etc/ld.so.cache... /usr/local/ey_resin/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. I, [2015-06-15T08:23:21.602490 #20728] INFO -- : Starting configuration run I, [2015-06-15T08:23:21.602585 #20728] INFO -- : Checking resolv.conf I, [2015-06-15T08:23:24.456950 #20728] INFO -- : Starting main chef run I, [2015-06-15T08:23:24.483486 #20728] INFO -- : Removing main cookbooks I, [2015-06-15T08:28:30.845254 #20728] INFO -- : Running telinit I, [2015-06-15T08:28:30.847290 #20728] INFO -- : Finished main chef run I, [2015-06-15T08:28:34.917864 #20728] INFO -- : Starting custom chef run I, [2015-06-15T08:28:34.920390 #20728] INFO -- : Removing custom cookbooks E, [2015-06-15T08:29:28.625803 #20728] ERROR -- : custom chef run failed. Reporting error E, [2015-06-15T08:29:28.626303 #20728] ERROR -- : custom error output: [2015-06-15T08:29:28+00:00] ERROR: Running exception handlers [2015-06-15T08:29:28+00:00] ERROR: Exception handlers complete [2015-06-15T08:29:28+00:00] FATAL: Stacktrace dumped to /etc/chef-custom/recipes/chef-stacktrace.out [2015-06-15T08:29:28+00:00] FATAL: Chef::Exceptions::Exec: package[dev-db/mongodb-bin](mongodb::install line 11) had an error: Chef::Exceptions::Exec: emerge -g --color n --nospinner --quiet =dev-db/mongodb-bin-2.6.10 returned 1, expected 0 E, [2015-06-15T08:29:30.186045 #20728] ERROR -- : Got an exception: Notifying user error: EY::Enzyme::DeployError: custom chef run failed

New Relic recipe for db servers

Is it possible to use the New Relic recipe to add server monitoring of our database servers to our EngineYard Cloud created New Relic account? In the New Relic recipe, it explicitly states that this won't work with New Relic accounts created through EngineYard, but is this a conflict that would only be seen on the app servers, or all servers? I would modify the recipe to only load it on our database servers.

Sunspot recipe

The sunspot gem is still alive and kicking. Please do not deprecate the recipe.

The latest version of the gem integrates Solr 5.3 and it is possible to run Solr from it while keeping SOLR_HOME in /data/solr. Here are the manual steps to setup Sunspot:

  1. Copy /data/appname/current/solr to /data/solr

  2. Add the line

solr_home: /data/solr

to `/data/appname/current/solr.yml

  1. Start solr with bundle exec rake sunspot:solr:start

Please update the Sunspot recipe with the above steps in mind.

Fatal error installing syslog-ng in Papertrail recipe

Here's the relevant output from the log:

/usr/local/ey_resin/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. ================================================================================
Error executing action `install` on resource 'package[app-admin/syslog-ng]'
================================================================================
Chef::Exceptions::Exec ---------------------- 
emerge -g --color n --nospinner --quiet =app-admin/syslog-ng-3.3.5 returned 1, expected 0 
Resource Declaration: --------------------- 
# In /etc/chef-custom/recipes/cookbooks/papertrail/recipes/default.rb 
42: package 'app-admin/syslog-ng' do 
43: version PAPERTRAIL_CONFIG[:syslog_ng_version] 
44: action :install 
45: end 
46: Compiled Resource: ------------------ 
# Declared in /etc/chef-custom/recipes/cookbooks/papertrail/recipes/default.rb:42:in `from_file' 
package("app-admin/syslog-ng") do 
  action [:install] 
  retries 0 
  retry_delay 2 
  package_name "app-admin/syslog-ng" 
  version "3.3.5" 
  cookbook_name :papertrail 
  recipe_name "default"
end 

...

[2013-06-15T07:56:13+00:00] INFO: Processing execute[get-latest-portage] action run (papertrail::default line 32) 
[2013-06-15T07:56:14+00:00] INFO: execute[get-latest-portage] ran successfully 
[2013-06-15T07:56:14+00:00] INFO: Processing file[unmasking app-admin/syslog-ng-3.3.5] action create (papertrail::default line 9) 
[2013-06-15T07:56:14+00:00] INFO: Processing ruby_block[append-to-/etc/portage/package.keywords/local] action create (papertrail::default line 28) 
[2013-06-15T07:56:14+00:00] INFO: Processing file[overriding hard mask for app-admin/syslog-ng-3.3.5] action create (papertrail::default line 9) 
[2013-06-15T07:56:14+00:00] INFO: Processing ruby_block[append-to-/etc/portage/package.unmask/engineyard_overrides] action create (papertrail::default line 28) [2013-06-15T07:56:14+00:00] INFO: Processing package[app-admin/syslog-ng] action install (papertrail::default line 42) 
[2013-06-15T07:56:16+00:00] ERROR: Running exception handlers [2013-06-15T07:56:16+00:00] ERROR: Exception handlers complete 
[2013-06-15T07:56:16+00:00] FATAL: Stacktrace dumped to /etc/chef-custom/recipes/chef-stacktrace.out 
[2013-06-15T07:56:16+00:00] FATAL: Chef::Exceptions::Exec: package[app-admin/syslog-ng] (papertrail::default line 42) had an error: Chef::Exceptions::Exec: emerge -g --color n --nospinner --quiet =app-admin/syslog-ng-3.3.5 returned 1, expected 0

method missing error while uploading/applying from enginyard

WARN: Setting attributes without specifying a precedence is deprecated and will be
removed in Chef 11.0. To set attributes at normal precedence, change code like:
node["key"] = "value" # Not this
to:
node.set["key"] = "value" # This

Called from:
/usr/local/ey_resin/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/node/attribute.rb:449:in method_missing' /usr/local/ey_resin/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/node.rb:346:inmethod_missing'
/etc/chef/recipes/cookbooks/chef/attributes/client.rb:11:in `from_file'

Issues with the datadog recipe

The datadog custom chef recipe runs and installs datadog but errors are reported in /root/.datadog-agent/ddagent-install.log

The issues are:

  1. CRIT error complaining that Supervisor is running as root

Starting the Agent.....2016-06-25 03:37:55,130 CRIT Supervisor running as root (no user in config file)
2016-06-25 03:37:55,160 INFO RPC interface 'supervisor' initialized
2016-06-25 03:37:55,160 CRIT Server 'unix_http_server' running without any HTTP authentication checking

  1. Compilation errors of plugins like these:

Cannot install # checks.d/ssh_check.py. There is probably no Compiler on the system.You are using pip version 6.0.6, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Cannot install # checks.d/pgbouncer.py. There is probably no Compiler on the system.You are using pip version 6.0.6, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Cannot install # Require libpq. There is probably no Compiler on the system.You are using pip version 6.0.6, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Cannot install # checks.d/win32_event_log.py. There is probably no Compiler on the system.You are using pip version 6.0.6, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Cannot install # checks.d/wmi.py. There is probably no Compiler on the system.You are using pip version 6.0.6, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Please update the recipe such that:
(1) supervisor is not run as the root user, and
(2) Ensure that the plugins compile on Gentoo. Or modify the configuration and skip those plugins if they’re not needed.

Thanks.

exim default.rb is empty

They exim default.rb file is completely empty.
Instructions say to uncomment some auth settings that no longer exist.

Elasticsearch doesn't build on EngineYard stack version 4

I get this issue:

Chef::Exceptions::Package
-------------------------
No candidate version available for dev-java/sun-jdk

Resource Declaration:
---------------------
# In /etc/chef-custom/recipes/cookbooks/elasticsearch/recipes/default.rb

 37:   package "dev-java/sun-jdk" do
 38:     version "1.6.0.26"
 39:     action :upgrade
 40:   end
 41: 

Compiled Resource:
------------------
# Declared in /etc/chef-custom/recipes/cookbooks/elasticsearch/recipes/default.rb:37:in `from_file'

package("dev-java/sun-jdk") do
  action [:upgrade]
  retries 0
  retry_delay 2
  package_name "dev-java/sun-jdk"
  version "1.6.0.26"
  cookbook_name :elasticsearch
  recipe_name "default"
end

Changing the recipe to use icedtea instead helped me:

  # Update JAVA as the Java on the AMI can sometimes crash
  #
  Chef::Log.info "Updating Sun JDK"
  package "dev-java/icedtea-bin" do
    # custom kasper hack
    version "6.1.12.6"
    action :upgrade
  end

JSON not properly initialized by mongo-backup script

The mongo-backup routine can fail on Mongodb 2.4.10. This may be due to an upstream change in Resin.

/usr/local/ey_resin/ruby/lib/ruby/gems/1.9.1/gems/aws-s3-0.6.3/lib/aws/s3/extensions.rb:212:in `const_missing_from_s3_library': uninitialized constant JSON (NameError)
    from /usr/local/bin/mongo-backup:23:in `<main>'

Cut down size of repo

I was trying to do some work on a slow connection and wondering why it takes so long to upload recipes, then I discovered that the file cookbooks/jenkins/files/default/jetty-distribution-8.1.11.v20130520.tar.gz is 90% of the diskspace, and I'm not even using Jenkins! I think it would be better to fetch this file off a static host somewhere rather than keeping it in the repo. What do you think?

eybackup_slave

eybackup_slave fails on encrypted backup environments.
It fail on the install of gpg package.
It tries to install version 2.0.9 while the server allready has 2.0.19.

I removed the package install lines and it works.

Redis/Resque Recipies

Not a major issue, but I like to run these on their own util slice (not on all of them) as we have mongodb on there.

Maybe change the default recipe to:

if ['solo', 'util'].include?(node[:instance_role]) && ( node[:name].match(/resque/) || node[:name].match(/redis/) )

Elasticsearch non_util causes chef crash

Single instance,

include_recipe "elasticsearch::non_util"

Recipe upload and apply causes:

/usr/local/ey_resin/ruby/lib/ruby/gems/1.8/gems/chef-0.6.0.4/lib/chef/node.rb:180:in `method_missing': Attribute default is not defined! (ArgumentError)
from /etc/chef-custom/recipes/cookbooks/elasticsearch/attributes/default.rb:1:in `from_file'

Any hints?

resque / resque-scheduler recipes "install resque gem" check not_if always return true, fail to execute the command

cookbooks/resque/recipes/default.rb:9

not_if { "gem list | grep resque" }

cookbooks/resque-scheduler/recipes/default.rb:8

not_if { "gem list | grep resque" }

I find the above 2 lines will always return true.

According to http://docs.opscode.com/resource_common.html#guards

  • A string is executed as a shell command. If the command returns 0, the guard is applied. If the command returns any other value, then the guard is not applied.
  • A block is executed as Ruby code that must return either true or false. If the block returns true, the the guard is applied. If the block returns false, the guard is not applied.

I guess it is because "{}" interpret as a Ruby code block in chef. The "gem list | grep resque" will become string inside the {}, thus it will always return true.

The fix should be remove the {} block.
i.e.
not_if { "gem list | grep resque" }

not_if "gem list | grep resque"

Adding MongoDB to a solo app leaves you with bad arbiter

This is the problematic section from replset.rb

if @node[:mongo_utility_instances].length < 3
  Chef::Log.info "Mongo Arbiter #{node[:db_host]}"
  mongo_arbiter=@node[:db_host]
else
  mongo_arbiter="na"
end

In the case of an environment that started with a solo instance, @node[:db_host] == 'localhost'. The setup_replset.js intended to configure the replication set will not work correctly as it looks something like this:

deploy@ip-10-102-25-196 ~ $ cat /data/mongodb/setup_replset.js
config = {_id: 'main', members: [
  {_id: 1, host: 'ip-10-102-25-196.ec2.internal:27017'},
  {_id: 2, host: 'ip-10-102-19-49.ec2.internal:27017'},
  {_id: 42, host: 'localhost:27017', arbiterOnly: true}
  ]
}

rs.initiate(config);

Instead of using db_host, it should find the solo instance and its usable name.

logrotate nginx conf permissions

The /etc/logrotate.d/nginx recipes specifies 0655 permissions. It should be 0644.

Otherwise, in my experience (with the EYv4 stack) logrotate will error on bad file mode and skip rotation.

app:production logrotate.d $ sudo logrotate -d /etc/logrotate.d/nginx
Ignoring /etc/logrotate.d/nginx because of bad file mode.

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.