|
| 1 | +--- |
| 2 | +title: "Configuring and running the EDB DMS Reader" |
| 3 | +deepToC: true |
| 4 | +redirects: |
| 5 | + - /purl/dms/configure_source |
| 6 | +--- |
| 7 | + |
| 8 | +## Getting credentials |
| 9 | + |
| 10 | +1. Access the [EDB Postgres AI® Console](https://portal.biganimal.com) and log in with your EDB Postgres AI Database Cloud Service credentials. |
| 11 | + |
| 12 | +1. Select the project where you created the database cluster. |
| 13 | + |
| 14 | +1. Within your project, select **Migrate** > **Credentials**. |
| 15 | + |
| 16 | +1. Select **Create Migration Credential** > **Download Credential**. |
| 17 | + |
| 18 | +1. Unzip the credentials folder and copy it to the host where the reader is installed. |
| 19 | + |
| 20 | +## Configuring the reader |
| 21 | + |
| 22 | +1. Open the EDB DMS reader located in `/opt/cdcreader/run-cdcreader.sh` and ensure you have write permissions. |
| 23 | + |
| 24 | +1. Set the variables according to your environment and uncomment the edited lines. See [parameters](#parameters) for further guidance. The script is reproduced below. |
| 25 | + |
| 26 | +```shell |
| 27 | +#!/bin/bash -e |
| 28 | +# run_cdcreader.sh |
| 29 | +# |
| 30 | +# This script provides a convenient place to specify |
| 31 | +# environment variables used to configure the |
| 32 | +# EDB Data Migration Service Reader. |
| 33 | +# |
| 34 | +# After env exports, `java` is called to start the |
| 35 | +# software. |
| 36 | + |
| 37 | +########################################## |
| 38 | +# DMS Reader General Configuration # |
| 39 | +########################################## |
| 40 | + |
| 41 | +# This ID is used to identify DMS Reader |
| 42 | +# and is specified by the user. |
| 43 | +#export DBZ_ID= |
| 44 | + |
| 45 | +# Supported options include: appliance (the hybrid PG AI platform), aws |
| 46 | +#export CLOUD_PROVIDER= |
| 47 | + |
| 48 | +# This is the DMS backend service used by the Reader |
| 49 | +# If your CLOUD_PROVIDER is `appliance`, consult your system administrators |
| 50 | +# The default value supports the `aws` CLOUD_PROVIDER |
| 51 | +#export RW_SERVICE_HOST=https://transporter-rw-service.biganimal.com |
| 52 | + |
| 53 | +# You need to create migration credentials in EDB Postgres AI platform |
| 54 | +# and set these fields with the path of the credential files |
| 55 | +#export TLS_PRIVATE_KEY_PATH=$HOME/credentials/client-key.pem |
| 56 | +#export TLS_CERTIFICATE_PATH=$HOME/credentials/client-cert.pem |
| 57 | +#export TLS_CA_PATH=$HOME/credentials/int.crt |
| 58 | +#export APICURIOREQUEST_CLIENT_KEYSTORE_LOCATION=$HOME/credentials/client.keystore.p12 |
| 59 | +#export APICURIOREQUEST_TRUSTSTORE_LOCATION=$HOME/credentials/int.truststore.p12 |
| 60 | +#export KAFKASECURITY_CLIENT_KEYSTORE_LOCATION=$HOME/credentials/client.keystore.p12 |
| 61 | +#export KAFKASECURITY_TRUSTSTORE_LOCATION=$HOME/credentials/int.truststore.p12 |
| 62 | + |
| 63 | +########################################## |
| 64 | +# DMS Reader Source DB Configuration # |
| 65 | +########################################## |
| 66 | + |
| 67 | +# A sample configuration to create a single postgres database connection: |
| 68 | +#export DBZ_DATABASES_0__TYPE=POSTGRES |
| 69 | +#export DBZ_DATABASES_0__HOSTNAME=localhost |
| 70 | +#export DBZ_DATABASES_0__PORT=5432 |
| 71 | +# The CATALOG is the database name |
| 72 | +#export DBZ_DATABASES_0__CATALOG=source |
| 73 | +#export DBZ_DATABASES_0__USERNAME=postgres |
| 74 | +# The password env can be set without specifing it here |
| 75 | +# but the env structure looks like this |
| 76 | +#export DBZ_DATABASES_0__PASSWORD=password |
| 77 | + |
| 78 | +# You can increase the index to configure more than |
| 79 | +# one database for the DMS Reader |
| 80 | +#export DBZ_DATABASES_1__TYPE=ORACLE |
| 81 | +#export DBZ_DATABASES_1__HOSTNAME=localhost |
| 82 | +#export DBZ_DATABASES_1__PORT=1521 |
| 83 | +# The CATALOG is the database name |
| 84 | +#export DBZ_DATABASES_1__CATALOG=ORCLCDB/ORCLPDB1 |
| 85 | +#export DBZ_DATABASES_1__USERNAME=oracle |
| 86 | +# The password env can be set without specifing it here |
| 87 | +# but the env structure looks like this |
| 88 | +#export DBZ_DATABASES_1__PASSWORD=password |
| 89 | + |
| 90 | +########################################## |
| 91 | +# Optional Parameters Below # |
| 92 | +########################################## |
| 93 | + |
| 94 | +# Configure logging |
| 95 | +# Generic loglevel |
| 96 | +#export QUARKUS_LOG_LEVEL=DEBUG |
| 97 | +# Loglevel for a single package |
| 98 | +#export QUARKUS_LOG_CATEGORY__COM_ENTERPRISEDB__LEVEL=DEBUG |
| 99 | + |
| 100 | +cd $(dirname $0) |
| 101 | +java ${JAVA_OPTS} -jar quarkus-run.jar |
| 102 | +``` |
| 103 | + |
| 104 | +## Parameters |
| 105 | + |
| 106 | +### `DBZ_ID` |
| 107 | + |
| 108 | +This is the name you assign to identify a source. This name will later appear as a _source_ in the **Migrate** > **Sources** section of the EDB Postgres AI Console. |
| 109 | + |
| 110 | +Consider the following ID guidelines: |
| 111 | + |
| 112 | +- The maximum character length for the ID is 255 characters. |
| 113 | +- You can use lowercase and uppercase characters, numbers, underscores(_) and hyphens(-) for the ID. Other special characters are not supported. |
| 114 | +- The ID must be unique. The source instances cannot have the same ID. |
| 115 | + |
| 116 | +### `RW_SERVICE_HOST` |
| 117 | + |
| 118 | +Specifies the URL of the service that will host the migration. `transporter-rw-service` is always https://transporter-rw-service.biganimal.com. |
| 119 | + |
| 120 | +### `TLS_PRIVATE_KEY_PATH` |
| 121 | + |
| 122 | +Directory path to the `client-key.pem` private key you downloaded from the EDB Postgres AI Console. |
| 123 | + |
| 124 | +The HTTP client of the EDB DMS Reader uses it to perform mTLS authentication with the `transporter-rw-service`. |
| 125 | + |
| 126 | +### `TLS_CERTIFICATE_PATH` |
| 127 | + |
| 128 | +Directory path to the X509 `client-cert.pem` certificate you downloaded from the EDB Postgres AI Console. |
| 129 | + |
| 130 | +The HTTP client of the EDB DMS Reader uses it to perform mTLS authentication with the `transporter-rw-service`. |
| 131 | + |
| 132 | +### `TLS_CA_PATH` |
| 133 | + |
| 134 | +Directory path to the `int.cert` Certificate Authority you downloaded from the EDB Postgres AI Console. |
| 135 | + |
| 136 | +It signs the certificate configured in `TLS_CERTIFICATE_PATH`. |
| 137 | + |
| 138 | +### `APICURIOREQUEST_CLIENT_KEYSTORE_LOCATION` |
| 139 | + |
| 140 | +Directory path to the `client-keystore.p12` keystore location file you downloaded from the EDB Postgres AI Console. |
| 141 | +It is created from the private key and certificate configured in `TLS_PRIVATE_KEY_PATH` and `TLS_CERTIFICATE_PATH`. |
| 142 | + |
| 143 | +The Apicurio client uses it to perform mTLS authentication with the `transporter-rw-service`. |
| 144 | + |
| 145 | +### `APICURIOREQUEST_TRUSTSTORE_LOCATION` |
| 146 | + |
| 147 | +Created from the Certificate Authority configured in `TLS_CA_PATH`. |
| 148 | + |
| 149 | +The Apicurio client uses it to perform mTLS authentication with the `transporter-rw-service`. |
| 150 | + |
| 151 | +### `DBZ_DATABASES` |
| 152 | + |
| 153 | +This is a list of source database information you require for the EDB DMS Reader be able to read the correct source database information for the migration. |
| 154 | + |
| 155 | +You can configure the EDB DMS Reader to migrate multiple databases. The `DBZ_DATABASES_0__TYPE` section delimits the information for the first database. You can use `DBZ_DATABASES_1__TYPE` to provide data for a second database. Add more sections to the EDB DMS Reader (`DBZ_DATABASES_2__TYPE`, `DBZ_DATABASES_3__TYPE`) by increasing the index manully. |
| 156 | + |
| 157 | +#### `DBZ_DATABASES_0__TYPE` |
| 158 | + |
| 159 | +This is the source database type. EDB DMS reader supports `ORACLE` and `POSTGRES`. |
| 160 | + |
| 161 | +#### `DBZ_DATABASES_0__HOSTNAME` |
| 162 | + |
| 163 | +The hostname of the source database. |
| 164 | + |
| 165 | +#### `DBZ_DATABASES_0__PORT` |
| 166 | + |
| 167 | +The port of the source database. |
| 168 | + |
| 169 | +#### `DBZ_DATABASES_0__CATALOG` |
| 170 | + |
| 171 | +The database name in the source database server. |
| 172 | + |
| 173 | +#### `DBZ_DATABASES_0__USERNAME` |
| 174 | + |
| 175 | +The database username of the source database. |
| 176 | + |
| 177 | +#### `DBZ_DATABASES_0__PASSWORD` |
| 178 | + |
| 179 | +The password for the database username of the source database. |
| 180 | + |
| 181 | + |
| 182 | +## Running the EDB DMS Reader |
| 183 | + |
| 184 | +1. Start the migration: |
| 185 | + |
| 186 | + ```shell |
| 187 | + cd /opt/cdcreader |
| 188 | + ./run-cdcreader.sh |
| 189 | + ``` |
| 190 | + |
| 191 | +1. Go to the [EDB Postgres AI Console](https://portal.biganimal.com), and verify that a source with the `DBZ_ID` name is displayed in **Migrate** > **Sources**. |
| 192 | + |
| 193 | +You can select this source for your [migration](create_migration). |
| 194 | + |
| 195 | + |
0 commit comments