-2

I have been building my own Control Panel (mostly hobby) where I control hosting packages on my webservers, mailaccounts on my mailservers, DNS records etc. I also use this to monitor my servers.

I don't have a lot of servers so updating them is not that big a pain (now I just log in through SSH one by one). But if my platform grows bigger it would be cool to also manage updates through one single interface (listing available updates per server, selecting them and updating them). I've looked into Puppet but it is a big overkill for me.

Is there any way to build a system like this for myself? Just like webmin does it. Maybe this is not possible but I would like to know for sure. Also all my servers are Debian (Ubuntu) based). Because most of my servers are Ubuntu based I looked into Canonical's Landscape but I think that is way to overpriced and it would totally kill my margins.

1 Answers1

0

There are many possible approaches to this... the first one coming to mind would be using ssh with key-based authentication, with a dedicated user account on each machine, configured in "sudoers" to be permitted access to the necessary commands without a password.

With ssh and keys, a mechanized process "here" can run an automated process "there" by connecting "there" over ssh, executing the command, and returning the output streams and exit statuses. Simple illustration:

$ ssh otherserver 'ls -l'

...will connect to the otherserver, show you a listing of the files in your home directory on the remote system, disconnect, and then return you to your local (not remote) prompt.

If you have key-based authentication, no password is needed.

If the remote process has prompts that must be answered, one way to accomplish that is with expect ... which is sort of a programmimg language designed for managing things where you need to "expect this" then "send that" and can handle timeouts for you.