-
Notifications
You must be signed in to change notification settings - Fork 53
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
Build Azure images with Packer #341
Comments
Blocked until we can get API keys for the client, our accounts are just not valid to access directly |
Api keys obtained. We cannot currently build azure images because we are missing the user-data input from linuxkit as its stuck upstream in limbo linuxkit/linuxkit#3585 Currently booting manually works, executing the user-data manually also seems to work, so once we fix that metadata issue, we should be able to automate the packer templates. I will send a draft PR Note: We may have issues with the custom_data VS user_data. Packer currently supports custom_data ONLY. So we may need to send a patch upstream to support user_data as well in the packer builder if we cannot use the custom_data properly. |
Draft PR: #412 |
Blocked due to user-data: #355 |
Thanks to @davidcassany yip has now support for the azure metadata. Tested and the metadata ends up in the proper place. Unfortunately packer does not support user data only custom data which is passed during provisioning and requires cloud-init or waagent to process....¬_¬ Seems like an issue + PR is required to the https://github.com/hashicorp/packer-plugin-azure repo to support using user-data 😩 |
yikes, seems like upstream azure-sdk did not support userdata until....01/03/2021 -> https://github.com/Azure/azure-sdk-for-go/blob/main/services/compute/mgmt/2021-03-01/compute/models.go The api packer is using is currently....2018-04-01 Like its gonna be a hard sell to send an update upstream for this... |
Looks like its easy to implement actually :O will send a patch upstream to support user_data and see what they think about |
opened hashicorp/packer-plugin-azure#122 and sent hashicorp/packer-plugin-azure#121 tested locally with that patch and it works as expected :o |
Templates are ready and pushed. They work, I have build and image based of the vanilla image. Unfortunately I dont think images are shareable so derivatives will need to upload their own vanilla image and then build from there. We could also make the bucket where we store the images publicy accessible so they can create recovery images from there but I dunno, something to discuss. There is this shared image gallery but I have no idea how that works anyway :D #412 missing the docs |
I've pinged upstream maintainers here hashicorp/packer-plugin-azure#123 (comment). let's see what happens |
Follow up opened hashicorp/packer-plugin-azure#131 |
Azure docs seems quite confusing in this regard, here I read that Images in the shared gallery should be generalized first: https://docs.microsoft.com/en-us/azure/virtual-machines/shared-image-galleries#generalized-and-specialized-images which seems to involve
There are also other docs at https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/virtual-machines/windows/capture-image-resource.md to turn a generalized image into a managed one, which seems to be required in order to have that published in the shared gallery |
Opened #341 to dig into the shared image gallery as a separate story |
* Align install, reset and upgrade hooks * Set upgrade hooks constants Signed-off-by: David Cassany <dcassany@suse.com>
This card is about having a packer template for Azure by using an image created by #235
Additional context
Part of #208
Requirements
The text was updated successfully, but these errors were encountered: