Triggering remote actions based on new nodes

Hi folks,

I’ve looked around to find answers on this, but haven’t been successful, so apologies if it’s a FAQ.

We’re automating the buildout of a Rails application with Chef, migrating from a partially-implemented Puppet installation. Things are going well, but we’re reaching the endgame and would like to remove a few last manual steps.

We have tools in place to build and configure a node. However, when a new node comes online, we have a few things that need to happen on other systems. We need firewall rules updated on database and memcache servers, and we also need MySQL GRANT statements run to allow the node to connect to the database.

Is there a way to have that happen - to notify the memcache servers to update their firewall rules, run statements on the MySQL server, etc? It seems like this problem would be solved in terms of helping automate scale out, but we haven’t found the answer yet.

–Wade


H. Wade Minter | Director of Engineering
TeamSnap: The smartest, easiest way to manage your team online
phone: 720.496.1053 | fax: 815.550.2938
minter@teamsnap.com

You should use Chef Search http://wiki.opscode.com/display/chef/Search
to do this. Have your DB server look for servers to add rules for based on
any criteria you want...

--Charles

On Wed, Jun 27, 2012 at 3:55 PM, H. Wade Minter minter@teamsnap.com wrote:

Hi folks,

I've looked around to find answers on this, but haven't been successful,
so apologies if it's a FAQ.

We're automating the buildout of a Rails application with Chef, migrating
from a partially-implemented Puppet installation. Things are going well,
but we're reaching the endgame and would like to remove a few last manual
steps.

We have tools in place to build and configure a node. However, when a new
node comes online, we have a few things that need to happen on other
systems. We need firewall rules updated on database and memcache servers,
and we also need MySQL GRANT statements run to allow the node to connect to
the database.

Is there a way to have that happen - to notify the memcache servers to
update their firewall rules, run statements on the MySQL server, etc? It
seems like this problem would be solved in terms of helping automate scale
out, but we haven't found the answer yet.

--Wade


H. Wade Minter | Director of Engineering
TeamSnap: The smartest, easiest way to manage your team online
phone: 720.496.1053 | fax: 815.550.2938
minter@teamsnap.com minter@teamsnap.com

--
Charles Sullivan
charlie.sullivan@gmail.com

Is there a way to notify the DB server "Hey, we just added a new web node, you should rebuild your rules now" as part of the web node role?


H. Wade Minter | Director of Engineering
TeamSnap: The smartest, easiest way to manage your team online
phone: 720.496.1053 | fax: 815.550.2938
minter@teamsnap.com

On Jun 27, 2012, at 4:58 PM, Charles Sullivan wrote:

You should use Chef Search to do this. Have your DB server look for servers to add rules for based on any criteria you want...

--Charles

On Wed, Jun 27, 2012 at 3:55 PM, H. Wade Minter minter@teamsnap.com wrote:
Hi folks,

I've looked around to find answers on this, but haven't been successful, so apologies if it's a FAQ.

We're automating the buildout of a Rails application with Chef, migrating from a partially-implemented Puppet installation. Things are going well, but we're reaching the endgame and would like to remove a few last manual steps.

We have tools in place to build and configure a node. However, when a new node comes online, we have a few things that need to happen on other systems. We need firewall rules updated on database and memcache servers, and we also need MySQL GRANT statements run to allow the node to connect to the database.

Is there a way to have that happen - to notify the memcache servers to update their firewall rules, run statements on the MySQL server, etc? It seems like this problem would be solved in terms of helping automate scale out, but we haven't found the answer yet.

--Wade


H. Wade Minter | Director of Engineering
TeamSnap: The smartest, easiest way to manage your team online
phone: 720.496.1053 | fax: 815.550.2938
minter@teamsnap.com

--
Charles Sullivan
charlie.sullivan@gmail.com

There isn't really a way in chef to have one node notify another (i.e.
update something on that node or run chef-client), or have one node notify
another node's resource.

The typical plan is to use chef's search feature to retrieve the
information needed (i.e. get the ip addresses of nodes with the 'rails'
role) to update firewall rules and have each node run on a regular interval
(cron or daemon). So once you have bootstrapped your node it will be added
within the interval to the firewall rules, SQL queries...

