[chef] Re: Making available configuration data of Database node to the WebApp node


Chronological Thread 
  • From: Denis Weerasiri < >
  • To:
  • Subject: [chef] Re: Making available configuration data of Database node to the WebApp node
  • Date: Thu, 3 Jul 2014 15:03:12 +1000

Hi, I could not mention the main focus of my exercise. I am trying to find a way to expose some runtime data of a particular node (eg- access credentials to MySQL database) to another node (eg- PHP node.). I thought the "variable" construct is a mechanism to access dynamic data across different nodes.


On Thu, Jul 3, 2014 at 2:59 PM, Denis Weerasiri < " target="_blank"> > wrote:
Hi,
I am trying to learn cookbook language by writing a cookbook to set up a LAMP stack in two different nodes for MySQL and PHP.
variables(
      :host => (deploy[:database][:host] rescue nil),
      :user => (deploy[:database][:username] rescue nil),
      :password => (deploy[:database][:password] rescue nil),
      :db => (deploy[:database][:database] rescue nil),
      :table => (node[:phpapp][:dbtable] rescue nil)
    )

Does any body knows what this "variable" construct tries to do? I don't understand what is meant by "=>" and "deploy" means in this recipe.

--
Thanks,
Denis 



--
Thanks,
Denis Weerasiri

Sent from my iPhone



Archive powered by MHonArc 2.6.16.

§