Getting Started with Packer and Terraform on Azure!

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ต.ค. 2024
  • EPISODE 9
    Lot's to cover in this episode covering the basics of Packer and Terraform on Azure. Demonstrates how to setup a Packer HCL project and use it from a Terraform project to provision Virtual Machines using your own custom images!
    Build two Virtual Machine images with Packer. One for both Linux and Windows.
    Use Terraform to setup a Packer Image repository.
    Create reusable Terraform modules for provisioning a simple Linux and Windows Virtual Machines.
    Create reusable Terraform module for provisioning a simple network to host your VMs.
    Reference your Packer VM Images, deploy your VMs and connect to them using SSH and RDP!
    Keep the knowledge flowing!
    www.buymeacoff...
    Source Code:
    github.com/mar...
    Azure ARM Packer Builder
    developer.hash...
    Azure ARM Terraform Provider
    registry.terra...
    Terraform Resource List:
    random_string
    azurerm_resource_group
    azurerm_virtual_network
    azurerm_bastion_host
    azurerm_linux_virtual_machine
    azurerm_windows_virtual_machine
    Azure Resource Naming Conventions
    learn.microsof...

ความคิดเห็น • 12

  • @marsamuk
    @marsamuk ปีที่แล้ว +2

    How will this work with Azure DevOps? Can we automate all using a pipeline? Trying to understand how the workflow will look like when using terraform and packer with Azure DevOps. Thanks

    • @azure-terraformer
      @azure-terraformer  ปีที่แล้ว +4

      Great question! I cover these scenarios a lot on my channel. Here are a couple episodes you should check out next!
      In Episode 13, I show how to create a Terraform pipeline in Azure DevOps. th-cam.com/video/wv81bhcGcMw/w-d-xo.html
      In Episode 14, I show how to create a Packer build pipeline in Azure DevOps. th-cam.com/video/v1VjhwQ4KCQ/w-d-xo.html
      In the Minecraft series (Episodes 16 - 24) I show how to combine Packer and Terraform together using Azure DevOps to automate both Packer to build images and Terraform to provision an environment in Azure referencing those images. th-cam.com/play/PLsOrrjBMkLaRXWri2EvqLAUKWJI7TH0kH.html

  • @mloskot
    @mloskot ปีที่แล้ว +1

    Hi again, lately I've been thinking of how to share configuration between Terraform and Packer. For example, I create Azure Compute Gallery (aka SIG) using Terraform code which I parametrise with resource group, gallery name, names of images (definitions). Then, I use Packer to build and publish particular VM image version. Obviously, Packer needs to know the names of resource group, gallery, image (i.e. parameters of shared_image_gallery_destination). I wonder, do you have any solution to share those or read those from Terraform outputs dynamically?

    • @azure-terraformer
      @azure-terraformer  11 หลายเดือนก่อน +1

      Tackling this in an upcoming mailbag video! Sorry for the delay!

    • @mloskot
      @mloskot 11 หลายเดือนก่อน +1

      @@azure-terraformer Thank you!

    • @azure-terraformer
      @azure-terraformer  11 หลายเดือนก่อน

      I am here to serve 😊

  • @NamronYoutube
    @NamronYoutube 8 หลายเดือนก่อน +1

    Hey @azure-terraformer I'm trying to follow along this great video you provided. When I let packer create the windows image I get an error because Chocolatey also installs .NET Framework 4.8 , but a reboot is required which can't be performed. How would you mitigate such a behavior in a real life scenario? The rest seems to be working. I'm big fan of your work and the effort you put in.

    • @azure-terraformer
      @azure-terraformer  8 หลายเดือนก่อน

      Thanks so much for the kind words! Packer does have an action that allows you to reboot the machine. But it is pretty tricky working with it!

    • @NamronYoutube
      @NamronYoutube 8 หลายเดือนก่อน +1

      @@azure-terraformer okay maybe I find something in the documentation about it. My new years resolution was to do more with terraform this year, so I’m working through your content and time flies by…

    • @azure-terraformer
      @azure-terraformer  8 หลายเดือนก่อน

      Happy Terraforming!

  • @mloskot
    @mloskot ปีที่แล้ว +1

    Cheers! The source code link points to the /008 and not /009 folder

    • @azure-terraformer
      @azure-terraformer  ปีที่แล้ว +1

      Thanks for the help! I’ve updated the link. Appreciate it!