olehborysevych commented on code in PR #23208:
URL: https://github.com/apache/beam/pull/23208#discussion_r974960087


##########
.github/workflows/k8e-backend.yml:
##########
@@ -0,0 +1,85 @@
+#

Review Comment:
   @MakarkinSAkvelon I think we need to rename this file to something like 
playground_deploy_backend



##########
.github/workflows/k8e-backend.yml:
##########
@@ -0,0 +1,85 @@
+#
+# 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.
+#
+
+name: build_playground_backend_kubernetes
+on:
+  push:
+env:
+  BEAM_ROOT_DIR: ../../
+  BEAM_EXAMPLE_CATEGORIES: ../categories.yaml
+  BEAM_VERSION: 2.40.0
+  K8S_NAMESPACE: playground-backend
+  HELM_APP_NAME: playground-backend
+  DOCKERTAG: beta
+jobs:
+  deployBackend:
+    name: Start to Deploy
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out the repo
+        uses: actions/checkout@v2
+      - name: Install kubectl
+        run: |
+             curl -LO "https://dl.k8s.io/release/$(curl -L -s 
https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" &&\
+             chmod +x kubectl &&\
+             mv kubectl /usr/local/bin/
+      - name: Install helm
+        run: |
+             curl -fsSL -o get_helm.sh 
https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 &&\
+             chmod 700 get_helm.sh &&\
+             ./get_helm.sh
+      - name: Set up Cloud SDK
+        uses: google-github-actions/setup-gcloud@v0
+      - name: Setup GCP account
+        run: |
+             echo "${{ secrets.S3D_GCP_PLAYGROUND_SA_KEY }}" | base64 -d > 
/tmp/gcp_access.json
+             which gcloud
+             gcloud auth activate-service-account --project=${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }} --key-file=/tmp/gcp_access.json
+      - name: create static ip
+        run: gcloud compute addresses create ${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}-static --global
+      - name: Update variables
+        run: |
+             echo "redis_ip: $(gcloud redis instances list --region 
us-central1 --format="value(host)"):6379" >> 
playground/infrastructure/helm-backend/values.yaml
+             echo "project_id: "${{ secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}"" 
>> playground/infrastructure/helm-backend/values.yaml
+             echo "registry: "${{ secrets.S3D_PLAYGROUND_REGISTRY_NAME}}/${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}/playground-repository"" >> 
playground/infrastructure/helm-backend/values.yaml
+             echo "static_ip: $(gcloud compute addresses list --filter 
"NAME:${{ secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}-static" 
--format="value(address)")" >> 
playground/infrastructure/helm-backend/values.yaml
+             echo "static_ip_name: ${{ secrets.S3D_GCP_PLAYGROUND_PROJECT_ID 
}}-static" >> playground/infrastructure/helm-backend/values.yaml
+             cat playground/infrastructure/helm-backend/values.yaml
+      - name: Get K8s Config
+        run: gcloud container clusters get-credentials --region us-central1-a 
playground-examples
+      - name: Login to Docker Registry
+        run: |
+              cat /tmp/gcp_access.json | docker login -u _json_key 
--password-stdin https://us-central1-docker.pkg.dev

Review Comment:
   docker registry is hardcode 



##########
playground/infrastructure/helm-backend/templates/go.yml:
##########
@@ -0,0 +1,45 @@
+# 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.
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: playground-go

Review Comment:
   I would like to see more meaningfull filenames here. "deployment-go" instead 
of "go" and the same for the rest of files



##########
playground/infrastructure/helm-backend/Chart.yaml:
##########
@@ -0,0 +1,22 @@
+
+# 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.
+
+apiVersion: v2
+description: A Helm chart for Apache Beam Application Deployment

Review Comment:
   name is misleading



