Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #2776

Re: How to program in Python to run system commands in 1000s of servers

References <0bb6311b-135a-4458-9258-1eca3be3cd31@q12g2000prb.googlegroups.com> <mailman.52.1302022780.9059.python-list@python.org> <roy-564C5B.21242005042011@news.panix.com> <vg3sjtu2tec.fsf@pepper.modeemi.fi>
Date 2011-04-08 00:13 +1000
Subject Re: How to program in Python to run system commands in 1000s of servers
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.110.1302185624.9059.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Apr 7, 2011 at 9:27 PM, Anssi Saari <as@sci.fi> wrote:
> Roy Smith <roy@panix.com> writes:
>
>>> We cannot use ssh as root remote connectivity as well.
>>
>> but with 1000's of servers, I really don't see any alternative to ssh,
>> with key authentication.  You don't really propose to type passwords at
>> 1000's of machines, do you?
>
> I guess it might mean someone decided to config sshd with
> PermitRootLogin no... I believe this is common? I don't think it's a
> particularly good idea, especially for a large scale deployment.
>
> So I guess there may be some config needed for the machines before
> they can be remotely administrated in an automatic fashion.

Depending on what exactly is needed, it might be easier to run a
separate daemon on the computers, one whose sole purpose is to do the
task / get the statistics needed and return them. Then the Python
script need only collect each program's returned response.

Alternatively, if the program needs to be run periodically anyway, it
might be easier to simply cron it on every computer it needs to run
on, and then log the results to some central server (maybe a MySQL
database, or something). Then whenever you want stats, you just query
that server.

Chris Angelico

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

How to program in Python to run system commands in 1000s of servers Babu <babukk@gmail.com> - 2011-04-05 07:51 -0700
  Re: How to program in Python to run system commands in 1000s of servers geremy condra <debatem1@gmail.com> - 2011-04-05 09:59 -0700
    Re: How to program in Python to run system commands in 1000s of servers Roy Smith <roy@panix.com> - 2011-04-05 21:24 -0400
      Re: How to program in Python to run system commands in 1000s of servers Anssi Saari <as@sci.fi> - 2011-04-07 14:27 +0300
        Re: How to program in Python to run system commands in 1000s of servers Chris Angelico <rosuav@gmail.com> - 2011-04-08 00:13 +1000
          Re: How to program in Python to run system commands in 1000s of servers Anssi Saari <as@sci.fi> - 2011-04-07 22:14 +0300
            Re: How to program in Python to run system commands in 1000s of servers Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2011-04-07 22:40 +0200
              Re: How to program in Python to run system commands in 1000s of servers Babu <babukk@gmail.com> - 2011-04-10 07:22 -0700
                Re: How to program in Python to run system commands in 1000s of servers Chris Angelico <rosuav@gmail.com> - 2011-04-11 00:42 +1000

csiph-web