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

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.034
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'subject:Python': 0.04; 'fashion.': 0.07; 'remotely': 0.07; 'python': 0.07; 'ssh': 0.09; 'pm,': 0.11; '>>>': 0.12; 'wrote:': 0.14; 'no...': 0.16; 'roy': 0.16; 'ssh,': 0.16; 'subject:servers': 0.16; 'subject:system': 0.16; '\xa0you': 0.16; 'writes:': 0.20; 'header:In-Reply-To:1': 0.22; 'thu,': 0.22; 'connectivity': 0.23; 'received:209.85.214.174': 0.23; 'received:mail- iw0-f174.google.com': 0.23; 'script': 0.26; 'guess': 0.26; 'chris': 0.27; 'message-id:@mail.gmail.com': 0.28; 'remote': 0.28; 'server': 0.29; 'needed,': 0.29; 'query': 0.29; 'server.': 0.31; 'statistics': 0.31; 'separate': 0.31; 'to:addr:python-list': 0.32; 'propose': 0.33; 'scale': 0.33; 'someone': 0.33; 'on,': 0.33; 'there': 0.35; 'returned': 0.35; 'passwords': 0.35; 'think': 0.36; 'some': 0.37; 'received:209.85': 0.37; 'exactly': 0.37; 'run': 0.37; 'apr': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'log': 0.38; 'machines': 0.39; 'received:209.85.214': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; "it's": 0.40; 'header:Received:5': 0.40; 'might': 0.40; 'database,': 0.60; 'central': 0.60; 'results': 0.61; '2011': 0.62; 'you?': 0.63; 'believe': 0.66; 'response.': 0.67; 'computers,': 0.68; 'subject:program': 0.68; 'alternative': 0.69; 'automatic': 0.71; 'periodically': 0.73; 'cron': 0.84; 'machines,': 0.84; "program's": 0.84; 'subject:commands': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=Ik8e4x9jGUkSRxZByPp60E+vJi5Z3sqFSqdgHuGAooQ=; b=AISR75xM3v4ORmRddi9HHbWnAsOS7rf7AWIIl+s0etcgIi3zAwf4uVla1wzvrxC/pn KCBiBT0PimJLOTjcspuZsr3EXBgZcG1fjEForzO7HWE8vC670LTjXe3TfxJWOUSm43QE 44gIPFGISHrBcvCIDZZKmXALFdMYwc8cS+FUY=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=hPxbsGe8cVaeFSh6tFNrxma9UMrlgKyPElE3RJNBnj6RZRZ4M7gUQtBHrvyO2Vyyqu T8IIK9HtXO5JQrAxGaTCQlTm+yQ6bx2vPG1sAdgWQVOEkWiTe8vnC0MVGaRJZd02IH5r 9EPcF8FW5hOq/elcR1eJja1dn88oVDfpsVI1c=
MIME-Version 1.0
In-Reply-To <vg3sjtu2tec.fsf@pepper.modeemi.fi>
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 Fri, 8 Apr 2011 00:13:41 +1000
Subject Re: How to program in Python to run system commands in 1000s of servers
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.110.1302185624.9059.python-list@python.org> (permalink)
Lines 29
NNTP-Posting-Host 82.94.164.166
X-Trace 1302185624 news.xs4all.nl 34849 [::ffff:82.94.164.166]:53021
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:2776

Show key headers only | 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