Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ locals {

ira_online_gpu_diffusers_sglang_diffusers_image_url = var.ira_online_gpu_sglang_diffusers_image_url != null ? var.ira_online_gpu_sglang_diffusers_image_url : "${local.cloudbuild_ar_image_repository_url}/gpu/sglang:latest"

ira_cpu_k6_benchmark_image_url = var.ira_cpu_k6_benchmark_image_url != null ? var.ira_cpu_k6_benchmark_image_url : "${local.cloudbuild_ar_image_repository_url}/cpu/k6-benchmark:latest"

ira_online_tpu_kubernetes_namespace_name = var.ira_online_tpu_kubernetes_namespace_name != null ? var.ira_online_tpu_kubernetes_namespace_name : "${local.unique_identifier_prefix}-online-tpu"
ira_online_tpu_kubernetes_service_account_name = var.ira_online_tpu_kubernetes_service_account_name != null ? var.ira_online_tpu_kubernetes_service_account_name : "${local.unique_identifier_prefix}-online-tpu"
ira_online_tpu_max_diffusion_sdxl_image_url = var.ira_online_tpu_max_diffusion_sdxl_image_url != null ? var.ira_online_tpu_max_diffusion_sdxl_image_url : "${local.cloudbuild_ar_image_repository_url}/tpu-max-diffusion/sdxl:latest"
Expand Down Expand Up @@ -221,6 +223,11 @@ variable "ira_online_gpu_diffusers_flux_image_url" {
type = string
}

variable "ira_cpu_k6_benchmark_image_url" {
default = null
description = "The URL for the k6 benchmark container image."
type = string
}

variable "ira_online_gpu_kubernetes_namespace_name" {
default = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ output "ira_offline_batch_project_id" {
value = local.ira_offline_batch_project_id
}

output "ira_cpu_k6_benchmark_image_url" {
value = local.ira_cpu_k6_benchmark_image_url
}

output "ira_online_gpu_diffusers_flux_image_url" {
value = local.ira_online_gpu_diffusers_flux_image_url
}
Expand Down

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

locals {
image_destination = local.ira_async_cpu_load_generator_image_url
}

resource "terraform_data" "submit_docker_build_k6_benchmark" {
input = {
acp_root = local.acp_root
cloudbuild_project_id = local.cloudbuild_project_id
cloudbuild_service_account_id = local.cloudbuild_service_account_id
cloudbuild_source_bucket_name = local.cloudbuild_source_bucket_name
image_destination = local.ira_cpu_k6_benchmark_image_url
}

provisioner "local-exec" {
command = <<-EOT
gcloud builds submit \
--config="cloudbuild.yaml" \
--gcs-source-staging-dir="gs://${self.input.cloudbuild_source_bucket_name}/source" \
--project="${self.input.cloudbuild_project_id}" \
--quiet \
--service-account="${self.input.cloudbuild_service_account_id}" \
--substitutions=_DESTINATION="${self.input.image_destination}"
EOT
interpreter = ["bash", "-c"]
working_dir = "${local.acp_root}/container-images/cpu/k6-benchmark"
}

triggers_replace = {
source_hash = sha256(join("", [for file in fileset("${local.acp_root}/container-images/cpu/k6-benchmark", "**") : filesha256("${local.acp_root}/container-images/cpu/k6-benchmark/${file}")]))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

locals {
acp_root = "${path.module}/../../../../../../../../.."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

terraform {
required_version = ">= 1.5.7"

required_providers {
google = {
source = "hashicorp/google"
version = "6.49.2"
}
local = {
source = "hashicorp/local"
version = "2.5.3"
}
}

provider_meta "google" {
module_name = "cloud-solutions/acp_ira_images_cpu_batch_load_generator_deploy-v1"
}
}
Loading