Skip to content

Commit

Permalink
feat: configure the gke cluster for fl
Browse files Browse the repository at this point in the history
Configure the GKE cluster for the federated learning use case
  • Loading branch information
ferrarimarco committed Dec 20, 2024
1 parent 686b648 commit f79bc83
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
11 changes: 8 additions & 3 deletions platforms/gke/base/use-cases/federated-learning/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# Federated learning on Google Cloud

## Configure the Federated learning reference architecture

You can configure the reference architecture by modifying files in
`platforms/gke/base/use-cases/federated-learning/terraform/_shared_config`.

## Deploy the Federated learning reference architecture

1. Provision the Federated Learning reference architecture:
1. Provision the Federated learning reference architecture:

```sh
"${ACP_PLATFORM_BASE_DIR}/use-cases/federated-learning/deploy.sh"
```

## Teardown the Federated Learning reference architecture
## Teardown the Federated learning reference architecture

1. Teardown the Federated Learning reference architecture:
1. Teardown the Federated learning reference architecture:

```sh
"${ACP_PLATFORM_BASE_DIR}/use-cases/federated-learning/teardown.sh"
Expand Down
3 changes: 2 additions & 1 deletion platforms/gke/base/use-cases/federated-learning/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ FEDERATED_LEARNING_SHARED_CONFIG_DIR="${FEDERATED_LEARNING_USE_CASE_TERRAFORM_DI

# shellcheck disable=SC2034 # Variable is used in other scripts
federated_learning_terraservices=(
"initialize"
"container_image_repository"
"private_google_access"
)

# shellcheck disable=SC2034 # Variable is used in other scripts
TERRAFORM_CLUSTER_CONFIGURATION=(
"cluster_binary_authorization_evaluation_mode = \"PROJECT_SINGLETON_POLICY_ENFORCE\""
"cluster_confidential_nodes_enabled = false"
)

apply_or_destroy_terraservice() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

resource "google_artifact_registry_repository" "container_image_repository" {
location = var.cluster_region
repository_id = "federated-learning-container-image-repository"
repository_id = "${local.unique_identifier_prefix}-fl-repository"
description = "Federated Learning container image repository"
format = "DOCKER"
project = google_project_service.artifactregistry_googleapis_com.project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ data "google_compute_network" "main_vpc_network" {

resource "google_dns_managed_zone" "private_google_access" {
project = google_project_service.dns_googleapis_com.project
name = "private-google-apis"
name = "${local.unique_identifier_prefix}-private-google-apis"
dns_name = "googleapis.com."
description = "Private DNS zone for Google APIs"
visibility = "private"
Expand All @@ -51,7 +51,7 @@ resource "google_dns_managed_zone" "private_google_access" {

resource "google_dns_managed_zone" "private_google_access_container_registry" {
project = google_project_service.dns_googleapis_com.project
name = "private-google-access-container-registry"
name = "${local.unique_identifier_prefix}-private-google-access-container-registry"
dns_name = "gcr.io."
description = "Private DNS zone for Container Registry"
visibility = "private"
Expand All @@ -65,7 +65,7 @@ resource "google_dns_managed_zone" "private_google_access_container_registry" {

resource "google_dns_managed_zone" "private_google_access_artifact_registry" {
project = google_project_service.dns_googleapis_com.project
name = "private-google-access-artifact-registry"
name = "${local.unique_identifier_prefix}-private-google-access-artifact-registry"
dns_name = "pkg.dev."
description = "Private DNS zone for Artifact Registry"
visibility = "private"
Expand Down

0 comments on commit f79bc83

Please sign in to comment.