Hi Ignasi.

Thank you for your help :-)
I have taken a look at the code to see the methods to order the images and other elements and have the information about the available provider services, e.g. I have seen the dates about the images, regions, etc, of aws are supplied using a web service from AWS API. I have taken a look at HPcloud-Compute and I have not seen any description of the provider services (e.g. images or region description), so I supose that a default description of these services are supplied, am I right?

Thanks a gain for your replies.
Jose






El 20/01/2014 11:17, Ignasi Barrera escribió:
Hi Jose,

The selection logic is performed by the TemplateBuilder implementation
[1] (note that some providers may define its own implementation of the
template builder).

Once the TemplateBuilder has collected the list of image and hardware
profile candidates, it uses an "image chooser" to select the "best"
image from the list. By default, it uses an ordering based chooser
[2], but you can define your own chooser using the "imageChooser"
method [3].

Hardware profile selection works in a very similar way. There is an
ordering based chooser that takes into accout the "smallest, fastest
and biggest" parameters to select the best compatible hardware profile
for the selected image [4, 5].


HTH!

Ignasi


[1] 
https://github.com/jclouds/jclouds/blob/master/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java#L668-L717
[2] 
https://github.com/jclouds/jclouds/blob/master/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java#L485-L526
[3] 
https://github.com/jclouds/jclouds/blob/master/compute/src/main/java/org/jclouds/compute/domain/TemplateBuilder.java#L172-L179
[4] 
https://github.com/jclouds/jclouds/blob/master/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java#L801-L808
[5] 
https://github.com/jclouds/jclouds/blob/master/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java#L762-L794

On 20 February 2014 10:50, Jose <[email protected]> wrote:
Hi.

Thanks a lot for your replies, it was veru usefull for me.
I thought jclouds works in this way.
jclouds will choose an instance type that meets the requirements, but which
is the predicate or the filter that jclouds uses to select the correct (the
best matching) instance (e.g a medium or a large instance) ? I have taken a
look to the source code to understand the mechanism which is used to resolve
this issue, but I do not get to find it.
I'd like to show the potential candidates to be intanciated.

Thank you again.
Jose.



El 16/01/2014 15:21, Andrew Phillips escribió:
When do you define a template Jclouds searchs and builds a node (fox

example a AMI in Amazon) which matchs with the template specification?

 From my understanding, it doesn't *build* a "custom" node, it simply
searches for an existing AMI that matches the requirements that you set in
the template.

For things like memory size which are based (in EC2) on the instance that
is instantiated, jclouds will choose an instance type (micro, medium etc.)
that meets the requirements, if that is possible.

Hope that helps. jclouds EC2 experts will hopefully be able to expand
on/correct my comments!

ap


Reply via email to