Skip to content

Commit

Permalink
add manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
ajanis committed May 10, 2024
1 parent 8dfa7e2 commit 290453e
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions cableos/cableos-installer.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ build {
// Post-processors to create new images and prepare for MAAS

// Create tar.gz file

post-processor "shell-local" {
inline = [
"IMG_FMT=qcow2",
Expand All @@ -173,19 +172,26 @@ build {
inline_shebang = "/bin/bash -e"
}

// Create .qcow and .iso images
post-processor "qemu" {
only = ["qemu"]
output = "output-cableos-installer/${base_filename}.qcow"
format = "qcow2"
disk_interface = "virtio"
// Create manifest of packer objects
post-processor "manifest" {
output = "manifest.json"
strip_path = true
}
post-processor "shell-local" {
inline = [
"qemu-img convert -f qcow2 -O raw output-cableos-installer/${base_filename}.qcow output-cableos-installer/${base-filename}.img",
"maas admin boot-resources create name=custom/new name_title='New Image' architecture=amd64/generic content@=new.img",
"echo 'Packer Provisioning Complete'"

]
}

# // Create .qcow and .iso images
# post-processor "qemu" {
# only = ["qemu"]
# output = "output-cableos-installer/${base_filename}.qcow"
# format = "qcow2"
# disk_interface = "virtio"
# }
# post-processor "shell-local" {
# inline = [
# "qemu-img convert -f qcow2 -O raw output-cableos-installer/${base_filename}.qcow output-cableos-installer/${base-filename}.img",
# "maas admin boot-resources create name=custom/new name_title='New Image' architecture=amd64/generic content@=new.img",
# "echo 'Packer Provisioning Complete'"

# ]
# }
}

0 comments on commit 290453e

Please sign in to comment.