On 2008-Nov-4, at 1:03 PM, Andrea Crotti wrote:
First a question, is there someone using textmate to work on unix servers??
For editing files here and there (especially scripts), but not to any great extent.
I thought that with sshfs and the power of bundles I could do something really nice, much better than using vim (which is a great software anyway) in ssh...
Have you heard of Puppet?
http://reductivelabs.com/trac/puppet/wiki/AboutPuppet
I'm about to start using it where I work. It might take care of most of the things you're looking to do via TM. Now, if someone would create a grammar for Puppet config files… :)
- If I create a language for every software (a grammar for monitrc, a
grammar for apache etc...) I will get too many languages, is there a way to create a group of languages??
A single Bundle can contain multiple Language Grammars if you want. Note that a lot of things are already defined (Apache config, for instance), so be sure to check before creating a new grammar.
- Good ways to send command to external servers??
Maybe just open a shell and ssh <host> <cmd>?
Or have a TextMate command that does this, or type the command in the editor window and hit ⌃R. Knowing the hostname will be the hard part (assuming you don't want to type it manually each time).
- There are any kind of problems working with TM+sshfs (if you know)?
I have seen the following problem:
* mount something with SSHFS * open a file * close the file * edit the file remotely (not via the mounted SSHFS filesystem) * open the file again * the changes aren't there
But this was probably two years ago when MacFUSE was very immature. I would do some testing before using it, but that issue has probably been fixed.
I have also created a good (I think) way to document servers, with latex and custom scripts, if anyone interested in TM + sysadmin work is welcome to write me, I could publish everything somewhere..
I prefer LDAP for this because:
* LDAP commands are on most systems by default * manipulating the data is just a matter of editing text * many things (Postfix, Puppet, sudo) can use LDAP without modification * most scripting languages have LDAP support
So, I can use custom scripts to make things easier, but if I find myself on a system without them, I can still do just about anything the "long way". If you ever want something pretty, you could always auto-generate some HTML or Latex based on what's in LDAP. Contact me directly if you want more details.
(On a related note, I've got an LDIF grammar started for TextMate, but I haven't shared it with anyone.)