UpCloudLtd / packer-plugin-upcloud

A suite of Packer plugins for provisioning UpCloud servers
https://github.com/UpCloudLtd/packer-plugin-upcloud
MIT License
4 stars 7 forks source link

Error: Unknown source type upcloud #6

Closed bbros-dev closed 3 years ago

bbros-dev commented 3 years ago

Using a HCL2 definition and Packer v1.7.2, after successful packer init init.pkr.hcl for the upcloud plugin:

$ packer build ....
* permission denied                                                                  
Error: Unknown source type upcloud                                                   

  on  line 0:                                                                        
  (source code not available)                                                        

known builders: [osc-bsusurrogate virtualbox-ovf lxd oracle-classic vmware-vmx       
azure-chroot proxmox-iso virtualbox-vm amazon-chroot null alicloud-ecs               
proxmox-clone amazon-ebs cloudstack vsphere-clone profitbricks hyperv-vmcx
vmware-iso openstack triton hyperone linode amazon-ebssurrogate ncloud
digitalocean oracle-oci azure-dtl hyperv-iso osc-chroot parallels-iso proxmox
amazon-ebsvolume qemu docker googlecompute hcloud vsphere-iso vagrant jdcloud
osc-bsu amazon-instance scaleway tencentcloud-cvm ucloud-uhost yandex file
parallels-pvm osc-bsuvolume lxc oneandone virtualbox-iso azure-arm]

UpCloud is not a known builder?

bbros-dev commented 3 years ago

Here the issue is two fold:

  1. The plugin error message should state how to remedy the error.
  2. The README.md doc should be updated to reflect the fact a required_plugins stanza is required not just to use packer init but also required to use packer build.
maxfrei commented 3 years ago
  1. This is not a plugin error, it's Packer error. That Packer not able to find upcloud plugin. You wrote:

    $ packer build ....

    I guess that for a build you used not init.pkr.hcl that you used for packer init. And that config was missing:

    packer {
    required_plugins {
        upcloud = {
            version = ">=v1.0.0"
            source = "github.com/UpCloudLtd/upcloud"
        }
    }
    }

    Am I right?

  2. Updated readme.

bbros-dev commented 3 years ago

There is a whole shmozzle around plugins. it impacts what isntructions you give. Digging up the Packer issue .... #11028 and #11020

If you carefully review what is said by upstream in those issues, and in the PR, I think you'll agree the whole set of upcloud plugin upgrade instructions needs to be more careful revisited.