ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "S I" <xia...@hotmail.com>
Subject RE: Ant Task: sshexec
Date Fri, 27 May 2005 02:15:31 GMT
Thanks.  What is or where is AntServer in AntContrib?  I'm in Apache Ant and 
I see NO Ant task in Core or Optional Tasks area.   Link please?

Thanks for the sample snippet.  After I figured I can't pass 'sudo' to 
sshexec task as an command arg I then realized I could use exec...my 
question is "in your sinppet, how do you pass your unix user id and pw in 
that target.  I see it no where in the snippet.  Are you doing it from this 
illusive AntServer?  Thanks for your help.

----Original Message Follows----
From: Ninju Bohra <ninju_bohra@yahoo.com>
Reply-To: "Ant Users List" <user@ant.apache.org>
To: Ant Users List <user@ant.apache.org>
Subject: RE: Ant Task: sshexec
Date: Thu, 26 May 2005 14:21:08 -0700 (PDT)
MIME-Version: 1.0
Received: from mail.apache.org ([209.237.227.199]) by MC8-F18.hotmail.com 
with Microsoft SMTPSVC(6.0.3790.211); Thu, 26 May 2005 14:21:19 -0700
Received: (qmail 31736 invoked by uid 500); 26 May 2005 21:21:13 -0000
Received: (qmail 31722 invoked by uid 99); 26 May 2005 21:21:12 -0000
Received: pass (hermes.apache.org: local policy)
Received: from web30212.mail.mud.yahoo.com (HELO 
web30212.mail.mud.yahoo.com) (68.142.201.225)  by apache.org (qpsmtpd/0.28) 
with SMTP; Thu, 26 May 2005 14:21:11 -0700
Received: (qmail 23103 invoked by uid 60001); 26 May 2005 21:21:09 -0000
Received: from [198.190.171.222] by web30212.mail.mud.yahoo.com via HTTP; 
Thu, 26 May 2005 14:21:08 PDT
X-Message-Info: JGTYoYF78jEHjJx36Oi8+Z3TmmkSEdPtfpLB7P/ybN8=
Mailing-List: contact user-help@ant.apache.org; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:user-unsubscribe@ant.apache.org>
List-Help: <mailto:user-help@ant.apache.org>
List-Post: <mailto:user@ant.apache.org>
List-Id: "Ant Users List" <user.ant.apache.org>
Delivered-To: mailing list user@ant.apache.org
X-ASF-Spam-Status: No, hits=3.9 
required=10.0tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,FORGED_YAHOO_RCVD
X-Spam-Check-By: apache.org
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;  s=s1024; d=yahoo.com;  
b=kgooQKeAzBF6J/gzUGubewZjXPX7IVQuUGXUUrp6I/YK8l8fJzFuSbJG3KLUcLfZkPoHkXZWxdbJ73FdDr75PFqwSzHc8v87LKX+kvH1CSidUKlETxNZ/P7MSRIwYuNcZqdzecqFZdaEDupoQ3pvf9Gc8rI9DPaPCL3GiqIPPWQ=

  ;
X-Virus-Checked: Checked
Return-Path: user-return-50332-xiamak=hotmail.com@ant.apache.org
X-OriginalArrivalTime: 26 May 2005 21:21:19.0742 (UTC) 
FILETIME=[DBEDE9E0:01C56238]

For stopping process on remote *NIX (Unix or Linux)
boxes I found using the AntServer task from the
ant-contrib project helpful.  I start the ANTServer on
the remote box and have it contains the targets for
starting/stoping our Tomcat servers, i.e:

<target name="stop.server.on.unix">
     <if>
        <equals arg1="${is.non.windows.jrun.hosted}"
arg2="true"/>
        <then>
            <exec executable="jrun" spawn="true">
               <arg value="-stop"/>
               <arg value="${server.full.name}"/>
            </exec>
        </then>
        <else>
            <exec
executable="/etc/init.d/${server.full.name}-tomcat">
               <arg value="stop"/>
            </exec>
        </else>
     </if>
</target>


