Install Replication Agent

Note: Operator role is required to install the Replication Agent.

The replication agent communicates the replication statuses and allows you to perform actions such as starting, stopping, and configuring replication.

  1. https://prd-cloud-platform-dis-downloads.s3.amazonaws.com/connect-agent-latest.zip.
  2. Import the docker images by downloading the zip file and executing the commands from PowerShell:
    docker load --input connect-agent-gateway.tar
    docker load --input connect-agent-jobcontroller.tar
    docker load --input connect-cdc-runtime-engine.tar
    
  3. Run the Replication agent by executing the command:
    
    docker-compose -p connect-agent up -d

Enable or Disable TLS

By default, TLS is enabled and a self-signed file is generated in the etc/precisely/security/di/certs folder of the container that is mapped to the /connect/security/certs folder of the host machine if none exist.

Disable TLS

To disable the TLS, set the environment variable PRECISELY_SSL_ENABLED to false in the docker-compose.yml file for both the connect-agent-gateway and connect-agent-jobcontroller services, and SSL_ENCRYPTION to N for the connect-cdc-runtime-engine service, or run docker-compose in an environment where these environment variables are set as such.

Change Port Number

If multiple components are using the same port number, you can change the port number.
  1. Open the docker-compose.yml located in the connect-agent-latest.zip.
  2. Change the number for the Ports parameter for the connect-agent-gateway.
    For example,
    ports:
        - "8281:8281"
    to
    ports:
        - "9281:8281"
  3. Change the port number for the environment parameter for the connect-agent-jobcontroller.
    environment:
       CONNECT_GATEWAY_URL: http://connect-agent-gateway:9281
  4. Change the port number for the environment parameter for the connect-agent-gateway.
    environment:
       CONNECT_JOBCONTROLLER_URL: http://connect-agent-jobcontroller:9282

Volume Mapping

For connect-cdc-runtime-engine, host volumes are set to ensure dataset persists even after the container are removed or restarted.

  • ./connect/security/keys: This is where connect-cdc keys are stored. For db2z, add a nacl folder with the public/private keys in this folder.
  • ./connect/security/certs: Certificates are created for TLS communication between the connect services in the connect-certs named volume. If you have existing certificate files, copy them in the mapped folder along with the application.yml and cert.json file.

  • ./connect/cdc/drivers/db2: Copy and Db2 jdbc driver files here.
  • ./connect/cdc/drivers/others: Copy all othere non-shipped jdbc drivers here. By default the connect-cdc image is shipped with the following drivers: kafka, mysql, oracle, postgresql, snowflake, sqlserver, teradata.

  • ./connect/kafka/conf: This is a recommended path to copy all kafka configuration file.

Register the Replication Agent

You may need to wait for a few seconds before registering the agent.

  1. Start the agent and the following message displays in the container console logs:
    INFO 4860 — [     main] c.p.s.auth.impl.AgentRuntimeClientImpl : Verification Uri Complete: 
                                https://auth-dev.cloud.precisely.services/auth/realms/Precisely/device?user_code=FYNS-PJLX 

    Verification Uri will also be written to this path “/home/connect/.connect/agent/verification-uri”

  2. Run the following command to retrieve the verification from container logs:
    docker logs connect-agent-gateway | grep " Verification Uri Complete: " 
  3. Use the verification-uri to log into SaaS and enter your credentials to authenticate.
    Note: verification-Uri will be valid for 10 minutes, you need to complete the registration process within this duration.
    Until the registration process is complete, the following message will be printed every 5 seconds in the container console logs.
    INFO 3296 — [ main] c.p.s.auth.impl.AgentRuntimeClientImpl : Token Expires in: 10 minutes
                                    INFO 3296 — [ main] c.p.s.auth.impl.AgentRuntimeClientImpl : Token Expires in: 9 minutes 55 seconds 
  4. Click Allow Access to complete the agent registration.
    The Register agent page states your agent was registered successfully. The following message displays in the container console logs:
    INFO 4860 — [ main] c.p.s.auth.impl.AgentRuntimeClientImpl :
                                Registered a new agent for tenantId:<tenantId> and for a product:<connect product name> with agent id:<agent id>

    The agent refreshes the access token at every 48th minute interval while running. If you stop agent for less than 30 days, then token will be refreshed automatically on agent start. Whereas, if you stop the agent for more than 30 days then agent re-registration would be required.

  5. If you do not complete the authentication within 10 minutes, the registration fails and the agent stops.
    INFO 18644 --- [ main] c.p.s.auth.impl.AgentRuntimeClientImpl : Token Expires in: 0 minutes 0 seconds
                                Error: com.precisely.saas.auth.AgentRegistrationException: Agent validation timed out
                                INFO 18644 --- [extShutdownHook] o.s.b.w.e.tomcat.GracefulShutdown : Commencing graceful shutdown. Waiting for active requests to complete
                                INFO 18644 --- [tomcat-shutdown] o.s.b.w.e.tomcat.GracefulShutdown : Graceful shutdown complete
  6. If you clicked Deny Access from step 4, the following dialog displays and the following errors are generated in the console.
    Error: com.precisely.saas.auth.AgentAccessDeniedException: ErrorTokenResponse(error=access_denied, error_description=The end user denied the authorization request)
                                INFO 11224 --- [extShutdownHook] o.s.b.w.e.tomcat.GracefulShutdown : Commencing graceful shutdown. Waiting for active requests to complete
                                INFO 11224 --- [tomcat-shutdown] o.s.b.w.e.tomcat.GracefulShutdown : Graceful shutdown complete
  7. After you have registered the agent, view the list of agents.