Skip to content

Commit 9eff627

Browse files
Merge pull request #90 from MaterializeInc/swap_follow_up_improvements_part2
Swap follow up improvements part2
2 parents 2d9103c + 1928753 commit 9eff627

File tree

7 files changed

+25
-175
lines changed

7 files changed

+25
-175
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,9 @@ These flags configure default limits for clusters, connections, and tables. You
142142
| <a name="input_db_instance_class"></a> [db\_instance\_class](#input\_db\_instance\_class) | Instance class for the RDS instance. This is used for concensus and metadata and is general not bottlnecked by memory or disk. Recomended instance family m7i, m6i, m7g, and m8g | `string` | `"db.m6i.large"` | no |
143143
| <a name="input_db_max_allocated_storage"></a> [db\_max\_allocated\_storage](#input\_db\_max\_allocated\_storage) | Maximum storage for autoscaling (in GB) | `number` | `100` | no |
144144
| <a name="input_db_multi_az"></a> [db\_multi\_az](#input\_db\_multi\_az) | Enable multi-AZ deployment for RDS | `bool` | `false` | no |
145-
| <a name="input_disk_support_config"></a> [disk\_support\_config](#input\_disk\_support\_config) | Advanced configuration for disk support (only used when enable\_disk\_support = true) | <pre>object({<br/> install_openebs = optional(bool, true)<br/> run_disk_setup_script = optional(bool, true)<br/> create_storage_class = optional(bool, true)<br/> openebs_version = optional(string, "4.3.3")<br/> openebs_namespace = optional(string, "openebs")<br/> storage_class_name = optional(string, "openebs-lvm-instance-store-ext4")<br/> storage_class_provisioner = optional(string, "local.csi.openebs.io")<br/> storage_class_parameters = optional(object({<br/> storage = optional(string, "lvm")<br/> fsType = optional(string, "ext4")<br/> volgroup = optional(string, "instance-store-vg")<br/> }), {})<br/> })</pre> | `{}` | no |
146145
| <a name="input_enable_bucket_encryption"></a> [enable\_bucket\_encryption](#input\_enable\_bucket\_encryption) | Enable server-side encryption for the S3 bucket | `bool` | `true` | no |
147146
| <a name="input_enable_bucket_versioning"></a> [enable\_bucket\_versioning](#input\_enable\_bucket\_versioning) | Enable versioning for the S3 bucket | `bool` | `true` | no |
148147
| <a name="input_enable_cluster_creator_admin_permissions"></a> [enable\_cluster\_creator\_admin\_permissions](#input\_enable\_cluster\_creator\_admin\_permissions) | To add the current caller identity as an administrator | `bool` | `true` | no |
149-
| <a name="input_enable_disk_support"></a> [enable\_disk\_support](#input\_enable\_disk\_support) | Enable disk support for Materialize using OpenEBS and NVMe instance storage. When enabled, this configures OpenEBS, runs the disk setup script for NVMe devices, and creates appropriate storage classes. | `bool` | `true` | no |
150148
| <a name="input_enable_monitoring"></a> [enable\_monitoring](#input\_enable\_monitoring) | Enable CloudWatch monitoring | `bool` | `true` | no |
151149
| <a name="input_environment"></a> [environment](#input\_environment) | Environment name (e.g., prod, staging, dev) | `string` | n/a | yes |
152150
| <a name="input_helm_chart"></a> [helm\_chart](#input\_helm\_chart) | Chart name from repository or local path to chart. For local charts, set the path to the chart directory. | `string` | `"materialize-operator"` | no |
@@ -231,6 +229,15 @@ More advanced TLS support using user-provided CAs or per-Materialize `Issuer`s a
231229

232230
## Upgrade Notes
233231

232+
#### v0.8.0
233+
234+
You must upgrade to at least v0.7.x before upgrading to v0.8.x of this terraform code.
235+
236+
Breaking changes:
237+
* The system node group is renamed and significantly modified, forcing a recreation.
238+
* Both node groups are now locked to Bottlerocket AMIs and ON\_DEMAND scheduling.
239+
* Openebs is removed, and with it all support for lgalloc, our legacy spill to disk mechanism.
240+
234241
#### v0.7.0
235242

236243
This is an intermediate version to handle some changes that must be applied in stages.

docs/footer.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ More advanced TLS support using user-provided CAs or per-Materialize `Issuer`s a
2525

2626
## Upgrade Notes
2727

28+
#### v0.8.0
29+
30+
You must upgrade to at least v0.7.x before upgrading to v0.8.x of this terraform code.
31+
32+
Breaking changes:
33+
* The system node group is renamed and significantly modified, forcing a recreation.
34+
* Both node groups are now locked to Bottlerocket AMIs and ON_DEMAND scheduling.
35+
* Openebs is removed, and with it all support for lgalloc, our legacy spill to disk mechanism.
36+
2837
#### v0.7.0
2938

3039
This is an intermediate version to handle some changes that must be applied in stages.

examples/simple/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ module "materialize_infrastructure" {
5252
# EKS Configuration
5353
cluster_version = "1.32"
5454

55-
system_node_group_instance_types = ["r7gd.2xlarge"]
55+
system_node_group_instance_types = ["m7g.medium"]
5656
system_node_group_desired_size = 2
57-
system_node_group_min_size = 1
57+
system_node_group_min_size = 2
5858
system_node_group_max_size = 2
5959

6060
materialize_node_group_instance_types = ["r7gd.2xlarge"]

main.tf

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ module "eks" {
3333
cluster_enabled_log_types = var.cluster_enabled_log_types
3434
enable_cluster_creator_admin_permissions = var.enable_cluster_creator_admin_permissions
3535

36-
# We can't uninstall this until we're certain that we're no longer using it.
37-
install_openebs = local.disk_config.install_openebs
38-
enable_disk_setup = local.disk_config.run_disk_setup_script
39-
openebs_namespace = local.disk_config.openebs_namespace
40-
openebs_version = local.disk_config.openebs_version
41-
4236
tags = local.common_tags
4337

4438
depends_on = [
@@ -256,15 +250,6 @@ locals {
256250
}
257251
}
258252
}
259-
# TODO we can't delete this until we're certain no one is using it
260-
storage = var.enable_disk_support ? {
261-
storageClass = {
262-
create = local.disk_config.create_storage_class
263-
name = local.disk_config.storage_class_name
264-
provisioner = local.disk_config.storage_class_provisioner
265-
parameters = local.disk_config.storage_class_parameters
266-
}
267-
} : {}
268253
tls = (var.use_self_signed_cluster_issuer && length(var.materialize_instances) > 0) ? {
269254
defaultCertificateSpecs = {
270255
balancerdExternal = {
@@ -356,23 +341,6 @@ locals {
356341
ManagedBy = "terraform"
357342
}
358343
)
359-
360-
# TODO we can't delete this until we're certain no one is using it
361-
# Disk support configuration
362-
disk_config = {
363-
install_openebs = var.enable_disk_support ? lookup(var.disk_support_config, "install_openebs", true) : false
364-
run_disk_setup_script = var.enable_disk_support ? lookup(var.disk_support_config, "run_disk_setup_script", true) : false
365-
create_storage_class = var.enable_disk_support ? lookup(var.disk_support_config, "create_storage_class", true) : false
366-
openebs_version = lookup(var.disk_support_config, "openebs_version", "4.3.3")
367-
openebs_namespace = lookup(var.disk_support_config, "openebs_namespace", "openebs")
368-
storage_class_name = lookup(var.disk_support_config, "storage_class_name", "openebs-lvm-instance-store-ext4")
369-
storage_class_provisioner = lookup(var.disk_support_config, "storage_class_provisioner", "local.csi.openebs.io")
370-
storage_class_parameters = {
371-
storage = try(var.disk_support_config.storage_class_parameters.storage, "lvm")
372-
fsType = try(var.disk_support_config.storage_class_parameters.fsType, "ext4")
373-
volgroup = try(var.disk_support_config.storage_class_parameters.volgroup, "instance-store-vg")
374-
}
375-
}
376344
}
377345

378346
resource "aws_cloudwatch_log_group" "materialize" {

modules/eks/main.tf

Lines changed: 4 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
locals {
22
name_prefix = "${var.namespace}-${var.environment}"
3-
4-
disk_setup_script = file("${path.module}/bootstrap.sh")
53
}
64

75
module "eks" {
@@ -20,7 +18,7 @@ module "eks" {
2018
cluster_enabled_log_types = var.cluster_enabled_log_types
2119

2220
eks_managed_node_groups = {
23-
"${local.name_prefix}-mz" = {
21+
"${local.name_prefix}-system" = {
2422
desired_size = var.node_group_desired_size
2523
min_size = var.node_group_min_size
2624
max_size = var.node_group_max_size
@@ -32,19 +30,10 @@ module "eks" {
3230
name = local.name_prefix
3331

3432
labels = {
35-
Environment = var.environment
36-
GithubRepo = "materialize"
37-
"materialize.cloud/disk" = var.enable_disk_setup ? "true" : "false"
38-
"materialize.cloud/scratch-fs" = var.enable_disk_setup ? "true" : "false"
39-
"workload" = "materialize-instance"
33+
Environment = var.environment
34+
GithubRepo = "materialize"
35+
"workload" = "system"
4036
}
41-
42-
cloudinit_pre_nodeadm = var.enable_disk_setup ? [
43-
{
44-
content_type = "text/x-shellscript"
45-
content = local.disk_setup_script
46-
}
47-
] : []
4837
}
4938
}
5039

@@ -84,76 +73,3 @@ module "eks" {
8473

8574
tags = var.tags
8675
}
87-
88-
# Install OpenEBS for lgalloc support
89-
resource "kubernetes_namespace" "openebs" {
90-
count = var.install_openebs ? 1 : 0
91-
92-
metadata {
93-
name = var.openebs_namespace
94-
}
95-
}
96-
97-
resource "helm_release" "openebs" {
98-
count = var.install_openebs ? 1 : 0
99-
100-
name = "openebs"
101-
namespace = kubernetes_namespace.openebs[0].metadata[0].name
102-
repository = "https://openebs.github.io/openebs"
103-
chart = "openebs"
104-
version = var.openebs_version
105-
106-
values = [jsonencode({
107-
"alloy" : {
108-
"enabled" : false,
109-
},
110-
"localpv-provisioner" : {
111-
"localpv" : {
112-
"enabled" : false,
113-
},
114-
"hostpathClass" : {
115-
"enabled" : false,
116-
},
117-
"serviceAccount" : {
118-
"create" : false,
119-
},
120-
},
121-
"zfs-localpv" : {
122-
"enabled" : false,
123-
},
124-
"loki" : {
125-
"enabled" : false,
126-
},
127-
"mayastor" : {
128-
"enabled" : false,
129-
},
130-
"minio" : {
131-
"enabled" : false,
132-
},
133-
"lvm-localpv" : {
134-
"analytics" : {
135-
"enabled" : false,
136-
},
137-
"lvmNode" : {
138-
"nodeSelector" : {
139-
"materialize.cloud/scratch-fs" : "true",
140-
"workload" : "materialize-instance",
141-
},
142-
},
143-
},
144-
"engines" : {
145-
"local" : {
146-
"zfs" : {
147-
"enabled" : false,
148-
},
149-
},
150-
"replicated" : {
151-
"mayastor" : {
152-
"enabled" : false,
153-
},
154-
},
155-
},
156-
})]
157-
158-
depends_on = [kubernetes_namespace.openebs]
159-
}

modules/eks/variables.tf

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ variable "node_group_instance_types" {
4646
variable "node_group_ami_type" {
4747
description = "AMI type for the node group"
4848
type = string
49-
default = "AL2023_ARM_64_STANDARD"
49+
default = "BOTTLEROCKET_ARM_64"
5050
}
5151

5252
variable "cluster_enabled_log_types" {
@@ -72,28 +72,3 @@ variable "enable_cluster_creator_admin_permissions" {
7272
type = bool
7373
default = true
7474
}
75-
76-
# OpenEBS configuration
77-
variable "install_openebs" {
78-
description = "Whether to install OpenEBS for NVMe storage"
79-
type = bool
80-
default = true
81-
}
82-
83-
variable "openebs_namespace" {
84-
description = "Namespace for OpenEBS components"
85-
type = string
86-
default = "openebs"
87-
}
88-
89-
variable "openebs_version" {
90-
description = "Version of OpenEBS Helm chart to install"
91-
type = string
92-
default = "4.3.3"
93-
}
94-
95-
variable "enable_disk_setup" {
96-
description = "Whether to enable disk setup using the bootstrap script"
97-
type = bool
98-
default = true
99-
}

variables.tf

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -409,28 +409,3 @@ variable "install_metrics_server" {
409409
type = bool
410410
default = true
411411
}
412-
413-
variable "enable_disk_support" {
414-
description = "Enable disk support for Materialize using OpenEBS and NVMe instance storage. When enabled, this configures OpenEBS, runs the disk setup script for NVMe devices, and creates appropriate storage classes."
415-
type = bool
416-
default = true
417-
}
418-
419-
variable "disk_support_config" {
420-
description = "Advanced configuration for disk support (only used when enable_disk_support = true)"
421-
type = object({
422-
install_openebs = optional(bool, true)
423-
run_disk_setup_script = optional(bool, true)
424-
create_storage_class = optional(bool, true)
425-
openebs_version = optional(string, "4.3.3")
426-
openebs_namespace = optional(string, "openebs")
427-
storage_class_name = optional(string, "openebs-lvm-instance-store-ext4")
428-
storage_class_provisioner = optional(string, "local.csi.openebs.io")
429-
storage_class_parameters = optional(object({
430-
storage = optional(string, "lvm")
431-
fsType = optional(string, "ext4")
432-
volgroup = optional(string, "instance-store-vg")
433-
}), {})
434-
})
435-
default = {}
436-
}

0 commit comments

Comments
 (0)