Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudbuild+playground+infra #55

Open
wants to merge 330 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
330 commits
Select commit Hold shift + click to select a range
912986c
Update cloudbuild_pg_to_gke.yaml
ruslan-ikhsan Nov 24, 2022
5a93aee
Update README.md
ruslan-ikhsan Nov 24, 2022
c755157
Update build.gradle.kts
ruslan-ikhsan Nov 24, 2022
b70afde
Updates
ruslan-ikhsan Nov 24, 2022
a1d0937
Update build.gradle.kts
ruslan-ikhsan Nov 24, 2022
d354909
Update cloudbuild_pg_to_gke.yaml
ruslan-ikhsan Nov 24, 2022
c5d6018
Update Dockerfile
ruslan-ikhsan Nov 24, 2022
8e27e02
Update cloudbuild_pg_to_gke.yaml
ruslan-ikhsan Nov 24, 2022
63bfc18
Update build.gradle.kts
ruslan-ikhsan Nov 24, 2022
95f0c9a
test faster without back
Nov 24, 2022
96b4c3e
Update env_init.sh
ruslan-ikhsan Nov 24, 2022
4f8ba9a
Updates to cloud build
ruslan-ikhsan Nov 24, 2022
54bba59
Update cloudbuild_pg_to_gke.yaml
ruslan-ikhsan Nov 24, 2022
b4c0e7c
Update build.gradle.kts
ruslan-ikhsan Nov 24, 2022
2041959
Updates cloud build
ruslan-ikhsan Nov 24, 2022
b5b97bc
Update cloudbuild_pg_to_gke.yaml
ruslan-ikhsan Nov 24, 2022
b3a5473
Update env_init.sh
ruslan-ikhsan Nov 24, 2022
d9db81a
Updates
ruslan-ikhsan Nov 24, 2022
871f149
Update build.gradle.kts
ruslan-ikhsan Nov 25, 2022
55f47b8
Updates
ruslan-ikhsan Nov 25, 2022
f131d69
trying to set run helm verbose
Nov 25, 2022
5a123c0
remove unneeded task temporarily
Nov 25, 2022
ac50f55
remove extraargs
Nov 25, 2022
7ac4b6c
verbose
Nov 25, 2022
f18c830
remove extra args
Nov 25, 2022
22ab4bc
remove commented code
Nov 25, 2022
a6d8da5
Update build.gradle.kts
ruslan-ikhsan Nov 25, 2022
93185f6
Merge branch 'cloudbuild+manualsetup+playground' of https://github.co…
ruslan-ikhsan Nov 25, 2022
0b95260
Update build.gradle.kts
ruslan-ikhsan Nov 25, 2022
f704876
Update build.gradle.kts
ruslan-ikhsan Nov 25, 2022
bffeaf4
Update build.gradle.kts
ruslan-ikhsan Nov 25, 2022
7f2a6e2
Update build.gradle.kts
ruslan-ikhsan Nov 25, 2022
ef4403e
Update cloudbuild_pg_to_gke.yaml
ruslan-ikhsan Nov 25, 2022
cd03dd8
Update cloudbuild_pg_to_gke.yaml
ruslan-ikhsan Nov 25, 2022
ae9cfe2
Update build.gradle.kts
ruslan-ikhsan Nov 25, 2022
75a55ed
Update build.gradle.kts
ruslan-ikhsan Nov 25, 2022
686802f
Update build.gradle.kts
ruslan-ikhsan Nov 25, 2022
7775eb5
Updates related to PR #24144
ruslan-ikhsan Nov 25, 2022
724cee4
Updates related to PR #24144
ruslan-ikhsan Nov 25, 2022
38993af
Update README.md
ruslan-ikhsan Nov 28, 2022
1c50bb9
Update build.gradle.kts
ruslan-ikhsan Nov 28, 2022
0b63cc4
Update README.md
ruslan-ikhsan Nov 28, 2022
070cd57
Update README.md
ruslan-ikhsan Nov 29, 2022
b4dd9f3
Update README.md
ruslan-ikhsan Nov 29, 2022
afddc16
Update variables.tf
ruslan-ikhsan Nov 29, 2022
119d31b
Update main.tf
ruslan-ikhsan Nov 29, 2022
8ec1c0b
Revert "Update main.tf"
ruslan-ikhsan Nov 29, 2022
4fe36a5
Revert "Update variables.tf"
ruslan-ikhsan Nov 29, 2022
a62b05d
Majority of updates following the comments in #24144
ruslan-ikhsan Nov 30, 2022
bc004b2
Rest of updates following the comments in #24144
ruslan-ikhsan Nov 30, 2022
44b409b
Create main.tf
ruslan-ikhsan Oct 7, 2022
c0e73c7
Update main.tf
ruslan-ikhsan Oct 7, 2022
759f00c
Create requirements.txt
ruslan-ikhsan Oct 7, 2022
8d019f0
Add files via upload
ruslan-ikhsan Oct 7, 2022
46e5ed4
Added main.py to src/
ruslan-ikhsan Oct 7, 2022
fad664b
Create README.md
ruslan-ikhsan Oct 7, 2022
8facebb
Update README.md
ruslan-ikhsan Oct 7, 2022
5cbeb80
Update tf backend script
ruslan-ikhsan Oct 10, 2022
a53b945
Update tf backend script
ruslan-ikhsan Oct 10, 2022
d5e30b6
Update TF scripts
ruslan-ikhsan Oct 12, 2022
a8b2202
New Terraform CF backend scripts
ruslan-ikhsan Oct 13, 2022
b424b07
Update Terraform v2 for backend
ruslan-ikhsan Oct 13, 2022
308d7bd
Update backend.tf
ruslan-ikhsan Oct 13, 2022
3c91403
Added api_enable tf scripts
ruslan-ikhsan Oct 13, 2022
8b751a2
Update main.tf
ruslan-ikhsan Oct 13, 2022
9c68685
Update main.tf
ruslan-ikhsan Oct 13, 2022
ed25e54
Updated tf files
ruslan-ikhsan Oct 13, 2022
f66ee33
Update main.tf
ruslan-ikhsan Oct 13, 2022
03c3626
Update main.tf
ruslan-ikhsan Oct 13, 2022
bec03ed
Updated some tf sciprts
ruslan-ikhsan Oct 13, 2022
4629412
Updated TF Files v.2
ruslan-ikhsan Oct 13, 2022
3af4f1d
Updated files tf scripts
ruslan-ikhsan Oct 13, 2022
ec90bb4
Update main.tf
ruslan-ikhsan Oct 13, 2022
2650851
Updated tf scripts
ruslan-ikhsan Oct 13, 2022
d215fc5
Update main.tf
ruslan-ikhsan Oct 13, 2022
26e7296
Update main.tf
ruslan-ikhsan Oct 13, 2022
d6a0702
Updates
ruslan-ikhsan Oct 13, 2022
e01cacd
Update main.tf
ruslan-ikhsan Oct 13, 2022
a87b2ab
Update tf scripts
ruslan-ikhsan Oct 13, 2022
6eb395d
Update main.tf
ruslan-ikhsan Oct 13, 2022
56bc7a5
Set up GitHub workflow
ruslan-ikhsan Oct 13, 2022
b8237a9
Update
ruslan-ikhsan Oct 13, 2022
dfdee88
Update main.tf
ruslan-ikhsan Oct 13, 2022
e9520d8
Update main.tf
ruslan-ikhsan Oct 13, 2022
7d2f49a
Update outputs.tf
ruslan-ikhsan Oct 13, 2022
a73c4eb
Some summary
ruslan-ikhsan Oct 13, 2022
1302ff7
Update variables.tf
ruslan-ikhsan Oct 13, 2022
b33496d
Updates
ruslan-ikhsan Oct 13, 2022
2ad535e
Updated
ruslan-ikhsan Oct 13, 2022
d5f6449
Udpated
ruslan-ikhsan Oct 13, 2022
2ba8e74
Updates
ruslan-ikhsan Oct 13, 2022
579821e
Update main.tf
ruslan-ikhsan Oct 14, 2022
4e67f81
Add
ruslan-ikhsan Oct 14, 2022
8078fd4
Updates
ruslan-ikhsan Oct 14, 2022
e15a76c
Updates
ruslan-ikhsan Oct 14, 2022
3d2bd56
Almost Final version
ruslan-ikhsan Oct 14, 2022
2a9df59
Almost Final Version
ruslan-ikhsan Oct 14, 2022
0c5e238
Update
ruslan-ikhsan Oct 14, 2022
376cab7
Update variables.tf
ruslan-ikhsan Oct 14, 2022
56eae84
Update main.tf
ruslan-ikhsan Oct 14, 2022
c783e6e
Updates
ruslan-ikhsan Oct 14, 2022
d68f873
Updates
ruslan-ikhsan Oct 14, 2022
45a7d80
Updates
ruslan-ikhsan Oct 14, 2022
0718b1f
Updates
ruslan-ikhsan Oct 16, 2022
6e7c37e
Final update
ruslan-ikhsan Oct 16, 2022
0eb5c6f
Delete redundant dir cloud-build
ruslan-ikhsan Oct 16, 2022
5247d3a
Delete redundant terraform dir
ruslan-ikhsan Oct 16, 2022
a331cb5
Delete state.tfbackend
ruslan-ikhsan Oct 16, 2022
33aa2b7
Update main.tf
ruslan-ikhsan Oct 16, 2022
78400c2
Move files
ruslan-ikhsan Oct 18, 2022
7816bac
Update cloudbuild.yaml
ruslan-ikhsan Oct 18, 2022
19af091
Create gcp-deploy.yml
ruslan-ikhsan Oct 18, 2022
b2c91e6
Update gcp-deploy.yml
ruslan-ikhsan Oct 18, 2022
10b5a3e
Update main.tf
ruslan-ikhsan Oct 19, 2022
9de2cd3
Update TF script for TOB backend
ruslan-ikhsan Oct 20, 2022
b90bfdd
Delete gcp-deploy.yml
ruslan-ikhsan Oct 21, 2022
c8cdc0a
Update main.tf
ruslan-ikhsan Oct 21, 2022
22f9d65
Final updates. Ready for review
ruslan-ikhsan Oct 21, 2022
1280d4d
Deleted locals variable
ruslan-ikhsan Oct 21, 2022
62c8379
Cloud Build for PG Backend (go, java)
ruslan-ikhsan Oct 25, 2022
9b18af7
Update cloudbuild_playground_backend.yml
ruslan-ikhsan Oct 25, 2022
438c329
Update cloudbuild_playground_backend.yml
ruslan-ikhsan Oct 25, 2022
ade8c63
Update cloudbuild_playground_backend.yml
ruslan-ikhsan Oct 25, 2022
c3b0b04
Update cloudbuild_playground_backend.yml
ruslan-ikhsan Oct 25, 2022
cf7c42c
Update cloudbuild_playground_backend.yml
ruslan-ikhsan Oct 25, 2022
348a0a5
Update cloudbuild_playground_backend.yml
ruslan-ikhsan Oct 25, 2022
68bd4a0
Update cloudbuild_playground_backend.yml
ruslan-ikhsan Oct 25, 2022
4cf12b5
Update cloudbuild_playground_backend.yml
ruslan-ikhsan Oct 25, 2022
360ab7f
Update cloudbuild_playground_backend.yml
ruslan-ikhsan Oct 25, 2022
2cff7e5
Update cloudbuild_playground_backend.yml
ruslan-ikhsan Oct 25, 2022
6c25baf
Update cloudbuild_playground_backend.yml
ruslan-ikhsan Oct 26, 2022
2a371d7
Update cloudbuild_playground_backend.yml
ruslan-ikhsan Oct 26, 2022
524791e
New cloudbuild yaml for backend
ruslan-ikhsan Oct 26, 2022
07c6196
Update cloudbuild_playground_backend.yml
ruslan-ikhsan Oct 26, 2022
22e23a7
Update cloudbuild_playground_backend.yml
ruslan-ikhsan Oct 26, 2022
1768904
Update for PR 280
ruslan-ikhsan Nov 7, 2022
8ef3ef0
Create cloudbuild_trigger.yml
ruslan-ikhsan Nov 2, 2022
e8da240
Update cloudbuild_trigger.yml
ruslan-ikhsan Nov 2, 2022
2d3fb66
Update cloudbuild_trigger.yml
ruslan-ikhsan Nov 2, 2022
3f294d4
Update cloudbuild_trigger.yml
ruslan-ikhsan Nov 2, 2022
d402c89
Update cloudbuild_trigger.yml
ruslan-ikhsan Nov 2, 2022
1d2a7b2
Update cloudbuild_trigger.yml
ruslan-ikhsan Nov 2, 2022
fc56907
Delete cloudbuild_playground_backend.yml
ruslan-ikhsan Nov 3, 2022
9961422
Delete Dockerfile-base-image-backend
ruslan-ikhsan Nov 3, 2022
07a9fda
Delete cloudbuild_trigger.yml
ruslan-ikhsan Nov 3, 2022
b0c9531
Delete cloudbuild_playground_backend.yml
ruslan-ikhsan Nov 3, 2022
239884f
Update variables.tf
ruslan-ikhsan Nov 7, 2022
278814e
Update README.md
ruslan-ikhsan Nov 8, 2022
06f4b5e
Update README.md
ruslan-ikhsan Nov 8, 2022
91d07ac
Create cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
456c456
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
7a59a32
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
4abdede
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
66b67b4
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
90c45e5
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
9f5b2d2
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
fd3f866
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
83ffcd6
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
9b5c413
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
799133c
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
acd3320
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
9bad046
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
c12e0ef
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
7d72900
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
e223cc4
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
8703895
Update cloudbuild.yaml
ruslan-ikhsan Nov 29, 2022
eb3d2e5
Bump github.com/aws/aws-sdk-go-v2/credentials in /sdks (#24318)
dependabot[bot] Nov 23, 2022
9557ed5
[Website] update table text content overflow #23460
bullet03 Oct 3, 2022
528faa1
[Metrics] Add 'performance tests' tag to JMH dashboard (related to #2…
Nov 23, 2022
206ea0c
Update apache beam installation in notebook (#24336)
AnandInguva Nov 23, 2022
960b09b
Adds GCP core dependency to the test expansion service (#24308)
chamikaramj Nov 23, 2022
9e782b3
[Spark dataset runner] Fix translation to run in the evaluation threa…
Nov 23, 2022
d87eb54
Update dataflow containers to coincide with objsize 0.6.1 update (#24…
lukecwik Nov 23, 2022
d60cfdc
Add test configurations for deterministic outputs on Dataflow (#24325)
AnandInguva Nov 23, 2022
2dec824
Updates ExpansionService to support dynamically discovering and expan…
chamikaramj Nov 24, 2022
445ec8d
Enable streaming runner v2 tests that were forgotten to be enabled. (…
lukecwik Nov 24, 2022
62af16e
A schema transform implementation for SpannerIO.Write (#24278)
pabloem Nov 24, 2022
f1e1299
Update java-multi-language-pipelines.md (#24345)
kn1kn1 Nov 25, 2022
6ec3125
[Tour Of Beam] persistence_key for Pg::SaveSnippet (#24287)
eantyshev Nov 28, 2022
a388f99
Get postcommits green and unsickbay (#24342)
damccorm Nov 28, 2022
858ea05
Fix workflow cron syntax (#24376)
damccorm Nov 28, 2022
0a6a240
concurrency (#24332)
eantyshev Nov 28, 2022
453fdfe
Check for null in BeamFnDataGrpcMultiplexer
kennknowles Nov 18, 2022
1df3d11
Upgrade checkerframework to 3.12.0
kennknowles Nov 18, 2022
f1f9c5e
Upgrade checkerframework gradle plugin to 0.6.19
kennknowles Nov 18, 2022
2f72234
Handle CompleteWorkStatus shutdown signal
apilloud Nov 16, 2022
d6dc8d0
Revert "Force discarding mode in with_fanout without rewindowing." (#…
tvalentyn Nov 28, 2022
f733441
Bump pillow from 9.2.0 to 9.3.0 in /sdks/python/apache_beam/examples/…
dependabot[bot] Nov 28, 2022
6dd5daf
Update precombine bencmark to better represent varied workloads (#24343)
lukecwik Nov 29, 2022
6c1e2d4
Merge pull request #24320: update bom to the latest one
reuvenlax Nov 29, 2022
2a83576
Merge pull request #24147: First step in adding schema update to Stor…
reuvenlax Nov 29, 2022
671fbda
Simplify sdks/java/harness build
apilloud Nov 17, 2022
14d6cd7
Move configuration changes before shadowJar
apilloud Nov 18, 2022
6ceb57f
Exclude :sdks:java:core from harness jar
apilloud Nov 18, 2022
1488804
Enable shadowJar validation for sdks/java/harness
apilloud Nov 18, 2022
3978cae
Add missing portability runner dependencies
apilloud Nov 18, 2022
2ccee17
Exclude jamm from harness jar
apilloud Nov 21, 2022
1fa52dc
Enforce GCP BOM on sdks/java/harness
apilloud Nov 28, 2022
12521f9
Merge branch 'akvelon:master' into master
ruslan-ikhsan Nov 30, 2022
02e282b
Committ
ruslan-ikhsan Jan 18, 2023
d540fb6
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
8839775
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
c986cbb
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
49948b7
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
91b4846
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
c9b0eda
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
3dd8281
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
7c75373
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
07e198a
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
f104050
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
9cf91de
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
e81fa88
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
8f5d782
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
ffcdb4c
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
8eab4bc
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
c674d28
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
0b4c5a8
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
335e57f
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
238c794
Update build.gradle.kts
ruslan-ikhsan Jan 18, 2023
4d538ef
Create env_ci.sh
ruslan-ikhsan Jan 19, 2023
9130628
Create env_ci.sh
ruslan-ikhsan Jan 19, 2023
679e703
Update env_ci.sh
ruslan-ikhsan Jan 19, 2023
ec58a2e
Update env_ci.sh
ruslan-ikhsan Jan 19, 2023
8aa5485
Update env_ci.sh
ruslan-ikhsan Jan 19, 2023
81ab5cd
Update env_ci.sh
ruslan-ikhsan Jan 19, 2023
b2d5c25
Update env_ci.sh
ruslan-ikhsan Jan 19, 2023
4df2424
Testing commits
ruslan-ikhsan Jan 19, 2023
2133fe5
Updates to test
ruslan-ikhsan Jan 19, 2023
71a230b
Update env_ci.sh
ruslan-ikhsan Jan 19, 2023
b1cb043
Update env_ci.sh
ruslan-ikhsan Jan 19, 2023
1461648
Update env_ci.sh
ruslan-ikhsan Jan 19, 2023
a4a9963
Update env_ci.sh
ruslan-ikhsan Jan 19, 2023
b0660ba
Update env_ci.sh
ruslan-ikhsan Jan 19, 2023
6f03c8e
Update ci_cd.py
ruslan-ikhsan Jan 19, 2023
e47959d
Update env_ci.sh
ruslan-ikhsan Jan 19, 2023
1791d51
Revert "Update env_ci.sh"
ruslan-ikhsan Jan 19, 2023
9500aea
Update env_ci.sh
ruslan-ikhsan Jan 19, 2023
c506a13
Update env_ci.sh
ruslan-ikhsan Jan 20, 2023
ea9afc9
Update env_ci.sh
ruslan-ikhsan Jan 20, 2023
46a7924
Updates for commits
ruslan-ikhsan Jan 20, 2023
12bf510
Update env_ci.sh
ruslan-ikhsan Jan 20, 2023
e70d5ad
Update ci_success_msg.sh
ruslan-ikhsan Jan 20, 2023
f6db914
Update env_ci.sh
ruslan-ikhsan Jan 20, 2023
17b3e08
Update env_ci.sh
ruslan-ikhsan Jan 20, 2023
a6c5785
Update ci_success_msg.sh
ruslan-ikhsan Jan 20, 2023
77d2ecb
Update ci_success_msg.sh
ruslan-ikhsan Jan 20, 2023
b64779e
Update ci_success_msg.sh
ruslan-ikhsan Jan 20, 2023
344012f
Update ci_success_msg.sh
ruslan-ikhsan Jan 20, 2023
0cfbf25
Delete env_ci.sh
ruslan-ikhsan Jan 20, 2023
9b8f51b
Merge branch 'master' into cloudbuild+playground+infra
ruslan-ikhsan Jan 20, 2023
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
58 changes: 58 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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.

steps:
- name: 'ubuntu'
entrypoint: 'bash'
args:
- '-c'
- |
apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get install -y software-properties-common
add-apt-repository -y ppa:deadsnakes/ppa && apt update
apt install -y python3.8 python3-pip
cd playground/infrastructure
pip install -r requirements.txt
export \
BEAM_ROOT_DIR="../../" \
SDK_CONFIG="../../playground/sdks.yaml" \
BEAM_EXAMPLE_CATEGORIES="../categories.yaml" \
SERVER_ADDRESS="https://${_SDK}.playground-uat.xyz" \
BEAM_USE_WEBGRPC=yes \
BEAM_CONCURRENCY=4
python3 ci_cd.py --step ${_STEP} --sdk SDK_${_SDK} --origin ${_ORIGIN} \
--subdirs ${_SUBDIRS}

env:
- 'ORIGIN=${_ORIGIN}'
- 'SDK=${_SDK}'
- 'STEP=${_STEP}'
- 'SUBDIRS=${_SUBDIRS}'
- 'GOOGLE_CLOUD_PROJECT=$PROJECT_ID'

substitutions:
_STEP: CD
_SDK: GO
_ORIGIN: PG_EXAMPLES
_SUBDIRS: "../../learning/katas ../../examples ../../sdks"

# This option enables writing logs to Cloud Logging
options:
logging: CLOUD_LOGGING_ONLY

timeout: 3600s
53 changes: 53 additions & 0 deletions cloudbuild/configs/playground-infrastructure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

# Setup of Cloud Build and GitHub repository to deploy Beam Playground

**This README explains how to:**

1. Enable Cloud Build in your GCP Project

2. Connect Github repository to Cloud Build


### Before you begin

- Create GCP project
- [Create a project docs](https://cloud.google.com/apis/docs/getting-started#creating_a_google_project)
- Enable billing for the project
- [Enable billing docs](https://cloud.google.com/apis/docs/getting-started#enabling_billing)
- Enable Cloud Build API
- [Enable API docs](https://cloud.google.com/apis/docs/getting-started#enabling_apis)
- Have your GitHub repository ready

## Enable Cloud Build and connect a GitHub Repository:

To connect your GitHub repository to your Cloud Build:

1. Open the Cloud Build, either from Navigation Menu on the left side or using search engine.

2. Open the Triggers page in the Cloud Build console. Select required GCP project in the top bar.

3. Click Connect repository on the top. Select GitHub (Cloud Build GitHub App), check the consent checkbox, and click Continue.

4. In the pop-up that appears, select your GitHub username or organization.

5. Select one of the following options based on your business need:

a. All repositories - enable current and future GitHub repositories for access via the Cloud Build app

b. Only select repositories - use the Select repositories drop-down to enable only specific repositories for access via the Cloud Build app.

6. Click Install to install the Cloud Build app.

7. After you have selected a project or created a new one, you will see the Connect repository panel.

8. In the Select repository section, select the following fields:

* GitHub account: The GitHub account used to install the Cloud Build GitHub App. This field may be pre-selected for you.

* Repository: The repositories you want to connect to Cloud Build.

9. Once you have selected your GitHub account and repositories, read the consent disclaimer and select the checkbox next to proceed further.

10. Click Connect and Done.

You have now connected one or more GitHub repositories to your Cloud project and Cloud Build.
66 changes: 66 additions & 0 deletions cloudbuild/configs/playground-infrastructure/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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.

steps:
# This step builds the base image for Beam Playground worker
- name: 'gcr.io/cloud-builders/docker'
args:
- 'build'
- '--tag=$_REGION-docker.pkg.dev/$PROJECT_ID/$_ARTIFACT_REGISTRY_REPOSITORY_ID/backend-builder:worker'
- '-f'
- 'cloudbuild/dockerfiles/Dockerfile-base-image-worker'
- '.'

# This step builds worker container and runs precommit gradle task
- name: '$_REGION-docker.pkg.dev/$PROJECT_ID/$_ARTIFACT_REGISTRY_REPOSITORY_ID/backend-builder:worker'
entrypoint: "/bin/bash"
args: ['-c', './gradlew playground:terraform:InitInfrastructure -Pproject_environment="beta"']

- name: '$_REGION-docker.pkg.dev/$PROJECT_ID/$_ARTIFACT_REGISTRY_REPOSITORY_ID/backend-builder:worker'
entrypoint: "gcloud"
args:
[
'container',
'clusters',
'get-credentials',
'playground-backend',
'--region=$_REGION'
]

- name: '$_REGION-docker.pkg.dev/$PROJECT_ID/$_ARTIFACT_REGISTRY_REPOSITORY_ID/backend-builder:worker'
entrypoint: "gcloud"
args:
[
'app',
'deploy',
'playground/index.yaml'
]

# This step builds worker container and runs precommit gradle task
- name: '$_REGION-docker.pkg.dev/$PROJECT_ID/$_ARTIFACT_REGISTRY_REPOSITORY_ID/backend-builder:worker'
entrypoint: "/bin/bash"
args: [ '-c', './gradlew playground:terraform:gkebackend -Pproject_environment="beta" -Pdocker-tag="ruslan"' ]

substitutions:
_REGION: us-central1
# This will need to be changed to reflect your actual Artifact Repository name for docker containers in GCP
_ARTIFACT_REGISTRY_REPOSITORY_ID: playground-repository

images:
- '$_REGION-docker.pkg.dev/$PROJECT_ID/$_ARTIFACT_REGISTRY_REPOSITORY_ID/backend-builder:worker'

timeout: 2000s
56 changes: 56 additions & 0 deletions cloudbuild/dockerfiles/Dockerfile-base-image-worker
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# 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.

FROM gcr.io/google.com/cloudsdktool/google-cloud-cli

ARG GO_VERSION=1.18
ENV PATH="${PATH}:/usr/local/go/bin"

RUN apt-get update >/dev/null
RUN apt-get -y install build-essential unzip

# Install Docker
# See: https://docs.docker.com/engine/install/ubuntu/#install-using-the-convenience-script
RUN curl -fsSL https://get.docker.com -o get-docker.sh
RUN sh ./get-docker.sh >/dev/null

# Install Go
# See: https://go.dev/doc/install
RUN curl -OL https://golang.org/dl/go$GO_VERSION.linux-amd64.tar.gz
RUN sha256sum go$GO_VERSION.linux-amd64.tar.gz
RUN tar -C /usr/local -xvf go$GO_VERSION.linux-amd64.tar.gz
RUN rm go$GO_VERSION.linux-amd64.tar.gz
RUN go version

#Install kubectl
RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" \
&& chmod +x ./kubectl \
&& mv ./kubectl /usr/local/bin/kubectl \
&& curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 \
&& chmod +x get_helm.sh && ./get_helm.sh > /dev/null

#Install Terraform
RUN curl -OL https://releases.hashicorp.com/terraform/1.3.3/terraform_1.3.3_linux_amd64.zip
RUN unzip terraform_1.3.3_linux_amd64.zip
RUN mv terraform /usr/local/bin

#Install GoLint
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.50.1

# Install Java
RUN apt-get install openjdk-11-jdk -y >/dev/null
RUN java -version
61 changes: 61 additions & 0 deletions cloudbuild_cd_python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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.

steps:
- name: 'ubuntu'
entrypoint: 'bash'
args:
- '-c'
- |
apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get install -y software-properties-common
add-apt-repository -y ppa:deadsnakes/ppa && apt update
apt install -y python3.8 python3-pip
cd playground/infrastructure
pip install -r requirements.txt
export \
BEAM_ROOT_DIR="../../" \
SDK_CONFIG="../../playground/sdks.yaml" \
BEAM_EXAMPLE_CATEGORIES="../categories.yaml" \
SERVER_ADDRESS="https://${_SDK}.playground-uat.xyz" \
BEAM_USE_WEBGRPC=yes \
BEAM_CONCURRENCY=4
for sdk in go java python
do
export sdks=$sdk
export SERVER_ADDRESS=https://$sdks-playground
python3 ci_cd.py --step ${_STEP} --sdk SDK_$sdks --origin ${_ORIGIN} --subdirs ${_SUBDIRS}
done

env:
- 'ORIGIN=${_ORIGIN}'
- 'STEP=${_STEP}'
- 'SUBDIRS=${_SUBDIRS}'
- 'GOOGLE_CLOUD_PROJECT=$PROJECT_ID'

substitutions:
_STEP: CD
_SDK: JAVA
_ORIGIN: PG_EXAMPLES
_SUBDIRS: "././learning/katas ././examples ././sdks"

# This option enables writing logs to Cloud Logging
options:
logging: CLOUD_LOGGING_ONLY

timeout: 3600s
79 changes: 79 additions & 0 deletions learning/tour-of-beam/terraform-v2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!--
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.
-->

# Overview

This project deploys backend infrastructure for Tour of Beam as GCP Cloud Functions using Terraform.

# Requirements

## Development requirements

- [Active GCP project with billing enabled](https://developers.google.com/workspace/guides/create-project)
- [Existing bucket to store Terraform state](https://cloud.google.com/storage/docs/creating-buckets)
- [Existing service account with the following roles](https://cloud.google.com/iam/docs/creating-managing-service-accounts):
- Cloud Functions Admin
- Project IAM Admin
- Service Account Admin
- Service Account User
- Storage Admin
- Storage Object Admin

#### Configuring your environment

Steps below will:
1. Enable required APIs for the project
2. Create service account and assign required IAM roles to it (service account to run the function with)
3. Create bucket to archive and store source code
4. Create cloud functions to each function defined in backend source code


```bash
# Create environment directory per your requirements/policy
mkdir environments/dev
cd ../environments/dev
# Create new configuration to auth to GCP Project
gcloud init
# Acquire new user credentials to use for Application Default Credentials
gcloud auth application-default login
# Initiliaze and run terraform
terraform init
terraform plan
terraform apply
```


### Sample usage

Entry point: list sdk names
```
$ curl -X GET https://$REGION-$PROJECT_ID.cloudfunctions.net/getSdkList | json_pp
```
[response](./samples/api/get_sdk_list.json)

Get content tree by sdk name (SDK name == SDK id)
```
$ curl -X GET 'https://$REGION-$PROJECT_ID.cloudfunctions.net/getContentTree?sdk=python'
```
[response](./samples/api/get_content_tree.json)


Get unit content tree by sdk name and unitId
```
$ curl -X GET 'https://$REGION-$PROJECT_ID.cloudfunctions.net/getContentTree?sdk=python&id=challenge1'
```
[response](./samples/api/get_unit_content.json)
Loading