Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Building Blocks of Infrastructure Lifecycle...

The Building Blocks of Infrastructure Lifecycle Management

In this presentation, Jenna Goldstrick and I explain how to implement an Infrastructure Lifecycle Management workflow using HashiCorp Terraform and Packer.

This version of the talk was given at HashiConf Boston, in October 2024.

Avatar for Kerim Satirli

Kerim Satirli

October 15, 2024

More Decks by Kerim Satirli

Other Decks in Technology

Transcript

  1. The building blocks of Infrastructure Lifecycle Management Kerim Satirli Jenna

    Goldstrich Sr. Developer Advocate Infrastructure & Orchestration Sr. Software Engineer Packer & HCP Packer
  2. Can you fix this Workspace? Looks like a new vuln.

    Can you fix? Greetings from HashiConf! app.terraform.io/app/HashiCafe-inc/explorer/views HCP Terraform Change Request
  3. gapcloser.pkr.hcl Terraform Resources data "hcp_packer_artifact" "gapcloser" { bucket_name = "gapcloser"

    platform = "docker" region = "docker" channel_name = "production" } resource "nomad_job" "gapcloser_scraper" { jobspec = templatefile("${path.module}/gapcloser.nomad.hcl", { CONTAINER_IMAGE = data.hcp_packer_artifact.gapcloser.external_identifier SCRAPER_PROFILE = "code" }) }
  4. source "docker" "gapcloser-scraper" { image = data.hcp-packer-artifact.nodejs-base.labels["ImageDigest"] commit = true

    platform = "linux/amd64" exec_user = "gapcloser:gapcloser" } build { hcp_packer_registry { bucket_name = "gapcloser-scraper" } sources = [ "source.docker.gapcloser-scraper" ] provisioner "file" { source = "./app" destination = "/app" } Packer template service_gapcloser.tf
  5. } sources = [ "source.docker.gapcloser-scraper" ] provisioner "file" { source

    = "./app" destination = "/app" } post-processors { post-processor "docker-tag" { repository = var.registry_host tags = concat(var.extra_tags, [ local.timestamp_cleaned, "latest" ]) } post-processor "docker-push" { ecr_login = true login_server = var.registry_host } Packer template service_gapcloser.tf
  6. source "docker" "gapcloser-scraper" { image = data.hcp-packer-artifact.nodejs-base.labels["ImageDigest"] commit = true

    platform = "linux/amd64" exec_user = "gapcloser:gapcloser" } build { hcp_packer_registry { bucket_name = "gapcloser-scraper" } sources = [ "source.docker.gapcloser-scraper" ] provisioner "file" { source = "./app" destination = "/app" } Packer template service_gapcloser.tf
  7. github.com/hashicorp-forge/gapcloser-scrapers/compare/main...fix_vuln_issue Opening a PR Fix Vulnerability in Scraper application I

    got a request from Kerim to patch this dependency, this PR updates one of our core dependancies that was vulnerable to a CVE described in this ticket here please approve ASAP to mitigate this vulnerability in this image.
  8. service_gapcloser.tf Terraform Resources data "hcp_packer_artifact" "gapcloser" { bucket_name = "gapcloser"

    platform = "docker" region = "docker" channel_name = "production" } resource "nomad_job" "gapcloser_scraper" { jobspec = templatefile("${path.module}/gapcloser.nomad.hcl", { CONTAINER_IMAGE = data.hcp_packer_artifact.gapcloser.external_identifier SCRAPER_PROFILE = "code" }) }
  9. People Foundational processes enable a better understanding of our infrastructure

    through basic monitoring and modularization. Adopt Standardized workflows unlock consistency and compliance through guardrails and codified best-practice patterns. Standardize Cross-stack architecture enables guided and self- service deployments that empower teams to scale. Scale Summary
  10. Learn More AI workloads with Nomad and NVIDIA Today at

    04:15 pm Level 5, West Prefunction Empowering Platform teams Today at 12:00 pm Level 2, Ensemble Ballroom