forked from datacommonsorg/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathskaffold.yaml
More file actions
460 lines (452 loc) · 17.4 KB
/
skaffold.yaml
File metadata and controls
460 lines (452 loc) · 17.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
# Copyright 2025 Google LLC
#
# Licensed 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
#
# https://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.
# Skaffold (https://skaffold.dev/docs/quickstart/) configuration file that is
# used to deploy website in a local Minikube cluster or to a GKE cluster with Cloud Deploy.
#
# For local development:
# skaffold run -p local
#
# For Cloud Deploy, the profiles are selected by the clouddeploy.yaml
apiVersion: skaffold/v4beta7
kind: Config
metadata:
name: website
build:
artifacts:
# Artifacts for local development
- image: datacommons/website
context: .
docker:
dockerfile: build/web_server/Dockerfile
buildArgs:
ENV: local
sync:
infer:
- "**/*.py"
- "**/*.html"
- "server/dist/**/*"
- "static/**/*"
- image: datacommons/mixer
context: mixer
docker:
dockerfile: build/web_server/Dockerfile
target: server
- image: datacommons/api-compiler
context: mixer
docker:
dockerfile: esp/Dockerfile
# Artifacts for Cloud Deploy
- image: gcr.io/datcom-ci/datacommons-website
context: build/web_server
- image: gcr.io/datcom-ci/datacommons-nl
context: build/nl_server
# This is an alias for the datacommons-nl image (tagged as mixer-sidecar).
# We use a separate artifact name here so Skaffold can track it independently
# from the main datacommons-nl artifact used by the website.
- image: gcr.io/datcom-ci/datacommons-embeddings-sidecar
context: build/nl_server
- image: gcr.io/datcom-ci/datacommons-nodejs
context: build/nodejs_server
- image: gcr.io/datcom-ci/datacommons-mixer
context: mixer/build/ci
tagPolicy:
sha256: {}
profiles:
- name: local
manifests:
kustomize:
paths:
- deploy/overlays/local
deploy:
kubeContext: minikube
portForward:
- resourceType: service
resourceName: website-service-local
namespace: website
port: 8080
localPort: 8080
- name: website-dev
customActions:
- name: deploy-cloud-esp-dev
containers:
- name: gcloud-website0
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
./scripts/deploy_cloud_esp.sh dev website ${MIXER_GITHASH}
- name: clear-website-cache
containers:
- name: gcloud-website
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
./tools/clearcache/run.sh website dev
manifests:
helm:
releases:
- name: datacommons-website-release
chartPath: deploy/helm_charts/dc_website
valuesFiles:
- deploy/helm_charts/envs/dev.yaml
setValues:
serviceAccount.name: website-ksa
- name: dc-mixer
chartPath: mixer/deploy/helm_charts/mixer
valuesFiles:
- mixer/deploy/helm_charts/envs/mixer_dev.yaml
namespace: website
setFiles:
kgStoreConfig.baseBigtableInfo: mixer/deploy/storage/base_bigtable_info.yaml
kgStoreConfig.bigqueryVersion: mixer/deploy/storage/bigquery.version
kgStoreConfig.spannerGraphInfo: mixer/deploy/storage/spanner_graph_info.yaml
setValues:
mixer.redis.enabled: true
mixer.redis.configFile: |
instances:
- region: "us-central1"
host: "10.60.165.235"
port: "6379"
mixer.enableOtlp: true
serviceAccount.name: website-ksa
ingress.enabled: "true"
mixer.hostProject: "datcom-website-dev"
project: "datcom-website-dev"
mixer.serviceName: "website-esp.endpoints.datcom-website-dev.cloud.goog"
serviceGroups.recon.enableEmbeddingsSidecar: "false"
serviceGroups.default.enableEmbeddingsSidecar: "true"
mixer.githash: ${MIXER_GITHASH}
- name: mixer-dev
customActions:
- name: deploy-cloud-esp-mixer-dev
containers:
- name: gcloud-website0
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
./scripts/deploy_cloud_esp.sh dev mixer ${MIXER_GITHASH}
manifests:
helm:
releases:
- name: mixer-dev
chartPath: mixer/deploy/helm_charts/mixer
valuesFiles:
- mixer/deploy/helm_charts/envs/mixer_dev.yaml
namespace: mixer
setFiles:
kgStoreConfig.baseBigtableInfo: mixer/deploy/storage/base_bigtable_info.yaml
kgStoreConfig.bigqueryVersion: mixer/deploy/storage/bigquery.version
kgStoreConfig.spannerGraphInfo: mixer/deploy/storage/spanner_graph_info.yaml
setValues:
serviceAccount.name: mixer-ksa
ingress.enabled: "true"
mixer.hostProject: "datcom-mixer-dev-316822"
mixer.serviceName: "dev.api.datacommons.org"
mixer.githash: ${MIXER_GITHASH}
- name: website-autopush
customActions:
- name: deploy-cloud-esp-autopush
containers:
- name: gcloud-website0
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
./scripts/deploy_cloud_esp.sh autopush website ${MIXER_GITHASH}
- name: clear-website-cache
containers:
- name: gcloud-website
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
./tools/clearcache/run.sh website autopush
manifests:
helm:
releases:
- name: datacommons-website-release
chartPath: deploy/helm_charts/dc_website
valuesFiles:
- deploy/helm_charts/envs/autopush.yaml
setValues:
serviceAccount.name: website-ksa
website.githash: ${WEBSITE_GITHASH}
- name: dc-mixer
chartPath: mixer/deploy/helm_charts/mixer
valuesFiles:
- mixer/deploy/helm_charts/envs/mixer_autopush.yaml
namespace: website
setFiles:
kgStoreConfig.baseBigtableInfo: mixer/deploy/storage/base_bigtable_info.yaml
kgStoreConfig.spannerGraphInfo: mixer/deploy/storage/spanner_graph_info.yaml
kgStoreConfig.bigqueryVersion: mixer/deploy/storage/bigquery.version
setValues:
mixer.redis.enabled: "true"
mixer.redis.configFile: |
instances:
- region: "us-central1"
host: "10.13.112.19"
port: "6379"
mixer.enableOtlp: true
serviceAccount.name: website-ksa
ingress.enabled: "true"
mixer.useRedis: "true"
mixer.githash: ${MIXER_GITHASH}
mixer.hostProject: "datcom-website-autopush"
mixer.serviceName: "website-esp.endpoints.datcom-website-autopush.cloud.goog"
serviceGroups.recon.enableEmbeddingsSidecar: "false"
- name: mixer-autopush
customActions:
- name: deploy-cloud-esp-mixer-autopush
containers:
- name: gcloud-website0
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
./scripts/deploy_cloud_esp.sh autopush mixer ${MIXER_GITHASH}
- name: clear-mixer-cache
containers:
- name: gcloud-mixer
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
./tools/clearcache/run.sh mixer autopush
manifests:
helm:
releases:
- name: mixer-autopush
chartPath: mixer/deploy/helm_charts/mixer
valuesFiles:
- mixer/deploy/helm_charts/envs/mixer_autopush.yaml
namespace: mixer
setFiles:
kgStoreConfig.baseBigtableInfo: mixer/deploy/storage/base_bigtable_info.yaml
kgStoreConfig.spannerGraphInfo: mixer/deploy/storage/spanner_graph_info.yaml
kgStoreConfig.bigqueryVersion: mixer/deploy/storage/bigquery.version
setValues:
serviceAccount.name: mixer-ksa
ingress.enabled: "true"
mixer.githash: ${MIXER_GITHASH}
mixer.hostProject: "datcom-mixer-autopush"
project: datcom-mixer-autopush
cluster_prefix: mixer
mixer.serviceName: "autopush.api.datacommons.org"
- name: website-staging
customActions:
- name: deploy-cloud-esp-staging
containers:
- name: gcloud-website0
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
./scripts/deploy_cloud_esp.sh staging website ${MIXER_GITHASH}
- name: clear-website-cache
containers:
- name: gcloud-website
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
./tools/clearcache/run.sh website staging
- name: run-percy-snapshots
containers:
- name: gcloud-website2
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
gcloud builds submit --config tools/release_automation/percy_snapshot_script/cloudbuild.per_environment_percy_snapshots.yaml --substitutions=_ENVIRONMENT=staging --project=datcom-ci
manifests:
helm:
releases:
- name: datacommons-website-release
chartPath: deploy/helm_charts/dc_website
valuesFiles:
- deploy/helm_charts/envs/staging.yaml
setValues:
serviceAccount.name: website-ksa
website.githash: ${WEBSITE_GITHASH}
- name: dc-mixer
chartPath: mixer/deploy/helm_charts/mixer
valuesFiles:
- mixer/deploy/helm_charts/envs/mixer_staging.yaml
namespace: website
setFiles:
kgStoreConfig.baseBigtableInfo: mixer/deploy/storage/base_bigtable_info.yaml
kgStoreConfig.spannerGraphInfo: mixer/deploy/storage/spanner_graph_info.yaml
kgStoreConfig.bigqueryVersion: mixer/deploy/storage/bigquery.version
setValues:
serviceGroups.svg.nodePool: pool-1
mixer.redis.enabled: "true"
mixer.redis.configFile: |
instances:
- region: "us-central1"
host: "10.38.211.19"
port: "6379"
mixer.enableOtlp: true
serviceAccount.name: website-ksa
ingress.enabled: "true"
mixer.useRedis: "true"
mixer.githash: ${MIXER_GITHASH}
mixer.hostProject: "datcom-website-staging"
project: "datcom-website-staging"
mixer.serviceName: "website-esp.endpoints.datcom-website-staging.cloud.goog"
serviceGroups.recon.enableEmbeddingsSidecar: "false"
- name: mixer-staging
customActions:
- name: deploy-cloud-esp-mixer-staging
containers:
- name: gcloud-website0
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
./scripts/deploy_cloud_esp.sh staging mixer ${MIXER_GITHASH}
- name: update-nl-integration-test-goldens
containers:
- name: gcloud-website
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
gcloud builds submit --config build/ci/cloudbuild.update_nl_goldens.yaml --project=datcom-ci
manifests:
helm:
releases:
- name: mixer-staging
chartPath: mixer/deploy/helm_charts/mixer
valuesFiles:
- mixer/deploy/helm_charts/envs/mixer_staging.yaml
namespace: mixer
setFiles:
kgStoreConfig.baseBigtableInfo: mixer/deploy/storage/base_bigtable_info.yaml
kgStoreConfig.spannerGraphInfo: mixer/deploy/storage/spanner_graph_info.yaml
kgStoreConfig.bigqueryVersion: mixer/deploy/storage/bigquery.version
setValues:
serviceGroups.svg.nodePool: pool-2
serviceAccount.name: mixer-ksa
ingress.enabled: "true"
mixer.githash: ${MIXER_GITHASH}
mixer.hostProject: "datcom-mixer-staging"
mixer.serviceName: "staging.api.datacommons.org"
- name: mixer-prod
customActions:
- name: deploy-cloud-esp-mixer-prod
containers:
- name: gcloud-website0
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
./scripts/deploy_cloud_esp.sh prod mixer ${MIXER_GITHASH}
manifests:
helm:
releases:
- name: mixer-prod
chartPath: mixer/deploy/helm_charts/mixer
valuesFiles:
- mixer/deploy/helm_charts/envs/mixer_prod.yaml
namespace: mixer
setFiles:
kgStoreConfig.baseBigtableInfo: mixer/deploy/storage/base_bigtable_info.yaml
kgStoreConfig.spannerGraphInfo: mixer/deploy/storage/spanner_graph_info.yaml
kgStoreConfig.bigqueryVersion: mixer/deploy/storage/bigquery.version
setValues:
serviceAccount.name: mixer-ksa
ingress.enabled: "true"
mixer.githash: ${MIXER_GITHASH}
mixer.hostProject: "datcom-mixer"
mixer.serviceName: "api.datacommons.org"
- name: website-prod
customActions:
- name: deploy-cloud-esp-prod
containers:
- name: gcloud-website0
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
./scripts/deploy_cloud_esp.sh prod website ${MIXER_GITHASH}
- name: clear-website-cache
containers:
- name: gcloud-website
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
./tools/clearcache/run.sh website prod
- name: run-percy-snapshots
containers:
- name: gcloud-website2
image: gcr.io/datcom-ci/datacommons-script-runner:latest
command: ["/bin/bash"]
args:
- "-c"
- |
gcloud builds submit --config tools/release_automation/percy_snapshot_script/cloudbuild.per_environment_percy_snapshots.yaml --substitutions=_ENVIRONMENT=production --project=datcom-ci --async
manifests:
helm:
releases:
- name: datacommons-website-release
chartPath: deploy/helm_charts/dc_website
valuesFiles:
- deploy/helm_charts/envs/prod.yaml
setValues:
serviceAccount.name: website-ksa
website.githash: ${WEBSITE_GITHASH}
- name: dc-mixer
chartPath: mixer/deploy/helm_charts/mixer
valuesFiles:
- mixer/deploy/helm_charts/envs/mixer_prod.yaml
namespace: website
setFiles:
kgStoreConfig.baseBigtableInfo: mixer/deploy/storage/base_bigtable_info.yaml
kgStoreConfig.spannerGraphInfo: mixer/deploy/storage/spanner_graph_info.yaml
kgStoreConfig.bigqueryVersion: mixer/deploy/storage/bigquery.version
setValues:
mixer.redis.enabled: true
mixer.redis.configFile: |
instances:
- region: "us-central1"
host: "10.212.232.163"
port: "6379"
mixer.enableOtlp: true
serviceAccount.name: website-ksa
ingress.enabled: "true"
mixer.useRedis: "false"
mixer.githash: ${MIXER_GITHASH}
mixer.hostProject: "datcom-website-prod"
project: "datcom-website-prod"
mixer.serviceName: "website-esp.endpoints.datcom-website-prod.cloud.goog"
serviceGroups.recon.enableEmbeddingsSidecar: "false"