solo-io / packer-plugin-arm-image

Packer plugin for ARM images
Apache License 2.0
425 stars 104 forks source link

Checksum file is missing #116

Closed monester closed 3 years ago

monester commented 3 years ago

I've created a simple packer template file with following context:

packer {
  required_plugins {
    arm-image = {
      version = ">= 0.2.1"
      source  = "github.com/solo-io/arm-image"
    }
  }
}

But after running packer init I'm getting this error:

> packer version
Packer v1.7.6
> packer init .
could not get sha256 checksum file for github.com/solo-io/arm-image version 0.2.1. Is the file present on the release and correctly named ? GET https://github.com/solo-io/packer-plugin-arm-image/releases/download/v0.2.1/packer-plugin-arm-image_v0.2.1_SHA256SUMS: 404  []

Do I miss something?

yuval-k commented 3 years ago

i wasn't aware of this distribution method; i will look into adding this file

yuval-k commented 3 years ago

also the source is not github.com/solo-io/arm-image but github.com/solo-io/packer-plugin-arm-image nvm, it can be both ways

monester commented 3 years ago

packer on init says that repo should not include packer-plugin:

Error: Invalid plugin type

  on ubuntu.json.pkr.hcl line 3, in packer:
   3:     arm-image = {
   4:       version = ">= 0.2.1"
   5:       source = "github.com/solo-io/packer-plugin-arm-image"
   6:     }

Plugin source "github.com/solo-io/arm-image" has a type with the prefix
"packer-plugin-", which isn't valid. Although that prefix is often used in the
names of version control repositories for Packer plugins, plugin source strings
should not include it.

Did you mean "github.com/solo-io/arm-image"?
yuval-k commented 3 years ago

makes sense @monester , this is new to me, so I hope to fix this in the next few days

eaglesemanation commented 3 years ago

@yuval-k I was intending on working on that next. There is some information on new plugin distribution process, but to put it simply all changes that need to be done are:

This repo provides good baseline automation for this deployment, we could at least copy some steps from it

yuval-k commented 3 years ago

@yuval-k I was intending on working on that next. There is some information on new plugin distribution process, but to put it simply all changes that need to be done are:

  • Change naming of released binary to be {{ .ProjectName }}_v{{ .Version }}_{{ .Env.API_VERSION }}_{{ .Os }}_{{ .Arch }}, where API_VERSION is result of $(go run . describe | jq -r '.api_version')
  • Add SHA256SUM file with name in form of {{ .ProjectName }}_v{{ .Version }}_SHA256SUMS

This repo provides good baseline automation for this deployment, we could at least copy some steps from it

Thanks! Copying from that repo makes sense. I think to make this really work smoothly we can also auto download the qemu binary, combined with your losetup PR will make the plugin run on any modern distro with no extra steps.

I hope to have a PR up soon

yuval-k commented 3 years ago

ok this should be solved starting v0.2.5 (I confirmed it works, just change your version to v0.2.5) do note that you still need to be root to run this plug-in (see the main readme doc for more info).

please re-open if there are it is still a problem