In the docs I see some very nice instructions on hand-setup of salt, but
I haven't found any advice on best practice for automated host-up
scripts. So this is kind of a reality check if what I'm doing is
totally missing something or more or less on target.
We've historically been using fabric for host orchestration. So I've a
new fabric target, salt_host_up(), that assumes the host exists, has an
ubuntu image deployed, and has DNS and reverse DNS but nothing else.
The function remote executes the following on my new host:
add salt-stack gpg key
create /etc/apt/sources.list.d/saltstack.list
sudo apt-get update
sudo apt-get install salt-minion
copy a file to /etc/salt/minion
service salt-minion restart
and then remote executes on the server
accept the new key on the master
sudo salt 'the-new-host' state.highstate
That last bit I'm a bit unclear on, since I haven't quite figured out
how to securely automate accepting the new minion key. So that's manual
for now. (And, anyway, I'm describing something I'm still working on,
so maybe I missed a detail.)
Is there a better way?
--
Jeff Abrahamson
+33 6 24 40 01 57
+44 7920 594 255
http://p27.eu/jeff/