Skip to content

Instantly share code, notes, and snippets.

Mergin' 🎶 on a Sunday afternoon 🎶

Marques Johansson displague

Mergin' 🎶 on a Sunday afternoon 🎶
View GitHub Profile
View golangci-lint.log
$ find . -name go.mod | sed s/go.mod// | xargs -I{} sh -c 'cd {}; GOOS=linux golangci-lint run --path-prefix {} --fix ./...'
pkg/img/build.go:32:2: `defaultDockerRegistry` is unused (deadcode)
defaultDockerRegistry = ""
cmd/hub/cmd/generate.go:51:11: Error return value of `os.Mkdir` is not checked (errcheck)
os.Mkdir(generateOpts.output, 0700)
cmd/hub/main.go:10:19: Error return value of `logger.Sync` is not checked (errcheck)
defer logger.Sync() // flushes buffer, if any
displague /
Last active August 9, 2021 19:44
Use Equinix Metal with Juju

Juju already has knowledge of the Equinix Metal cloud, which means adding your Equinix Metal account to Juju is quick and easy.

More specific information on Juju's Equinix Metal support (e.g. the supported regions) can be seen locally or, since v.2.9.0, remotely (on a live cloud). Here, we'll show how to do it locally (client cache):

juju show-cloud --local equinix
displague / centos8-stream.ipxe
Last active May 27, 2021 13:34
CentOS 8 Stream via iPXE on Equinix Metal
View centos8-stream.ipxe
dhcp net0
set mirror
# x86_64, aarch_64, ppc64le
set arch x86_64
set path /centos/8-stream/BaseOS/x86_64/os
displague /
Last active February 18, 2021 20:23
Using Equinix Metal's Terraform provider with Terraform v0.12

In Terraform 0.13, providers are fetched from the Terraform registry. More details here.

The Packet provider was included in the Hashicorp registry, used prior to TF 0.13 and can be access with legacy syntax. The Equinix Metal provider was not released until after that transition.

It is possible to use the Equinix Metal provider with Terraform 0.12 with a few additional steps:

  1. Download the provider for your architecture from
  2. Extract the provider and copy the binary into terraform.d/plugins/$ARCH (darwin_adm64, for example)
  3. Include a terraform stanza and configure the provider resource with an auth_token

I captured some screenshots from a deployment using this PR and vSphere 6.7.0 that we can include in the README in a future PR.





View EM-Horizontal-Color.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View loadbal-and-ccm.yaml
apiVersion: apps/v1
kind: Deployment
name: packet-cloud-controller-manager
namespace: kube-system
app: packet-cloud-controller-manager
replicas: 1
displague /
Last active September 29, 2020 14:00
delete tfacc packet devices and projects
#!/usr/bin/env bash
packet project get | \
awk '/tfacc/ {print $2}' | \
while read proj; do
packet devices get -p $proj | \
awk '/tfacc/ {print $2}' | \
xargs -n1 packet device delete -f --id ;
packet project delete -f --id $proj ;