Stay organized with collections
Save and categorize content based on your preferences.
Upgrade guide
This guide provides general guidance on how to upgrade and existing
Manufacturing Data Engine (MDE) installation using Terraform.
If you have modified Terraform scripts you might need additional
steps. This is a generic upgrade guide so always make sure that you also read
the full releases notes for the
specific version you are deploying as this may include information you need to
take into consideration.
Before you begin
Some Dataflow jobs need to be stopped manually before upgrading. The
release notes list the
jobs you have to stop manually for the specific version you are upgrading to.
This guide requires the follow prerequisites:
You are using the default deployment package.
Your client environment has the required CLI tools installed in their
most updated version:
Google Cloud CLI with the following additional components installed:
You can use any client environment to deploy MDE, but
you can save time by deploying from Cloud Shell since it has most of
the required tools already installed.
You have full access to the MDE Google Cloud project and
access to the configuration files used for the original deployment:
Service Account JSON key file: mde-imgs-service-account-key.json.
Terraform: input.tfvars.
Terraform: backend.conf.
All gcloud commands in this guide assume that the default project is set
to the MDE deployment project. You can set the
default project using the following command:
gcloudconfigsetprojectPROJECT_ID
Replace PROJECT_ID with the MDE deployment project ID.
You have acquired the credentials for the MDE
GKE cluster. Use the following command if you haven't already:
This section provides guidance on how perform the upgrade using Terraform.
Update the Terraform service account permissions to add the newly required
permissions from MDE 1.4.0 and up. They can be added by
using the following commands:
If you are upgrading from v.1.4.x to v1.5.x, run the pre-upgrade script included in the
release package:
# Execute from upgrade/1.5.0 directory
shmigrate-metadata-instance-bq-table.sh
Reload the Terraform state using the following command:
# Execute from deployment/terraform directory
terraforminit-backend-config=backend.conf-reconfigure
Create a Terraform plan.
Once the input parameters are ready, you must create a Terraform plan using
the following command. You can use the plan to verify what artifacts and
configurations will be created in the project.
Apply the Terraform plan using the following command:
terraformapply./tfplan
Verify that the deployment succeeded.
After the terraform apply command finishes executing, you should see a
success message that looks similar to the following (the actual number will
depend on the specific deployment options and version):
After the upgrade is complete, you need to perform one or more of the following
steps depending on the status of the earlier MDE deployment.
Natural key hash generation
If you are upgrading from 1.4.x to 1.5.0, you need to follow the steps outlined
on this guide
before anything else.
BigQuery views for existing types
If you are upgrading from a release before 1.4.x, then the created types won't
have an analytics view created for it as this feature was introduced in 1.4.0.
You'll need to activate the existing types once again to trigger the analytics
view recreation. You can check the /activate endpoint in the Postman kit that's
shipped with the release.
GKE cluster filestore driver
If you experience an issue that the GKE cluster pods are starting or stuck in
ContainerCreating, then it could be the result of the filestore driver not
being enabled. You can enable it by following the steps in the deployment
guide
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[],[],null,["# Upgrade guide\n=============\n\nThis guide provides general guidance on how to upgrade and existing\nManufacturing Data Engine (MDE) installation using Terraform.\n\nIf you have modified Terraform scripts you might need additional\nsteps. This is a generic upgrade guide so always make sure that you also read\nthe full [releases notes](/manufacturing-data-engine/docs/release-notes) for the\nspecific version you are deploying as this may include information you need to\ntake into consideration.\n| **Caution:** If you are upgrading from v1.4.x to v1.5, the process will recreate some of the internal Pub/Sub subscriptions. Make sure that the existing MDE instance is fully drained and that it does not have any internal messages in the Pub/Sub subscriptions before running the upgrade script. You can achieve this by stopping the messages sent to the `input-message` subscription.\n| **Note:** MDE only supports sequential upgrades. If you are running a major release earlier than 1.4.x, you will have to upgrade your MDE one major version at a time.\n\nBefore you begin\n----------------\n\n| **Note:** Before upgrading your MDE deployment, see the [Known issues](/manufacturing-data-engine/docs/deployment/known-issues) page.\n\nSome Dataflow jobs need to be stopped manually before upgrading. The\n[release notes](/manufacturing-data-engine/docs/release-notes) list the\njobs you have to stop manually for the specific version you are upgrading to.\n\nThis guide requires the follow prerequisites:\n\n1. You are using the default deployment package.\n2. Your client environment has the required CLI tools installed in their\n most updated version:\n\n - [Google Cloud CLI](/sdk/docs/install) with the following additional components installed:\n\n - [kubectl](/kubernetes-engine/docs/how-to/cluster-access-for-kubectl#install_kubectl)\n - [cbt](/bigtable/docs/cbt-overview#installing)\n - [Terraform CLI](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) ( 1.9.x or later)\n - [Helm CLI](https://helm.sh/docs/intro/install/) (3.9.x or later)\n\n You can use any client environment to deploy MDE, but\n you can save time by deploying from Cloud Shell since it has most of\n the required tools already installed.\n\n [Activate Cloud Shell](https://console.cloud.google.com/?cloudshell=true)\n\n \u003cbr /\u003e\n\n3. You have full access to the MDE Google Cloud project and\n access to the configuration files used for the original deployment:\n\n - Service Account JSON key file: `mde-imgs-service-account-key.json`.\n - Terraform: `input.tfvars`.\n - Terraform: `backend.conf`.\n\n | **Note:** MDE v1.5 does not require the Service Account JSON key file.\n\n All `gcloud` commands in this guide assume that the default project is set\n to the MDE deployment project. You can set the\n default project using the following command: \n\n gcloud config set project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\n Replace `PROJECT_ID` with the MDE deployment project ID.\n4. You have acquired the credentials for the MDE\n GKE cluster. Use the following command if you haven't already:\n\n export CLUSTER_NAME=\"mde-gke\"\n export CLUSTER_LOCATION=$(gcloud container clusters list --filter=\"name:${CLUSTER_NAME}\" --format=\"value(LOCATION)\" )\n\n export KUBE_CONFIG_PATH=~/.kube/config\n gcloud container clusters get-credentials ${CLUSTER_NAME} --region ${CLUSTER_LOCATION}\n\nUpgrade\n-------\n\nThis section provides guidance on how perform the upgrade using Terraform.\n\n1. Update the Terraform service account permissions to add the newly required\n permissions from MDE 1.4.0 and up. They can be added by\n using the following commands:\n\n export PROJECT_ID=$(gcloud config get-value project)\n export SA_TERRAFORM=\"mde-tf\"\n\n gcloud projects add-iam-policy-binding ${PROJECT_ID} \\\n --member=\"serviceAccount:${SA_TERRAFORM}@${PROJECT_ID}.iam.gserviceaccount.com\" \\\n --role='roles/file.editor'\n\n2. Backup the old deployment folder using the following command:\n\n cp -r \u003cvar translate=\"no\"\u003eMDE_FOLDER\u003c/var\u003e/\u003cvar translate=\"no\"\u003eMDE_FOLDER_BACKUP\u003c/var\u003e\n\n3. Download the latest MDE solution release package and\n extract it:\n\n | **Note:** Access to the MDE deployment assets requires approval from your Google Cloud team. We suggest reaching out to them as soon as possible if you are interested in testing or deploying MDE. If you don't know who your Google Cloud account team is, feel free to use the `Contact Us` button on the top right of the screen and we will be in touch shortly.\n 1. Download the solution package.\n 2. Extract the package to your client environment.\n 3. Move into the new release folder using the `cd` command.\n4. Copy the following files from the backup to the new folder using the\n following commands (files paths may differ):\n\n cp ../\u003cvar translate=\"no\"\u003eMDE_FOLDER_BACKUP\u003c/var\u003e/mde-imgs-service-account-key.json .\n cd deployment/terraform\n cp ../../../\u003cvar translate=\"no\"\u003eMDE_FOLDER_BACKUP\u003c/var\u003e/deployment/terraform/input.tfvars .\n cp ../../../\u003cvar translate=\"no\"\u003eMDE_FOLDER_BACKUP\u003c/var\u003e/deployment/terraform/backend.conf .\n\n5. If you are upgrading from v.1.4.x to v1.5.x, run the pre-upgrade script included in the\n release package:\n\n # Execute from upgrade/1.5.0 directory\n sh migrate-metadata-instance-bq-table.sh\n\n6. Reload the Terraform state using the following command:\n\n # Execute from deployment/terraform directory\n terraform init -backend-config=backend.conf -reconfigure\n\n7. Create a Terraform plan.\n\n Once the input parameters are ready, you must create a Terraform plan using\n the following command. You can use the plan to verify what artifacts and\n configurations will be created in the project. \n\n terraform plan -var-file=./input.tfvars -out=./tfplan\n\n | **Important:** If Terraform shows errors during the planning phase that certain Pub/Sub subscriptions that end up with the `-materialization` suffix can't be deleted because they have a `lifecycle.prevent_destroy` flag, then you will need to manually delete all of the Pub/Sub topics that end up with the `-materialization` suffix along with the subscriptions that were attached to it. You will need to perform this step *before* starting the deployment to make sure that the topics are created automatically by MDE post the deployment.\n8. Apply the Terraform plan using the following command:\n\n terraform apply ./tfplan\n\n9. Verify that the deployment succeeded.\n\n After the `terraform apply` command finishes executing, you should see a\n success message that looks similar to the following (the actual number will\n depend on the specific deployment options and version): \n\n Apply complete! Resources: 1 added, 34 changed, 0 destroyed.\n\nPost Upgrade\n------------\n\nAfter the upgrade is complete, you need to perform one or more of the following\nsteps depending on the status of the earlier MDE deployment.\n\n### Natural key hash generation\n\nIf you are upgrading from 1.4.x to 1.5.0, you need to follow the steps outlined\n[on this guide](/manufacturing-data-engine/docs/deployment/upgrade-guide-15)\nbefore anything else.\n\n### BigQuery views for existing types\n\nIf you are upgrading from a release before 1.4.x, then the created types won't\nhave an analytics view created for it as this feature was introduced in 1.4.0.\nYou'll need to activate the existing types once again to trigger the analytics\nview recreation. You can check the `/activate` endpoint in the Postman kit that's\nshipped with the release.\n\n### GKE cluster filestore driver\n\nIf you experience an issue that the GKE cluster pods are starting or stuck in\n`ContainerCreating`, then it could be the result of the filestore driver not\nbeing enabled. You can enable it by following the steps in the deployment\n[guide](/manufacturing-data-engine/docs/deployment/step-three-configure-access#enabling-GKE%20cluster-filestore-driver)"]]