Code Monkey home page Code Monkey logo

packer-plugin-linode's Introduction

Packer Plugin Linode

The Linode multi-component plugin can be used with HashiCorp Packer to create custom images. For the full list of available features for this plugin see docs.

Installation

Using pre-built releases

Using the packer init command

Starting from version 1.7, Packer supports a new packer init command allowing automatic installation of Packer plugins. Read the Packer documentation for more information.

To install this plugin, copy and paste this code into your Packer configuration . Then, run packer init.

packer {
  required_plugins {
    linode = {
      version = ">= 1.0.2"
      source  = "github.com/linode/linode"
    }
  }
}

Manual installation

You can find pre-built binary releases of the plugin here. Once you have downloaded the latest archive corresponding to your target OS, uncompress it to retrieve the plugin binary file corresponding to your platform. To install the plugin, please follow the Packer documentation on installing a plugin.

From Sources

If you prefer to build the plugin from sources, clone the GitHub repository locally and run the command go build from the root directory. Upon successful compilation, a packer-plugin-linode plugin binary file can be found in the root directory. To install the compiled plugin, please follow the official Packer documentation on installing a plugin.

Configuration

For more information on how to configure the plugin, please read the documentation located in the docs/ directory.

Contribution Guidelines

Want to improve [packer-plugin-linode]? Please start here.

packer-plugin-linode's People

Contributors

andrewsomething avatar azr avatar cbednarski avatar dependabot[bot] avatar dimtion avatar edouardb avatar gmmephisto avatar jengoldstrich avatar jescalan avatar jriddle-linode avatar kelseyhightower avatar lbajolet-hashicorp avatar lgarber-akamai avatar miry avatar mitchellh avatar modrake avatar mwhooker avatar nayyara-cropsey avatar nywilken avatar pearkes avatar rasa avatar rickard-von-essen avatar rizkybiz avatar swampdragons avatar sylviamoss avatar tkrisko avatar williamb1024 avatar yec-akamai avatar ykim-1 avatar zliang-akamai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

packer-plugin-linode's Issues

[Bug]: Tags are not applied when building using Packer

tags

Packer Version

v1.10.2

Packer Plugin Linode Version

v1.4.1

Expected Behavior

VM tags are not applied to the VM when building using Packer.

source "linode" "example" {
  image             = "linode/ubuntu22.04"
  image_description = "This image was created using Packer."
  image_label       = "test-image-${local.timestamp}"
  instance_label    = "temp-packer-debian-10"
  instance_type     = "g6-nanode-1"
  linode_token      = "${var.linode_api_token}"
  region            = "nl-ams"
  ssh_username      = "root"
  instance_tags     = ["foo"]
 
}

Actual Behavior

Command output:

packer build .
linode.example: output will be in this color.

==> linode.example: Running builder ...
==> linode.example: Creating temporary SSH key for instance...
==> linode.example: Creating Linode...
==> linode.example: Using SSH communicator to connect: 172.233.51.105
==> linode.example: Waiting for SSH to become available...
==> linode.example: Connected to SSH!
==> linode.example: Provisioning with shell script: /tmp/packer-shell3435650164
    linode.example: Adding file to Docker Container
==> linode.example: Shutting down Linode...
==> linode.example: Creating image...

Build is done successfully, but tags are not being applied to the VM (screenshot attached)

Steps to Reproduce

Specify VM tags using "instance_tags"

source "linode" "example" {
  image             = "linode/ubuntu22.04"
  image_description = "This image was created using Packer."
  image_label       = "test-image-${local.timestamp}"
  instance_label    = "temp-packer-debian-10"
  instance_type     = "g6-nanode-1"
  linode_token      = "${var.linode_api_token}"
  region            = "nl-ams"
  ssh_username      = "root"
  instance_tags     = ["foo"]
 
}

Error Output

No error output. Tags are not being applied.

[Bug]: OAuth error with plugin versions > 1.0.5

Packer Version

v1.9.4

Packer Plugin Linode Version

v1.1.3

Expected Behavior

When building an image using plugin greater than 1.0.5 its failing using an existing token created a few years ago, i would expect the image to build successfully.

I am setting linode_token with a valid token that works in v1.0.5 if I go > than this version it fails

Actual Behavior

The behaviour I'm seeing is as follows

