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 / 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
diff --git a/protos/hardware/hardware.proto b/protos/hardware/hardware.proto
index 3601801..3ac88c0 100644
--- a/protos/hardware/hardware.proto
+++ b/protos/hardware/hardware.proto
@@ -6,36 +6,58 @@ package github.com.tinkerbell.tink.protos.hardware;
import "google/api/annotations.proto";
+// The HardwareService services provides access to data describing the compute
+// and networking profiles of the hardware available to accept workflows.

Kubernetes

  • Rancher
  • Kubernetes API 1.17.5

Nodes

  • 3x Packet c3.small.x86

Benchmark

  • kubestone 0.5.0

Install

import packet
import json
import os
from pathlib import Path
label="marques@MacBook-Pro.hsd1.nj.comcast.net"
manager = packet.Manager(auth_token=os.environ["APIKEY"])
#manager.get_ssh_key("4405413a-8da6-4e56-9c4f-07e532d7a024").delete()
keys = manager.list_ssh_keys()
@displague
displague / 0-packet-provider.yaml
Last active July 8, 2020 16:20
crossplane-provider-packet example
apiVersion: packet.crossplane.io/v1alpha2
kind: Provider
metadata:
name: packet-provider
spec:
credentialsSecretRef:
key: key
name: packet-creds
namespace: packet-test
projectID: b12cc31b-170c-4986-bb55-2489f7c22a88

Stack Dependency

Stacks may depend on access to other custom resources in the API. These dependencies are provided in the dependsOn field of the Stack spec.

Each dependency results in an RBAC Rule authorizing the service account used by the Stack controller to access the resources defined in the Stack.

The following Stack body would result in the Stack's controller running under a