You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whirr.apache.org by Adrian Cole <ad...@jclouds.org> on 2011/08/18 19:54:14 UTC

tool I used testing patches

Hi, team.

Sometimes it is tough to reproduce test success or failure since one's
workspace might be tainted.  The following is a process I used to test
a patch running against zookeeper on aws-ec2.  It first creates a
fresh node to perform tests on, then runs the integration test against
zookoeeper.

Here's the steps:

  * preparation
    checkout and mvn install
https://github.com/jclouds/jclouds-examples/tree/master/compute-basics

  * setup a new node with whirr and maven:
    create a m1.small node on aws-ec2 with the following command:
         java -DminRam=1024 -jar
target/compute-basics-jar-with-dependencies.jar aws-ec2 ACCESS SECRET
whirrtest
    setup whirr from a clean svn checkout
         java -jar target/compute-basics-jar-with-dependencies.jar
aws-ec2 ACCESS SECRET whirrtest run /path/to/setup-whirr.sh

  * iterate a patch, testing against a live service
    if you are testing a patch, apply it with the patch-script after
you changed it to use the correct url for the patch you wish to test
         java -jar target/compute-basics-jar-with-dependencies.jar
aws-ec2 ACCESS SECRET whirrtest run /path/to/patch-whirr.sh
    modify test-whirr-service with the config params you want and the
cloud you are testing against and then run it, repeating as necessary
         java -jar target/compute-basics-jar-with-dependencies.jar
aws-ec2 ACCESS SECRET whirrtest run /path/to/test-whirr-service.sh

  * cleanup your node!
     java -jar target/compute-basics-jar-with-dependencies.jar aws-ec2
ACCESS SECRET whirrtest destroy

I hope this helps!
-Adrian

ex.
Adrian-Coles-iMac:compute-basics adriancole$  java  -jar
target/compute-basics-jar-with-dependencies.jar aws-ec2 ACCESS SECRET
whirrtest run /Users/adriancole/Desktop/test-whirr-service.sh
>> initialized provider  [id=aws-ec2, endpoint=https://ec2.us-east-1.amazonaws.com, apiVersion=2010-06-15, identity=067PW7Z9P0FNH7JDPE82, iso3166Codes=[US-VA, US-CA, IE, SG, JP-13]]
>> running [/Users/adriancole/Desktop/test-whirr-service.sh] on group whirrtest as adriancole
-  >> blocking on socket [address=174.129.88.111, port=22] for 600000 seconds
-  << socket [address=174.129.88.111, port=22] opened
-  >> running [./_test-whirr-service init] as adriancole@174.129.88.111
-  << init(0)
-  >> running [./_test-whirr-service start] as adriancole@174.129.88.111
-  << start(0)
-  << complete(true)
-  << stdout from _test-whirr-service as adriancole@174.129.88.111
[INFO] Installing
/home/users/adriancole/whirr/services/zookeeper/pom.xml to
/home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT.pom
[INFO] Installing
/home/users/adriancole/whirr/services/zookeeper/target/whirr-zookeeper-0.7.0-SNAPSHOT-tests.jar
to /home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT-tests.jar
[INFO] Installing
/home/users/adriancole/whirr/services/zookeeper/target/whirr-zookeeper-0.7.0-SNAPSHOT-sources.jar
to /home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT-sources.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6:12.858s
[INFO] Finished at: Thu Aug 18 17:22:05 UTC 2011
[INFO] Final Memory: 28M/247M
[INFO] ------------------------------------------------------------------------

-  << stderr from _test-whirr-service as adriancole@174.129.88.111

<< node us-east-1/i-cf0a2fae: [10.116.77.215, 174.129.88.111]
<<     [output=, error=, exitCode=0]

Re: tool I used testing patches

Posted by Adrian Cole <ad...@jclouds.org>.
I'm happy to hear I'm not the only one thinking twisted thoughts like make a
whirr service to test patches to whirr ;)

I'm fine including in contrib or making a whirr test service.

