olehborysevych commented on code in PR #24614:
URL: https://github.com/apache/beam/pull/24614#discussion_r1053156803
##########
playground/backend/containers/go/build.gradle:
##########
@@ -55,10 +55,6 @@ task copyDockerfileDependencies(type: Copy) {
from '../../../infrastructure/proxy/allow_list_proxy.py'
into 'build/'
}
- copy {
Review Comment:
confirming this is a stale code removed
##########
playground/infrastructure/cloudbuild/examples_cd.sh:
##########
@@ -0,0 +1,49 @@
+#!/usr/bin/env bash
+
+# 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.
+
+# Install Python 3.8 and dependencies
+apt-get update > /dev/null
+export DEBIAN_FRONTEND=noninteractive
+apt-get install -y software-properties-common > /dev/null
+add-apt-repository -y ppa:deadsnakes/ppa > /dev/null && apt update > /dev/null
+apt install -y python3.8 python3-pip > /dev/null
+
+cd playground/infrastructure
+pip install -r requirements.txt > /dev/null
+
+export \
+ORIGIN=PG_EXAMPLES \
+STEP=CD \
+SUBDIRS="./learning/katas ./examples ./sdks" \
+GOOGLE_CLOUD_PROJECT=${PROJECT_ID} \
+BEAM_ROOT_DIR="../../" \
+SDK_CONFIG="../../playground/sdks.yaml" \
+BEAM_EXAMPLE_CATEGORIES="../categories.yaml" \
+BEAM_USE_WEBGRPC=yes \
+BEAM_CONCURRENCY=4 \
Review Comment:
I think we should externalise this to a substitution so we could check
different settings if needed without a commit. @rshamunov what do you think
about it?
##########
playground/infrastructure/cloudbuild/examples_cd.yaml:
##########
@@ -0,0 +1,36 @@
+# 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:
+ - id: "Deploying Playground SDK examples (CD)"
+ name: 'ubuntu'
+ entrypoint: 'bash'
+ args:
+ - '-c'
+ - |
+ chmod +x playground/infrastructure/cloudbuild/examples_cd.sh \
+ && ./playground/infrastructure/cloudbuild/examples_cd.sh
+ env:
+ - 'DNS_NAME=${_DNS_NAME}'
+ - 'PROJECT_ID=$PROJECT_ID'
+
+logsBucket: 'gs://state-bucket-ex1'
Review Comment:
is this correct bucket name?
##########
playground/infrastructure/cloudbuild/examples_cd.sh:
##########
@@ -0,0 +1,49 @@
+#!/usr/bin/env bash
+
+# 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.
+
+# Install Python 3.8 and dependencies
+apt-get update > /dev/null
+export DEBIAN_FRONTEND=noninteractive
+apt-get install -y software-properties-common > /dev/null
+add-apt-repository -y ppa:deadsnakes/ppa > /dev/null && apt update > /dev/null
+apt install -y python3.8 python3-pip > /dev/null
+
+cd playground/infrastructure
+pip install -r requirements.txt > /dev/null
+
+export \
+ORIGIN=PG_EXAMPLES \
+STEP=CD \
+SUBDIRS="./learning/katas ./examples ./sdks" \
+GOOGLE_CLOUD_PROJECT=${PROJECT_ID} \
+BEAM_ROOT_DIR="../../" \
+SDK_CONFIG="../../playground/sdks.yaml" \
+BEAM_EXAMPLE_CATEGORIES="../categories.yaml" \
+BEAM_USE_WEBGRPC=yes \
+BEAM_CONCURRENCY=4 \
Review Comment:
I'm also think that having SUBDIRS and sdks as substitutions will also be
beneficial and will allow more flexible operations as how we deploy examples.
Might be useful for SCIO example deployment. But also negotiable.
--
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]