mirror of https://github.com/apache/jclouds.git
updated ant samples
This commit is contained in:
parent
7050b0f85c
commit
9244b6ddd0
|
@ -20,10 +20,11 @@
|
|||
-->
|
||||
<project xmlns:artifact="urn:maven-artifact-ant" name="cargooverssh" default="cargooverssh" basedir=".">
|
||||
<property file="build.properties" />
|
||||
<property name="password" value="" />
|
||||
<property name="keyfile" value="" />
|
||||
<property name="jclouds.version" value="1.0-SNAPSHOT" />
|
||||
<property name="privatekeyfile" value="${user.home}/.ssh/id_rsa" />
|
||||
<property name="publickeyfile" value="${user.home}/.ssh/id_rsa.pub" />
|
||||
<property name="listenport" value="8080" />
|
||||
<property name="container.zip" value="http://www.ibiblio.org/pub/mirrors/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.zip" />
|
||||
<property name="container.zip" value="http://mirrors.axint.net/apache/tomcat/tomcat-6/v6.0.24/bin/apache-tomcat-6.0.24.tar.gz" />
|
||||
<property name="warfile" value="build/samples-blazeds.war" />
|
||||
|
||||
<!-- maven must be available before we use it -->
|
||||
|
@ -34,6 +35,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="${warfile}"/>
|
||||
-->
|
||||
|
||||
<input
|
||||
message="Which service would you like to use (ec2, cloudservers, vcloud, terremark, rimuhosting, hostingdotcom)?"
|
||||
validargs="ec2,cloudservers,vcloud,terremark,rimuhosting,hostingdotcom"
|
||||
|
@ -51,17 +53,17 @@
|
|||
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath"/>
|
||||
|
||||
<artifact:localRepository id="local.repository" path="${user.home}/.m2/repository"/>
|
||||
<artifact:remoteRepository id="jclouds.repository" url="http://jclouds.googlecode.com/svn/repo" />
|
||||
<artifact:remoteRepository id="jclouds-snapshot.repository" url="http://jclouds.rimuhosting.com/maven2/snapshots"/>
|
||||
<artifact:remoteRepository id="cargo-snapshot.repository" url="http://snapshots.repository.codehaus.org" />
|
||||
|
||||
<!-- Setup maven so that we can get latest version of jclouds, jclouds, and jruby -->
|
||||
<artifact:dependencies pathId="jclouds.classpath">
|
||||
<dependency groupid="org.codehaus.cargo" artifactId="cargo-ant" version="1.0.1-SNAPSHOT"/>
|
||||
<dependency groupid="org.codehaus.cargo" artifactId="cargo-core-container-tomcat" version="1.0.1-SNAPSHOT"/>
|
||||
<dependency groupId="org.jclouds" artifactId="jclouds-${driver}" version="1.0-beta-3"/>
|
||||
<dependency groupId="org.jclouds" artifactId="jclouds-antcontrib" version="1.0-beta-3"/>
|
||||
<dependency groupid="org.codehaus.cargo" artifactId="cargo-ant" version="1.0.1-alpha-2"/>
|
||||
<dependency groupid="org.codehaus.cargo" artifactId="cargo-core-container-tomcat" version="1.0.1-alpha-2"/>
|
||||
<dependency groupId="org.jclouds" artifactId="jclouds-${driver}" version="${jclouds.version}"/>
|
||||
<dependency groupId="org.jclouds" artifactId="jclouds-antcontrib" version="${jclouds.version}"/>
|
||||
<remoteRepository refid="jclouds.repository"/>
|
||||
<remoteRepository refid="jclouds-snapshot.repository"/>
|
||||
<remoteRepository refid="cargo-snapshot.repository"/>
|
||||
<localRepository refid="local.repository"/>
|
||||
</artifact:dependencies>
|
||||
|
||||
|
@ -85,12 +87,13 @@
|
|||
<compute actions="destroy,create" provider="${url}">
|
||||
<nodes tag="${nodetag}" os="UBUNTU" size="SMALLEST"
|
||||
runscript="runscript.sh" openports="22,${listenport}"
|
||||
hostproperty="host" usernameproperty="username" passwordproperty="password" />
|
||||
privatekeyfile="${privatekeyfile}" publickeyfile="${publickeyfile}"
|
||||
hostproperty="host" usernameproperty="username" />
|
||||
</compute>
|
||||
</target>
|
||||
|
||||
<target name="cargooverssh" depends="create" description="run cargo on remote nodes" >
|
||||
<echo message="deploying tomcat and blaze to: ${nodetag}" />
|
||||
<echo message="deploying tomcat and blaze to: http://${host}:${listenport}/samples-blazeds/" />
|
||||
<cargo containerId="tomcat6x" output="build/output.log" log="build/cargo.log" action="start" timeout="600000">
|
||||
<zipurlinstaller installurl="${container.zip}" />
|
||||
<configuration home="build/cargo" type="standalone">
|
||||
|
@ -99,8 +102,8 @@
|
|||
<property name="cargo.servlet.port" value="${listenport}"/>
|
||||
<property name="cargo.ssh.host" value="${host}"/>
|
||||
<property name="cargo.ssh.username" value="${username}"/>
|
||||
<property name="cargo.ssh.password" value="${password}"/>
|
||||
<property name="cargo.ssh.keyfile" value="${keyfile}"/>
|
||||
<property name="cargo.ssh.password" value=""/>
|
||||
<property name="cargo.ssh.keyfile" value="${privatekeyfile}"/>
|
||||
<property name="cargo.ssh.remotebase" value="/tmp/cargo"/>
|
||||
<property name="cargo.logging" value="high"/>
|
||||
<deployable type="war" file="${warfile}"/>
|
||||
|
@ -109,7 +112,7 @@
|
|||
</target>
|
||||
|
||||
<target name="justplaincargo" description="run cargo on local machine" >
|
||||
<echo message="deploying tomcat and blaze to: localhost" />
|
||||
<echo message="deploying tomcat and blaze to: http://localhost:${listenport}/samples-blazeds/" />
|
||||
<cargo containerId="tomcat6x" output="build/output.log" log="build/cargo.log" action="start" timeout="600000">
|
||||
<zipurlinstaller installurl="${container.zip}" />
|
||||
<configuration home="build/cargo" type="standalone">
|
||||
|
|
|
@ -3,8 +3,8 @@ apt-get update -qq
|
|||
apt-get upgrade -y -qq
|
||||
apt-get install -y -qq wget
|
||||
apt-get install -y -qq openjdk-6-jdk
|
||||
wget -q http://www.alliedquotes.com/mirrors/apache/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
|
||||
tar xzf apache-tomcat-6.0.20.tar.gz
|
||||
wget -q http://mirrors.axint.net/apache/tomcat/tomcat-6/v6.0.24/bin/apache-tomcat-6.0.24.tar.gz
|
||||
tar xzf apache-tomcat-6.0.24.tar.gz
|
||||
mkdir -p /tmp/cargo/containers
|
||||
chmod 1777 /tmp/cargo
|
||||
mv apache-tomcat-6.0.20 /tmp/cargo/containers/tomcat6x
|
||||
mv apache-tomcat-6.0.24 /tmp/cargo/containers/tomcat6x
|
||||
|
|
|
@ -18,12 +18,15 @@
|
|||
====================================================================
|
||||
|
||||
-->
|
||||
<project name="compute" default="list" basedir="." xmlns:artifact="urn:maven-artifact-ant">
|
||||
<project name="compute" default="dump" basedir="." xmlns:artifact="urn:maven-artifact-ant">
|
||||
<property file="build.properties" />
|
||||
<property name="jclouds.version" value="1.0-SNAPSHOT" />
|
||||
<property name="privatekeyfile" value="${user.home}/.ssh/id_rsa" />
|
||||
<property name="publickeyfile" value="${user.home}/.ssh/id_rsa.pub" />
|
||||
|
||||
<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"/>
|
||||
-->
|
||||
|
||||
<get src="http://apache.imghat.com/maven/binaries/maven-ant-tasks-2.1.0.jar" dest="build/maven-ant-tasks-2.1.0.jar"/>
|
||||
|
||||
<input
|
||||
message="Which service would you like to use (ec2, cloudservers, vcloud, terremark, rimuhosting, hostingdotcom)?"
|
||||
|
@ -41,12 +44,14 @@
|
|||
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath" />
|
||||
|
||||
<artifact:localRepository id="local.repository" path="${user.home}/.m2/repository" />
|
||||
<artifact:remoteRepository id="jclouds.repository" url="http://jclouds.googlecode.com/svn/repo" />
|
||||
<artifact:remoteRepository id="jclouds-snapshot.repository" url="http://jclouds.rimuhosting.com/maven2/snapshots" />
|
||||
|
||||
<artifact:dependencies pathId="jclouds.classpath">
|
||||
<dependency groupId="org.jclouds" artifactId="jclouds-antcontrib" version="1.0-beta-3" />
|
||||
<dependency groupId="org.jclouds" artifactId="jclouds-${driver}" version="1.0-beta-3" />
|
||||
<dependency groupId="org.jclouds" artifactId="jclouds-antcontrib" version="${jclouds.version}" />
|
||||
<dependency groupId="org.jclouds" artifactId="jclouds-${driver}" version="${jclouds.version}" />
|
||||
<localRepository refid="local.repository" />
|
||||
<remoteRepository refid="jclouds.repository" />
|
||||
<remoteRepository refid="jclouds-snapshot.repository" />
|
||||
</artifact:dependencies>
|
||||
|
||||
|
@ -88,6 +93,18 @@
|
|||
<compute actions="list-locations,list-sizes,list-images,list-details" provider="${jclouds.compute.url}" />
|
||||
</target>
|
||||
|
||||
<target name="reboot" description="reboot the node ${nodetag}">
|
||||
|
||||
<input
|
||||
message="Which node do you wish to reboot"
|
||||
addproperty="nodetag"
|
||||
/>
|
||||
|
||||
<compute actions="reboot" provider="${jclouds.compute.url}">
|
||||
<nodes tag="${nodetag}" />
|
||||
</compute>
|
||||
</target>
|
||||
|
||||
<target name="destroy" description="destroy the node ${nodetag}">
|
||||
|
||||
<input
|
||||
|
|
Loading…
Reference in New Issue