==> linode.test-game-server: Failed to create event poller: failed to run pretask: failed to list events: [401] Your OAuth token is not authorized to use this endpoint.
==> linode.test-game-server: Provisioning step had errors: Running the cleanup provisioner, if present...
Build 'linode.test-game-server' errored after 4 minutes 16 seconds: Failed to create event poller: failed to run pretask: failed to list events: [401] Your OAuth token is not authorized to use this endpoint.

Steps to Reproduce

Create an old api token on linode interface

Error Output

==> linode.test-game-server: Failed to create event poller: failed to run pretask: failed to list events: [401] Your OAuth token is not authorized to use this endpoint.
==> linode.test-game-server: Provisioning step had errors: Running the cleanup provisioner, if present...
Build 'linode.test-game-server' errored after 4 minutes 16 seconds: Failed to create event poller: failed to run pretask: failed to list events: [401] Your OAuth token is not authorized to use this endpoint.

[Bug]: Equal (=) sign is not being accepted as a tag value

Packer Version

v1.10.2

Packer Plugin Linode Version

v1.4.1

Expected Behavior

Tag which contains an equal sign are not being accepted as a valid character. Adding it via the API or web interface works without any issues.

Looks like the limitation comes from this regex -

tagRe := regexp.MustCompile("^[[:alnum:]:_-]{1,255}$")

source "linode" "example" {
  image             = "linode/ubuntu22.04"
  image_description = "This image was created using Packer."
  image_label       = "test-image-${local.timestamp}"
  instance_label    = "temp-packer-debian-10"
  instance_type     = "g6-nanode-1"
  linode_token      = "${var.linode_api_token}"
  region            = "nl-ams"
  ssh_username      = "root"
  instance_tags     = ["foo=bar"]
}

Actual Behavior

Error returned

Steps to Reproduce

Add a tag which contains = sign

source "linode" "example" {
  image             = "linode/ubuntu22.04"
  image_description = "This image was created using Packer."
  image_label       = "test-image-${local.timestamp}"
  instance_label    = "temp-packer-debian-10"
  instance_type     = "g6-nanode-1"
  linode_token      = "${var.linode_api_token}"
  region            = "nl-ams"
  ssh_username      = "root"
  instance_tags     = ["foo=bar"]
}

Error Output

Error: 1 error(s) occurred:

* invalid tag: foo=bar

  on linode.pkr.hcl line 1:
  (source code not available)

[Feature]: Add support to set instance config during creation.

Hi Guys,

I can't see a template for a feature / enhancement (I think it's broken according to github). So I'm sorry it's not following your expected format.

Description:

Please can we add the ability to set the instance config during packer initalization. When we are building packer images we are wanting to use GRUB2 as we would like to boot with your kernels during imaging, rather than Linode's. However, the Linode Packer integration does not allow you to set config specific variables.

As a result, we have to have a shell provisioner which runs before ansible, shuts down the instance and then reboots it. Instead, it would be much cleaner if we can get some (or all) of the linode config so that once it's booted we can get straight to work.

Use Case:

We build images, and run them, using the OS Kernel, not Linode's. This allows us to set it from boot instead of it being a post step. This is our last discrepency between Linode and AWS Image Building, which allows us to ensure that all image building works with both systems!

Thoughts:

I'm not sure if it would be best to make the config option a dictionary / object and just pass it straight through to the Linode API so it's always up to date, or if it's best to have specific config keys you would want to pass through.

You would need to launch the machine with it being powered off, change the config, and then power it on. Rather than trying to change the config once it had booted.

Many Thanks,
Tom Franklin.

Setting ssh_private_key_file fails with linode error

Overview of the Issue

I tried to set the ssh_private_key_file to make sure I can use the same SSH key after setting up a Linode with NixOS. First I tried using https://www.packer.io/docs/datasources/sshkey, then I tried using my own private key but they both fail.

Build 'linode.example' errored after 838 milliseconds 558 microseconds: Error creating Linode: [400] [authorized_keys] SSH Key 1 key-type must be ssh-dss, ssh-rsa, ecdsa-sha2-nistp, or ssh-ed25519.

Reproduction Steps

Use the linode example config, this still works:

locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") }

