From 8485393fc6d633d6bd49a7748047add241c338e6 Mon Sep 17 00:00:00 2001 From: Manit Gupta Date: Tue, 15 Oct 2024 11:13:31 +0530 Subject: [PATCH] Add Terraform template links in SMT docs (#914) * Add terraform docs * Add terraform docs * Add terraform docs * Add callout * Add callout --- docs/cli/cli.md | 2 +- docs/data-types/schema.md | 2 +- docs/limitations.md | 2 +- docs/minimal/minimal.md | 2 +- docs/monitoring/Monitoring.md | 2 +- docs/permissions.md | 2 +- docs/poc/poc.md | 2 +- docs/reports.md | 2 +- .../reverse-replication/ReverseReplication.md | 2 +- docs/terraform.md | 47 +++++++++++++++++++ docs/transformations/CustomTransformation.md | 2 +- docs/troubleshoot/trouble.md | 2 +- docs/ui/ui.md | 2 +- 13 files changed, 59 insertions(+), 12 deletions(-) create mode 100644 docs/terraform.md diff --git a/docs/cli/cli.md b/docs/cli/cli.md index 8206f212b..75b3917dc 100644 --- a/docs/cli/cli.md +++ b/docs/cli/cli.md @@ -1,7 +1,7 @@ --- layout: default title: SMT CLI -nav_order: 5 +nav_order: 6 has_children: true permalink: /cli --- diff --git a/docs/data-types/schema.md b/docs/data-types/schema.md index f04c739f3..5464e3667 100644 --- a/docs/data-types/schema.md +++ b/docs/data-types/schema.md @@ -1,7 +1,7 @@ --- layout: default title: Data Type Conversion -nav_order: 7 +nav_order: 8 has_children: true permalink: /data-types-conv --- diff --git a/docs/limitations.md b/docs/limitations.md index 13e60ead7..8657e40b5 100644 --- a/docs/limitations.md +++ b/docs/limitations.md @@ -1,7 +1,7 @@ --- layout: default title: Known Limitations -nav_order: 12 +nav_order: 13 permalink: /known-limitations --- diff --git a/docs/minimal/minimal.md b/docs/minimal/minimal.md index 9a4eb27ac..17d1ca3f2 100644 --- a/docs/minimal/minimal.md +++ b/docs/minimal/minimal.md @@ -1,7 +1,7 @@ --- layout: default title: Minimal downtime migrations -nav_order: 8 +nav_order: 9 has_children: true permalink: /minimal --- diff --git a/docs/monitoring/Monitoring.md b/docs/monitoring/Monitoring.md index 61b8155a2..7cbba4554 100644 --- a/docs/monitoring/Monitoring.md +++ b/docs/monitoring/Monitoring.md @@ -1,7 +1,7 @@ --- layout: default title: Monitoring -nav_order: 13 +nav_order: 14 has_children: true permalink: /monitoring --- diff --git a/docs/permissions.md b/docs/permissions.md index 98e696c86..0999c055c 100644 --- a/docs/permissions.md +++ b/docs/permissions.md @@ -1,7 +1,7 @@ --- layout: default title: Permissions and Connectivity -nav_order: 4 +nav_order: 5 description: "Permissions and connectivity required to run SMT" --- diff --git a/docs/poc/poc.md b/docs/poc/poc.md index 9199bede6..256696c4f 100644 --- a/docs/poc/poc.md +++ b/docs/poc/poc.md @@ -1,7 +1,7 @@ --- layout: default title: POC migrations -nav_order: 9 +nav_order: 10 has_children: true permalink: /poc --- diff --git a/docs/reports.md b/docs/reports.md index 438d25fe1..23c757bad 100644 --- a/docs/reports.md +++ b/docs/reports.md @@ -1,7 +1,7 @@ --- layout: default title: SMT Output(s) -nav_order: 10 +nav_order: 11 description: "Artifacts generated when you run Spanner migration tool" --- diff --git a/docs/reverse-replication/ReverseReplication.md b/docs/reverse-replication/ReverseReplication.md index d030556ce..4f5842473 100644 --- a/docs/reverse-replication/ReverseReplication.md +++ b/docs/reverse-replication/ReverseReplication.md @@ -1,7 +1,7 @@ --- layout: default title: Reverse Replication -nav_order: 13 +nav_order: 14 has_children: true permalink: /reverse-replication --- diff --git a/docs/terraform.md b/docs/terraform.md new file mode 100644 index 000000000..9aa167eb8 --- /dev/null +++ b/docs/terraform.md @@ -0,0 +1,47 @@ +--- +layout: default +title: Terraform Templates +nav_order: 4 +description: "Terraform templates to run migrations" +--- + +# Terraform Templates +{: .d-inline-block } + +New +{: .label .label-green } + +Dataflow templates now contains a repository that provides samples for common scenarios users might have while trying to run a live migration to Spanner using Terraform based orchestration. + +Pick a sample that is closest to your use-case, and use it as a starting point, and tailor it to your own specific needs. + +## Terraform repositories + +1. [Bulk migration](https://github.com/GoogleCloudPlatform/DataflowTemplates/tree/main/v2/datastream-to-spanner/terraform/samples) +2. [Live migration](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/sourcedb-to-spanner/terraform/samples) +3. [Sample environment setups](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/spanner-common/terraform/samples) + +## Commonly used templates & guides + +1. [How to run a production migration using a combination of bulk and live migrations](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/spanner-common/docs/END-TO-END-PRODUCTION-MIGRATION.md) +2. [Bulk migration](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/sourcedb-to-spanner/terraform/samples/single-job-bulk-migration/README.md) +3. [Live migration](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/datastream-to-spanner/terraform/samples/mysql-end-to-end/README.md) +4. [Sharded bulk migration](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/sourcedb-to-spanner/terraform/samples/sharded-bulk-migration/README.md) +5. [Sharded live migration using one dataflow job](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/datastream-to-spanner/terraform/samples/mysql-sharded-single-df-job/README.md) +6. [Sharded live migration using multiple dataflow jobs](https://github.com/GoogleCloudPlatform/DataflowTemplates/blob/main/v2/datastream-to-spanner/terraform/samples/mysql-sharded-end-to-end/README.md) + +## Sample structure + +Each sample contains the following (and potentially more) files: + +1. `main.tf` - This contains the Terraform resources which will be created. +2. `outputs.tf` - This declares the outputs that will be output as part of + running the terraform example. +3. `variables.tf` - This declares the input variables that are required to + configure the resources. +4. `terraform.tf` - This contains the required providers and APIs/project + configurations for the sample. +5. `terraform.tfvars` - This contains the dummy inputs that need to be populated + to run the example. +6. `terraform_simple.tfvars` - This contains the minimal list of dummy inputs + that need to be populated to run the example. \ No newline at end of file diff --git a/docs/transformations/CustomTransformation.md b/docs/transformations/CustomTransformation.md index a83b8451f..b5c2a2b37 100644 --- a/docs/transformations/CustomTransformation.md +++ b/docs/transformations/CustomTransformation.md @@ -1,7 +1,7 @@ --- layout: default title: Custom Transformations -nav_order: 15 +nav_order: 16 permalink: /custom-transformation --- diff --git a/docs/troubleshoot/trouble.md b/docs/troubleshoot/trouble.md index 6efced08c..e80f80d10 100644 --- a/docs/troubleshoot/trouble.md +++ b/docs/troubleshoot/trouble.md @@ -1,7 +1,7 @@ --- layout: default title: Troubleshooting -nav_order: 11 +nav_order: 12 has_children: true permalink: /troubleshooting --- diff --git a/docs/ui/ui.md b/docs/ui/ui.md index 1fbc1102e..1355a27ee 100644 --- a/docs/ui/ui.md +++ b/docs/ui/ui.md @@ -1,7 +1,7 @@ --- layout: default title: SMT UI -nav_order: 6 +nav_order: 7 has_children: true permalink: /ui ---