Orchestration with salt (triggers across nodes)

180 views
Skip to first unread message

Ahmed Kamal

unread,
Jan 17, 2013, 4:53:27 PM1/17/13
to salt-users
Hi folks,

I would like to deploy wordpress to two nodes (web, db). However I'd like to have a randomly generated password set on mysql, and communicated back to wordpress to be written in the php config file. Is this possible with salt?

More generally, can a minion "watch" or "trigger" other minions. I guess this is my understanding of what's needed to get orchestration across servers ?

Erik Johnson

unread,
Jan 17, 2013, 4:59:50 PM1/17/13
to salt-...@googlegroups.com

--
 
 


Look into the publish module for an example of how minions can trigger other minions.

https://salt.readthedocs.org/en/latest/ref/modules/all/salt.modules.publish.html


--

-Erik

"For me, it is far better to grasp the universe as it really is than to persist in delusion, however satisfying and reassuring."  -- Carl Sagan

Ahmed Kamal

unread,
Jan 17, 2013, 5:22:41 PM1/17/13
to salt-...@googlegroups.com
mm not very inspired by the page, to me the publish module in its current form looks too tightly coupled. You're telling the other nodes what they should do. I think it could be more beneficial to publish a signal (say: DBConfigDone) and in my web-server state, I'd install a handler "watch'es" that signal and handles it. 

If you think the publish module in its current form can handle this simple wordpress example though, a more concrete example would be very cool


--
 
 

Thomas S Hatch

unread,
Jan 18, 2013, 12:28:22 PM1/18/13
to salt-...@googlegroups.com
I would randomly generate the password in pillar, then have both minions be able to access the password via their respective pillars. This skips signals entirely while still preserving the security of the protected password and  bypassing the requirement for one group to wait for another. If you still need to ensure that the order of the state runs is managed between minions take a look at the overstate, btu I think that pillar will be able to do everything you need to make this happen

Thomas S. Hatch  |  Founder, CTO


5272 South College Drive, Suite 301 | Murray, UT 84123


--
 
 

Reply all
Reply to author
Forward
0 new messages