##########
.github/workflows/k8e-backend.yml:
##########
@@ -0,0 +1,85 @@
+#
+# 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.
+#
+
+name: build_playground_backend_kubernetes
+on:
+  push:
+env:
+  BEAM_ROOT_DIR: ../../
+  BEAM_EXAMPLE_CATEGORIES: ../categories.yaml
+  BEAM_VERSION: 2.40.0
+  K8S_NAMESPACE: playground-backend
+  HELM_APP_NAME: playground-backend
+  DOCKERTAG: beta
+jobs:
+  deployBackend:
+    name: Start to Deploy
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out the repo
+        uses: actions/checkout@v2
+      - name: Install kubectl
+        run: |
+             curl -LO "https://dl.k8s.io/release/$(curl -L -s 
https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" &&\
+             chmod +x kubectl &&\
+             mv kubectl /usr/local/bin/
+      - name: Install helm
+        run: |
+             curl -fsSL -o get_helm.sh 
https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 &&\
+             chmod 700 get_helm.sh &&\
+             ./get_helm.sh
+      - name: Set up Cloud SDK
+        uses: google-github-actions/setup-gcloud@v0
+      - name: Setup GCP account
+        run: |
+             echo "${{ secrets.S3D_GCP_PLAYGROUND_SA_KEY }}" | base64 -d > 
/tmp/gcp_access.json
+             which gcloud
+             gcloud auth activate-service-account --project=${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }} --key-file=/tmp/gcp_access.json
+      - name: create static ip
+        run: gcloud compute addresses create ${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}-static --global
+      - name: Update variables
+        run: |
+             echo "redis_ip: $(gcloud redis instances list --region 
us-central1 --format="value(host)"):6379" >> 
playground/infrastructure/helm-backend/values.yaml
+             echo "project_id: "${{ secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}"" 
>> playground/infrastructure/helm-backend/values.yaml
+             echo "registry: "${{ secrets.S3D_PLAYGROUND_REGISTRY_NAME}}/${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}/playground-repository"" >> 
playground/infrastructure/helm-backend/values.yaml
+             echo "static_ip: $(gcloud compute addresses list --filter 
"NAME:${{ secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}-static" 
--format="value(address)")" >> 
playground/infrastructure/helm-backend/values.yaml
+             echo "static_ip_name: ${{ secrets.S3D_GCP_PLAYGROUND_PROJECT_ID 
}}-static" >> playground/infrastructure/helm-backend/values.yaml
+             cat playground/infrastructure/helm-backend/values.yaml
+      - name: Get K8s Config
+        run: gcloud container clusters get-credentials --region us-central1-a 
playground-examples

Review Comment:
   region name and "playground-examples" is hardcoded here and I think the name 
is misleading



##########
.github/workflows/k8e-backend.yml:
##########
@@ -0,0 +1,85 @@
+#
+# 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.
+#
+
+name: build_playground_backend_kubernetes
+on:
+  push:
+env:
+  BEAM_ROOT_DIR: ../../
+  BEAM_EXAMPLE_CATEGORIES: ../categories.yaml
+  BEAM_VERSION: 2.40.0
+  K8S_NAMESPACE: playground-backend
+  HELM_APP_NAME: playground-backend
+  DOCKERTAG: beta
+jobs:
+  deployBackend:
+    name: Start to Deploy
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out the repo
+        uses: actions/checkout@v2
+      - name: Install kubectl
+        run: |
+             curl -LO "https://dl.k8s.io/release/$(curl -L -s 
https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" &&\
+             chmod +x kubectl &&\
+             mv kubectl /usr/local/bin/
+      - name: Install helm
+        run: |
+             curl -fsSL -o get_helm.sh 
https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 &&\
+             chmod 700 get_helm.sh &&\
+             ./get_helm.sh
+      - name: Set up Cloud SDK
+        uses: google-github-actions/setup-gcloud@v0
+      - name: Setup GCP account
+        run: |
+             echo "${{ secrets.S3D_GCP_PLAYGROUND_SA_KEY }}" | base64 -d > 
/tmp/gcp_access.json
+             which gcloud
+             gcloud auth activate-service-account --project=${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }} --key-file=/tmp/gcp_access.json
+      - name: create static ip
+        run: gcloud compute addresses create ${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}-static --global
+      - name: Update variables
+        run: |
+             echo "redis_ip: $(gcloud redis instances list --region 
us-central1 --format="value(host)"):6379" >> 
playground/infrastructure/helm-backend/values.yaml

