JMX_PORT=10203 ./kafka-move-leadership.sh --zookeeper 10.40.0.2:2181,10.40.0.3:2181,10.40.0.4:2181 --broker-id 913231889 --first-broker-id 276559255 --last-broker-id 276559255
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_iam_policy" "terraform_create_policy" { | |
name = "terraform_create_policy" | |
path = "/" | |
policy = "${data.aws_iam_policy_document.terraform_create_policy.json}" | |
} | |
data "aws_iam_policy_document" "terraform_create_policy" { | |
statement { | |
sid = "1" | |
actions = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Compile all the assets named in config.assets.precompile" | |
task :precompile do | |
# We need to do this dance because RAILS_GROUPS is used | |
# too early in the boot process and changing here is already too late. | |
if ENV["RAILS_GROUPS"].to_s.empty? || ENV["RAILS_ENV"].to_s.empty? | |
ENV["RAILS_GROUPS"] ||= "assets" | |
ENV["RAILS_ENV"] ||= "production" | |
Kernel.exec $0, *ARGV | |
else | |
Rake::Task["environment"].invoke |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Author:: Joshua Timberman (<[email protected]>) | |
# Copyright:: Copyright (c) 2011 Opscode, Inc. | |
# License:: Apache License, Version 2.0 | |
# | |
# 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 |
This script installs a patched version of ruby 1.9.3-p0 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84).
Huge thanks to funny-falcon for the performance patches.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In the rsyslog/recipe/default.rb, wrap the "package: command: | |
# We have to hack around yum dependency resolution since Amazon's Linux AMI is already using sysklogd | |
# and yum doesn't handle the swap out well enough | |
if platform?("amazon") && node['platform_version'] == "2010.11.2" # <== This is the version we are running. | |
# This was changed in version 2011.02, so any instances launched after that should be fine. | |
# No idea about other version numbers | |
cookbook_file "/tmp/yum-shell-rsyslog.yum" do | |
source "yum-shell-rsyslog.yum" | |
owner "root" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In the rsyslog/recipe/default.rb, wrap the "package: command: | |
# We have to hack around yum dependency resolution since Amazon's Linux AMI is already using sysklogd | |
# and yum doesn't handle the swap out well enough | |
if platform?("amazon") && node['platform_version'] == "2010.11.2" # <== This is the version we are running. | |
# This was changed in version 2011.02, so any instances launched after that should be fine. | |
# No idea about other version numbers | |
cookbook_file "/tmp/yum-shell-rsyslog.yum" do | |
source "yum-shell-rsyslog.yum" | |
owner "root" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if node['dmi']['system']['manufacturer'] == "Dell Inc." | |
source_file = "set_hostname-physical" | |
else | |
source_file = "set_hostname" | |
end | |
cookbook_file "/etc/init.d/set_hostname" do | |
source source_file | |
owner "root" | |
group "root" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'etc' | |
package "terminal/screen" do | |
action :install | |
end | |
screen_users = ['root'] | |
search("users", "*:*").each { |u| screen_users << u.id } | |
screenrc_paths = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The end result when the recipe is run is: | |
node[:openldap][:ldap_conf][:servers] = [ "ldap://ldap1.internal.com", "ldap://ldap2.internal.com", "ldap://server.office.com" ] | |
# but what I *expected* was this: | |
node[:openldap][:ldap_conf][:servers] = [ "ldap://server.office.com" ] |
NewerOlder