On Wed, Jun 27, 2012 at 3:55 PM, H. Wade Minter minter@teamsnap.com wrote:

Hi folks,

I've looked around to find answers on this, but haven't been successful,
so apologies if it's a FAQ.

We're automating the buildout of a Rails application with Chef, migrating
from a partially-implemented Puppet installation. Things are going well,
but we're reaching the endgame and would like to remove a few last manual
steps.

We have tools in place to build and configure a node. However, when a new
node comes online, we have a few things that need to happen on other
systems. We need firewall rules updated on database and memcache servers,
and we also need MySQL GRANT statements run to allow the node to connect to
the database.

Is there a way to have that happen - to notify the memcache servers to
update their firewall rules, run statements on the MySQL server, etc? It
seems like this problem would be solved in terms of helping automate scale
out, but we haven't found the answer yet.

--Wade


H. Wade Minter | Director of Engineering
TeamSnap: The smartest, easiest way to manage your team online
phone: 720.496.1053 | fax: 815.550.2938
minter@teamsnap.com minter@teamsnap.com

--
-Bryan

Interesting - I would have figured that there'd be some sort of notification system to make bringing up new nodes more automated. Oh well.

--Wade


H. Wade Minter | Director of Engineering
TeamSnap: The smartest, easiest way to manage your team online
phone: 720.496.1053 | fax: 815.550.2938
minter@teamsnap.com

On Jun 27, 2012, at 5:04 PM, Bryan Baugher wrote:

There isn't really a way in chef to have one node notify another (i.e. update something on that node or run chef-client), or have one node notify another node's resource.

The typical plan is to use chef's search feature to retrieve the information needed (i.e. get the ip addresses of nodes with the 'rails' role) to update firewall rules and have each node run on a regular interval (cron or daemon). So once you have bootstrapped your node it will be added within the interval to the firewall rules, SQL queries...

On Wed, Jun 27, 2012 at 3:55 PM, H. Wade Minter minter@teamsnap.com wrote:
Hi folks,

I've looked around to find answers on this, but haven't been successful, so apologies if it's a FAQ.

We're automating the buildout of a Rails application with Chef, migrating from a partially-implemented Puppet installation. Things are going well, but we're reaching the endgame and would like to remove a few last manual steps.

We have tools in place to build and configure a node. However, when a new node comes online, we have a few things that need to happen on other systems. We need firewall rules updated on database and memcache servers, and we also need MySQL GRANT statements run to allow the node to connect to the database.

Is there a way to have that happen - to notify the memcache servers to update their firewall rules, run statements on the MySQL server, etc? It seems like this problem would be solved in terms of helping automate scale out, but we haven't found the answer yet.

--Wade


H. Wade Minter | Director of Engineering
TeamSnap: The smartest, easiest way to manage your team online
phone: 720.496.1053 | fax: 815.550.2938
minter@teamsnap.com

--
-Bryan

If you really need something that badly then you should create a webapp or
some other program that you can interact with via a remote HTTP call. I do
this for a lot of purposes.

On Wed, Jun 27, 2012 at 4:10 PM, H. Wade Minter minter@teamsnap.com wrote:

Interesting - I would have figured that there'd be some sort of
notification system to make bringing up new nodes more automated. Oh well.

--Wade


H. Wade Minter | Director of Engineering
TeamSnap: The smartest, easiest way to manage your team online
phone: 720.496.1053 | fax: 815.550.2938
minter@teamsnap.com minter@teamsnap.com

On Jun 27, 2012, at 5:04 PM, Bryan Baugher wrote:

There isn't really a way in chef to have one node notify another (i.e.
update something on that node or run chef-client), or have one node notify
another node's resource.

The typical plan is to use chef's search feature to retrieve the
information needed (i.e. get the ip addresses of nodes with the 'rails'
role) to update firewall rules and have each node run on a regular interval
(cron or daemon). So once you have bootstrapped your node it will be added
within the interval to the firewall rules, SQL queries...

