Whirr
  1. Whirr
  2. WHIRR-500

Let users control which hardware is used for each instance template.

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: core
    • Labels:
      None

      Description

      For non-byon providers, you can use whirr.templates.role1+role2.hardwareId=foo

      For byon, the way roles are assigned to instances is indeterminate (it depends on the order of the keys in doAction(eventMap)).
      It would be great if the user could get control over this.

      1. WHIRR-500.patch
        3 kB
        Karel Vervaeke
      2. WHIRR-500.patch
        3 kB
        Karel Vervaeke

        Activity

        Hide
        Karel Vervaeke added a comment - - edited

        Attached a quick hack, I'm all for suggestions on how to do it better.

        The yaml model doesn't give you much to work with, so I abused the 'tags' functionality:

         
        **Yaml
        
        nodes:
            - id: ubuntu1
              hostname: 192.168.54.160
              os_arch: x86
              os_family: ubuntu
              ...
              tags:
                - tag1
                - tag2
        
        ** recipe:
        whirr.templates.role1+role2.hardwareId=tag1,tag2
        -> Only nodes which have both 'tag1' and 'tag2' will be used.
        

        If you use .hardwareId, you should use it on all instance-templates, otherwise the tagged instances can get assigned to the wrong node.

        ps: yay, WHIRR-500

        Show
        Karel Vervaeke added a comment - - edited Attached a quick hack, I'm all for suggestions on how to do it better. The yaml model doesn't give you much to work with, so I abused the 'tags' functionality: **Yaml nodes: - id: ubuntu1 hostname: 192.168.54.160 os_arch: x86 os_family: ubuntu ... tags: - tag1 - tag2 ** recipe: whirr.templates.role1+role2.hardwareId=tag1,tag2 -> Only nodes which have both 'tag1' and 'tag2' will be used. If you use .hardwareId, you should use it on all instance-templates, otherwise the tagged instances can get assigned to the wrong node. ps: yay, WHIRR-500
        Hide
        Karel Vervaeke added a comment -

        Updated patch. Previous patch failed to handle templates which didn't specify a .hardwareId

        Show
        Karel Vervaeke added a comment - Updated patch. Previous patch failed to handle templates which didn't specify a .hardwareId
        Hide
        Andrei Savu added a comment -

        Thanks Karel. Looks good! I will give it a try a bit later today. I'm planning to do some more refactoring on BYON as part of WHIRR-494.

        Show
        Andrei Savu added a comment - Thanks Karel. Looks good! I will give it a try a bit later today. I'm planning to do some more refactoring on BYON as part of WHIRR-494 .
        Hide
        Andrei Savu added a comment -

        Committed to trunk. Thanks Karel!

        Show
        Andrei Savu added a comment - Committed to trunk. Thanks Karel!

          People

          • Assignee:
            Karel Vervaeke
            Reporter:
            Karel Vervaeke
          • Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development