Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make OS disk size even more configurable #94

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion terraform/binary-cache.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module "binary_cache_vm" {
location = azurerm_resource_group.infra.location
virtual_machine_name = "ghaf-binary-cache-${local.env}"
virtual_machine_size = local.opts[local.conf].vm_size_binarycache
virtual_machine_osdisk_size = "50"
virtual_machine_osdisk_size = local.opts[local.conf].osdisk_size_binarycache
virtual_machine_source_image = module.binary_cache_image.image_id

virtual_machine_custom_data = join("\n", ["#cloud-config", yamlencode({
Expand Down
2 changes: 1 addition & 1 deletion terraform/builder.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module "builder_vm" {
location = azurerm_resource_group.infra.location
virtual_machine_name = "ghaf-builder-${count.index}-${local.env}"
virtual_machine_size = local.opts[local.conf].vm_size_builder
virtual_machine_osdisk_size = "150"
virtual_machine_osdisk_size = local.opts[local.conf].osdisk_size_builder
virtual_machine_source_image = module.builder_image.image_id

virtual_machine_custom_data = join("\n", ["#cloud-config", yamlencode({
Expand Down
2 changes: 1 addition & 1 deletion terraform/jenkins-controller.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module "jenkins_controller_vm" {
location = azurerm_resource_group.infra.location
virtual_machine_name = "ghaf-jenkins-controller-${local.env}"
virtual_machine_size = local.opts[local.conf].vm_size_controller
virtual_machine_osdisk_size = "150"
virtual_machine_osdisk_size = local.opts[local.conf].osdisk_size_controller
virtual_machine_source_image = module.jenkins_controller_image.image_id

virtual_machine_custom_data = join("\n", ["#cloud-config", yamlencode({
Expand Down
33 changes: 21 additions & 12 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,31 @@ locals {
# E.g. 'Standard_D2_v3' means: 2 vCPU, 8 GiB RAM
opts = {
priv = {
vm_size_binarycache = "Standard_D2_v3"
vm_size_builder = "Standard_D2_v3"
vm_size_controller = "Standard_E2_v5"
num_builders = 1
vm_size_binarycache = "Standard_D2_v3"
osdisk_size_binarycache = "50"
vm_size_builder = "Standard_D2_v3"
osdisk_size_builder = "150"
vm_size_controller = "Standard_E2_v5"
osdisk_size_controller = "150"
num_builders = 1
}
dev = {
vm_size_binarycache = "Standard_D2_v3"
vm_size_builder = "Standard_D4_v3"
vm_size_controller = "Standard_E4_v5"
num_builders = 1
vm_size_binarycache = "Standard_D2_v3"
osdisk_size_binarycache = "250"
vm_size_builder = "Standard_D4_v3"
osdisk_size_builder = "250"
vm_size_controller = "Standard_E4_v5"
osdisk_size_controller = "500"
num_builders = 1
}
prod = {
vm_size_binarycache = "Standard_D2_v3"
vm_size_builder = "Standard_D8_v3"
vm_size_controller = "Standard_E4_v5"
num_builders = 2
vm_size_binarycache = "Standard_D2_v3"
osdisk_size_binarycache = "250"
vm_size_builder = "Standard_D8_v3"
osdisk_size_builder = "500"
vm_size_controller = "Standard_E4_v5"
osdisk_size_controller = "1000"
num_builders = 2
}
}

Expand Down
Loading