Review Comment:
   this could be done with something like yaml-update-action from github
   



##########
.github/workflows/k8e-backend.yml:
##########
@@ -0,0 +1,85 @@
+#
+# 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.
+#
+
+name: build_playground_backend_kubernetes
+on:
+  push:
+env:
+  BEAM_ROOT_DIR: ../../
+  BEAM_EXAMPLE_CATEGORIES: ../categories.yaml
+  BEAM_VERSION: 2.40.0
+  K8S_NAMESPACE: playground-backend
+  HELM_APP_NAME: playground-backend
+  DOCKERTAG: beta
+jobs:
+  deployBackend:
+    name: Start to Deploy
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out the repo
+        uses: actions/checkout@v2
+      - name: Install kubectl
+        run: |
+             curl -LO "https://dl.k8s.io/release/$(curl -L -s 
https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" &&\
+             chmod +x kubectl &&\
+             mv kubectl /usr/local/bin/
+      - name: Install helm
+        run: |
+             curl -fsSL -o get_helm.sh 
https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 &&\
+             chmod 700 get_helm.sh &&\
+             ./get_helm.sh
+      - name: Set up Cloud SDK
+        uses: google-github-actions/setup-gcloud@v0
+      - name: Setup GCP account
+        run: |
+             echo "${{ secrets.S3D_GCP_PLAYGROUND_SA_KEY }}" | base64 -d > 
/tmp/gcp_access.json
+             which gcloud
+             gcloud auth activate-service-account --project=${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }} --key-file=/tmp/gcp_access.json
+      - name: create static ip
+        run: gcloud compute addresses create ${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}-static --global
+      - name: Update variables
+        run: |
+             echo "redis_ip: $(gcloud redis instances list --region 
us-central1 --format="value(host)"):6379" >> 
playground/infrastructure/helm-backend/values.yaml
+             echo "project_id: "${{ secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}"" 
>> playground/infrastructure/helm-backend/values.yaml
+             echo "registry: "${{ secrets.S3D_PLAYGROUND_REGISTRY_NAME}}/${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}/playground-repository"" >> 
playground/infrastructure/helm-backend/values.yaml
+             echo "static_ip: $(gcloud compute addresses list --filter 
"NAME:${{ secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}-static" 
--format="value(address)")" >> 
playground/infrastructure/helm-backend/values.yaml
+             echo "static_ip_name: ${{ secrets.S3D_GCP_PLAYGROUND_PROJECT_ID 
}}-static" >> playground/infrastructure/helm-backend/values.yaml
+             cat playground/infrastructure/helm-backend/values.yaml
+      - name: Get K8s Config
+        run: gcloud container clusters get-credentials --region us-central1-a 
playground-examples
+      - name: Login to Docker Registry
+        run: |
+              cat /tmp/gcp_access.json | docker login -u _json_key 
--password-stdin https://us-central1-docker.pkg.dev
+      - name: Build And Push Backend
+        run: ./gradlew playground:backend:containers:java:dockerTagPush 
-Pdocker-repository-root='${{ secrets.S3D_PLAYGROUND_REGISTRY_NAME}}/${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}/playground-repository' 
-Pbase-image='apache/beam_java8_sdk:${{ env.BEAM_VERSION }}' -Pdocker-tag=${{ 
env.DOCKERTAG }}

Review Comment:
   playground-repository needs to be externalized to variable



