Name: terraform-provider-matchbox
Owner: CoreOS
Description: Terraform provider for on-premise / bare-metal via Matchbox
Created: 2017-04-04 21:58:42.0
Updated: 2018-05-15 09:47:02.0
Pushed: 2018-04-24 12:13:37.0
Size: 2342
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The Matchbox provider is used to interact with the matchbox API. Matchbox matches bare-metal machines by labels (e.g. MAC address) to Profiles with iPXE configs, Container Linux configs, or generic free-form configs in order to provision clusters.
A Matchbox v0.6+ installation is required. Matchbox v0.7+ is required to use the generic_config
field.
Install Terraform v0.9+ Add the terraform-provider-matchbox
plugin binary somewhere on your filesystem.
v
et -u github.com/coreos/terraform-provider-matchbox
Register the plugin in ~/.terraformrc
.
iders {
tchbox = "/path/to/terraform-provider-matchbox"
On-premise, setup a PXE network boot environment. Install matchbox on a provisioner node or Kubernetes cluster. Be sure to enable the gRPC API and follow the instructions to generate TLS credentials.
onfigure the matchbox provider
ider "matchbox" {
dpoint = "${var.matchbox_rpc_endpoint}"
ient_cert = "${file("~/.matchbox/client.crt")}"
ient_key = "${file("~/.matchbox/client.key")}"
= "${file("~/.matchbox/ca.crt")}"
reate a Container Linux install profile
urce "matchbox_profile" "container-linux-install" {
me = "container-linux-install"
rnel = "/assets/coreos/${var.container_linux_version}/coreos_production_pxe.vmlinuz"
itrd = [
"/assets/coreos/${var.container_linux_version}/coreos_production_pxe_image.cpio.gz"
gs = [
"coreos.config.url=http://${var.matchbox_http_endpoint}/ignition?uuid=$${uuid}&mac=$${mac:hexhyp}",
"coreos.first_boot=yes",
"console=tty0",
"console=ttyS0",
"coreos.autologin"
ntainer_linux_config = "${file("./cl/coreos-install.yaml.tmpl")}"
neric_config = "${file("./example.ks")}"
atch a bare-metal machine
urce "matchbox_group" "node1" {
me = "node1"
ofile = "${matchbox_profile.container-linux-install.name}"
lector {
mac = "52:54:00:a1:9c:ae"
tadata {
custom_variable = "machine_specific_value_here"
ssh_authorized_key = "${var.ssh_authorized_key}"
See examples for Terraform configs which PXE boot, install CoreOS, and provision entire clusters.
To develop the plugin locally, compile and install the executable with Go 1.8.
make build
make test
Add or update dependencies in glide.yaml
and vendor. The glide and glide-vc tools vendor and prune dependencies.
make vendor