Getting Started with Packer and Terraform on Azure!

Поделиться
HTML-код
  • Опубликовано: 1 мар 2023
  • 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.buymeacoffee.com/azterraf...
    Source Code:
    github.com/markti/azure-terra...
    Azure ARM Packer Builder
    developer.hashicorp.com/packe...
    Azure ARM Terraform Provider
    registry.terraform.io/provide...
    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.microsoft.com/en-us/azu...
  • НаукаНаука

Комментарии • 12

  • @user-qt2ez9md2b
    @user-qt2ez9md2b 5 месяцев назад +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  5 месяцев назад

      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!

    • @user-qt2ez9md2b
      @user-qt2ez9md2b 5 месяцев назад +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  5 месяцев назад

      Happy Terraforming!

  • @mloskot
    @mloskot 9 месяцев назад +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  8 месяцев назад +1

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

    • @mloskot
      @mloskot 8 месяцев назад +1

      @@azure-terraformer Thank you!

    • @azure-terraformer
      @azure-terraformer  8 месяцев назад

      I am here to serve 😊

  • @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  Год назад +3

      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. ruclips.net/video/wv81bhcGcMw/видео.html
      In Episode 14, I show how to create a Packer build pipeline in Azure DevOps. ruclips.net/video/v1VjhwQ4KCQ/видео.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. ruclips.net/p/PLsOrrjBMkLaRXWri2EvqLAUKWJI7TH0kH

  • @mloskot
    @mloskot 10 месяцев назад +1

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

    • @azure-terraformer
      @azure-terraformer  10 месяцев назад +1

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