I then have my Windows client script use the
<remoteAnt> task to call the remote ANTServer's
targets... and voila the code is run on the remote box
and it stop the Tomcat.

--- S I <xiamak@hotmail.com> wrote:

 > Thank you all for responding to my post.
 >
 > Unfortunately, i did not find any Ant task or unix
 > utility which will allow
 > me to solely STOP Tomcat remotely from a windows
 > client.  Is there such a
 > utility?  My unix Admin gave me full sudo access and
 > STILL...when I try to
 > stop tomcat, I'm prompted for sudo's passwrd.  So my
 > full automation from
 > windows side to deployment on the unix/linux side is
 > basically hacked &
 > clobbered.
 >
 > We're a windows/java shop serving client apps on our
 > linux servers running
 > Tomcat.
 >
 > I'm running Anthill and everything's automated to be
 > pushed nightly to the
 > unix side, however, since I have no way of stopping
 > Tomcat remotely to
 > deploy, I'm opting for a unix cron job to detect my
 > war file, stop tomcat,
 > deploy, and restart tomcat.
 >
 > This is kiddy-coding and not very elegant and I'm
 > not very happy with how
 > I've run into dead-end walls at every turn.  Any
 > ideas, solutions?  Thanks a
 > million.
 >
 > ----Original Message Follows----
 > From: "Anderson, Rob (Global Trade)"
 > <Rob.Anderson@nike.com>
 > Reply-To: "Ant Users List" <user@ant.apache.org>
 > To: "Ant Users List" <user@ant.apache.org>
 > Subject: RE: Ant Task: sshexec
 > Date: Mon, 23 May 2005 13:40:07 -0700
 > MIME-Version: 1.0
 > Received: from mail.apache.org ([209.237.227.199])
 > by MC6-F34.hotmail.com
 > with Microsoft SMTPSVC(6.0.3790.211); Mon, 23 May
 > 2005 13:40:28 -0700
 > Received: (qmail 77095 invoked by uid 500); 23 May
 > 2005 20:40:21 -0000
 > Received: (qmail 77075 invoked by uid 99); 23 May
 > 2005 20:40:21 -0000
 > Received: pass (hermes.apache.org: local policy)
 > Received: from nbarrierb241.nike.com (HELO
 > barrierb241.nike.com)
 > (146.197.27.40)  by apache.org (qpsmtpd/0.28) with
 > ESMTP; Mon, 23 May 2005
 > 13:40:19 -0700
 > X-Message-Info:
 > JGTYoYF78jGL4xAfSBT13x6wAq4XrH2CWTAQhE33W58=
 > Mailing-List: contact user-help@ant.apache.org; run
 > by ezmlm
 > Precedence: bulk
 > List-Unsubscribe:
 > <mailto:user-unsubscribe@ant.apache.org>
 > List-Help: <mailto:user-help@ant.apache.org>
 > List-Post: <mailto:user@ant.apache.org>
 > List-Id: "Ant Users List" <user.ant.apache.org>
 > Delivered-To: mailing list user@ant.apache.org
 > X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=
 > X-Spam-Check-By: apache.org
 > X-Server-Uuid: BDE2CC8B-9671-48D4-9A25-CA756DA0A621
 > X-MimeOLE: Produced By Microsoft Exchange
 > V6.5.7226.0
 > Content-class: urn:content-classes:message
 > X-MS-Has-Attach:
 > X-MS-TNEF-Correlator:
 > Thread-Topic: Ant Task: sshexec
 > Thread-Index: AcVf1uJQABnZCZHoRcaZKdgSMX4NmAAACJig
 > X-OriginalArrivalTime: 23 May 2005 20:40:07.0442
 > (UTC)
 > FILETIME=[9B159F20:01C55FD7]
 > X-WSS-ID: 6E8CE02D2LC386083-01-01
 > X-Virus-Checked: Checked
 > Return-Path:
 > user-return-50272-xiamak=hotmail.com@ant.apache.org
 >
 > Your unix admin should be able to configure sudo to
 > only allow you to
 > execute the commands to stop and start tomcat. And
 > with the permissions set
 > correctly on the start and stop scripts there is no
 > security risk. It's not
 > like you are asking for root privileges.
 >
 > -Rob A
 >
 >  > -----Original Message-----
 >  > From: S I [mailto:xiamak@hotmail.com]
 >  > Sent: Monday, May 23, 2005 1:31 PM
 >  > To: user@ant.apache.org
 >  > Subject: RE: Ant Task: sshexec
 >  >
 >  >
 >  > OK, due to the limitations of  the ant task
 > <sshexec> and/or
 >  > unix's sudo
 >  > command, is there a unix utility which will allow
 > me to make
 >  > a windows
 >  > system call <exec> over to a unix box and STOP
 > Tomcat and
 >  > deploy my war
 >  > files?
 >  >
 >  > I'm currently invoking my build.xml from a Dos
 > prompt; all
 >  > the pieces are
 >  > done, however, I can't stop or interact with the
 > unix server
 >  > to stop Tomcat
 >  > w/o asking our Admin to surronder 'sudo' w/o
 > password and
 >  > exposing our
 >  > security.  Help!
 >  >
 >  > I need either a shell script or a utility which
 > will
 >  > transmist and feed sudo
 >  > its password.  There gotta be something out
 > there.
 >  >
 >  > Thanks
 >  >
 >  > Steven
 >  >
 >  > ----Original Message Follows----
 >  > From: "Anderson, Rob (Global Trade)"
 > <Rob.Anderson@nike.com>
 >  > Reply-To: "Ant Users List" <user@ant.apache.org>
 >  > To: "Ant Users List" <user@ant.apache.org>
 >  > Subject: RE: Ant Task: sshexec
 >  > Date: Thu, 19 May 2005 17:31:16 -0700
 >  > MIME-Version: 1.0
 >  > Received: from mail.apache.org
 > ([209.237.227.199]) by
 >  > MC8-F34.hotmail.com
 >  > with Microsoft SMTPSVC(6.0.3790.211); Thu, 19 May
 > 2005 17:31:34 -0700
 >  > Received: (qmail 33952 invoked by uid 500); 20
 > May 2005 00:31:26 -0000
 >  > Received: (qmail 33937 invoked by uid 99); 20 May
 > 2005 00:31:26 -0000
 >  > Received: pass (hermes.apache.org: local policy)
 >  > Received: from nbarrierb241.nike.com (HELO
 > barrierb241.nike.com)
 >  > (146.197.27.40)  by apache.org (qpsmtpd/0.28)
 > with ESMTP;
 >  > Thu, 19 May 2005
 >  > 17:31:25 -0700
 >  > X-Message-Info:
 > JGTYoYF78jEfTrAn+9Ijq13nAndId/dbw8MXe74s5Xk=
 >  > Mailing-List: contact user-help@ant.apache.org;
 > run by ezmlm
 >  > Precedence: bulk
 >  > List-Unsubscribe:
 > <mailto:user-unsubscribe@ant.apache.org>
 >  > List-Help: <mailto:user-help@ant.apache.org>
 >  > List-Post: <mailto:user@ant.apache.org>
 >  > List-Id: "Ant Users List" <user.ant.apache.org>
 >  > Delivered-To: mailing list user@ant.apache.org
 >  > X-ASF-Spam-Status: No, hits=0.0
 > required=10.0tests=
 >  > X-Spam-Check-By: apache.org
 >  > X-Server-Uuid:
 > BDE2CC8B-9671-48D4-9A25-CA756DA0A621
 >  > X-MimeOLE: Produced By Microsoft Exchange
 > V6.5.7226.0
 >  > Content-class: urn:content-classes:message
 >  > X-MS-Has-Attach:
 >  > X-MS-TNEF-Correlator:
 >  > Thread-Topic: Ant Task: sshexec
 >  > Thread-Index:
 > AcVc0vVSTdYpZfRHSTe1cWhXZLUDGAAABWxg
 >  > X-OriginalArrivalTime: 20 May 2005 00:31:16.0363
 > (UTC)
 >  > FILETIME=[3BF405B0:01C55CD3]
 >  > X-WSS-ID: 6E93F05E2H0277058-01-01
 >  > X-Virus-Checked: Checked
 >  > Return-Path:
 > user-return-50229-xiamak=hotmail.com@ant.apache.org
 >  >
 >  > Not possible. The sshexec task was not designed
 > for any
 >  > interactivity. You
 >  > should configure sudo to allow you to execute the
 > command without a
 >  > password.
 >  >
 >  > -Rob A
 >  >
 >  >  > -----Original Message-----
 >  >  > From: S I [mailto:xiamak@hotmail.com]
 >  >  > Sent: Thursday, May 19, 2005 5:26 PM
 >  >  > To: user@ant.apache.org
 >  >  > Subject: RE: Ant Task: sshexec
 >  >  >
 >  >  >
 >  >  > I've run into a new problem with sshexec: How
 > can I pass
 >  >  > 'sudo' and its
 >  >  > password to it?  I've tested it in couple of
 > different ways
 >  >  > today to no
 >  >  > avail.  Help please!  Thank you.
 >  >  >
 >  >  > Steven
 >  >  >
 >  >  > ----Original Message Follows----
 >  >  > From: "S I" <xiamak@hotmail.com>
 >  >  > Reply-To: "Ant Users List"
 > <user@ant.apache.org>
 >  >  > To: user@ant.apache.org
 >  >  > Subject: RE: Ant Task: sshexec
 >  >  > Date: Thu, 19 May 2005 15:34:37 -0700
 >  >  > MIME-Version: 1.0
 >  >  > X-Originating-IP: [206.173.244.27]
 >  >  > X-Originating-Email: [xiamak@hotmail.com]
 >  >  > X-Sender: xiamak@hotmail.com
 >  >  > Received: from mail.apache.org
 > ([209.237.227.199]) by
 >  >  > mc10-f15.hotmail.com
 >  >  > with Microsoft SMTPSVC(6.0.3790.211); Thu, 19
 > May 2005
 >  > 15:35:27 -0700
 >  >  > Received: (qmail 62349 invoked by uid 500); 19
 > May 2005
 >  > 22:35:07 -0000
 >  >  > Received: (qmail 62239 invoked by uid 99); 19
 > May 2005
 >  > 22:35:06 -0000
 >  >  > Received: pass (hermes.apache.org: domain of
 >  >  > xiamak@hotmail.com designates
 >  >  > 65.54.245.18 as permitted sender)
 >  >  > Received: from bay1-f18.bay1.hotmail.com (HELO
 > hotmail.com)
 >  >  > (65.54.245.18)
 >  >  > by apache.org (qpsmtpd/0.28) with ESMTP; Thu,
 > 19 May 2005
 >  >  > 15:35:00 -0700
 >  >  > Received: from mail pickup service by
 > hotmail.com with
 >  >  > Microsoft SMTPSVC;
 >  >  > Thu, 19 May 2005 15:34:37 -0700
 >  >  > Received: from 206.173.244.27 by
 > by1fd.bay1.hotmail.msn.com
 >  >  > with HTTP;Thu,
 >  >  > 19 May 2005 22:34:37 GMT
 >  >  > X-Message-Info:
 > JGTYoYF78jEHjJx36Oi8+Z3TmmkSEdPt4iogl2abg+M=
 >  >  > Mailing-List: contact
 > user-help@ant.apache.org; run by ezmlm
 >  >  > Precedence: bulk
 >  >  > List-Unsubscribe:
 > <mailto:user-unsubscribe@ant.apache.org>
 >  >  > List-Help: <mailto:user-help@ant.apache.org>
 >  >  > List-Post: <mailto:user@ant.apache.org>
 >  >  > List-Id: "Ant Users List"
 > <user.ant.apache.org>
 >  >  > Delivered-To: mailing list user@ant.apache.org
 >  >  > X-ASF-Spam-Status: No, hits=1.7
 >  >  >
 >
