-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable rabbitmq puppet module and run it manually
- Loading branch information
Luis Mayorga
committed
Aug 28, 2014
1 parent
b5d2f99
commit 862811e
Showing
12 changed files
with
122 additions
and
35 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
} | ||
} | ||
|
||
node 'bunny1' { | ||
|
||
node 'bunny1' inherits base { | ||
include client | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIIEpAIBAAKCAQEAtMFdGYPW5QNbSBW09wiT4vGq5M2MNBPTMtXwRbi8RDI9hXGb | ||
sxULmprMdKNA6b12ppxEsUG5tvnuuqSRdlmTN0b3VM2tGukgBpGRImpnwBTx2Ziy | ||
nyDl/wyxMRN/0TbvPllHjUA8FxufpT/pbVD0JsF+bGLxcM+KRRJxfgA/ZjPWad0s | ||
wIrqLXnQb6egfjEawrQvaji0E4o6LlLkIexzbs1Bse8GtFxCLA5oGvvj9pcBpCY3 | ||
EA5J6Eq4UAmZUG9bDC45/+uucl5wN+X5I+XR5+lvdAiOb26f7rfbXCoJNrEJ+qfc | ||
cZCT9xeUpHraZRD5x0OzHVz3+GDldJ3npRhF+QIDAQABAoIBADz6YosCBBP8PuYh | ||
lIwmE6Xi+1D22s6SxZQHwmfy+2hSPpjvC6Ste92rTUAn9vUjmox4eWAHGTzWMig6 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U9fJU8Rj4PYS5G8QKEk1zcq | ||
B+GzMkqYr05n4vdm1MNqCuhPcGWsDpANDjXB5nB1Vf4jv1WJ684GOEWdtMzDvjAd | ||
vaYdhH4QSKbmJF4OCUjTNc1Gms/BHmM3wFkHQ6NxFata08VZo71lkQ== | ||
-----END RSA PRIVATE KEY----- |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|1|vaC0TiLAKljuFW4Yz7OrZq7vmg0=|4OlE3iLDoOSId5Vo3YGmcxBHlq4= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFY/1P1Q/VFmHM2RIUvnPyt56R4AB6J+zOR5iy+erhwz017RC9Y2+yupoqrLQnsx955h9gxk3bk/Rf3tZKcaSgA= | ||
|1|x/28QnMhU4gNVm9KsCpWxd2CnSA=|3OKv6wD0alQyZN9K/TlD8bmnauY= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFY/1P1Q/VFmHM2RIUvnPyt56R4AB6J+zOR5iy+erhwz017RC9Y2+yupoqrLQnsx955h9gxk3bk/Rf3tZKcaSgA= | ||
|1|iuL87tmyWqdsdXuZTzOxjzhmoC0=|6yCHxwlrOHVirU9+nLIHBB4aG6g= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFY/1P1Q/VFmHM2RIUvnPyt56R4AB6J+zOR5iy+erhwz017RC9Y2+yupoqrLQnsx955h9gxk3bk/Rf3tZKcaSgA= |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#simple bunny client class | ||
class client{ | ||
|
||
file {'/home/vagrant/.ssh/known_hosts': | ||
ensure => present, | ||
source => 'puppet:///modules/client/known_hosts', | ||
mode => '0644', | ||
} | ||
|
||
file {'/home/vagrant/.ssh/id_rsa': | ||
ensure => present, | ||
source => 'puppet:///modules/client/id_rsa', | ||
mode => '0600', | ||
owner => 'vagrant', | ||
group => 'vagrant', | ||
} | ||
|
||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0wV0Zg9blA1tIFbT3CJPi8arkzYw0E9My1fBFuLxEMj2FcZuzFQuamsx0o0DpvXamnESxQbm2+e66pJF2WZM3RvdUza0a6SAGkZEiamfAFPHZmLKfIOX/DLExE3/RNu8+WUeNQDwXG5+lP+ltUPQmwX5sYvFwz4pFEnF+AD9mM9Zp3SzAiuotedBvp6B+MRrCtC9qOLQTijouUuQh7HNuzUGx7wa0XEIsDmga++P2lwGkJjcQDknoSrhQCZlQb1sMLjn/665yXnA35fkj5dHn6W90CI5vbp/ut9tcKgk2sQn6p9xxkJP3F5SketplEPnHQ7MdXPf4YOV0neelGEX5 bunny ssh key | ||
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
LCYFNFDSMYAXKRVSAPZS |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,49 @@ | ||
class qserver($node_name, $cluster_node_type, $cluster_nodes) { | ||
|
||
class { 'rabbitmq': | ||
service_manage => true, | ||
port => '5672', | ||
delete_guest_user => true, | ||
environment_variables => { | ||
'RABBITMQ_NODENAME' => $nodename, | ||
'RABBITMQ_SERVICENAME' => 'RabbitMQ', | ||
}, | ||
config_cluster => true, | ||
cluster_nodes => $cluster_nodes, | ||
cluster_node_type => $cluster_node_type, | ||
wipe_db_on_cookie_change => true, | ||
file {'/home/vagrant/.ssh/authorized_keys': | ||
ensure => present, | ||
source => 'puppet:///modules/qserver/authorized_keys', | ||
mode => '0600', | ||
owner => 'vagrant', | ||
group => 'vagrant', | ||
} | ||
|
||
package { 'rabbitmq-server': | ||
ensure => present, | ||
} -> | ||
|
||
exec { 'stop rabbitmq-server': | ||
command => '/usr/sbin/service rabbitmq-server stop', | ||
logoutput => true, | ||
} -> | ||
|
||
file { '/var/lib/rabbitmq/.erlang.cookie': | ||
ensure => present, | ||
source => 'puppet:///modules/qserver/erlang.cookie', | ||
mode => '0400', | ||
owner => 'rabbitmq', | ||
group => 'rabbitmq', | ||
} -> | ||
|
||
exec { 'start rabbitmq-server': | ||
command => '/usr/sbin/service rabbitmq-server start', | ||
logoutput => true, | ||
} | ||
|
||
#class { 'rabbitmq': | ||
# service_manage => true, | ||
# port => '5672', | ||
# delete_guest_user => true, | ||
# environment_variables => { | ||
# 'RABBITMQ_NODENAME' => $nodename, | ||
# 'RABBITMQ_SERVICENAME' => 'RabbitMQ', | ||
# }, | ||
# erlang_cookie => 'LCYFNFDSMYAXKRVSAPZS', | ||
# wipe_db_on_cookie_change => true, | ||
# config_cluster => true, | ||
# cluster_nodes => $cluster_nodes, | ||
# cluster_node_type => $cluster_node_type, | ||
#} | ||
} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#based on https://www.rabbitmq.com/clustering.html | ||
#configure clustering on rbs2 (rabbitmqserver2) as --ram | ||
ssh [email protected] 'echo vagrant | sudo rabbitmqctl stop_app' | ||
ssh [email protected] 'echo vagrant | sudo rabbitmqctl join_cluster --ram rabbit@rabbitmqserver1' | ||
ssh [email protected] 'echo vagrant | sudo rabbitmqctl start_app' | ||
|
||
#configure clustering on rbs3 (rabbitmqserver3) as disc | ||
ssh [email protected] 'echo vagrant | sudo rabbitmqctl stop_app' | ||
ssh [email protected] 'echo vagrant | sudo rabbitmqctl join_cluster rabbit@rabbitmqserver2' | ||
ssh [email protected] 'echo vagrant | sudo rabbitmqctl start_app' | ||
|
||
#checking for clustering status | ||
ssh [email protected] 'echo vagrant | sudo rabbitmqctl cluster_status' | ||
ssh [email protected] 'echo vagrant | sudo rabbitmqctl cluster_status' | ||
ssh [email protected] 'echo vagrant | sudo rabbitmqctl cluster_status' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
echo 'updating packages no verbose' | ||
# apt-get -y update -q=2 | ||
apt-get -y update -q=2 | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +0,0 @@ | ||
#i had some errors intalling this package with puppet. | ||
npm install -g [email protected] --loglevel error | ||
echo '----------------------------------------' | ||
|
||
echo 'changing permissions on gems' | ||
chown vagrant:vagrant /home/vagrant/gems -R | ||
echo '----------------------------------------' | ||
|
||
echo 'installing npm local packages from packages.json' | ||
sudo -H -u vagrant bash -c 'cd /home/vagrant/gems && npm install --loglevel error' | ||
echo '----------------------------------------' | ||
|
||
echo 'start server with gulp' | ||
sudo -H -u vagrant bash -c 'cd /home/vagrant/gems && gulp serve' | ||
echo '----------------------------------------' | ||