ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Zafarano" <mzafar...@quinstreet.com>
Subject RE: ssh issue with ant
Date Thu, 03 Nov 2005 15:32:53 GMT
Here is a code snip, but there are things you have do on the server
sides:
1) Setup a user like scm
2) Setup a key on the two systems for that user
3) Setup sudo on the system with that usr
4) Setup ANT
5) Setup Source control system requirements (We use P4, can use CC,
StarTeam, etc)
6) Setup .profile to source the #7
7) Setup .bashrc 
8) Setup ssh & rsync
9) etc

Make sure you standardize all the systems 3rd party apps and configs.
It may require that you work with IT to be able to setup the proper
keys, sudo users, users, etc...

    <echo message="Starting file transfer to ${deploy.remote.host.name}"
/>
     <exec dir="." executable="rsync" os="Linux" failonerror="true">
             <arg value="-r" />
             <arg value="-v" />
             <arg value="--rsh=ssh" />
             <arg value="${build.dist.dir}" />
             <arg
value="dssjava@${deploy.remote.host.name}:${deploy.remote.build.dist.bas
e.dir}" />
     </exec>

     <exec dir="." executable="ssh" os="Linux" failonerror="true">
             <!--arg value="-l dssjava" /-->
             <arg value="${deploy.remote.host.name}" />
             <arg value="ant -f
${deploy.remote.build.dist.dir}/deployment/build_jboss.xml
jboss_install_server" />
             <arg
value="-DdeployPropertyFile=${deploy.remote.build.dist.dir}/deployment/$
{deploy.properties.base.name}" />
             <arg
value="-Djboss.server.zip.file=${deploy.remote.build.dist.dir}/${jboss.s
erver.zip.name}" />
             <arg value="-Ddssap.jboss.home=${deploy.remote.jboss.home}"
/>
             <arg value="-Ddssap.server.name=${server.name}" />
             <arg
value="-Djboss.shutdown.wait.seconds=${jboss.shutdown.wait.seconds}" />
             <arg value="-Ddbupdate.zip.file=${dbupdate.zip.file}" />
             <arg value="-Ddbupdate.user=${dbupdate.user}" />
             <arg value="-Ddbupdate.password=${dbupdate.password}" />
             <arg value="-D${set.run.dbupdate}=${set.run.dbupdate}" />
     </exec>

I also setup AntHill Pro so that everyone can just hit a button to build
and deploy to a certain env, eg., dev, test, stage, preview and
production.

Hope this helps.

-----Original Message-----
From: Bob Noonan [mailto:noonan@cs.wm.edu] 
Sent: Thursday, November 03, 2005 7:03 AM
To: Ant Users List
Subject: Re: ssh issue with ant

Since I am having similar problems using ssh/scp from within an ant
file, I would be grateful if you could elaborate.

Thanks,
Bob Noonan


On Nov 2, 2005, at 5:29 PM, Marcus Zafarano wrote:

> Well, I found the problem.
>
>
>
> -----Original Message-----
> From: Marcus Zafarano
> Sent: Wednesday, November 02, 2005 7:14 AM
> To: user@ant.apache.org
> Subject: ssh issue with ant
>
>
>
> Hi,
>
>
>
> I am trying to ssh to another system as one user say scm and run as
> another user dssjava on another and I get this error (Linux).
>
>
>
> I do source the .bashrc  when I ssh over but I still get this  
> problem. I
> have checked all it suggests, but still no go.
>
>
>
> I do it manually ssh dssjava@[host] and it does it manually when I run
> the script, but not through the ssh part of the script.
>
>
>
> Also, if I log in on that system and run the scripts and comment  
> out the
> ssh part the scripts work. Ii know I must be doing something wrong  
> with
> the ssh.
>
>
>
> [exec]
> tbsus_200511020622_1.5.0/jboss-server_tbsus_200511020622_1.5.0.zip
>
>  [exec] wrote 36147298 bytes  read 212 bytes  24098340.00 bytes/sec
>
>  [exec] total size is 36141983  speedup is 1.00
>
>  [exec] Buildfile:
> /www/home/dssjava/depots/CGO_Archive/release/tbsce/1.5/clients/ 
> tbs_us/bu
> ilds/tbsus_200511020622_1.5.0/deployment/build_jboss.xml
>
>  [exec]   [taskdef] Could not load definitions from resource
> net/sf/antcontrib/antcontrib.properties. It could not be found.
>
>
>
>  [exec] jboss_install_server:
>
>  [exec]      [echo] Server cgo-tbsus-test shutdown for redeployment.
>
>  [exec]   [taskdef] Could not load definitions from resource
> net/sf/antcontrib/antcontrib.properties. It could not be found.
>
>
>
>  [exec] jboss_stop:
>
>
>
>  [exec] BUILD FAILED
>
>  [exec]
> file:/www/home/dssjava/depots/CGO_Archive/release/tbsce/1.5/clients/ 
> tbs_
> us/builds/tbsus_200511020622_1.5.0/deployment/build_jboss.xml:148:  
> Could
> not create task or type of type: osfamily.
>
>
>
>  [exec] Ant could not find the task or a class this task relies upon.
>
>
>
>  [exec] This is common and has a number of causes; the usual
>
>  [exec] solutions are to read the manual pages then download and
>
>  [exec] install needed JAR files, or fix the build file:
>
>  [exec]  - You have misspelt 'osfamily'.
>
>  [exec]    Fix: check your spelling.
>
>  [exec]  - The task needs an external JAR file to execute
>
>  [exec]    and this is not found at the right place in the classpath.
>
>  [exec]    Fix: check the documentation for dependencies.
>
>  [exec]    Fix: declare the task.
>
>  [exec]  - The task is an Ant optional task and optional.jar is absent
>
>  [exec]    Fix: look for optional.jar in ANT_HOME/lib, download if
> needed
>
>  [exec]  - The task was not built into optional.jar as dependent
>
>  [exec]    libraries were not found at build time.
>
>  [exec]    Fix: look in the JAR to verify, then rebuild with the  
> needed
>
>  [exec]    libraries, or download a release version from apache.org
>
>  [exec]  - The build file was written for a later version of Ant
>
>  [exec]    Fix: upgrade to at least the latest release version of Ant
>
>  [exec]  - The task is not an Ant core or optional task
>
>  [exec]    and needs to be declared using <taskdef>.
>
>
>
>  [exec] Remember that for JAR files to be visible to Ant tasks
> implemented
>
>  [exec] in ANT_HOME/lib, the files must be in the same directory or on
> the
>
>  [exec] classpath
>
>
>
>  [exec] Please neither file bug reports on this problem, nor email the
>
>  [exec] Ant mailing lists, until all of these causes have been  
> explored,
>
>  [exec] as this is not an Ant bug.
>
>
>
>  [exec] Total time: 0 seconds
>
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message