Hi folks,
I'd like to tie in to jclouds's TemplateBuilder so that I can use its
filtering capabilities but then use custom logic to determine which of
the matching images is "best" (for my custom value of best).
The driving use case is that I want a portable way to say "any recent
ubuntu or centos". Normally this is the default of course but it
doesn't always do the right thing when other options are specified --
broken ubuntu "alpha" images in AWS being the worst offender (asking for
16gb RAM in us-west-1 gives back an awful ubuntu 8.04 alpha, for
instance!). It would also handle use cases where someone says "Ubuntu
11 or 12, or CentOS 6.x, is best. failing that, Ubuntu 10 or CentOS 5.x.
(and never any alpha images!)".
I'm happy to add an issue and work on this but I wanted to check: does
this look like a good idea?
In terms of the solution, I see two options: TemplateBuilder could take
an imageOrdering predicate where the builder applies my ordering
(currently the Impl just uses a hard-coded DEFAULT_IMAGE_ORDERING); or
we could make the existing Impl buildImagePredicate method public and
let the user do the filtering then sorting. Any preference?
Thanks
Alex
- custom ordering for TemplateBuilder images Alex Heneveld
-