You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whirr.apache.org by Steve Loughran <st...@hortonworks.com> on 2012/09/21 13:36:01 UTC

policy on specifying machine instances in tests?

Is there a policy on specifying machine instances?

I have a specific AMI I want to test against, and have set up the
test.properties file to be driven by a system prop

whirr.image-id=${sys:whirr.test.image-id}

then I can use -Dwhirr.test.image-id=us-west-2/ami-1234

I don't think this is ideal, really you'd want a check that had a default
value and allowed people to override it if they really wanted to.

What can be done here (this is for something I do plan to submit, the AMI
is an AMAZON-LINUX image brought up to date with patches and the right java
version pre-installed. The official AMIs lag security-wise.

-Steve

Re: policy on specifying machine instances in tests?

Posted by Andrew Bayer <an...@gmail.com>.
I'd also suggest migrating to
whirr.template=imageId=foo,hardwareId=bar[,etc] rather than the individual
fields, as whirr.template overrides them anyway.

A.

On Fri, Sep 21, 2012 at 5:48 AM, Tom White <to...@cloudera.com> wrote:

> On Fri, Sep 21, 2012 at 1:39 PM, Steve Loughran <st...@hortonworks.com>
> wrote:
> > On 21 September 2012 13:01, Tom White <to...@cloudera.com> wrote:
> >
> >> You can create a file called .whirr-test.properties in your home
> >> directory and set whirr.image-id in there to the value you want. Then
> >> do
> >>
> >> mvn verify -Pintegration -DargLine="-Dwhirr.test.provider=aws-ec2
> >> -Dwhirr.test.identity=$AWS_ACCESS_KEY_ID
> >> -Dwhirr.test.credential=$AWS_SECRET_ACCESS_KEY
> >> -Dconfig=.whirr-test.properties"
> >>
> >
> >
> > I see. Is that config going to override whatever test properties file
> I've
> > got in src/test/resources, or does it get read in before/afterwards
>
> It overrides properties in src/test/resources.
>
> Tom
>

Re: policy on specifying machine instances in tests?

Posted by Tom White <to...@cloudera.com>.
On Fri, Sep 21, 2012 at 1:39 PM, Steve Loughran <st...@hortonworks.com> wrote:
> On 21 September 2012 13:01, Tom White <to...@cloudera.com> wrote:
>
>> You can create a file called .whirr-test.properties in your home
>> directory and set whirr.image-id in there to the value you want. Then
>> do
>>
>> mvn verify -Pintegration -DargLine="-Dwhirr.test.provider=aws-ec2
>> -Dwhirr.test.identity=$AWS_ACCESS_KEY_ID
>> -Dwhirr.test.credential=$AWS_SECRET_ACCESS_KEY
>> -Dconfig=.whirr-test.properties"
>>
>
>
> I see. Is that config going to override whatever test properties file I've
> got in src/test/resources, or does it get read in before/afterwards

It overrides properties in src/test/resources.

Tom

Re: policy on specifying machine instances in tests?

Posted by Steve Loughran <st...@hortonworks.com>.
On 21 September 2012 13:01, Tom White <to...@cloudera.com> wrote:

> You can create a file called .whirr-test.properties in your home
> directory and set whirr.image-id in there to the value you want. Then
> do
>
> mvn verify -Pintegration -DargLine="-Dwhirr.test.provider=aws-ec2
> -Dwhirr.test.identity=$AWS_ACCESS_KEY_ID
> -Dwhirr.test.credential=$AWS_SECRET_ACCESS_KEY
> -Dconfig=.whirr-test.properties"
>


I see. Is that config going to override whatever test properties file I've
got in src/test/resources, or does it get read in before/afterwards

Re: policy on specifying machine instances in tests?

Posted by Tom White <to...@cloudera.com>.
You can create a file called .whirr-test.properties in your home
directory and set whirr.image-id in there to the value you want. Then
do

mvn verify -Pintegration -DargLine="-Dwhirr.test.provider=aws-ec2
-Dwhirr.test.identity=$AWS_ACCESS_KEY_ID
-Dwhirr.test.credential=$AWS_SECRET_ACCESS_KEY
-Dconfig=.whirr-test.properties"

Tom

On Fri, Sep 21, 2012 at 12:36 PM, Steve Loughran <st...@hortonworks.com> wrote:
> Is there a policy on specifying machine instances?
>
> I have a specific AMI I want to test against, and have set up the
> test.properties file to be driven by a system prop
>
> whirr.image-id=${sys:whirr.test.image-id}
>
> then I can use -Dwhirr.test.image-id=us-west-2/ami-1234
>
> I don't think this is ideal, really you'd want a check that had a default
> value and allowed people to override it if they really wanted to.
>
> What can be done here (this is for something I do plan to submit, the AMI
> is an AMAZON-LINUX image brought up to date with patches and the right java
> version pre-installed. The official AMIs lag security-wise.
>
> -Steve