Running a Data Sync app on Red Hat Managed Integration

Deploying your Data Sync server application

Prerequisites
  • You have a Data Sync server application working locally

Procedure
  1. Log in to the Solution Explorer.

  2. Navigate to the OpenShift console.

  3. Click Create Project.

  4. Enter the details for your application, when prompted.

  5. Navigate to the Project Overview screen.

  6. Search for the Data Sync App in the Service Catalog.

  7. In the Configuration section:

    1. Enter the Git URL for the application repository.

      To use a private repository, see Creating New Applications.
    2. Enter information for the required fields (indicated by * ).

    3. Complete any optional fields, if necessary.

  8. Complete the Wizard to start provisioning the Data Sync server application.

  9. Wait for the service to display a ready status.

  10. On the Project Overview screen, use the application URL displayed in the top right corner to verify your application is available.

Connecting the Data Sync client to your Data Sync server application

Prerequisites
Procedure
  1. Get the hostname of the Data Sync Server application.

    1. In your teriminal, run the command:

      $ oc get route <data-sync-application-name>
    2. Verify the output as:

      NAME                             HOST/PORT               PATH      SERVICES        PORT      TERMINATION   WILDCARD
      <sync-server-application-name>   <sync-server-hostname>            data-sync-app   <all>                   None
    3. Record the value for <sync-server-hostname>.

  2. Make sure the @aerogear/voyager-client, graphql, and graphql-tag libraries are added to your project. If necessary, add them by using the following commands:

    npm install @aerogear/voyager-client
    npm install graphql
    npm install graphql-tag
  3. In your project source code, import and configure the client using the server hostname.

    const config = {
      httpUrl: 'http://<sync-server-hostname>/graphql',
      wsUrl: 'ws://<sync-server-hostname>/graphql'
    }

    The client is now ready to make queries and mutations to the Data Sync server application.