Skip to content

Commit

Permalink
docs: resource generation and cli dataflow option docs (#818)
Browse files Browse the repository at this point in the history
* docs for migration

* change

* changes
  • Loading branch information
asthamohta authored May 2, 2024
1 parent 39d30ae commit 2995e95
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 5 deletions.
17 changes: 13 additions & 4 deletions docs/cli/config-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,16 @@ The empty fields are optional.
{
"dataShardId": "smt_datashard_Jo1B_gVrJ",
"srcConnectionProfile": {
"name": "test-src-conn",
"location": "us-central1"
"name": "",
"host": "",
"user" :"",
"port" :"",
"password" :"",
"location": ""
},
"dstConnectionProfile": {
"name": "test-dst-conn",
"location": "us-central1"
"name": "",
"location": ""
},
"tmpDir": "gs://my-bucket/path-to-folder",
"streamLocation": "us-central1",
Expand Down Expand Up @@ -146,3 +150,8 @@ The empty fields are optional.
}
}
```

### Automatic generation of Connection Profiles
Any source or destination connection file that does not exist will be created.
1. For Source Connection Profile, host, user, port and password need to be provided for creation of profile. If profile name is not provided then it will be generated. If profile location is not provided, spanner instance location will be used. Name and location can be optionally provided.
2. For Destination Connection Profile, no extra details need to be provided. Name and location can be optionally provided.
4 changes: 4 additions & 0 deletions docs/cli/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,7 @@ Detailed description of optional flags can be found [here](./flags.md).
Flag for specifying the name of the Google Cloud Project in which the Spanner migration tool
can create resources required for migration. If the project is not specified, Spanner migration
tool will try to fetch the configured project in the gCloud CLI.

--dataflow-template=DATAFLOW_TEMPLATE
The google cloud storage path of the minimal downtime migration
template to use to run the migration job. Default value is the latest dataflow template.
6 changes: 5 additions & 1 deletion docs/cli/schema-and-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,8 @@ Detailed description of optional flags can be found [here](./flags.md).
--project=PROJECT
Flag for specifying the name of the Google Cloud Project in which the Spanner migration tool
can create resources required for migration. If the project is not specified, Spanner migration
tool will try to fetch the configured project in the gCloud CLI.
tool will try to fetch the configured project in the gCloud CLI.

--dataflow-template=DATAFLOW_TEMPLATE
The google cloud storage path of the minimal downtime migration
template to use to run the migration job. Default value is the latest dataflow template.
2 changes: 2 additions & 0 deletions docs/ui/prepare-migration/conn-profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,6 @@ For JSON based configuration, creation of new resources is not supported. The co

SMT provides an example of how a JSON based configuration looks like [here](https://github.com/GoogleCloudPlatform/spanner-migration-tool/blob/master/test_data/mysql_shard_streaming.cfg).

Source and Target connection profiles can be automatically generated. Refer to [this](../../cli/config-json.md#automatic-generation-of-connection-profiles) documentation to know more.

![](https://services.google.com/fh/files/misc/text_input_shard.png)
31 changes: 31 additions & 0 deletions docs/ui/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,34 @@ Spanner migration tool UI has the following components:
- **[Connect to Source Page](./connect-source.md)** - This page can be used to configure source of data in the Spanner migration tool UI.
- **[Schema Conversion Workspace](./schema-conv/schema-conv.md)** - This page can be used to make schema conversion changes from source to Spanner. This page will help you visualise how your schema would look like in Spanner, and also provide issues/warnings/suggestions based on the automated analysis of your schema.
- **[Prepare Migration Page](./prepare-migration/prepare.md)** - This page is used to configure the migration. It asks for details such as the mode (`schema`/`data`/`schema-and-data`) and the type (`poc` or `minimal downtime`) of migration and accordingly requests for configuration input (e.g destionation `databaseName`, Datastream connection profiles etc.)

## Launching the web UI for Spanner migration tool
In order to launch the web UI for Spanner migration tool, run the following command:

```sh
gcloud alpha spanner migrate web
```

{: .important }
You will be asked to authorize running this command by providing your Google Cloud credentials. This allows Spanner migration tool to access resources on your behalf.

### Optional Flags

{: .highlight }
Detailed description of optional flags can be found [here](./flags.md).

--log-level=LOG_LEVEL
To configure the log level for the execution (INFO, VERBOSE).

--open
Opens the Spanner migration tool web interface in the default browser, defaults to false

--port=PORT
The port in which Spanner migration tool will run, defaults to 8080

--validate
Flag for validating if all the required input parameters are present

--dataflow-template=DATAFLOW_TEMPLATE
The google cloud storage path of the minimal downtime migration template to use to run the migration job. Default value is the latest dataflow template.

4 changes: 4 additions & 0 deletions test_data/mysql_shard_streaming.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"streamLocation":"asia-east2",
"srcConnectionProfile":{
"name":"test1",
"user":"root",
"host":"0.0.0.0",
"port":"3306",
"password":"password",
"location":"asia-east2"
},
"dstConnectionProfile":{
Expand Down

0 comments on commit 2995e95

Please sign in to comment.