source "linode" "example" {
  image             = "linode/debian9"
  image_description = "My Private Image"
  image_label       = "private-image-${local.timestamp}"
  instance_label    = "temporary-linode-${local.timestamp}"
  instance_type     = "g6-nanode-1"
  linode_token      = "YOUR API TOKEN"
  region            = "us-east"
  ssh_username      = "root"
}

build {
  sources = ["source.linode.example"]
}

Now add any private key using the ssh_private_key_file option, as stated in the docs. Provisioning now fails.

Plugin and Packer version

Packer v1.7.3

packer-plugin-linode_v1.0.0_x5.0_darwin_amd64

Simplified Packer Buildfile

Reproducable build file
packer {
  required_plugins {
    linode = {
      version = ">= 0.0.1"
      source  = "github.com/hashicorp/linode"
    }
    sshkey = {
      version = ">= 0.1.0"
      source  = "github.com/ivoronin/sshkey"
    }
  }
}

locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") }


variable "linode_token" {
  type      = string
  sensitive = true
}

source "linode" "example" {
  image                = "linode/debian9"
  image_description    = "NixOS"
  image_label          = "nixos-${local.timestamp}"
  instance_label       = "packer-build-${local.timestamp}"
  instance_type        = "g6-standard-2"
  linode_token         = var.linode_token
  region               = "us-east"
  ssh_username         = "root"
  ssh_private_key_file = data.sshkey.install.private_key_path
}

data "sshkey" "install" {}

build {
  sources = ["source.linode.example"]
}

Operating system and Environment details

running from MacOS (but via nix), trying to install NixOS with NIXOS_LUSTRATE on a debian 9 base.

Log Fragments and crash.log files