##########
.github/workflows/k8e-backend.yml:
##########
@@ -0,0 +1,85 @@
+#
+# 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.
+#
+
+name: build_playground_backend_kubernetes
+on:
+  push:
+env:
+  BEAM_ROOT_DIR: ../../
+  BEAM_EXAMPLE_CATEGORIES: ../categories.yaml
+  BEAM_VERSION: 2.40.0
+  K8S_NAMESPACE: playground-backend
+  HELM_APP_NAME: playground-backend
+  DOCKERTAG: beta
+jobs:
+  deployBackend:
+    name: Start to Deploy
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out the repo
+        uses: actions/checkout@v2
+      - name: Install kubectl
+        run: |
+             curl -LO "https://dl.k8s.io/release/$(curl -L -s 
https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" &&\
+             chmod +x kubectl &&\
+             mv kubectl /usr/local/bin/
+      - name: Install helm
+        run: |
+             curl -fsSL -o get_helm.sh 
https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 &&\
+             chmod 700 get_helm.sh &&\
+             ./get_helm.sh
+      - name: Set up Cloud SDK
+        uses: google-github-actions/setup-gcloud@v0
+      - name: Setup GCP account
+        run: |
+             echo "${{ secrets.S3D_GCP_PLAYGROUND_SA_KEY }}" | base64 -d > 
/tmp/gcp_access.json

Review Comment:
   still has old secret and project id's key here and below



##########
playground/infrastructure/helm-backend/templates/go.yml:
##########
@@ -0,0 +1,45 @@
+# 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.
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: playground-go

Review Comment:
   ALso we discussed the MAX_JOBS environment variable 



##########
playground/infrastructure/helm-backend/values.yaml:
##########
@@ -0,0 +1,42 @@
+
+# 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.
+
+replicaCount: 1
+image:
+   java_image: beam_playground-backend-java
+   go_image: beam_playground-backend-go
+   router_image: beam_playground-backend-router
+   scio_image: beam_playground-backend-scio
+   python_image: beam_playground-backend-python
+   pullPolicy: Always
+   tag: "beta"
+
+service:
+   type: NodePort
+   targetPort: 8080
+   port: 443
+
+autoscaling:
+   enabled: false
+   minReplicas: 1
+   maxReplicas: 4
+   targetCPUUtilizationPercentage: 80
+Footer

Review Comment:
   this looks odd!



##########
playground/infrastructure/helm-backend/templates/service-python.yml:
##########
@@ -0,0 +1,40 @@
+
+# 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.
+
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    app: backend-python
+    type: backend
+  name: playground-python
+  annotations:
+    cloud.google.com/backend-config: '{"default": "bkend-health"}'
+    cloud.google.com/neg: '{"ingress": true}'
+spec:
+  ports:
+  - port: {{ .Values.service.port }}
+    protocol: TCP
+    targetPort: {{ .Values.service.targetPort }}
+  selector:
+    app: backend-python
+  type: {{ .Values.service.type }}
+Footer

Review Comment:
   This looks odd