required=10.0tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,MSGID_
 >  >  > FROM_MTA_HEADER,SPF_HELO_PASS,SPF_PASS
 >  >  > X-Spam-Check-By: apache.org
 >  >  > X-OriginalArrivalTime: 19 May 2005
 > 22:34:37.0421 (UTC)
 >  >  > FILETIME=[F04239D0:01C55CC2]
 >  >  > X-Virus-Checked: Checked
 >  >  > Return-Path:
 > user-return-50225-xiamak=hotmail.com@ant.apache.org
 >  >  >
 >  >  > Ah great thanks. Why didn't I think of that?
 > :)
 >  >  >
 >  >  > ----Original Message Follows----
 >  >  > From: "Anderson, Rob (Global Trade)"
 > <Rob.Anderson@nike.com>
 >  >  > Reply-To: "Ant Users List"
 > <user@ant.apache.org>
 >  >  > To: "Ant Users List" <user@ant.apache.org>
 >  >  > Subject: RE: Ant Task: sshexec
 >  >  > Date: Thu, 19 May 2005 15:30:25 -0700
 >  >  > MIME-Version: 1.0
 >  >  > Received: from mail.apache.org
 > ([209.237.227.199]) by
 >  >  > MC8-F33.hotmail.com
 >  >  > with Microsoft SMTPSVC(6.0.3790.211); Thu, 19
 > May 2005
 >  > 15:30:53 -0700
 >  >  > Received: (qmail 43676 invoked by uid 500); 19
 > May 2005
 >  > 22:30:42 -0000
 >  >  > Received: (qmail 43649 invoked by uid 99); 19
 > May 2005
 >  > 22:30:42 -0000
 >  >  > Received: pass (hermes.apache.org: local
 > policy)
 >  >  > Received: from nbarrierb241.nike.com (HELO
 > barrierb241.nike.com)
 >  >  > (146.197.27.40)  by apache.org (qpsmtpd/0.28)
 > with ESMTP;
 >  >  > Thu, 19 May 2005
 >  >  > 15:30:41 -0700
 >  >  > X-Message-Info:
 > JGTYoYF78jEehhnlXDVH4HDrHvm5tdh7pTx6mUPXN6c=
 >  >  > Mailing-List: contact
 > user-help@ant.apache.org; run by ezmlm
 >  >  > Precedence: bulk
 >  >  > List-Unsubscribe:
 > <mailto:user-unsubscribe@ant.apache.org>
 >  >  > List-Help: <mailto:user-help@ant.apache.org>
 >  >  > List-Post: <mailto:user@ant.apache.org>
 >  >  > List-Id: "Ant Users List"
 > <user.ant.apache.org>
 >  >  > Delivered-To: mailing list user@ant.apache.org
 >  >  > X-ASF-Spam-Status: No, hits=0.0
 > required=10.0tests=
 >  >  > X-Spam-Check-By: apache.org
 >  >  > X-Server-Uuid:
 > BDE2CC8B-9671-48D4-9A25-CA756DA0A621
 >  >  > X-MimeOLE: Produced By Microsoft Exchange
 > V6.5.7226.0
 >  >  > Content-class: urn:content-classes:message
 >  >  > X-MS-Has-Attach:
 >  >  > X-MS-TNEF-Correlator:
 >  >  > Thread-Topic: Ant Task: sshexec
 >  >  > Thread-Index:
 > AcVcvlXvjShwcP98Rk+on/fJJyTPmgAA+Oxg
 >  >  > X-OriginalArrivalTime: 19 May 2005
 > 22:30:25.0284 (UTC)
 >  >  > FILETIME=[59F92C40:01C55CC2]
 >  >  > X-WSS-ID: 6E93CC0B2H0232912-01-01
 >  >  > X-Virus-Checked: Checked
 >  >  > Return-Path:
 > user-return-50224-xiamak=hotmail.com@ant.apache.org
 >  >  >
 >  >  > Separate the commands with a ;
 >  >  >
 >  >  >     <sshexec host="somehost"
 >  >  >   	username="${username}"
 >  >  >   	password="${password}"
 >  >  >   	command="touch somefile;touch
 > anotherfile;touch
 >  >  > yetanotherfile"/>
 >  >  >
 >  >  > -Rob A
 >  >  >
 >  >  >  > -----Original Message-----
 >  >  >  > From: S I [mailto:xiamak@hotmail.com]
 >  >  >  > Sent: Thursday, May 19, 2005 3:01 PM
 >  >  >  > To: user@ant.apache.org
 >  >  >  > Subject: Ant Task: sshexec
 >  >  >  >
 >  >  >  >
 >  >  >  > How can I get sshexec to pass it more than
 > one command
 >  > at a time?
 >  >  >  >
 >  >  >  >   <sshexec host="somehost"
 >  >  >  > 	username="${username}"
 >  >  >  > 	password="${password}"
 >  >  >  > 	command="touch somefile"/>
 >  >  >  >
 >  >  >  > I used it to run command on our unix server
 > from my winxp
 >  >  >  > desktop.  However,
 >  >  >  > it seems I have to instantiate many of
 > these ...
 >  >  >  >
 >  >  >  > <sshexec host="somehost"
 >  >  >  > 	username="${username}"
 >  >  >  > 	password="${password}"
 >  >  >  > 	command="touch somefile"/>
 >  >  >  >
 >  >  >  > .. just to run 1 cmd @ a time.  I tried
 > <commnadline> + it
 >  >  > <argument>
 >  >  >  > attribs to no avail as you guessed it.
 > Help!
 >  >  >  >
 >  >  >  > Thanks
 >  >  >  > Steven
 >  >  >  >
 >  >  >  >
 >  >  >  >
 >  >  >  >
 >  >  >
 >  >
 >
