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" <[email protected]> wrote:
> That's really useful - thanks for sharing it Adrian.
>
> On Thu, Aug 18, 2011 at 8:45 PM, Andrei Savu <[email protected]>
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 <[email protected]> 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 [email protected]
>>> -  << init(0)
>>> -  >> running [./_test-whirr-service start] as [email protected]
>>> -  << start(0)
>>> -  << complete(true)
>>> -  << stdout from _test-whirr-service as [email protected]
>>> [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 [email protected]
>>>
>>> << node us-east-1/i-cf0a2fae: [10.116.77.215, 174.129.88.111]
>>> <<     [output=, error=, exitCode=0]
>>>
>>

Reply via email to