##########
.github/workflows/k8e-backend.yml:
##########
@@ -0,0 +1,85 @@
+#
+# 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.
+#
+
+name: build_playground_backend_kubernetes
+on:
+  push:
+env:
+  BEAM_ROOT_DIR: ../../
+  BEAM_EXAMPLE_CATEGORIES: ../categories.yaml
+  BEAM_VERSION: 2.40.0
+  K8S_NAMESPACE: playground-backend
+  HELM_APP_NAME: playground-backend
+  DOCKERTAG: beta
+jobs:
+  deployBackend:
+    name: Start to Deploy
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check out the repo
+        uses: actions/checkout@v2
+      - name: Install kubectl
+        run: |
+             curl -LO "https://dl.k8s.io/release/$(curl -L -s 
https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" &&\
+             chmod +x kubectl &&\
+             mv kubectl /usr/local/bin/
+      - name: Install helm
+        run: |
+             curl -fsSL -o get_helm.sh 
https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 &&\
+             chmod 700 get_helm.sh &&\
+             ./get_helm.sh
+      - name: Set up Cloud SDK
+        uses: google-github-actions/setup-gcloud@v0
+      - name: Setup GCP account
+        run: |
+             echo "${{ secrets.S3D_GCP_PLAYGROUND_SA_KEY }}" | base64 -d > 
/tmp/gcp_access.json
+             which gcloud
+             gcloud auth activate-service-account --project=${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }} --key-file=/tmp/gcp_access.json
+      - name: create static ip
+        run: gcloud compute addresses create ${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}-static --global
+      - name: Update variables
+        run: |
+             echo "redis_ip: $(gcloud redis instances list --region 
us-central1 --format="value(host)"):6379" >> 
playground/infrastructure/helm-backend/values.yaml
+             echo "project_id: "${{ secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}"" 
>> playground/infrastructure/helm-backend/values.yaml
+             echo "registry: "${{ secrets.S3D_PLAYGROUND_REGISTRY_NAME}}/${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}/playground-repository"" >> 
playground/infrastructure/helm-backend/values.yaml
+             echo "static_ip: $(gcloud compute addresses list --filter 
"NAME:${{ secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}-static" 
--format="value(address)")" >> 
playground/infrastructure/helm-backend/values.yaml
+             echo "static_ip_name: ${{ secrets.S3D_GCP_PLAYGROUND_PROJECT_ID 
}}-static" >> playground/infrastructure/helm-backend/values.yaml
+             cat playground/infrastructure/helm-backend/values.yaml
+      - name: Get K8s Config
+        run: gcloud container clusters get-credentials --region us-central1-a 
playground-examples
+      - name: Login to Docker Registry
+        run: |
+              cat /tmp/gcp_access.json | docker login -u _json_key 
--password-stdin https://us-central1-docker.pkg.dev
+      - name: Build And Push Backend
+        run: ./gradlew playground:backend:containers:java:dockerTagPush 
-Pdocker-repository-root='${{ secrets.S3D_PLAYGROUND_REGISTRY_NAME}}/${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}/playground-repository' 
-Pbase-image='apache/beam_java8_sdk:${{ env.BEAM_VERSION }}' -Pdocker-tag=${{ 
env.DOCKERTAG }}
+      - name: Build And Push Go Backend
+        run: ./gradlew playground:backend:containers:go:dockerTagPush 
-Pdocker-repository-root='${{ secrets.S3D_PLAYGROUND_REGISTRY_NAME}}/${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}/playground-repository' 
-Pdocker-tag=${{ env.DOCKERTAG }}
+      - name: Build And Push Python Backend
+        run: ./gradlew playground:backend:containers:python:dockerTagPush 
-Pdocker-repository-root='${{ secrets.S3D_PLAYGROUND_REGISTRY_NAME}}/${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}/playground-repository' 
-Pdocker-tag=${{ env.DOCKERTAG }}
+      - name: Build And Push Scio Backend
+        run: ./gradlew playground:backend:containers:scio:dockerTagPush 
-Pdocker-repository-root='${{ secrets.S3D_PLAYGROUND_REGISTRY_NAME}}/${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}/playground-repository' 
-Pdocker-tag=${{ env.DOCKERTAG }}
+      - name: Build And Push Router Backend
+        run: ./gradlew playground:backend:containers:router:dockerTagPush 
-Pdocker-repository-root='${{ secrets.S3D_PLAYGROUND_REGISTRY_NAME}}/${{ 
secrets.S3D_GCP_PLAYGROUND_PROJECT_ID }}/playground-repository' 
-Pdocker-tag=${{ env.DOCKERTAG }}
+      - name: Database and index creation
+        run: |
+              gcloud app create --region=us-central

Review Comment:
   region is hardcoded



-- 
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