Publish Packer-built images to Azure Shared Image Gallery
ฝัง
- เผยแพร่เมื่อ 11 ก.ย. 2024
- EPISODE 11
Use a Shared Image Gallery to publish Packer-built Virtual Machine images, track version history, and replicate across Azure regions.
Follow me on Twitter for quick code snippets and thoughts on Cloud, Automation and other things!
/ marktinderholt
Keep the knowledge flowing!
www.buymeacoff...
Source Code:
github.com/mar...
Azure ARM Packer Builder
developer.hash...
Azure ARM Resources Provider
registry.terra...
v3.41.0
registry.terra...
Additional Providers:
- Random Provider (registry.terra...)
Terraform Resource List:
- random_string
- azurerm_resource_group
- azurerm_shared_image_gallery
- azurerm_shared_image
Azure Resource Naming Conventions
learn.microsof...
I think I know the answer to this question but: Shared Image Gallery = Azure Compute Gallery, right? It's just the silly rename on the backend that changed. I see Packer docs still ref it as Shared Image Gallery.
Yes you are right. There have been several name changes! Hard to keep track! 🤣😵
Thanks for the informative video, as always. To me, it's quite confusing in general what the Azure Compute Gallery expects to exist before Packer builds an image.
Especially, that there are notions of Azure Image Template, Image Definition, Image, Image Version... not too difficult to get lost in the chicken-egg issue :)
Yes. It is a bit confusing. Since Packer is platform agnostic, its responsibility starts and ends with the machine image. They are very strict about this boundary. (No cheating! 🤣) This means any platform specific stuff needs to be setup before packer can run. When using an Azure Compute Gallery, you have a bunch of Azure-specific organizational stuff sitting on top of the image. Ultimately the image is just created as a “version” within an image definition. Therefore, you need to have the gallery and the image definition in place before packer can produce an image.
@@azure-terraformer Thank you for this explanation. Good stuff!
Glad it helped!
Where I can get the code for this? Please provide github link
source code is linked in the video's description mate!