ebpf-lab

Example code from Learning eBPF by Liz Rice, https://github.com/lizrice/learning-ebpf
git clone https://git.in0rdr.ch/ebpf-lab.git
Log | Files | Refs | Pull requests |Archive | README

libvirt-centos9.pkr.hcl (1299B)


      1 variable "manifest" {
      2   type    = string
      3   default = "manifest.json"
      4 }
      5 
      6 source "qemu" "centos9" {
      7   accelerator      = "kvm"
      8   boot_command     = ["<up><tab> rd.shell ip=dhcp inst.cmdline inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter>"]
      9   boot_wait        = "5s"
     10   cpu_model        = "host"
     11   disk_interface   = "virtio"
     12   disk_size        = "14000"
     13   memory           = "4096"
     14   cpus             = "2"
     15   net_device       = "virtio-net"
     16   format           = "qcow2"
     17   http_directory   = "config"
     18   iso_checksum     = "file:https://linuxsoft.cern.ch/centos-stream/9-stream/BaseOS/x86_64/iso/CentOS-Stream-9-latest-x86_64-boot.iso.SHA256SUM"
     19   iso_url          = "https://linuxsoft.cern.ch/centos-stream/9-stream/BaseOS/x86_64/iso/CentOS-Stream-9-latest-x86_64-boot.iso"
     20   shutdown_command = "echo 'packer' | sudo -S shutdown -P now"
     21   ssh_timeout      = "20m"
     22   ssh_username     = "root"
     23   ssh_password     = "root"
     24   vm_name          = "centos9-${formatdate("YYYYMMDD-hhmmss", timestamp())}.qcow2"
     25   output_directory = "output/centos9-${formatdate("YYYYMMDD-hhmmss", timestamp())}"
     26 }
     27 
     28 build {
     29   sources = ["source.qemu.centos9"]
     30 
     31   provisioner "shell" {
     32     script = "scripts/ebpf-lab.sh"
     33   }
     34 
     35   post-processor "manifest" {
     36     output     = "${var.manifest}"
     37     strip_path = true
     38   }
     39 }