|
| 1 | +# To deploy (from cmd/etl_worker): |
| 2 | +# go build etl_worker.go && gcloud beta app deploy --project=mlab-staging app-ndt-staging.yaml |
| 3 | + |
| 4 | +runtime: custom |
| 5 | +env: flex |
| 6 | +service: etl-ndt-parser |
| 7 | + |
| 8 | +# Resource and scaling options. For more background, see: |
| 9 | +# https://cloud.google.com/appengine/docs/flexible/go/configuring-your-app-with-app-yaml |
| 10 | + |
| 11 | +# TODO(dev): adjust CPU and memory based on actual requirements. |
| 12 | +resources: |
| 13 | + cpu: 2 |
| 14 | + # Instances support between [(cpu * 0.9) - 0.4, (cpu * 6.5) - 0.4] |
| 15 | + # Actual memory available is exposed via GAE_MEMORY_MB environment variable. |
| 16 | + memory_gb: 6 |
| 17 | + |
| 18 | + # TODO - Adjust once we understand requirements. |
| 19 | + disk_size_gb: 10 |
| 20 | + |
| 21 | +automatic_scaling: |
| 22 | + # This is intended for batch jobs. A single instance is required, and we allow |
| 23 | + # it to scale up to 50 instances to get work done quickly. However, note that |
| 24 | + # more than 1.5 tasks/sec may result in bigquery stream quota problems, so this |
| 25 | + # may require changes. |
| 26 | + min_num_instances: 1 |
| 27 | + max_num_instances: 50 |
| 28 | + cool_down_period_sec: 300 |
| 29 | + # We don't care much about latency, so a high utilization is desireable. |
| 30 | + cpu_utilization: |
| 31 | + target_utilization: 0.85 |
| 32 | + |
| 33 | +# Note: add a public port for GCE auto discovery by prometheus. |
| 34 | +# TODO(dev): are any values redundant or irrelevant? |
| 35 | +network: |
| 36 | + instance_tag: etl-parser |
| 37 | + name: default |
| 38 | + # Forward port 9090 on the GCE instance address to the same port in the |
| 39 | + # container address. Only forward TCP traffic. |
| 40 | + # Note: the default AppEngine container port 8080 cannot be forwarded. |
| 41 | + forwarded_ports: |
| 42 | + - 9090/tcp |
| 43 | + |
| 44 | +env_variables: |
| 45 | + MAX_WORKERS: 25 |
| 46 | + BIGQUERY_PROJECT: 'mlab-staging' |
| 47 | + BIGQUERY_DATASET: 'staging' |
| 48 | + # TODO add custom service-account, instead of using default credentials. |
0 commit comments