Ardagan commented on a change in pull request #12167: URL: https://github.com/apache/beam/pull/12167#discussion_r450384812
########## File path: .test-infra/metrics/influxdb/Dockerfile ########## @@ -0,0 +1,35 @@ +################################################################################ +# 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 python:3-slim + +RUN pip install --no-cache-dir gsutil + +WORKDIR / + +RUN gsutil cp gs://apache-beam-testing-metrics/influxdb-backup.tar.gz . && \ Review comment: Are these backups available to non-committers? ########## File path: .test-infra/metrics/kubernetes/beam-influxdb-autobackup.yaml ########## @@ -16,35 +16,51 @@ # limitations under the License. ################################################################################ -# A Cron Job that makes a full InfluxDB backup every week. +# A Cron Job that makes a full InfluxDB backup every week and sends it to +# GCS bucket. apiVersion: batch/v1beta1 kind: CronJob metadata: labels: app: beammetrics name: influxdb-autobackup spec: - schedule: "@weekly" + schedule: "@daily" concurrencyPolicy: Forbid jobTemplate: spec: template: spec: - containers: - - image: influxdb:1.8.0 - name: influxdb-autobackup + # Using "initContainers" ensures that "create_backups" completes + # before "copy-to-gcs-bucket" begins. + initContainers: + - name: create-backup + image: influxdb:1.8.0 args: - influxd - backup - -portable - -host - influxdb-rpc:8088 - - /backups + - /backup + volumeMounts: + - mountPath: /backup + name: shared-data + - name: copy-to-gsc-bucket + image: gcr.io/apache-beam-testing/gsutil Review comment: As I can understand, we overwrite same backup each time. Given daily creation of backups and noone is paged when something goes wrong, this backup can be easily corrupted as well. Though it is ok for current PR, it's best to add some rotation to backups, keeping 1-2 week old backups available. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
