Permalink
Switch branches/tags
production_RELEASE_RELEASE_CANDIDATE_STABLE_34 production_RELEASE_RELEASE_CANDIDATE_STABLE_32 production_RELEASE_RELEASE_CANDIDATE_STABLE_31 production_RELEASE_RELEASE_CANDIDATE_STABLE_30 production_RELEASE_RELEASE_CANDIDATE_STABLE_28 production_RELEASE_RELEASE_CANDIDATE_STABLE_27 production_RELEASE_RELEASE_CANDIDATE_STABLE_26 production_RELEASE_RELEASE_CANDIDATE_STABLE_25 production_RELEASE_RELEASE_CANDIDATE_STABLE_24 production_RELEASE_RELEASE_CANDIDATE_STABLE_23 production_RELEASE_RELEASE_CANDIDATE_STABLE_22 production_RELEASE_RELEASE_CANDIDATE_STABLE_21 production_RELEASE_RELEASE_CANDIDATE_STABLE_20 production_RELEASE_RELEASE_CANDIDATE_STABLE_19 production_RELEASE_RELEASE_CANDIDATE_STABLE_18 production_RELEASE_RELEASE_CANDIDATE_STABLE_17 production_RELEASE_RELEASE_CANDIDATE_STABLE_16 production_RELEASE_RELEASE_CANDIDATE_STABLE_15 production_RELEASE_RELEASE_CANDIDATE_STABLE_14 production_RELEASE_RELEASE_CANDIDATE_STABLE_13 production_RELEASE_RELEASE_CANDIDATE_STABLE_12 production_RELEASE_RELEASE_CANDIDATE_STABLE_11 production_RELEASE_RELEASE_CANDIDATE_STABLE_10 production_RELEASE_RELEASE_CANDIDATE_STABLE_8 production_RELEASE_RELEASE_CANDIDATE_STABLE_6 production_RELEASE_RELEASE_CANDIDATE_STABLE_5 production_RELEASE_RELEASE_CANDIDATE_STABLE_2 production_RELEASE_RELEASE_CANDIDATE_BETA_1 production_RELEASE_DEV_597 production_RELEASE_DEV_596 production_RELEASE_DEV_595 production_RELEASE_DEV_594 production_RELEASE_DEV_593 production_RELEASE_DEV_592 production_RELEASE_DEV_591 production_RELEASE_DEV_590 production_RELEASE_DEV_589 production_RELEASE_DEV_588 production_RELEASE_DEV_587 production_RELEASE_DEV_586 production_RELEASE_DEV_585 production_RELEASE_DEV_584 production_RELEASE_DEV_583 production_RELEASE_DEV_582 production_RELEASE_DEV_581 production_RELEASE_DEV_580 production_RELEASE_DEV_579 production_RELEASE_DEV_578 production_RELEASE_DEV_577 production_RELEASE_DEV_576 production_RELEASE_DEV_575 production_RELEASE_DEV_574 production_RELEASE_DEV_573 production_RELEASE_DEV_572 production_RELEASE_DEV_571 production_RELEASE_DEV_570 production_RELEASE_DEV_569 production_RELEASE_DEV_568 production_RELEASE_DEV_567 production_RELEASE_DEV_566 production_RELEASE_DEV_565 production_RELEASE_DEV_564 production_RELEASE_DEV_563 production_RELEASE_DEV_562 production_RELEASE_DEV_561 production_RELEASE_DEV_560 production_RELEASE_DEV_559 production_RELEASE_DEV_558 production_RELEASE_DEV_557 production_RELEASE_DEV_556 production_RELEASE_DEV_555 production_RELEASE_DEV_554 production_RELEASE_DEV_553 production_RELEASE_DEV_552 production_RELEASE_DEV_551 production_RELEASE_DEV_550 production_RELEASE_DEV_549 production_RELEASE_DEV_548 production_RELEASE_DEV_547 production_RELEASE_DEV_546 production_RELEASE_DEV_545 production_RELEASE_DEV_544 production_RELEASE_DEV_543 production_RELEASE_DEV_542 production_RELEASE_DEV_541 production_RELEASE_DEV_540 production_RELEASE_DEV_539 production_RELEASE_DEV_538 production_RELEASE_DEV_537 production_RELEASE_DEV_536 production_RELEASE_DEV_535 production_RELEASE_DEV_534 production_RELEASE_DEV_533 production_RELEASE_DEV_532 production_RELEASE_DEV_531 production_RELEASE_DEV_530 production_RELEASE_DEV_529 production_RELEASE_DEV_528 production_RELEASE_DEV_527 production_RELEASE_DEV_526
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
94 lines (85 sloc) 2.62 KB
dep 'rabbitmq-server', :template => 'managed'
dep 'rabbitmq-server.managed'
dep 'erlang-nox.managed' do
provides []
end
dep 'rabbitmq.src' do
requires "erlang-nox.managed"
source "https://github.com/downloads/protonet/custom_debs/rabbitmq-server_2.6.1-1_all.custom.deb"
process_source {
sudo("dpkg -i --force-confnew --force-confmiss rabbitmq-server_2.6.1-1_all.custom.deb")
if File.exists?("/etc/init.d/rabbitmq-server.dpkg-dist")
sudo("mv -f /etc/init.d/rabbitmq-server.dpkg-dist /etc/init.d/rabbitmq-server")
end
sudo("chmod +x /etc/init.d/rabbitmq-server")
sudo("/etc/init.d/rabbitmq-server start > /dev/null 2>&1")
}
provides ["rabbitmq-server"]
end
dep 'rabbitmq-server-304.src' do
requires "erlang-nox.managed"
source "http://www.rabbitmq.com/releases/rabbitmq-server/v3.0.4/rabbitmq-server_3.0.4-1_all.deb"
process_source {
sudo("dpkg -i rabbitmq-server_3.0.4-1_all.deb")
}
provides ["rabbitmq-server"]
end
dep 'add rabbitmqadmin' do
met? {
which("rabbitmqadmin")
}
meet {
sudo("wget -O /usr/sbin/rabbitmqadmin -L http://localhost:15672/cli/rabbitmqadmin")
sudo("chmod +x /usr/sbin/rabbitmqadmin")
}
end
dep 'enable rabbitmq management plugin' do
met? {
system("rabbitmq-plugins list -E rabbitmq_management | grep rabbitmq_management")
}
meet {
sudo("rabbitmq-plugins enable rabbitmq_management")
sudo("service rabbitmq-server restart")
}
end
dep "stop rabbitmq" do
requires 'rabbitmq-server-304.src'
met? { !sudo("/etc/init.d/rabbitmq-server status", as: "root") }
meet { sudo("/etc/init.d/rabbitmq-server stop", as: "root") }
end
dep 'rabbitmq remove' do
def binaries
["rabbitmq-activate-plugins", "rabbitmq-multi", "rabbitmqctl", "rabbitmq-deactivate-plugins", "rabbitmq-server"]
end
met? {
binaries.all? do |cmd|
!which(cmd)
end
}
meet {
shell("/home/protonet/dashboard/current/script/init/app_monit stop")
sudo("/etc/init.d/rabbitmq-server stop")
binaries.each do |cmd|
sudo("rm -rf `which #{cmd}`")
end
# also get rid of the init.d
sudo("rm -rf /etc/init.d/rabbitmq-server")
}
end
dep 'rabbitmq remove autostart' do
def paths
["/etc/rc0.d/K20rabbitmq-server", "/etc/rc1.d/K20rabbitmq-server", "/etc/rc2.d/S20rabbitmq-server",
"/etc/rc3.d/S20rabbitmq-server", "/etc/rc4.d/S20rabbitmq-server", "/etc/rc5.d/S20rabbitmq-server"]
end
met? {
paths.all? do |path|
!File.exists?("/etc/rc0.d/K20rabbitmq-server")
end
}
meet {
sudo("rm -rf #{paths.join(" ")}")
}
end
dep 'rabbitmq update' do
requires 'rabbitmq remove', 'rabbitmq304.src', 'rabbitmq remove autostart'
end