Skip to content

Commit

Permalink
chore: reduce size of remote cache to tune deployment costs (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan authored Jan 18, 2024
1 parent 0537872 commit c4775d7
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions .aspect/workflows/terraform/workflows.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,22 @@ module "aspect_workflows" {
# Number of nodes & machine type in the kubernetes cluster where the remote cache & observability
# services run.
k8s_cluster = {
node_count = 3
machine_type = "e2-standard-2"
# Kubernetes cluster on this deploymemt is tuned for cost. A high-performance deployment should
# use a minimum of e2-standard-2 and multiple nodes so that the cache can be sharded.
node_count = 1
machine_type = "e2-medium"
}

# Delivery properties
delivery_enabled = true

# Remote cache configuration
remote = {
cache_shards = 3
# Kubernetes cluster on this deploymemt is tuned for cost. A high-performance deployment should
# use a use multiple cache shards.
cache_shards = 1
cache_size_gb = 384
load_balancer_replicas = 2
load_balancer_replicas = 1
replicate_cache = false
}

Expand All @@ -56,31 +60,16 @@ module "aspect_workflows" {
default = {
machine_type = "n1-standard-4"
image_id = data.google_compute_image.runner_image.id
# While preemtible instances are possible to provision and we use them here on this open source
# repository as a demonstration of how to reduce compute costs, they are not recommended for
# repositories where the occasional CI failures due to a machine being preemted mid-job are not
# acceptable.
use_preemptible = true
}
small = {
machine_type = "e2-small"
num_ssds = 0
image_id = data.google_compute_image.runner_image.id
# While preemtible instances are possible to provision and we use them here on this open source
# repository as a demonstration of how to reduce compute costs, they are not recommended for
# repositories where the occasional CI failures due to a machine being preemted mid-job are not
# acceptable.
use_preemptible = true
}
micro = {
machine_type = "e2-micro"
num_ssds = 0
image_id = data.google_compute_image.runner_image.id
# While preemtible instances are possible to provision and we use them here on this open source
# repository as a demonstration of how to reduce compute costs, they are not recommended for
# repositories where the occasional CI failures due to a machine being preemted mid-job are not
# acceptable.
use_preemptible = true
}
}

Expand Down

0 comments on commit c4775d7

Please sign in to comment.