Skip to content

Commit

Permalink
Merge pull request #18 from packet-labs/metal
Browse files Browse the repository at this point in the history
prepares for rename to equinix/terraform-metal-distributed-minio
  • Loading branch information
displague authored Jan 19, 2021
2 parents 23b8221 + 09e1672 commit 74e3cdd
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 24 deletions.
88 changes: 88 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions OWNERS.md
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This repository is [Maintained](https://github.com/packethost/standards/blob/mas

If you require support, please email [[email protected]]([email protected]), 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.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion assets/user_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
16 changes: 8 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
provider "packet" {
provider "metal" {
auth_token = var.auth_token
}

Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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"])
}


Expand All @@ -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)
}
}

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
@@ -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"{
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ terraform {
null = {
source = "hashicorp/null"
}
packet = {
source = "packethost/packet"
metal = {
source = "equinix/metal"
}
random = {
source = "hashicorp/random"
Expand Down

0 comments on commit 74e3cdd

Please sign in to comment.