diff --git a/build/ci/cloudbuild.deploy_mixer.yaml b/build/ci/cloudbuild.deploy_mixer.yaml index 4ce7e9cb60..3b620544ca 100644 --- a/build/ci/cloudbuild.deploy_mixer.yaml +++ b/build/ci/cloudbuild.deploy_mixer.yaml @@ -84,7 +84,7 @@ steps: --region=us-central1 \ --skaffold-file=skaffold.yaml \ --images="${images_str}" \ - --deploy-parameters="mixer.githash=${mixer_githash},MIXER_GITHASH=${mixer_githash}" \ + --deploy-parameters="MIXER_GITHASH=${mixer_githash}" \ --project=datcom-ci echo "Successfully created release ${release_name}." \ No newline at end of file diff --git a/build/ci/cloudbuild.deploy_website_mixer.yaml b/build/ci/cloudbuild.deploy_website_mixer.yaml index 65ccb5fa54..ed0ef930c5 100644 --- a/build/ci/cloudbuild.deploy_website_mixer.yaml +++ b/build/ci/cloudbuild.deploy_website_mixer.yaml @@ -103,7 +103,7 @@ steps: --region=us-central1 \ --skaffold-file=skaffold.yaml \ --images="$${images_str}" \ - --deploy-parameters="mixer.githash=$${mixer_githash},MIXER_GITHASH=$${mixer_githash},website.githash=$${website_githash}" \ + --deploy-parameters="MIXER_GITHASH=$${mixer_githash},WEBSITE_GITHASH=$${website_githash}" \ --project=datcom-ci echo "Successfully created release $${release_name}." diff --git a/deploy/helm_charts/dc_website/values.yaml b/deploy/helm_charts/dc_website/values.yaml index 01daec0623..943d736968 100644 --- a/deploy/helm_charts/dc_website/values.yaml +++ b/deploy/helm_charts/dc_website/values.yaml @@ -78,6 +78,9 @@ kgStoreConfig: baseBigtableInfo: customBigtableInfo: "" +# NOTE: These serviceGroups configs are used for ROUTING ONLY (generating ingress-config). +# To configure workload settings (replicas, resources, etc.) for the mixer deployments, +# please modify the respective `website_mixer_{env}.yaml` overrides file. serviceGroups: svg: urlPaths: @@ -86,37 +89,15 @@ serviceGroups: - "/v1/variable/*" - "/v1/bulk/info/variable-group" - "/v1/bulk/info/variable" - replicas: 1 - resources: - memoryRequest: "8G" - memoryLimit: "8G" - cacheSVG: true - nodePool: observation: urlPaths: - "/v2/observation" - replicas: 1 - resources: - memoryRequest: "4G" - memoryLimit: "4G" - nodePool: node: urlPaths: - "/v2/node" - replicas: 1 - resources: - memoryRequest: "8G" - memoryLimit: "8G" - cacheSVG: true - nodePool: default: urlPaths: - "/*" - replicas: 1 - resources: - memoryRequest: "2G" - memoryLimit: "2G" - nodePool: ############################################################################### # Config for NL diff --git a/deploy/helm_charts/envs/autopush.yaml b/deploy/helm_charts/envs/autopush.yaml index 5259ed84f2..2e0a87feb4 100644 --- a/deploy/helm_charts/envs/autopush.yaml +++ b/deploy/helm_charts/envs/autopush.yaml @@ -39,22 +39,6 @@ website: } } -mixer: - serviceName: "website-esp.endpoints.datcom-website-autopush.cloud.goog" - hostProject: "datcom-website-autopush" - cacheSVFormula: true - redis: - enabled: true - configFile: | - instances: - - region: "us-central1" - host: "10.13.112.19" - port: "6379" - enableOtlp: true - -serviceAccount: - name: website-ksa - ingress: enabled: true @@ -92,17 +76,6 @@ nl: prediction_endpoint_id: "284894457873039360" enable_reranking: true -serviceGroups: - recon: null - svg: - replicas: 5 - node: - replicas: 12 - observation: - replicas: 12 - default: - replicas: 12 - nodejs: enabled: true apiRoot: "http://website-service:8080" diff --git a/deploy/helm_charts/envs/dev.yaml b/deploy/helm_charts/envs/dev.yaml index 3a66b784da..bb9d237cdf 100644 --- a/deploy/helm_charts/envs/dev.yaml +++ b/deploy/helm_charts/envs/dev.yaml @@ -29,35 +29,10 @@ website: redis: enabled: false -mixer: - serviceName: "website-esp.endpoints.datcom-website-dev.cloud.goog" - hostProject: "datcom-website-dev" - redis: - enabled: true - configFile: | - instances: - - region: "us-central1" - host: "10.60.165.235" - port: "6379" - enableOtlp: true - -serviceAccount: - name: website-ksa - +# Enable ingress for website ingress: enabled: true -serviceGroups: - recon: null - svg: - replicas: 1 - observation: - replicas: 3 - node: - replicas: 3 - default: - replicas: 3 - nl: enabled: true image: diff --git a/deploy/helm_charts/envs/prod.yaml b/deploy/helm_charts/envs/prod.yaml index 6483eb0ab1..c160d4da37 100644 --- a/deploy/helm_charts/envs/prod.yaml +++ b/deploy/helm_charts/envs/prod.yaml @@ -40,12 +40,14 @@ website: } } -mixer: - serviceName: "website-esp.endpoints.datcom-website-prod.cloud.goog" - hostProject: "datcom-website-prod" -serviceAccount: - name: website-ksa + +# Ingress is disabled because we use Multi Cluster Ingress (MCI) and Multi Cluster Service (MCS) +# defined in gke/ which manage networking independently of this Helm chart. +# Enabling ingress here would mean using templates/single_cluster.yaml to set up a standard +# Ingress and Service, which is not what we want for this multi-cluster environment. +ingress: + enabled: false nl: enabled: true @@ -64,16 +66,5 @@ nl: prediction_endpoint_id: "430892009855647744" enable_reranking: false -serviceGroups: - recon: null - svg: - replicas: 10 - observation: - replicas: 100 - node: - replicas: 100 - default: - replicas: 50 - svg: blocklistFile: ["dc/g/Uncategorized", "oecd/g/OECD"] diff --git a/deploy/helm_charts/envs/staging.yaml b/deploy/helm_charts/envs/staging.yaml index 8f25bc65ef..1c5e934002 100644 --- a/deploy/helm_charts/envs/staging.yaml +++ b/deploy/helm_charts/envs/staging.yaml @@ -37,19 +37,14 @@ website: } } -mixer: - serviceName: "website-esp.endpoints.datcom-website-staging.cloud.goog" - hostProject: "datcom-website-staging" - redis: - enabled: true - enableOtlp: true +# Ingress is disabled because we use Multi Cluster Ingress (MCI) and Multi Cluster Service (MCS) +# defined in gke/ which manage networking independently of this Helm chart. +# Enabling ingress here would mean using templates/single_cluster.yaml to set up a standard +# Ingress and Service, which is not what we want for this environment. ingress: enabled: false -serviceAccount: - name: website-ksa - nl: enabled: true image: @@ -69,17 +64,6 @@ nl: prediction_endpoint_id: "8435477397553283072" enable_reranking: false -serviceGroups: - recon: null - svg: - replicas: 2 - node: - replicas: 4 - observation: - replicas: 4 - default: - replicas: 4 - nodejs: enabled: true apiRoot: "http://website-service:8080" diff --git a/deploy/helm_charts/envs/website_mixer_autopush.yaml b/deploy/helm_charts/envs/website_mixer_autopush.yaml new file mode 100644 index 0000000000..a0cb2c9a6b --- /dev/null +++ b/deploy/helm_charts/envs/website_mixer_autopush.yaml @@ -0,0 +1,36 @@ +# Overrides for datcom-website-autopush's mixer deployments +# Default values are defined by +# priority: /mixer/deploy/helm_charts/envs/mixer_autopush.yaml +# fallback: /mixer/deploy/helm_charts/values.yaml + +mixer: + serviceName: "website-esp.endpoints.datcom-website-autopush.cloud.goog" + hostProject: "datcom-website-autopush" + cacheSVFormula: true + useRedis: true + redis: + enabled: true + configFile: | + instances: + - region: "us-central1" + host: "10.13.112.19" + port: "6379" + enableOtlp: true + +serviceAccount: + name: website-ksa + +# Disable ingress for mixer in datcom-website-autopush +ingress: + enabled: false + +serviceGroups: + recon: null + svg: + replicas: 5 + node: + replicas: 12 + observation: + replicas: 12 + default: + replicas: 12 diff --git a/deploy/helm_charts/envs/website_mixer_dev.yaml b/deploy/helm_charts/envs/website_mixer_dev.yaml new file mode 100644 index 0000000000..4ae7b15e29 --- /dev/null +++ b/deploy/helm_charts/envs/website_mixer_dev.yaml @@ -0,0 +1,36 @@ +# Overrides for datcom-website-dev's mixer deployments +# Default values are defined by +# priority: /mixer/deploy/helm_charts/envs/mixer_dev.yaml +# fallback: /mixer/deploy/helm_charts/values.yaml + +project: "datcom-website-dev" + +mixer: + hostProject: "datcom-website-dev" + serviceName: "website-esp.endpoints.datcom-website-dev.cloud.goog" + redis: + enabled: true + configFile: | + instances: + - region: "us-central1" + host: "10.60.165.235" + port: "6379" + enableOtlp: true + +serviceAccount: + name: website-ksa + +# Disable ingress for mixer in datcom-website-dev +ingress: + enabled: false + +serviceGroups: + recon: null + svg: + replicas: 1 + observation: + replicas: 3 + node: + replicas: 3 + default: + replicas: 3 diff --git a/deploy/helm_charts/envs/website_mixer_prod.yaml b/deploy/helm_charts/envs/website_mixer_prod.yaml new file mode 100644 index 0000000000..385fdf22bc --- /dev/null +++ b/deploy/helm_charts/envs/website_mixer_prod.yaml @@ -0,0 +1,36 @@ +# Overrides for datcom-website-prod's mixer deployments +# Default values are defined by +# priority: /mixer/deploy/helm_charts/envs/mixer_prod.yaml +# fallback: /mixer/deploy/helm_charts/values.yaml + +project: "datcom-website-prod" +mixer: + hostProject: "datcom-website-prod" + serviceName: "website-esp.endpoints.datcom-website-prod.cloud.goog" + useRedis: false + redis: + enabled: true + configFile: | + instances: + - region: "us-central1" + host: "10.212.232.163" + port: "6379" + enableOtlp: true + +serviceAccount: + name: website-ksa + +# Disable ingress for mixer in datcom-website-prod (Sidecar only) +ingress: + enabled: false + +serviceGroups: + recon: null + svg: + replicas: 10 + observation: + replicas: 100 + node: + replicas: 100 + default: + replicas: 50 diff --git a/deploy/helm_charts/envs/website_mixer_staging.yaml b/deploy/helm_charts/envs/website_mixer_staging.yaml new file mode 100644 index 0000000000..81d54e8479 --- /dev/null +++ b/deploy/helm_charts/envs/website_mixer_staging.yaml @@ -0,0 +1,36 @@ +# Overrides for datcom-website-staging's mixer deployments +# Default values are defined by +# priority: /mixer/deploy/helm_charts/envs/mixer_staging.yaml +# fallback: /mixer/deploy/helm_charts/values.yaml + +project: "datcom-website-staging" +mixer: + hostProject: "datcom-website-staging" + serviceName: "website-esp.endpoints.datcom-website-staging.cloud.goog" + useRedis: true + redis: + enabled: true + configFile: | + instances: + - region: "us-central1" + host: "10.38.211.19" + port: "6379" + enableOtlp: true + +serviceAccount: + name: website-ksa +ingress: + enabled: false + +serviceGroups: + recon: null + svg: + replicas: 2 + nodePool: pool-1 + node: + replicas: 4 + observation: + replicas: 4 + default: + replicas: 4 + diff --git a/scripts/deploy_mixer_cloud_deploy.sh b/scripts/deploy_mixer_cloud_deploy.sh index 656e90da5b..f9482aec79 100755 --- a/scripts/deploy_mixer_cloud_deploy.sh +++ b/scripts/deploy_mixer_cloud_deploy.sh @@ -30,5 +30,5 @@ gcloud deploy releases create "dev-manual-$TIMESTAMP" \ --region=us-central1 \ --skaffold-file=skaffold.yaml \ --images="gcr.io/datcom-ci/datacommons-mixer=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-mixer:$MIXER_GITHASH,gcr.io/datcom-ci/datacommons-embeddings-sidecar=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nl:mixer-sidecar" \ ---deploy-parameters="mixer.githash=$MIXER_GITHASH,MIXER_GITHASH=$MIXER_GITHASH" \ +--deploy-parameters="MIXER_GITHASH=$MIXER_GITHASH" \ --project=datcom-ci diff --git a/scripts/deploy_website_cloud_deploy.sh b/scripts/deploy_website_cloud_deploy.sh index 47da7f4bd7..d56bd3037e 100755 --- a/scripts/deploy_website_cloud_deploy.sh +++ b/scripts/deploy_website_cloud_deploy.sh @@ -31,5 +31,5 @@ gcloud deploy releases create "dev-manual-$TIMESTAMP" \ --region=us-central1 \ --skaffold-file=skaffold.yaml \ --images="gcr.io/datcom-ci/datacommons-website=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-website:$WEBSITE_GITHASH,gcr.io/datcom-ci/datacommons-mixer=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-mixer:$MIXER_GITHASH,gcr.io/datcom-ci/datacommons-nodejs=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nodejs:$WEBSITE_GITHASH,gcr.io/datcom-ci/datacommons-nl=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nl:$WEBSITE_GITHASH,gcr.io/datcom-ci/datacommons-embeddings-sidecar=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nl:mixer-sidecar" \ ---deploy-parameters="mixer.githash=$MIXER_GITHASH,MIXER_GITHASH=$MIXER_GITHASH,website.githash=$WEBSITE_GITHASH" \ ---project=datcom-ci \ No newline at end of file +--deploy-parameters="MIXER_GITHASH=$MIXER_GITHASH,WEBSITE_GITHASH=$WEBSITE_GITHASH" \ +--project=datcom-ci diff --git a/skaffold.yaml b/skaffold.yaml index 69a8a491b8..7ca2148668 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -108,33 +108,20 @@ profiles: chartPath: deploy/helm_charts/dc_website valuesFiles: - deploy/helm_charts/envs/dev.yaml - setValues: - serviceAccount.name: website-ksa + setValueTemplates: + website.githash: "{{ .WEBSITE_GITHASH }}" - name: dc-mixer chartPath: mixer/deploy/helm_charts/mixer valuesFiles: - mixer/deploy/helm_charts/envs/mixer_dev.yaml + - deploy/helm_charts/envs/website_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} + setValueTemplates: + mixer.githash: "{{ .MIXER_GITHASH }}" - name: mixer-dev customActions: - name: deploy-cloud-esp-mixer-dev @@ -158,12 +145,8 @@ profiles: 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} + setValueTemplates: + mixer.githash: "{{ .MIXER_GITHASH }}" - name: website-autopush customActions: @@ -192,33 +175,20 @@ profiles: chartPath: deploy/helm_charts/dc_website valuesFiles: - deploy/helm_charts/envs/autopush.yaml - setValues: - serviceAccount.name: website-ksa - website.githash: ${WEBSITE_GITHASH} + setValueTemplates: + website.githash: "{{ .WEBSITE_GITHASH }}" - name: dc-mixer chartPath: mixer/deploy/helm_charts/mixer valuesFiles: - mixer/deploy/helm_charts/envs/mixer_autopush.yaml + - deploy/helm_charts/envs/website_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" + setValueTemplates: + mixer.githash: "{{ .MIXER_GITHASH }}" - name: mixer-autopush customActions: - name: deploy-cloud-esp-mixer-autopush @@ -251,15 +221,8 @@ profiles: 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" - + setValueTemplates: + mixer.githash: "{{ .MIXER_GITHASH }}" - name: website-staging customActions: - name: deploy-cloud-esp-staging @@ -296,35 +259,20 @@ profiles: chartPath: deploy/helm_charts/dc_website valuesFiles: - deploy/helm_charts/envs/staging.yaml - setValues: - serviceAccount.name: website-ksa - website.githash: ${WEBSITE_GITHASH} + setValueTemplates: + website.githash: "{{ .WEBSITE_GITHASH }}" - name: dc-mixer chartPath: mixer/deploy/helm_charts/mixer valuesFiles: - mixer/deploy/helm_charts/envs/mixer_staging.yaml + - deploy/helm_charts/envs/website_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" + setValueTemplates: + mixer.githash: "{{ .MIXER_GITHASH }}" - name: mixer-staging customActions: - name: deploy-cloud-esp-mixer-staging @@ -357,13 +305,8 @@ profiles: 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" + setValueTemplates: + mixer.githash: "{{ .MIXER_GITHASH }}" - name: mixer-prod customActions: - name: deploy-cloud-esp-mixer-prod @@ -387,13 +330,8 @@ profiles: 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" - + setValueTemplates: + mixer.githash: "{{ .MIXER_GITHASH }}" - name: website-prod customActions: - name: deploy-cloud-esp-prod @@ -430,31 +368,17 @@ profiles: chartPath: deploy/helm_charts/dc_website valuesFiles: - deploy/helm_charts/envs/prod.yaml - setValues: - serviceAccount.name: website-ksa - website.githash: ${WEBSITE_GITHASH} + setValueTemplates: + website.githash: "{{ .WEBSITE_GITHASH }}" - name: dc-mixer chartPath: mixer/deploy/helm_charts/mixer valuesFiles: - mixer/deploy/helm_charts/envs/mixer_prod.yaml + - deploy/helm_charts/envs/website_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" + setValueTemplates: + mixer.githash: "{{ .MIXER_GITHASH }}"