Re: --hosts=... semantics ?
"Jonathan Hogg" <[email protected]>
| Newsgroups | gmane.comp.sysutils.ark.devel |
|---|---|
| Message-ID | <[email protected]> |
[Oops! For those confused by Will's disembodied reply, here is the email I accidently sent to Will instead of the list.]
Hi Will,
Thinking about this reminds me of ruminations I had a while ago on the idea of what can proceed automatically, and what should ark stop and ask about. Whilst I think the '--constraint-hosts' idea is right (you should always be able to specify on the command line exactly what you want to proceed), perhaps there's an element of policy here.
For instance, at a flexible I-trust-everyone site, I may say that we're happy for everything up to a final deploy can be done automatically anywhere when required by constraints. On a more restricted site where only certain people are supposed to do certain things, I might specify that compiles may proceed automatically on the reference compile boxen, and installs may proceed automatically on the environment test boxen, but everything else must be explicity done.
Would it be possible to specify this information in your team setup file? Perhaps something like:
<auto-satisfy-map><table>
<entry name="compile">capybara,cobra</entry>
<entry name="install">tarantula,toad</entry>
<entry name="reveal">tarantula,toad</entry>
</table></auto-satisfy-map>
This would allow me to skip extra command-line stuff in most instances. The syntax could perhaps be extended to have wildcards: maybe '.' for command-line host, '*' for all hosts, perhaps '!mumble' for "except mumble". So that a more relaxed policy might be:
<auto-satisfy-map><table>
<entry name="compile">*</entry>
<entry name="install">.,!avalon</entry>
<entry name="reveal">.,!avalon</entry>
</table></auto-satisfy-map>
Perhaps a similar mechanism could be used to control what it will do by default when you don't specify a '--hosts' option. For instance, at a paranoid site I might want something that goes like:
# ark reveal password-stuff
WARNING: This command will reveal 'password-stuff' on *ALL* hosts. If
you are sure this is what you wanted to do, then please re-run the
command as:
ark reveal --hosts=* password-stuff
#
Again, this would depend on what command you're running: you might be happy to do site-wide installs without complaints.
OK [I'm almost done, honest ;-)]. Here's one for you Will: add in hooks to the host (or team?) thing called 'pre-command' and 'post-command' that allow people to specify their own mechanisms for this sort of thing and then pick a reasonable one for sidai. [I know the 'post-command' is not necessary, but I like the symmetry ot it - perhaps you'd want to use it to send mail to users when a new version of something has been deployed.]
Jonathan (too much coffee man)
--
Jonathan Hogg, Web Development and Support, DB Equities Research London
Desk: +44 20 7547 1543, Mobile: +44 7976 614338
--
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.