---------------------------------------------------------------------
 >  >  >  > To unsubscribe, e-mail:
 > user-unsubscribe@ant.apache.org
 >  >  >  > For additional commands, e-mail:
 > user-help@ant.apache.org
 >  >  >  >
 >  >  >  >
 >  >  >  >
 >  >  >
 >  >  >
 >  >  >
 >  >
 >
---------------------------------------------------------------------
 >  >  > To unsubscribe, e-mail:
 > user-unsubscribe@ant.apache.org
 >  >  > For additional commands, e-mail:
 > user-help@ant.apache.org
 >  >  >
 >  >  >
 >  >  >
 >  >  >
 >  >
 >
---------------------------------------------------------------------
 >  >  > To unsubscribe, e-mail:
 > user-unsubscribe@ant.apache.org
 >  >  > For additional commands, e-mail:
 > user-help@ant.apache.org
 >  >  >
 >  >  >
 >  >  >
 >  >  >
 >  >
 >
---------------------------------------------------------------------
 >  >  > To unsubscribe, e-mail:
 > user-unsubscribe@ant.apache.org
 >  >  > For additional commands, e-mail:
 > user-help@ant.apache.org
 >  >  >
 >  >  >
 >  >  >
 >  >
 >  >
 >  >
 >
---------------------------------------------------------------------
 >  > To unsubscribe, e-mail:
 > user-unsubscribe@ant.apache.org
 >  > For additional commands, e-mail:
 > user-help@ant.apache.org
 >  >
 >  >
 >  >
 >  >
 >
---------------------------------------------------------------------
 >  > To unsubscribe, e-mail:
 > user-unsubscribe@ant.apache.org
 >  > For additional commands, e-mail:
 > user-help@ant.apache.org
 >  >
 >  >
 >  >
 >
 >
 >
---------------------------------------------------------------------
 > To unsubscribe, e-mail:
 > user-unsubscribe@ant.apache.org
 > For additional commands, e-mail:
 > user-help@ant.apache.org
 >
 >
 >
 >
---------------------------------------------------------------------
 > To unsubscribe, e-mail:
 > user-unsubscribe@ant.apache.org
 > For additional commands, e-mail:
 > user-help@ant.apache.org
 >
 >


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message