Full logs
2021/07/20 18:03:20 [INFO] Packer version: 1.7.3 [go1.16.6 darwin amd64]
2021/07/20 18:03:20 [TRACE] discovering plugins in /nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin
2021/07/20 18:03:20 [TRACE] discovering plugins in /Users/jelle/.packer.d/plugins
2021/07/20 18:03:20 [TRACE] discovering plugins in .
2021/07/20 18:03:20 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/07/20 18:03:20 [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/jelle/.packerconfig
2021/07/20 18:03:20 [WARN] Config file doesn't exist: /Users/jelle/.packerconfig
2021/07/20 18:03:20 [INFO] Setting cache directory: /Users/jelle/dev/projects/peertube-saas/nixos-packer/packer_cache
2021/07/20 18:03:20 [TRACE] init: plugingetter.ListInstallationsOptions{FromFolders:[]string{"/nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer", ".", "/Users/jelle/.packer.d/plugins"}, BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"darwin", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc000086480)}}}}
2021/07/20 18:03:20 [TRACE] listing potential installations for "github.com/hashicorp/linode" that match ">= 0.0.1". plugingetter.ListInstallationsOptions{FromFolders:[]string{"/nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer", ".", "/Users/jelle/.packer.d/plugins"}, BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"darwin", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc000086480)}}}}
2021/07/20 18:03:20 [TRACE] for plugin github.com/hashicorp/linode found 1 matching installation(s)
2021/07/20 18:03:20 [TRACE] listing potential installations for "github.com/ivoronin/sshkey" that match ">= 0.1.0". plugingetter.ListInstallationsOptions{FromFolders:[]string{"/nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer", ".", "/Users/jelle/.packer.d/plugins"}, BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"darwin", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc000086480)}}}}
2021/07/20 18:03:20 [TRACE] for plugin github.com/ivoronin/sshkey found 1 matching installation(s)
2021/07/20 18:03:20 [INFO] (telemetry) Finalizing.
2021/07/20 18:03:20 waiting for all plugin processes to complete...
2021/07/20 18:03:21 [INFO] Packer version: 1.7.3 [go1.16.6 darwin amd64]
2021/07/20 18:03:21 [TRACE] discovering plugins in /nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin
2021/07/20 18:03:21 [TRACE] discovering plugins in /Users/jelle/.packer.d/plugins
2021/07/20 18:03:21 [TRACE] discovering plugins in .
2021/07/20 18:03:21 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/07/20 18:03:21 [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/jelle/.packerconfig
2021/07/20 18:03:21 [WARN] Config file doesn't exist: /Users/jelle/.packerconfig
2021/07/20 18:03:21 [INFO] Setting cache directory: /Users/jelle/.cache/packer
2021/07/20 18:03:21 [TRACE] listing potential installations for "github.com/hashicorp/linode" that match ">= 0.0.1". plugingetter.ListInstallationsOptions{FromFolders:[]string{"/nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer", ".", "/Users/jelle/.packer.d/plugins"}, BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"darwin", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc000086600)}}}}
2021/07/20 18:03:21 [TRACE] Found the following "github.com/hashicorp/linode" installations: [{/Users/jelle/.packer.d/plugins/github.com/hashicorp/linode/packer-plugin-linode_v1.0.0_x5.0_darwin_amd64 v1.0.0}]
2021/07/20 18:03:21 [INFO] found external [-packer-default-plugin-name-] builders from linode plugin
2021/07/20 18:03:21 [TRACE] listing potential installations for "github.com/ivoronin/sshkey" that match ">= 0.1.0". plugingetter.ListInstallationsOptions{FromFolders:[]string{"/nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer", ".", "/Users/jelle/.packer.d/plugins"}, BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"darwin", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc000086600)}}}}
2021/07/20 18:03:21 [TRACE] Found the following "github.com/ivoronin/sshkey" installations: [{/Users/jelle/.packer.d/plugins/github.com/ivoronin/sshkey/packer-plugin-sshkey_v0.1.0_x5.0_darwin_amd64 v0.1.0}]
2021/07/20 18:03:21 found external [-packer-default-plugin-name-] datasource from sshkey plugin
2021/07/20 18:03:21 [TRACE] validateValue: not active for linode_token, so skipping
2021/07/20 18:03:21 [TRACE] validateValue: not active for nixos_version, so skipping
2021/07/20 18:03:21 [TRACE] Starting external plugin /Users/jelle/.packer.d/plugins/github.com/ivoronin/sshkey/packer-plugin-sshkey_v0.1.0_x5.0_darwin_amd64 start datasource -packer-default-plugin-name-
2021/07/20 18:03:21 Starting plugin: /Users/jelle/.packer.d/plugins/github.com/ivoronin/sshkey/packer-plugin-sshkey_v0.1.0_x5.0_darwin_amd64 []string{"/Users/jelle/.packer.d/plugins/github.com/ivoronin/sshkey/packer-plugin-sshkey_v0.1.0_x5.0_darwin_amd64", "start", "datasource", "-packer-default-plugin-name-"}
2021/07/20 18:03:21 Waiting for RPC address for: /Users/jelle/.packer.d/plugins/github.com/ivoronin/sshkey/packer-plugin-sshkey_v0.1.0_x5.0_darwin_amd64
2021/07/20 18:03:21 packer-plugin-sshkey_v0.1.0_x5.0_darwin_amd64 plugin: 2021/07/20 18:03:21 Plugin address: unix /tmp/packer-plugin602722078
2021/07/20 18:03:21 packer-plugin-sshkey_v0.1.0_x5.0_darwin_amd64 plugin: 2021/07/20 18:03:21 Waiting for connection...
2021/07/20 18:03:21 Received unix RPC address for /Users/jelle/.packer.d/plugins/github.com/ivoronin/sshkey/packer-plugin-sshkey_v0.1.0_x5.0_darwin_amd64: addr is /tmp/packer-plugin602722078
2021/07/20 18:03:21 packer-plugin-sshkey_v0.1.0_x5.0_darwin_amd64 plugin: 2021/07/20 18:03:21 Serving a plugin connection...
2021/07/20 18:03:21 packer-plugin-sshkey_v0.1.0_x5.0_darwin_amd64 plugin: 2021/07/20 18:03:21 [TRACE] starting datasource -packer-default-plugin-name-
2021/07/20 18:03:21 [TRACE] Starting external plugin /Users/jelle/.packer.d/plugins/github.com/hashicorp/linode/packer-plugin-linode_v1.0.0_x5.0_darwin_amd64 start builder -packer-default-plugin-name-
2021/07/20 18:03:21 Starting plugin: /Users/jelle/.packer.d/plugins/github.com/hashicorp/linode/packer-plugin-linode_v1.0.0_x5.0_darwin_amd64 []string{"/Users/jelle/.packer.d/plugins/github.com/hashicorp/linode/packer-plugin-linode_v1.0.0_x5.0_darwin_amd64", "start", "builder", "-packer-default-plugin-name-"}
2021/07/20 18:03:21 Waiting for RPC address for: /Users/jelle/.packer.d/plugins/github.com/hashicorp/linode/packer-plugin-linode_v1.0.0_x5.0_darwin_amd64
2021/07/20 18:03:21 packer-plugin-linode_v1.0.0_x5.0_darwin_amd64 plugin: 2021/07/20 18:03:21 Plugin address: unix /tmp/packer-plugin264359411
2021/07/20 18:03:21 Received unix RPC address for /Users/jelle/.packer.d/plugins/github.com/hashicorp/linode/packer-plugin-linode_v1.0.0_x5.0_darwin_amd64: addr is /tmp/packer-plugin264359411
2021/07/20 18:03:21 packer-plugin-linode_v1.0.0_x5.0_darwin_amd64 plugin: 2021/07/20 18:03:21 Waiting for connection...
2021/07/20 18:03:21 packer-plugin-linode_v1.0.0_x5.0_darwin_amd64 plugin: 2021/07/20 18:03:21 Serving a plugin connection...
2021/07/20 18:03:21 packer-plugin-linode_v1.0.0_x5.0_darwin_amd64 plugin: 2021/07/20 18:03:21 [TRACE] starting builder -packer-default-plugin-name-
2021/07/20 18:03:21 [TRACE] Starting internal plugin packer-provisioner-file
2021/07/20 18:03:21 Starting plugin: /nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer []string{"/nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer", "plugin", "packer-provisioner-file"}
2021/07/20 18:03:21 Waiting for RPC address for: /nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer
2021/07/20 18:03:21 packer-provisioner-file plugin: [INFO] Packer version: 1.7.3 [go1.16.6 darwin amd64]
2021/07/20 18:03:21 packer-provisioner-file plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/07/20 18:03:21 packer-provisioner-file plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/jelle/.packerconfig
2021/07/20 18:03:21 packer-provisioner-file plugin: [WARN] Config file doesn't exist: /Users/jelle/.packerconfig
2021/07/20 18:03:21 packer-provisioner-file plugin: [INFO] Setting cache directory: /Users/jelle/.cache/packer
2021/07/20 18:03:21 packer-provisioner-file plugin: args: []string{"packer-provisioner-file"}
2021/07/20 18:03:21 Received unix RPC address for /nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer: addr is /tmp/packer-plugin479551696
2021/07/20 18:03:21 packer-provisioner-file plugin: Plugin address: unix /tmp/packer-plugin479551696
2021/07/20 18:03:21 packer-provisioner-file plugin: Waiting for connection...
2021/07/20 18:03:21 packer-provisioner-file plugin: Serving a plugin connection...
2021/07/20 18:03:21 [TRACE] Starting internal plugin packer-provisioner-shell
2021/07/20 18:03:21 Starting plugin: /nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer []string{"/nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer", "plugin", "packer-provisioner-shell"}
2021/07/20 18:03:21 Waiting for RPC address for: /nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer
2021/07/20 18:03:22 packer-provisioner-shell plugin: [INFO] Packer version: 1.7.3 [go1.16.6 darwin amd64]
2021/07/20 18:03:22 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/07/20 18:03:22 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/jelle/.packerconfig
2021/07/20 18:03:22 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /Users/jelle/.packerconfig
2021/07/20 18:03:22 packer-provisioner-shell plugin: [INFO] Setting cache directory: /Users/jelle/.cache/packer
2021/07/20 18:03:22 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2021/07/20 18:03:22 Received unix RPC address for /nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer: addr is /tmp/packer-plugin202666409
2021/07/20 18:03:22 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin202666409
2021/07/20 18:03:22 packer-provisioner-shell plugin: Waiting for connection...
2021/07/20 18:03:22 packer-provisioner-shell plugin: Serving a plugin connection...
2021/07/20 18:03:22 [TRACE] Starting internal plugin packer-provisioner-shell
2021/07/20 18:03:22 Starting plugin: /nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer []string{"/nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer", "plugin", "packer-provisioner-shell"}
2021/07/20 18:03:22 Waiting for RPC address for: /nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer
2021/07/20 18:03:22 packer-provisioner-shell plugin: [INFO] Packer version: 1.7.3 [go1.16.6 darwin amd64]
2021/07/20 18:03:22 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2021/07/20 18:03:22 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /Users/jelle/.packerconfig
2021/07/20 18:03:22 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /Users/jelle/.packerconfig
2021/07/20 18:03:22 packer-provisioner-shell plugin: [INFO] Setting cache directory: /Users/jelle/.cache/packer
2021/07/20 18:03:22 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2021/07/20 18:03:22 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin507125290
2021/07/20 18:03:22 packer-provisioner-shell plugin: Waiting for connection...
2021/07/20 18:03:22 Received unix RPC address for /nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer: addr is /tmp/packer-plugin507125290
2021/07/20 18:03:22 packer-provisioner-shell plugin: Serving a plugin connection...
2021/07/20 18:03:22 Build debug mode: false
2021/07/20 18:03:22 Force build: false
2021/07/20 18:03:22 On error:
linode.example: output will be in this color.

2021/07/20 18:03:22 Waiting on builds to complete...
2021/07/20 18:03:22 Starting build run: linode.example
2021/07/20 18:03:22 Running builder:
2021/07/20 18:03:22 [INFO] (telemetry) Starting builder
==> linode.example: Running builder ...
==> linode.example: Using existing SSH private key
==> linode.example: Creating Linode...
==> linode.example: Error creating Linode: [400] [authorized_keys] SSH Key 1 key-type must be ssh-dss, ssh-rsa, ecdsa-sha2-nistp, or ssh-ed25519.
2021/07/20 18:03:23 [INFO] (telemetry) ending
==> Wait completed after 840 milliseconds 984 microseconds
2021/07/20 18:03:23 machine readable: error-count []string{"1"}
Build 'linode.example' errored after 838 milliseconds 558 microseconds: Error creating Linode: [400] [authorized_keys] SSH Key 1 key-type must be ssh-dss, ssh-rsa, ecdsa-sha2-nistp, or ssh-ed25519.
==> Some builds didn't complete successfully and had errors:

2021/07/20 18:03:23 machine readable: linode.example,error []string{"Error creating Linode: [400] [authorized_keys] SSH Key 1 key-type must be ssh-dss, ssh-rsa, ecdsa-sha2-nistp, or ssh-ed25519."}
==> Builds finished but no artifacts were created.
==> Wait completed after 840 milliseconds 984 microseconds

