ruslan-ikhsan commented on code in PR #25793:
URL: https://github.com/apache/beam/pull/25793#discussion_r1177773744


##########
learning/tour-of-beam/terraform/README.md:
##########
@@ -0,0 +1,121 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+-->
+# The Tour of Beam deployment on GCP
+This guide provides instructions on how to deploy the Tour of Beam environment 
on Google Cloud Platform (GCP) and Firebase environment. Before starting the 
deployment, ensure that you have the following prerequisites in place:
+
+## Prerequisites:
+
+1. [GCP 
project](https://cloud.google.com/resource-manager/docs/creating-managing-projects)
+2. [GCP User 
account](https://cloud.google.com/appengine/docs/standard/access-control?tab=python)
 _(Note: You will find the instruction "How to create User account" for your 
new project)_<br>
+   Ensure that the account has at least following privileges:
+   - Cloud Datastore Owner
+   - Create Service Accounts
+   - Security Admin
+   - Service Account User
+   - Service Usage Admin
+   - Storage Admin
+   - Kubernetes Engine Cluster Viewer
+
+3. [Google Cloud Storage 
bucket](https://cloud.google.com/storage/docs/creating-buckets) for saving 
deployment state
+
+4. An OS with the following software installed:
+
+* [Java](https://adoptopenjdk.net/)
+* [NodeJS & 
npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm/)
+* [Flutter (3.7.3 >)](https://docs.flutter.dev/get-started/install)
+* [Dart SDK (2.19.2)](https://dart.dev/get-dart)
+* [Firebase-tools CLI](https://www.npmjs.com/package/firebase-tools)
+* [Terraform](https://www.terraform.io/downloads)
+* [gcloud CLI](https://cloud.google.com/sdk/docs/install-sdk)
+* [Kubectl authentication 
plugin](https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke)
+* [Go](https://go.dev/doc/install)
+
+5. Apache Beam Git repository cloned locally
+
+# Prepare deployment configuration:
+Tour of Beam backend uses `terraform.tfvars` located in 
`learning/tour-of-beam/terraform/environment/environment_name/` to define 
variables specific to an environment (e.g., prod, test, staging). Follow the 
steps below to prepare the deployment configuration:<br>
+1. Create a folder (referred to as `environment_name`) to define a new 
environment and place configuration files into it:
+
+* `terraform.tfvars` environment variables:
+```
+project_id              = "gcp_project_id"            # Your GCP Project ID
+cloudfunctions_bucket   = "gcs_bucket_name"           # Globally unique name 
of the bucket to store cloud functions' source code
+region                  = "gcp_region"                # Your GCP resources 
region
+service_account_id      = "service_account_name"      # Name of GCP service 
account to run Tour of Beam cloud functions
+
+```
+* `state.tfbackend` environment variables:
+```
+bucket = "bucket_name"          # Your created bucket name for terraform 
tfstate file
+```
+2. Configure authentication for the Google Cloud Platform (GCP)
+```
+gcloud init
+```
+```
+gcloud auth application-default login
+```
+
+3. Configure authentication in the GCP Docker registry:
+```
+ gcloud auth configure-docker `chosen_region`-docker.pkg.dev
+```
+4. And the authentication in GCP Google Kubernetes Engine:
+```
+gcloud container clusters get-credentials --region `chosen_gke_zone` 
`gke_name` --project `project_id`

Review Comment:
   "Existing Playground environment" has been added as pre-requisite
   It consists of various services, including GKE



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to