Skip to content

Instantly share code, notes, and snippets.

View displague's full-sized avatar
🐝
Mergin' 🎶 on a Sunday afternoon 🎶

Marques Johansson displague

🐝
Mergin' 🎶 on a Sunday afternoon 🎶
View GitHub Profile
@displague
displague / equinix_metal_port_vlan_attachment.md-1.13-1.14.diff
Last active October 24, 2023 23:14
Equinix Terraform 1.13 to 1.14 Schema changes
diff --git a/docs/resources/equinix_metal_port_vlan_attachment.md b/docs/resources/equinix_metal_port_vlan_attachment.md
index 7ccb5ea..ac60bb1 100644
--- a/docs/resources/equinix_metal_port_vlan_attachment.md
+++ b/docs/resources/equinix_metal_port_vlan_attachment.md
@@ -6,7 +6,7 @@ subcategory: "Metal"
Provides a resource to attach device ports to VLANs.
-Device and VLAN must be in the same facility.
+Device and VLAN must be in the same metro.
@displague
displague / qbr.sh
Last active August 2, 2023 20:49
QBR: GitHub releases over the past quarter (customize with your orgs and repos)
#!/usr/bin/env bash
quarters=${1:-0} # Modified this line to set quarters to 0
year=$(date +%Y)
month=$(date +%m)
quarter=$(((${month##0} - 1) / 3 + 1)) # trim leading zeros or invalid octals in August and September
quarter_patterns=(
[1]="0[1-3]" [2]="0[4-6]"
[3]="0[7-9]" [4]="1[0-2]"
)
all_patterns=""
$ 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 = "https://index.docker.io/v1/"
^
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
displague / README.md
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
displague / centos8-stream.ipxe
Last active May 27, 2021 13:34
CentOS 8 Stream via iPXE on Equinix Metal
#!ipxe
dhcp net0
# https://www.centos.org/download/mirrors/
set mirror http://mirror.pit.teraswitch.com
# x86_64, aarch_64, ppc64le
set arch x86_64
set path /centos/8-stream/BaseOS/x86_64/os
@displague
displague / README.md
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 https://github.com/equinix/terraform-provider-metal/releases
  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.

image

image

image

image

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: packet-cloud-controller-manager
namespace: kube-system
labels:
app: packet-cloud-controller-manager
spec:
replicas: 1