On Wed, Jun 27, 2012 at 3:55 PM, H. Wade Minter minter@teamsnap.comwrote:

Hi folks,

I've looked around to find answers on this, but haven't been successful,
so apologies if it's a FAQ.

We're automating the buildout of a Rails application with Chef, migrating
from a partially-implemented Puppet installation. Things are going well,
but we're reaching the endgame and would like to remove a few last manual
steps.

We have tools in place to build and configure a node. However, when a
new node comes online, we have a few things that need to happen on other
systems. We need firewall rules updated on database and memcache servers,
and we also need MySQL GRANT statements run to allow the node to connect to
the database.

Is there a way to have that happen - to notify the memcache servers to
update their firewall rules, run statements on the MySQL server, etc? It
seems like this problem would be solved in terms of helping automate scale
out, but we haven't found the answer yet.

--Wade


H. Wade Minter | Director of Engineering
TeamSnap: The smartest, easiest way to manage your team online
phone: 720.496.1053 | fax: 815.550.2938
minter@teamsnap.com minter@teamsnap.com

--
-Bryan

--
Charles Sullivan
charlie.sullivan@gmail.com

I guess it might be worth mentioning the slides from my ChefConf talk
on the topic?

It's not the ONLY way to do it but I think it has some good
information in there. Of course I'm biased....

On Wed, Jun 27, 2012 at 2:12 PM, Charles Sullivan
charlie.sullivan@gmail.com wrote:

If you really need something that badly then you should create a webapp or
some other program that you can interact with via a remote HTTP call. I do
this for a lot of purposes.

On Wed, Jun 27, 2012 at 4:10 PM, H. Wade Minter minter@teamsnap.com wrote:

Interesting - I would have figured that there'd be some sort of
notification system to make bringing up new nodes more automated. Oh well.

--Wade


H. Wade Minter | Director of Engineering
TeamSnap: The smartest, easiest way to manage your team online
phone: 720.496.1053 | fax: 815.550.2938
minter@teamsnap.com

On Jun 27, 2012, at 5:04 PM, Bryan Baugher wrote:

There isn't really a way in chef to have one node notify another (i.e.
update something on that node or run chef-client), or have one node notify
another node's resource.

The typical plan is to use chef's search feature to retrieve the
information needed (i.e. get the ip addresses of nodes with the 'rails'
role) to update firewall rules and have each node run on a regular interval
(cron or daemon). So once you have bootstrapped your node it will be added
within the interval to the firewall rules, SQL queries...

On Wed, Jun 27, 2012 at 3:55 PM, H. Wade Minter minter@teamsnap.com
wrote:

Hi folks,

I've looked around to find answers on this, but haven't been successful,
so apologies if it's a FAQ.

We're automating the buildout of a Rails application with Chef, migrating
from a partially-implemented Puppet installation. Things are going well,
but we're reaching the endgame and would like to remove a few last manual
steps.

We have tools in place to build and configure a node. However, when a
new node comes online, we have a few things that need to happen on other
systems. We need firewall rules updated on database and memcache servers,
and we also need MySQL GRANT statements run to allow the node to connect to
the database.

Is there a way to have that happen - to notify the memcache servers to
update their firewall rules, run statements on the MySQL server, etc? It
seems like this problem would be solved in terms of helping automate scale
out, but we haven't found the answer yet.

--Wade


H. Wade Minter | Director of Engineering
TeamSnap: The smartest, easiest way to manage your team online
phone: 720.496.1053 | fax: 815.550.2938
minter@teamsnap.com

--
-Bryan

--
Charles Sullivan
charlie.sullivan@gmail.com

On Wed, Jun 27, 2012 at 11:04 PM, Bryan Baugher bjbq4d@gmail.com wrote:

There isn't really a way in chef to have one node notify another (i.e.
update something on that node or run chef-client), or have one node notify
another node's resource.

The typical plan is to use chef's search feature to retrieve the information
needed (i.e. get the ip addresses of nodes with the 'rails' role) to update
firewall rules and have each node run on a regular interval (cron or
daemon).

Another option is to use mcollective to trigger the chef-client run on
the other nodes.