diff --git a/.terraform.lock.hcl b/.terraform.lock.hcl new file mode 100755 index 0000000..d84c3e9 --- /dev/null +++ b/.terraform.lock.hcl @@ -0,0 +1,88 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/equinix/metal" { + version = "1.0.0" + hashes = [ + "h1:nUIvAmwG1AIo5FCrqiNoB9oWHjRs5K6YTwr2T3iIEkY=", + "zh:06bf3f257e490891a9470e6b559d27b4136c2a699d05eb5690cad5fec98d7d4d", + "zh:0d1312af7461a3ee6def3f91e82ac0b06c66667423c459791cf52dda75527428", + "zh:0d866ece81ff174d5a25890ed18672e15a5ddd88834335289b62541690076ab8", + "zh:0fb605b2271883a8a76d330ca479687f8ee001f47594ff289f7aeb9df4d2265a", + "zh:2f5f6f582bd11a24cca99fbde1da31999dd8c3d1117f17ee2d5f9eb048e02100", + "zh:3d12c99b463f732eb5f4a81f38b6eeba4314892669f4ce3ced8d91cd2b9209a3", + "zh:6045a87e5b74c90fbe07352aedab1ec3175c421b36caebeaacc1f7446bede27c", + "zh:6528716f0fdd24b4eada6ca5b526f12f19bdf987e998abc2ec5942d59986be6a", + "zh:7bc75f9b60928d8b843e4342b069724e224ff051c54e606efaa1b080d25e8f6e", + "zh:b530619842716e48342fc79b04b2b261c89bc26019c9bac4993ea532b17b3b89", + "zh:c3321a23259cbdb0488a0450a85197db4a467776287e96cf67c5731d9f83c58e", + ] +} + +provider "registry.terraform.io/hashicorp/local" { + version = "2.0.0" + hashes = [ + "h1:pO1ANXtOCRfecKsY9Hn4UsXoPBLv6LFiDIEiS1MZ09E=", + "zh:34ce8b79493ace8333d094752b579ccc907fa9392a2c1d6933a6c95d0786d3f1", + "zh:5c5a19c4f614a4ffb68bae0b0563f3860115cf7539b8adc21108324cfdc10092", + "zh:67ddb1ca2cd3e1a8f948302597ceb967f19d2eeb2d125303493667388fe6330e", + "zh:68e6b16f3a8e180fcba1a99754118deb2d82331b51f6cca39f04518339bfdfa6", + "zh:8393a12eb11598b2799d51c9b0a922a3d9fadda5a626b94a1b4914086d53120e", + "zh:90daea4b2010a86f2aca1e3a9590e0b3ddcab229c2bd3685fae76a832e9e836f", + "zh:99308edc734a0ac9149b44f8e316ca879b2670a1cae387a8ae754c180b57cdb4", + "zh:c76594db07a9d1a73372a073888b672df64adb455d483c2426cc220eda7e092e", + "zh:dc09c1fb36c6a706bdac96cce338952888c8423978426a09f5df93031aa88b84", + "zh:deda88134e9780319e8de91b3745520be48ead6ec38cb662694d09185c3dac70", + ] +} + +provider "registry.terraform.io/hashicorp/null" { + version = "3.0.0" + hashes = [ + "h1:V1tzrSG6t3e7zWvUwRbGbhsWU2Jd/anrJpOl9XM+R/8=", + "zh:05fb7eab469324c97e9b73a61d2ece6f91de4e9b493e573bfeda0f2077bc3a4c", + "zh:1688aa91885a395c4ae67636d411475d0b831e422e005dcf02eedacaafac3bb4", + "zh:24a0b1292e3a474f57c483a7a4512d797e041bc9c2fbaac42fe12e86a7fb5a3c", + "zh:2fc951bd0d1b9b23427acc93be09b6909d72871e464088171da60fbee4fdde03", + "zh:6db825759425599a326385a68acc6be2d9ba0d7d6ef587191d0cdc6daef9ac63", + "zh:85985763d02618993c32c294072cc6ec51f1692b803cb506fcfedca9d40eaec9", + "zh:a53186599c57058be1509f904da512342cfdc5d808efdaf02dec15f0f3cb039a", + "zh:c2e07b49b6efa676bdc7b00c06333ea1792a983a5720f9e2233db27323d2707c", + "zh:cdc8fe1096103cf5374751e2e8408ec4abd2eb67d5a1c5151fe2c7ecfd525bef", + "zh:dbdef21df0c012b0d08776f3d4f34eb0f2f229adfde07ff252a119e52c0f65b7", + ] +} + +provider "registry.terraform.io/hashicorp/random" { + version = "3.0.1" + hashes = [ + "h1:0QaSbRBgBi8vI/8IRwec1INdOqBxXbgsSFElx1O4k4g=", + "zh:0d4f683868324af056a9eb2b06306feef7c202c88dbbe6a4ad7517146a22fb50", + "zh:4824b3c7914b77d41dfe90f6f333c7ac9860afb83e2a344d91fbe46e5dfbec26", + "zh:4b82e43712f3cf0d0cbc95b2cbcd409ba8f0dc7848fdfb7c13633c27468ed04a", + "zh:78b3a2b860c3ebc973a794000015f5946eb59b82705d701d487475406b2612f1", + "zh:88bc65197bd74ff408d147b32f0045372ae3a3f2a2fdd7f734f315d988c0e4a2", + "zh:91bd3c9f625f177f3a5d641a64e54d4b4540cb071070ecda060a8261fb6eb2ef", + "zh:a6818842b28d800f784e0c93284ff602b0c4022f407e4750da03f50b853a9a2c", + "zh:c4a1a2b52abd05687e6cfded4a789dcd7b43e7a746e4d02dd1055370cf9a994d", + "zh:cf65041bf12fc3bde709c1d267dbe94142bc05adcabc4feb17da3b12249132ac", + "zh:e385e00e7425dda9d30b74ab4ffa4636f4b8eb23918c0b763f0ffab84ece0c5c", + ] +} + +provider "registry.terraform.io/hashicorp/template" { + version = "2.2.0" + hashes = [ + "h1:0wlehNaxBX7GJQnPfQwTNvvAf38Jm0Nv7ssKGMaG6Og=", + "zh:01702196f0a0492ec07917db7aaa595843d8f171dc195f4c988d2ffca2a06386", + "zh:09aae3da826ba3d7df69efeb25d146a1de0d03e951d35019a0f80e4f58c89b53", + "zh:09ba83c0625b6fe0a954da6fbd0c355ac0b7f07f86c91a2a97849140fea49603", + "zh:0e3a6c8e16f17f19010accd0844187d524580d9fdb0731f675ffcf4afba03d16", + "zh:45f2c594b6f2f34ea663704cc72048b212fe7d16fb4cfd959365fa997228a776", + "zh:77ea3e5a0446784d77114b5e851c970a3dde1e08fa6de38210b8385d7605d451", + "zh:8a154388f3708e3df5a69122a23bdfaf760a523788a5081976b3d5616f7d30ae", + "zh:992843002f2db5a11e626b3fc23dc0c87ad3729b3b3cff08e32ffb3df97edbde", + "zh:ad906f4cebd3ec5e43d5cd6dc8f4c5c9cc3b33d2243c89c5fc18f97f7277b51d", + "zh:c979425ddb256511137ecd093e23283234da0154b7fa8b21c2687182d9aea8b2", + ] +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 89fb79b..f6af0df 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,16 +2,16 @@ Thx for your interest! We're so glad you're here. ### Important Resources - - bugs: [https://github.com/packet-labs/terraform-distributed-minio/issues](https://github.com/packet-labs/terraform-distributed-minio/issues) + - bugs: [https://github.com/equinix/terraform-metal-distributed-minio/issues](https://github.com/equinix/terraform-metal-distributed-minio/issues) ### Code of Conduct -Available via [https://github.com/packet-labs/terraform-distributed-minio/blob/master/CODE_OF_CONDUCT.md](https://github.com/packet-labs/terraform-distributed-minio/blob/master/CODE_OF_CONDUCT.md) +Available via [https://github.com/equinix/terraform-metal-distributed-minio/blob/master/CODE_OF_CONDUCT.md](https://github.com/equinix/terraform-metal-distributed-minio/blob/master/CODE_OF_CONDUCT.md) ### Environment Details -[https://github.com/packet-labs/terraform-distributed-minio/blob/master/MANIFEST.md](https://github.com/packet-labs/terraform-distributed-minio/blob/master/MANIFEST.md) +[https://github.com/equinix/terraform-metal-distributed-minio/blob/master/MANIFEST.md](https://github.com/equinix/terraform-metal-distributed-minio/blob/master/MANIFEST.md) ### How to Submit Change Requests -Please submit change requests and / or features via [Issues](https://github.com/packet-labs/terraform-distributed-minio/issues). There's no guarantee it'll be changed, but you never know until you try. I'll try to add comments as soon as possible, though. +Please submit change requests and / or features via [Issues](https://github.com/equinix/terraform-metal-distributed-minio/issues). There's no guarantee it'll be changed, but you never know until you try. I'll try to add comments as soon as possible, though. ### How to Report a Bug -Bugs are problems in code, in the functionality of an application or in its UI design; you can submit them through [Issues](https://github.com/packet-labs/terraform-distributed-minio/issues) as well. +Bugs are problems in code, in the functionality of an application or in its UI design; you can submit them through [Issues](https://github.com/equinix/terraform-metal-distributed-minio/issues) as well. diff --git a/OWNERS.md b/OWNERS.md index e4aa454..c7f54b6 100644 --- a/OWNERS.md +++ b/OWNERS.md @@ -1,7 +1,7 @@ # Owners -This project is governed by [Packet](https://packet.com) and benefits from a community of users that collaborate and contribute to its use in Kubernetes on Packet. +This project is governed by [Equinix Metal](https://metal.equinix.com) and benefits from a community of users that collaborate and contribute to its use in Kubernetes on Equinix Metal. -Members of the Packet Github organization will strive to triage issues in a timely manner, see [SUPPORT.md](SUPPORT.md) for details. +Members of the Equinix Github organization will strive to triage issues in a timely manner, see [SUPPORT.md](SUPPORT.md) for details. See the [packethost/standards glossary](https://github.com/packethost/standards/blob/master/glossary.md#ownersmd) for more details about this file. diff --git a/README.md b/README.md index d53dc87..311681b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This repository is [Maintained](https://github.com/packethost/standards/blob/mas If you require support, please email [support@equinixmetal.com](support@equinixmetal.com), visit the Equinix Metal IRC channel (#equinixmetal on freenode), subscribe to the [Equinix Metal Community Slack](https://equinixmetal.slack.com/) channel or post an issue within this repository. -[Contributions](https://github.com/packet-labs/terraform-distributed-minio/blob/master/CONTRIBUTING.md) are welcome to help extend this work! +[Contributions](https://github.com/equinix/terraform-metal-distributed-minio/blob/master/CONTRIBUTING.md) are welcome to help extend this work! # Minio Distributed on Equinix Metal with Terraform Minio Distributed on Equinix Metal with Terraform is a [Terraform](http://terraform.io) template that will deploy [Minio](http://min.io) distributed on [Equinix Metal](https://metal.equinix.com/) baremetal. MinIO is a high performance object storage server compatible with Amazon S3. Minio is a great option for Equinix Metal users that want to have easily accessible S3 compatible object storage as Equinix Metal offers instance types with storage options including SATA SSDs, NVMe SSDs, and high capacity SATA HDDs. @@ -20,7 +20,7 @@ This repository currently supports Terraform v0.13 or higher. To download this project, run the following command: ```bash -git clone https://github.com/packet-labs/terraform-distributed-minio.git +git clone https://github.com/equinix/terraform-metal-distributed-minio.git ``` ## Initialize Terraform diff --git a/assets/user_data.sh b/assets/user_data.sh index 4c7d65d..fd914fc 100644 --- a/assets/user_data.sh +++ b/assets/user_data.sh @@ -279,7 +279,7 @@ LISTEN_IP= # if not public, grab the private IP only # THIS IS NOT YET SUPPORTED #if [ -z "$PUBLIC" ]; then -# LISTEN_IP=$(curl https://metadata.packet.net/metadata | jq -r '.network.addresses[] | select(.address_family == 4 and .public == true) | .address') +# LISTEN_IP=$(curl https://metadata.platformequinix.com/metadata | jq -r '.network.addresses[] | select(.address_family == 4 and .public == true) | .address') #fi root_disk=`df -h | sort -k 6 | head -1 | cut -c1-8` diff --git a/main.tf b/main.tf index ef171c1..9b7d631 100644 --- a/main.tf +++ b/main.tf @@ -1,4 +1,4 @@ -provider "packet" { +provider "metal" { auth_token = var.auth_token } @@ -18,7 +18,7 @@ resource "random_string" "minio_secret_key" { special = false } -resource "packet_reserved_ip_block" "elastic_addresses" { +resource "metal_reserved_ip_block" "elastic_addresses" { project_id = var.project_id facility = var.facility quantity = var.cluster_size @@ -46,7 +46,7 @@ data "local_file" "foo" { filename = "${path.module}/assets/user_data.sh" } -resource "packet_device" "minio-distributed-cluster" { +resource "metal_device" "minio-distributed-cluster" { count = var.cluster_size project_id = var.project_id hostname = format("%s%d",var.hostname, count.index+1) @@ -57,10 +57,10 @@ resource "packet_device" "minio-distributed-cluster" { user_data = replace(data.local_file.foo.content, "__ENVSET__", element(data.template_file.user_data_env.*.rendered, count.index)) } -resource "packet_ip_attachment" "eip_assignment" { +resource "metal_ip_attachment" "eip_assignment" { count = var.cluster_size - device_id = element(packet_device.minio-distributed-cluster.*.id, count.index) - cidr_notation = join("/", [cidrhost(packet_reserved_ip_block.elastic_addresses.cidr_notation, count.index), "32"]) + device_id = element(metal_device.minio-distributed-cluster.*.id, count.index) + cidr_notation = join("/", [cidrhost(metal_reserved_ip_block.elastic_addresses.cidr_notation, count.index), "32"]) } @@ -69,7 +69,7 @@ data template_file "ipaddr" { count = var.cluster_size template = "$${ip}" vars = { - ip = cidrhost(packet_reserved_ip_block.elastic_addresses.cidr_notation, count.index) + ip = cidrhost(metal_reserved_ip_block.elastic_addresses.cidr_notation, count.index) } } @@ -89,7 +89,7 @@ resource "null_resource" "await_minio_ready" { # Changes to any instance of the cluster requires re-provisioning triggers = { - cluster_instance_ids = join(",", packet_device.minio-distributed-cluster.*.id) + cluster_instance_ids = join(",", metal_device.minio-distributed-cluster.*.id) } provisioner "local-exec" { // we retry every 5 seconds, or 12 times per minute, over 5 minutes, for 60 retries diff --git a/manifest.md b/manifest.md index 65836e4..3ad2650 100644 --- a/manifest.md +++ b/manifest.md @@ -18,4 +18,4 @@ en ## Description -terraform-distributed-minio is a Terraform template that will deploy Minio distributed on Packet baremetal. MinIO is a high performance object storage server compatible with Amazon S3. Minio is a great option for Packet users that want to have easily accessible S3 compatible object storage as Packet offers instance types with storage options including SATA SSDs, NVMe SSDs, and high capacity SATA HDDs. +terraform-metal-distributed-minio is a Terraform template that will deploy Minio distributed on Equinix Metal baremetal. MinIO is a high performance object storage server compatible with Amazon S3. Minio is a great option for Equinix Metal users that want to have easily accessible S3 compatible object storage as Equinix Metal offers instance types with storage options including SATA SSDs, NVMe SSDs, and high capacity SATA HDDs. diff --git a/outputs.tf b/outputs.tf index 04a1bae..ede8456 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,5 +1,5 @@ output "minio_endpoints" { - value = formatlist("%s minio endpoint is %s", packet_device.minio-distributed-cluster[*].hostname, data.template_file.endpoint[*].rendered) + value = formatlist("%s minio endpoint is %s", metal_device.minio-distributed-cluster[*].hostname, data.template_file.endpoint[*].rendered) } output "minio_access_key"{ diff --git a/variables.tf b/variables.tf index 2868409..b0685d8 100644 --- a/variables.tf +++ b/variables.tf @@ -1,10 +1,10 @@ variable "auth_token" { - description = "Packet API Key" + description = "Equinix Metal API Key" type = string } variable "project_id" { - description = "Packet Project ID" + description = "Equinix Metal Project ID" type = string } diff --git a/versions.tf b/versions.tf index 6d23e4e..4522c5d 100644 --- a/versions.tf +++ b/versions.tf @@ -3,8 +3,8 @@ terraform { null = { source = "hashicorp/null" } - packet = { - source = "packethost/packet" + metal = { + source = "equinix/metal" } random = { source = "hashicorp/random"