-A
On Aug 18, 2011 9:25 PM, "Tom White" <to...@cloudera.com> wrote:
> That's really useful - thanks for sharing it Adrian.
>
> On Thu, Aug 18, 2011 at 8:45 PM, Andrei Savu <sa...@gmail.com>
wrote:
>> Nice work Adrian. Maybe later we can actually have an automatic patch
>> testing system.
>>
>> Should we consider to add these scripts in contrib?
>
> Or a Whirr service?
>
> Putting it on a wiki page might be useful too.
>
> Cheers,
> Tom
>
>>
>> Cheers,
>>
>> -- Andrei Savu
>>
>> On Thu, Aug 18, 2011 at 10:54 AM, Adrian Cole <ad...@jclouds.org> wrote:
>>> Hi, team.
>>>
>>> Sometimes it is tough to reproduce test success or failure since one's
>>> workspace might be tainted.  The following is a process I used to test
>>> a patch running against zookeeper on aws-ec2.  It first creates a
>>> fresh node to perform tests on, then runs the integration test against
>>> zookoeeper.
>>>
>>> Here's the steps:
>>>
>>>  * preparation
>>>    checkout and mvn install
>>> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
>>>
>>>  * setup a new node with whirr and maven:
>>>    create a m1.small node on aws-ec2 with the following command:
>>>         java -DminRam=1024 -jar
>>> target/compute-basics-jar-with-dependencies.jar aws-ec2 ACCESS SECRET
>>> whirrtest
>>>    setup whirr from a clean svn checkout
>>>         java -jar target/compute-basics-jar-with-dependencies.jar
>>> aws-ec2 ACCESS SECRET whirrtest run /path/to/setup-whirr.sh
>>>
>>>  * iterate a patch, testing against a live service
>>>    if you are testing a patch, apply it with the patch-script after
>>> you changed it to use the correct url for the patch you wish to test
>>>         java -jar target/compute-basics-jar-with-dependencies.jar
>>> aws-ec2 ACCESS SECRET whirrtest run /path/to/patch-whirr.sh
>>>    modify test-whirr-service with the config params you want and the
>>> cloud you are testing against and then run it, repeating as necessary
>>>         java -jar target/compute-basics-jar-with-dependencies.jar
>>> aws-ec2 ACCESS SECRET whirrtest run /path/to/test-whirr-service.sh
>>>
>>>  * cleanup your node!
>>>     java -jar target/compute-basics-jar-with-dependencies.jar aws-ec2
>>> ACCESS SECRET whirrtest destroy
>>>
>>> I hope this helps!
>>> -Adrian
>>>
>>> ex.
>>> Adrian-Coles-iMac:compute-basics adriancole$  java  -jar
>>> target/compute-basics-jar-with-dependencies.jar aws-ec2 ACCESS SECRET
>>> whirrtest run /Users/adriancole/Desktop/test-whirr-service.sh
>>>>> initialized provider  [id=aws-ec2, endpoint=
https://ec2.us-east-1.amazonaws.com, apiVersion=2010-06-15,
identity=067PW7Z9P0FNH7JDPE82, iso3166Codes=[US-VA, US-CA, IE, SG, JP-13]]
>>>>> running [/Users/adriancole/Desktop/test-whirr-service.sh] on group
whirrtest as adriancole
>>> -  >> blocking on socket [address=174.129.88.111, port=22] for 600000
seconds
>>> -  << socket [address=174.129.88.111, port=22] opened
>>> -  >> running [./_test-whirr-service init] as adriancole@174.129.88.111
>>> -  << init(0)
>>> -  >> running [./_test-whirr-service start] as adriancole@174.129.88.111
>>> -  << start(0)
>>> -  << complete(true)
>>> -  << stdout from _test-whirr-service as adriancole@174.129.88.111
>>> [INFO] Installing
>>> /home/users/adriancole/whirr/services/zookeeper/pom.xml to
>>>
/home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT.pom
>>> [INFO] Installing
>>>
/home/users/adriancole/whirr/services/zookeeper/target/whirr-zookeeper-0.7.0-SNAPSHOT-tests.jar
>>> to
/home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT-tests.jar
>>> [INFO] Installing
>>>
/home/users/adriancole/whirr/services/zookeeper/target/whirr-zookeeper-0.7.0-SNAPSHOT-sources.jar
>>> to
/home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT-sources.jar
>>> [INFO]
------------------------------------------------------------------------
>>> [INFO] BUILD SUCCESS
>>> [INFO]
------------------------------------------------------------------------
>>> [INFO] Total time: 6:12.858s
>>> [INFO] Finished at: Thu Aug 18 17:22:05 UTC 2011
>>> [INFO] Final Memory: 28M/247M
>>> [INFO]
------------------------------------------------------------------------
>>>
>>> -  << stderr from _test-whirr-service as adriancole@174.129.88.111
>>>
>>> << node us-east-1/i-cf0a2fae: [10.116.77.215, 174.129.88.111]
>>> <<     [output=, error=, exitCode=0]
>>>
>>

