Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/866#discussion_r37967596
  
    --- Diff: 
software/base/src/test/java/org/apache/brooklyn/entity/software/base/test/location/WinRmMachineLocationLiveTest.java
 ---
    @@ -65,7 +65,7 @@ public void setUpClass() throws Exception {
             JcloudsLocation loc = (JcloudsLocation) 
mgmt.getLocationRegistry().resolve("jclouds:aws-ec2:us-west-2", ImmutableMap.of(
                     "inboundPorts", ImmutableList.of(5985, 3389),
                     "displayName", "AWS Oregon (Windows)",
    -                "imageId", "us-west-2/ami-8fd3f9bf",
    +                "imageNameRegex", ".*Windows.*2012.*",
    --- End diff --
    
    A customer said that they also needed to specify an image owner, in order 
to avoid a marketplace windows AMI being picked. Can you search for AMIs that 
match that regex to see if that is a risk?
    
    For example:
    
        brooklyn.location.named.mywindows1.imageOwner=801119661308
        
brooklyn.location.named.mywindows1.imageNameRegex=Windows_Server-2012-R2_RTM-English-64Bit-Base-.*
    
    This is used within our jclouds integration code (in 
ComputeServiceRegistryImpl.findComputeService) where we have:
    
       properties.setProperty(PROPERTY_EC2_AMI_QUERY,
       
"owner-id="+conf.getStringKey("imageOwner")+";state=available;image-type=machine");
    
    (It's a bit ugly having the code there; would be nicer if that were a 
first-class property on jclouds' AWSEC2TemplateOptions. That's an improvement 
we could make in jclouds. It would also be nice to have a config key for 
`imageOwner` rather than just this hard-coded constant being looked up in the 
config!).



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to