==> Some builds didn't complete successfully and had errors:
--> linode.example: Error creating Linode: [400] [authorized_keys] SSH Key 1 key-type must be ssh-dss, ssh-rsa, ecdsa-sha2-nistp, or ssh-ed25519.

2021/07/20 18:03:23 [INFO] (telemetry) Finalizing.
==> Builds finished but no artifacts were created.
2021/07/20 18:03:23 waiting for all plugin processes to complete...
2021/07/20 18:03:23 /Users/jelle/.packer.d/plugins/github.com/ivoronin/sshkey/packer-plugin-sshkey_v0.1.0_x5.0_darwin_amd64: plugin process exited
2021/07/20 18:03:23 /Users/jelle/.packer.d/plugins/github.com/hashicorp/linode/packer-plugin-linode_v1.0.0_x5.0_darwin_amd64: plugin process exited
2021/07/20 18:03:23 /nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer: plugin process exited
2021/07/20 18:03:23 /nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer: plugin process exited
2021/07/20 18:03:23 /nix/store/qn5pnsn5dchqbsy20ajzjpaqqk9hwzlc-packer-1.7.3/bin/packer: plugin process exited

linodego version

Overview of the Issue

It appears the linode/linodego had an accidental v1.0.0 release which was picked up by this project. See: linode/linodego@fb6add3

I think because of this, we won't see any of the updates in v0.26.1 or newer and latest is currently v0.28.1.

Support for private ips

Description

I'm using private ips for the Linodes that I launch with Terraform, and it would be nice to be able to configure that for the Linode that Packer sets up.

Use Case(s)

I am building Consul servers with Packer, and I am using the private IPs for communication, this works fine for Linodes that have private_ip = true (through Terraform), but Consul throws errors if there is no private IP attached.

During my Packer build of my Consul images I run a sanity check: /usr/local/bin/consul validate /etc/consul.d/consul.json however this fails with this error:

==> linode: Config validation failed: No private IPv4 address found

If I could configure the linode to have private networking enabled I could catch configuration mistakes early.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.