Re: tool I used testing patches

Posted by Tom White <to...@cloudera.com>.
That's really useful - thanks for sharing it Adrian.

On Thu, Aug 18, 2011 at 8:45 PM, Andrei Savu <sa...@gmail.com> wrote:
> Nice work Adrian. Maybe later we can actually have an automatic patch
> testing system.
>
> Should we consider to add these scripts in contrib?

Or a Whirr service?

Putting it on a wiki page might be useful too.

Cheers,
Tom

>
> Cheers,
>
> -- Andrei Savu
>
> On Thu, Aug 18, 2011 at 10:54 AM, Adrian Cole <ad...@jclouds.org> wrote:
>> Hi, team.
>>
>> Sometimes it is tough to reproduce test success or failure since one's
>> workspace might be tainted.  The following is a process I used to test
>> a patch running against zookeeper on aws-ec2.  It first creates a
>> fresh node to perform tests on, then runs the integration test against
>> zookoeeper.
>>
>> Here's the steps:
>>
>>  * preparation
>>    checkout and mvn install
>> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
>>
>>  * setup a new node with whirr and maven:
>>    create a m1.small node on aws-ec2 with the following command:
>>         java -DminRam=1024 -jar
>> target/compute-basics-jar-with-dependencies.jar aws-ec2 ACCESS SECRET
>> whirrtest
>>    setup whirr from a clean svn checkout
>>         java -jar target/compute-basics-jar-with-dependencies.jar
>> aws-ec2 ACCESS SECRET whirrtest run /path/to/setup-whirr.sh
>>
>>  * iterate a patch, testing against a live service
>>    if you are testing a patch, apply it with the patch-script after
>> you changed it to use the correct url for the patch you wish to test
>>         java -jar target/compute-basics-jar-with-dependencies.jar
>> aws-ec2 ACCESS SECRET whirrtest run /path/to/patch-whirr.sh
>>    modify test-whirr-service with the config params you want and the
>> cloud you are testing against and then run it, repeating as necessary
>>         java -jar target/compute-basics-jar-with-dependencies.jar
>> aws-ec2 ACCESS SECRET whirrtest run /path/to/test-whirr-service.sh
>>
>>  * cleanup your node!
>>     java -jar target/compute-basics-jar-with-dependencies.jar aws-ec2
>> ACCESS SECRET whirrtest destroy
>>
>> I hope this helps!
>> -Adrian
>>
>> ex.
>> Adrian-Coles-iMac:compute-basics adriancole$  java  -jar
>> target/compute-basics-jar-with-dependencies.jar aws-ec2 ACCESS SECRET
>> whirrtest run /Users/adriancole/Desktop/test-whirr-service.sh
>>>> initialized provider  [id=aws-ec2, endpoint=https://ec2.us-east-1.amazonaws.com, apiVersion=2010-06-15, identity=067PW7Z9P0FNH7JDPE82, iso3166Codes=[US-VA, US-CA, IE, SG, JP-13]]
>>>> running [/Users/adriancole/Desktop/test-whirr-service.sh] on group whirrtest as adriancole
>> -  >> blocking on socket [address=174.129.88.111, port=22] for 600000 seconds
>> -  << socket [address=174.129.88.111, port=22] opened
>> -  >> running [./_test-whirr-service init] as adriancole@174.129.88.111
>> -  << init(0)
>> -  >> running [./_test-whirr-service start] as adriancole@174.129.88.111
>> -  << start(0)
>> -  << complete(true)
>> -  << stdout from _test-whirr-service as adriancole@174.129.88.111
>> [INFO] Installing
>> /home/users/adriancole/whirr/services/zookeeper/pom.xml to
>> /home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT.pom
>> [INFO] Installing
>> /home/users/adriancole/whirr/services/zookeeper/target/whirr-zookeeper-0.7.0-SNAPSHOT-tests.jar
>> to /home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT-tests.jar
>> [INFO] Installing
>> /home/users/adriancole/whirr/services/zookeeper/target/whirr-zookeeper-0.7.0-SNAPSHOT-sources.jar
>> to /home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT-sources.jar
>> [INFO] ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESS
>> [INFO] ------------------------------------------------------------------------
>> [INFO] Total time: 6:12.858s
>> [INFO] Finished at: Thu Aug 18 17:22:05 UTC 2011
>> [INFO] Final Memory: 28M/247M
>> [INFO] ------------------------------------------------------------------------
>>
>> -  << stderr from _test-whirr-service as adriancole@174.129.88.111
>>
>> << node us-east-1/i-cf0a2fae: [10.116.77.215, 174.129.88.111]
>> <<     [output=, error=, exitCode=0]
>>
>

Re: tool I used testing patches

Posted by Andrei Savu <sa...@gmail.com>.
Nice work Adrian. Maybe later we can actually have an automatic patch
testing system.

Should we consider to add these scripts in contrib?

Cheers,

-- Andrei Savu

On Thu, Aug 18, 2011 at 10:54 AM, Adrian Cole <ad...@jclouds.org> wrote:
> Hi, team.
>
> Sometimes it is tough to reproduce test success or failure since one's
> workspace might be tainted.  The following is a process I used to test
> a patch running against zookeeper on aws-ec2.  It first creates a
> fresh node to perform tests on, then runs the integration test against
> zookoeeper.
>
> Here's the steps:
>
>  * preparation
>    checkout and mvn install
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
>
>  * setup a new node with whirr and maven:
>    create a m1.small node on aws-ec2 with the following command:
>         java -DminRam=1024 -jar
> target/compute-basics-jar-with-dependencies.jar aws-ec2 ACCESS SECRET
> whirrtest
>    setup whirr from a clean svn checkout
>         java -jar target/compute-basics-jar-with-dependencies.jar
> aws-ec2 ACCESS SECRET whirrtest run /path/to/setup-whirr.sh
>
>  * iterate a patch, testing against a live service
>    if you are testing a patch, apply it with the patch-script after
> you changed it to use the correct url for the patch you wish to test
>         java -jar target/compute-basics-jar-with-dependencies.jar
> aws-ec2 ACCESS SECRET whirrtest run /path/to/patch-whirr.sh
>    modify test-whirr-service with the config params you want and the
> cloud you are testing against and then run it, repeating as necessary
>         java -jar target/compute-basics-jar-with-dependencies.jar
> aws-ec2 ACCESS SECRET whirrtest run /path/to/test-whirr-service.sh
>
>  * cleanup your node!
>     java -jar target/compute-basics-jar-with-dependencies.jar aws-ec2
> ACCESS SECRET whirrtest destroy
>
> I hope this helps!
> -Adrian
>
> ex.
> Adrian-Coles-iMac:compute-basics adriancole$  java  -jar
> target/compute-basics-jar-with-dependencies.jar aws-ec2 ACCESS SECRET
> whirrtest run /Users/adriancole/Desktop/test-whirr-service.sh
>>> initialized provider  [id=aws-ec2, endpoint=https://ec2.us-east-1.amazonaws.com, apiVersion=2010-06-15, identity=067PW7Z9P0FNH7JDPE82, iso3166Codes=[US-VA, US-CA, IE, SG, JP-13]]
>>> running [/Users/adriancole/Desktop/test-whirr-service.sh] on group whirrtest as adriancole
> -  >> blocking on socket [address=174.129.88.111, port=22] for 600000 seconds
> -  << socket [address=174.129.88.111, port=22] opened
> -  >> running [./_test-whirr-service init] as adriancole@174.129.88.111
> -  << init(0)
> -  >> running [./_test-whirr-service start] as adriancole@174.129.88.111
> -  << start(0)
> -  << complete(true)
> -  << stdout from _test-whirr-service as adriancole@174.129.88.111
> [INFO] Installing
> /home/users/adriancole/whirr/services/zookeeper/pom.xml to
> /home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT.pom
> [INFO] Installing
> /home/users/adriancole/whirr/services/zookeeper/target/whirr-zookeeper-0.7.0-SNAPSHOT-tests.jar
> to /home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT-tests.jar
> [INFO] Installing
> /home/users/adriancole/whirr/services/zookeeper/target/whirr-zookeeper-0.7.0-SNAPSHOT-sources.jar
> to /home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT-sources.jar
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 6:12.858s
> [INFO] Finished at: Thu Aug 18 17:22:05 UTC 2011
> [INFO] Final Memory: 28M/247M
> [INFO] ------------------------------------------------------------------------
>
> -  << stderr from _test-whirr-service as adriancole@174.129.88.111
>
> << node us-east-1/i-cf0a2fae: [10.116.77.215, 174.129.88.111]
> <<     [output=, error=, exitCode=0]
>

Re: tool I used testing patches

Posted by Karel Vervaeke <ka...@outerthought.org>.
Nice :)
We do the same sort of thing with one of our projects:
The project is using a fixed restlet version, but there's a script which builds
the latest restlet trunk, and then builds and tests our project
against restlet trunk.

We have a Hudson instance polling for restlet updates, which notifies
us immediately
if something in restlet trunk breaks our project.

Regards,
Karel

On Thu, Aug 18, 2011 at 7:54 PM, Adrian Cole <ad...@jclouds.org> wrote:
> Hi, team.
>
> Sometimes it is tough to reproduce test success or failure since one's
> workspace might be tainted.  The following is a process I used to test
> a patch running against zookeeper on aws-ec2.  It first creates a
> fresh node to perform tests on, then runs the integration test against
> zookoeeper.
>
> Here's the steps:
>
>  * preparation
>    checkout and mvn install
> https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
>
>  * setup a new node with whirr and maven:
>    create a m1.small node on aws-ec2 with the following command:
>         java -DminRam=1024 -jar
> target/compute-basics-jar-with-dependencies.jar aws-ec2 ACCESS SECRET
> whirrtest
>    setup whirr from a clean svn checkout
>         java -jar target/compute-basics-jar-with-dependencies.jar
> aws-ec2 ACCESS SECRET whirrtest run /path/to/setup-whirr.sh
>
>  * iterate a patch, testing against a live service
>    if you are testing a patch, apply it with the patch-script after
> you changed it to use the correct url for the patch you wish to test
>         java -jar target/compute-basics-jar-with-dependencies.jar
> aws-ec2 ACCESS SECRET whirrtest run /path/to/patch-whirr.sh
>    modify test-whirr-service with the config params you want and the
> cloud you are testing against and then run it, repeating as necessary
>         java -jar target/compute-basics-jar-with-dependencies.jar
> aws-ec2 ACCESS SECRET whirrtest run /path/to/test-whirr-service.sh
>
>  * cleanup your node!
>     java -jar target/compute-basics-jar-with-dependencies.jar aws-ec2
> ACCESS SECRET whirrtest destroy
>
> I hope this helps!
> -Adrian
>
> ex.
> Adrian-Coles-iMac:compute-basics adriancole$  java  -jar
> target/compute-basics-jar-with-dependencies.jar aws-ec2 ACCESS SECRET
> whirrtest run /Users/adriancole/Desktop/test-whirr-service.sh
>>> initialized provider  [id=aws-ec2, endpoint=https://ec2.us-east-1.amazonaws.com, apiVersion=2010-06-15, identity=067PW7Z9P0FNH7JDPE82, iso3166Codes=[US-VA, US-CA, IE, SG, JP-13]]
>>> running [/Users/adriancole/Desktop/test-whirr-service.sh] on group whirrtest as adriancole
> -  >> blocking on socket [address=174.129.88.111, port=22] for 600000 seconds
> -  << socket [address=174.129.88.111, port=22] opened
> -  >> running [./_test-whirr-service init] as adriancole@174.129.88.111
> -  << init(0)
> -  >> running [./_test-whirr-service start] as adriancole@174.129.88.111
> -  << start(0)
> -  << complete(true)
> -  << stdout from _test-whirr-service as adriancole@174.129.88.111
> [INFO] Installing
> /home/users/adriancole/whirr/services/zookeeper/pom.xml to
> /home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT.pom
> [INFO] Installing
> /home/users/adriancole/whirr/services/zookeeper/target/whirr-zookeeper-0.7.0-SNAPSHOT-tests.jar
> to /home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT-tests.jar
> [INFO] Installing
> /home/users/adriancole/whirr/services/zookeeper/target/whirr-zookeeper-0.7.0-SNAPSHOT-sources.jar
> to /home/users/adriancole/.m2/repository/org/apache/whirr/whirr-zookeeper/0.7.0-SNAPSHOT/whirr-zookeeper-0.7.0-SNAPSHOT-sources.jar
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 6:12.858s
> [INFO] Finished at: Thu Aug 18 17:22:05 UTC 2011
> [INFO] Final Memory: 28M/247M
> [INFO] ------------------------------------------------------------------------
>
> -  << stderr from _test-whirr-service as adriancole@174.129.88.111
>
> << node us-east-1/i-cf0a2fae: [10.116.77.215, 174.129.88.111]
> <<     [output=, error=, exitCode=0]
>



-- 
Karel Vervaeke
http://outerthought.org/
Open Source Content Applications
Makers of Kauri, Daisy CMS and Lily