Skip to content

Instantly share code, notes, and snippets.

Avatar
🐝
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 = "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
View README.md

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
View README.md
@displague
displague / centos8-stream.ipxe
Last active May 27, 2021 13:34
CentOS 8 Stream via iPXE on Equinix Metal
View centos8-stream.ipxe
#!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
View README.md

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
View terraform-metal-vsphere.md

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

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
metadata:
name: packet-cloud-controller-manager
namespace: kube-system
labels:
app: packet-cloud-controller-manager
spec:
replicas: 1
@displague
displague / tfacc.sh
Last active September 29, 2020 14:00
delete tfacc packet devices and projects
View tfacc.sh
#!/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 ;
done