Create the target environment
After you review the compatibility requirements and prepare the ZDM Proxy infrastructure, you must prepare your target cluster for the migration.
This includes the following:
-
Create the new cluster that will be the target of your migration.
-
Re-create the schema from your origin cluster on the target cluster.
-
Gather authentication credentials and connection details for the target cluster.
The following steps assume you are migrating to DataStax Enterprise (DSE). If that is not the case, see the ZDM documentation for your actual target cluster.
|
For complex migrations, such as those that involve multi-datacenter clusters, many-to-one/one-to-many mappings, or unresolvable mismatched schemas, see the considerations for complex migrations. |
Prepare your target database
-
Provision the cluster infrastructure, and then create your DSE cluster with your desired configuration.
Determine the correct topology and specifications for your new cluster, and then provision infrastructure that meets those requirements. Your target infrastructure can be hosted on a cloud provider, in a private cloud, or on bare metal machines.
For more information, see the DSE installation and configuration documentation.
Because ZDM Proxy supports separate connection details for each cluster, you can configure the new cluster as needed, independent of the origin cluster’s configuration. This is a good opportunity to establish your desired configuration state on the new cluster and implement new patterns that might have been unavailable or impractical on the old cluster, such as enabling authentication or configuring TLS encryption.
-
Recommended: Consider testing your new cluster to ensure it meets your performance requirements, and then tune it as necessary before beginning the migration.
-
If you enabled authentication in your cluster, create a user with the required permissions for your client application to use to read and write to the cluster.
Store the authentication credentials securely for use by your client application and ZDM Proxy later in the migration process.
-
Note your cluster’s connection details, including the contact points (IP addresses or hostnames) and port number.
-
Re-create your origin cluster’s schema on your new cluster, including each keyspace and table that you want to migrate.
On your new DSE cluster, the keyspace names, table names, column names, data types, and primary keys must be identical to the schema on the origin cluster or the migration will fail.
To copy the schema, you can run CQL
DESCRIBEon the origin cluster to get the schema that is being migrated, and then run the output on your new cluster.If your origin cluster is running an earlier version, you might need to edit CQL clauses that are no longer supported in newer versions, such as
COMPACT STORAGE. For specific changes in each version, see the release notes for DSE and your Cassandra driver.
Test the connection to the target cluster
After you create the target cluster, try connecting your client application directly to the target cluster without ZDM Proxy. This ensures that the connection will work when you disconnect ZDM Proxy at the end of the migration. For example, if you use a Cassandra driver, see the driver documentation to learn how to connect to DSE databases.
Additionally, DataStax recommends running performance tests and measuring benchmarks in a test environment where your client application is connected directly to your target cluster. ZDM Proxy inherently impacts latency, so it is important that you understand how your application workloads will perform on the new cluster without ZDM Proxy.
Depending on the results of your tests, you might need to adjust your application logic, data model, or cluster configuration to achieve your performance goals. For example, you might need to optimize queries to avoid anti-patterns that were acceptable on your origin cluster but degrade performance on the target cluster.
Next steps
After preparing the infrastructure for ZDM Proxy and your target cluster, begin Phase 1 of the migration by setting up ZDM Proxy Automation with ZDM Utility.