mirror of https://github.com/apache/jclouds.git
updated ant samples
git-svn-id: http://jclouds.googlecode.com/svn/trunk@2640 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
0373e508ec
commit
2f9d4a8ed8
|
@ -23,6 +23,7 @@
|
|||
<property file="build.properties" />
|
||||
<property name="password" value="" />
|
||||
<property name="keyfile" value="" />
|
||||
<property name="warfile" value="build/samples-blazeds.war" />
|
||||
|
||||
<!-- maven must be available before we use it -->
|
||||
<delete dir="build/cargo"/>
|
||||
|
@ -30,7 +31,7 @@
|
|||
|
||||
<!--
|
||||
<get src="http://apache.imghat.com/maven/binaries/maven-ant-tasks-2.1.0.jar" dest="build/maven-ant-tasks-2.1.0.jar"/>
|
||||
<get src="http://web-actions.googlecode.com/files/samples-blazeds.war" dest="build/samples-blazeds.war"/>
|
||||
<get src="http://web-actions.googlecode.com/files/samples-blazeds.war" dest="${warfile}"/>
|
||||
-->
|
||||
|
||||
<!-- initialize maven tasks -->
|
||||
|
@ -97,7 +98,6 @@
|
|||
command="${sudo} mv apache-tomcat-6.0.20 /tmp/cargo/containers/tomcat6x" />
|
||||
</target>
|
||||
|
||||
|
||||
<target name="cargooverssh" depends="create">
|
||||
<echo message="deploying tomcat and blaze to: ${jclouds.compute.servername}" />
|
||||
<cargo containerId="tomcat6x" output="build/output.log" log="build/cargo.log" action="start" timeout="600000">
|
||||
|
@ -112,7 +112,19 @@
|
|||
<property name="cargo.ssh.keyfile" value="${keyfile}"/>
|
||||
<property name="cargo.ssh.remotebase" value="/tmp/cargo"/>
|
||||
<property name="cargo.logging" value="high"/>
|
||||
<deployable type="war" file="build/samples-blazeds.war"/>
|
||||
<deployable type="war" file="${warfile}"/>
|
||||
</configuration>
|
||||
</cargo>
|
||||
</target>
|
||||
|
||||
<target name="justplaincargo">
|
||||
<echo message="deploying tomcat and blaze to: localhost" />
|
||||
<cargo containerId="tomcat6x" output="build/output.log" log="build/cargo.log" action="start" timeout="600000">
|
||||
<zipurlinstaller installurl="http://www.alliedquotes.com/mirrors/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.zip"/>
|
||||
<configuration home="build/cargo" type="standalone">
|
||||
<property name="cargo.servlet.port" value="8080"/>
|
||||
<property name="cargo.logging" value="high"/>
|
||||
<deployable type="war" file="${warfile}"/>
|
||||
</configuration>
|
||||
</cargo>
|
||||
</target>
|
||||
|
|
|
@ -20,9 +20,7 @@
|
|||
-->
|
||||
<project name="compute" default="list" basedir="." xmlns:artifact="urn:maven-artifact-ant">
|
||||
<mkdir dir="build" />
|
||||
<!--
|
||||
<get src="http://apache.imghat.com/maven/binaries/maven-ant-tasks-2.1.0.jar" dest="build/maven-ant-tasks-2.1.0.jar"/>
|
||||
-->
|
||||
|
||||
<path id="maven-ant-tasks.classpath" path="build/maven-ant-tasks-2.1.0.jar" />
|
||||
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath" />
|
||||
|
||||
|
@ -31,7 +29,7 @@
|
|||
|
||||
<artifact:dependencies pathId="jclouds.classpath">
|
||||
<dependency groupId="org.jclouds" artifactId="jclouds-antcontrib" version="1.0-SNAPSHOT" />
|
||||
<dependency groupId="org.jclouds" artifactId="jclouds-terremark" version="1.0-SNAPSHOT" />
|
||||
<dependency groupId="org.jclouds" artifactId="jclouds-aws" version="1.0-SNAPSHOT" />
|
||||
<localRepository refid="local.repository" />
|
||||
<remoteRepository refid="jclouds-snapshot.repository" />
|
||||
</artifact:dependencies>
|
||||
|
@ -64,27 +62,9 @@
|
|||
|
||||
<target name="create" description="create the server ${jclouds.compute.servername}">
|
||||
<compute action="create" provider="${jclouds.compute.url}">
|
||||
<server name="${jclouds.compute.servername}" image="UBUNTU_JEOS_90" profile="SMALLEST" hostproperty="host" usernameproperty="username" passwordproperty="password" />
|
||||
<server name="${jclouds.compute.servername}" image="UBUNTU_90" profile="SMALLEST" hostproperty="host" usernameproperty="username" passwordproperty="password" />
|
||||
</compute>
|
||||
|
||||
<property name="sudo" value="echo ${password}|sudo -S" />
|
||||
<!-- funny game to get around sudo problems with >>. first sudo is only to prime the password -->
|
||||
<sshexec host="${host}" username="${username}" password="${password}" trust="true"
|
||||
command="${sudo} echo hello;echo nameserver 208.67.222.222 |sudo tee -a /etc/resolv.conf" />
|
||||
<sshexec host="${host}" username="${username}" password="${password}" trust="true"
|
||||
command="${sudo} apt-get update -qq" />
|
||||
<sshexec host="${host}" username="${username}" password="${password}" trust="true"
|
||||
command="${sudo} apt-get upgrade -y -qq" />
|
||||
<sshexec host="${host}" username="${username}" password="${password}" trust="true"
|
||||
command="${sudo} apt-get install -y -qq wget" />
|
||||
<sshexec host="${host}" username="${username}" password="${password}" trust="true"
|
||||
command="${sudo} apt-get install -y -qq openjdk-6-jdk" />
|
||||
<sshexec host="${host}" username="${username}" password="${password}" trust="true"
|
||||
command="wget -q http://www.alliedquotes.com/mirrors/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz" />
|
||||
<sshexec host="${host}" username="${username}" password="${password}" trust="true"
|
||||
command="tar xzf apache-tomcat-6.0.20.tar.gz" />
|
||||
<sshexec host="${host}" username="${username}" password="${password}" trust="true"
|
||||
command="${sudo} mv apache-tomcat-6.0.20 /usr/local/tomcat" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue