Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using AMIs built for architectures other than amd64 #202

Open
ldx opened this issue Jan 7, 2021 · 4 comments
Open

Allow using AMIs built for architectures other than amd64 #202

ldx opened this issue Jan 7, 2021 · 4 comments
Assignees

Comments

@ldx
Copy link
Contributor

ldx commented Jan 7, 2021

Right now kip can only use one AMI specified via bootImageSpec in provider.yaml.

However, AMIs are specific to the OS and CPU architecture. To support other architectures and OSes (ARM, mac1, etc) we need to be able to specify a boot image filter for each.

@jrroman jrroman self-assigned this Jan 7, 2021
@hidalgopl
Copy link
Contributor

hidalgopl commented Jan 11, 2021

@ldx @jrroman @henryprecheur What you guys think of having something really generic, such as:

bootImageSpec:
    amis:
      - familyRegex: "mac.*"
        owners: 689494258501
        filters: name=elotl-kip-mac*
      - familyRegex: "*" # default
        owners: 689494258501
        filters: name=elotl-kip-*

@jrroman
Copy link
Contributor

jrroman commented Jan 11, 2021

@hidalgopl so the issue i see with this is it will break reverse compatibility with previous releases of kip. We could potentially add this for additional ami fields while keeping the base of owner and filter. This is the way i have been testing currently:

 16   bootImageSpec:
 17     owners: 689494258501
 18     filters: name=elotl-kip-*
 19     macfilters: name=elotl-kipmac-*
 20     armfilters: name=elotl-kiparm-*

I do however think what you have described is very clear contextually and intuitive.

@hidalgopl
Copy link
Contributor

@jrroman You're right, I haven't thought about it. We can keep backwards compatibility by keeping what I proposed under new key:

bootImageSpec:
     owners: 689494258501
     filters: name=elotl-kip-*
     overrideAMI:
      - familyRegex: "mac.*"
        owners: 689494258501
        filters: name=elotl-kip-mac*
     - familyRegex: "*" # default
       owners: 689494258501
       filters: name=elotl-kip-*

Big question is how flexible this feature needs to be. And whether we want to have different AMI for different arch, or different AMI for different instance type familiy.
For our current needs keys you added are fully sufficient. However, if ever we want to be able to have different AMI for different instance type/family, introducing changes would be tricky if we already have feature that chooses AMI based on arch.

@hidalgopl hidalgopl added this to the mac1.metal support milestone Jan 11, 2021
@ldx
Copy link
Contributor Author

ldx commented Jan 12, 2021

@jrroman You're right, I haven't thought about it. We can keep backwards compatibility by keeping what I proposed under new key:

bootImageSpec:
     owners: 689494258501
     filters: name=elotl-kip-*
     overrideAMI:
      - familyRegex: "mac.*"
        owners: 689494258501
        filters: name=elotl-kip-mac*
     - familyRegex: "*" # default
       owners: 689494258501
       filters: name=elotl-kip-*

Big question is how flexible this feature needs to be. And whether we want to have different AMI for different arch, or different AMI for different instance type familiy.
For our current needs keys you added are fully sufficient. However, if ever we want to be able to have different AMI for different instance type/family, introducing changes would be tricky if we already have feature that chooses AMI based on arch.

bootImageSpec is a map[string]string, so making some values in the map lists or other data structures would break compatibility. I think an architecture prefix to keys should be a good first shot without adding too much complexity. We should get a canonical list of architectures and use those (i.e. same ones AWS uses in describe-images, e.g. x86_64, x86_64_mac, etc). So an example bootImageSpec might look like:

bootImageSpec:
  owners: 123456789
  x86_64-filters: name=elotl-kip-*
  x86_64_mac-filters: name=elotl-kip-mac-*

We can keep the current keys (filters, owners, etc) for backward compatibility.

Another missing piece: an instance family -> architecture mapping, so we know which architecture we need when starting an instance.

@henryprecheur henryprecheur self-assigned this Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants