Install and Configure Smart Preview Hybrid Server

Perform the following steps with the App Service account, except where noted.

 

Install SSL Certificates for the Smart Preview Hybrid Service

The Smart Previews Hybrid service is required to run on SSL.

  • You must have an SSL certificate available on the host before installing Smart Previews Hybrid.

Repeat these steps on each server you have designated for the Smart Preview Hybrid Service

  1. Add the SSL certificate for the URL you will use for the Smart Preview Hybrid Service.
    1. Certificates should be added under the local computer store, personal certificates
    2. For use in IIS to provide SSL encryption to web traffic.
  2. Add the certificate in the Windows Certificate Manager:
    1. Launch the Microsoft Management Console: Start>Run>MMC.
    2. In the Management Console, go to File>Add/Remove Snap-in.
    3. Select the "Certificates" add-in.
      1. Choose "Local Computer" when prompted for which computer to manage certificates for while adding the certificate snap-in.
      2. When the certificate manager load, in the left navigation, expand "Certificates (Local Computer)">"Personal".
      3. Right-click the "Certificates" folder under "Personal, select "All Tasks" then "Import"


      4. Follow the wizard to import your certificate.
  3. Ensure the network is configured to allow HTTPS traffic to your Smart Preview Hybrid service URL to reach this server.

Install the Smart Preview Hybrid Server

Use the following instructions to install the Smart Preview Hybrid server.

  1. Run the file SmartPreviewsHybrid.msi as an Administrator.
  2. Open a command prompt as admin, CD to the installation folder.
  3. Execute the command: \>msiexec.exe /i SmartPreviewsHybrid.msi. The installer launches with Administrator privileges.
  4. Read and accept the EULA.
  5. Provide the path to the application directory.
  6. Provide details for how the web application will be configured in IIS:
    1. Port:
      1. The port number the site listens on.
      2. This is the port that receives the HTTPS requests from the Smart Previews Hybrid service URL.
    2. Certificate Friendly Name
      1. The certificate used for your Smart Preview Hybrid Service URL
      2. The certificate added in step 1 above.
    3. User Name.
      1. This is your App Service Account, in the form domain\username
    4. Password: The App Service account password.


  7. Complete the wizard and wait for the installation to complete.

    Service Account

    Your Smart Previews Service account requires full control security permissions to the Smart Previews Hybrid installation folder.

Configure the Smart Preview Hybrid Service

  1. Open a web browser and navigate to the Smart Previews Hybrid site /pages/configure.aspx page.
       https://[smartPreviewHybridServiceURL]:[port]/pages/configure.aspx
    1. Provide the Tenant information
      1. Click "Generate" to generate a new signing certificate to be used by Smart previews Hybrid. (this is different from the SSL cert used for the HTTPS binding, as described in step 1 above.)
      2. Click "Download" to download the .cer file to be used in the Smart Previews Azure App configuration.
    2. Provide the Smart Previews On-Premise Deployment data.
    3. The Database Connection String identifies how to connect to the preview configuration database, created when installing the import server.
      It is in the format:
         Server=[Database Server Name];Database=[Name of Configuration Database];Trusted_Connection=True;
      1. The Preview Generation service address points to a service that runs on the Import server.
        It must be in the format:
           http://[Import Server Name]:1238/PreviewGeneratorService
      2. Configure the Fetchers.
      3. For more information, see How to Configure Fetchers
    4. Navigate to the Installation directory and find the web.config file.
    5. Edit web.config:
      1.  Find the cloud service address. "CloudServiceAddress" (approximately line 105):
        <add key="CloudServiceAddress" value="https://previewapp.bainsight.com/Services/PreviewProxyService.svc" />
      2. Update the URL to the URL of your Azure Preview Service.
      3. Save the changes.
  2. The Smart Preview Hybrid Service installation is now complete.

Connect the Smart Previews Azure Web App and the Smart Previews Hybrid Service

As described in previous sections, Smart Previews Web App is deployed in an Azure Web Service while Smart Preview Hybrid Service is deployed in an on-premise virtual machine.

Tip: The Azure Web App needs to make web requests to the Hybrid Service which means that Hybrid Service needs to be exposed to the public internet via an open inbound port.

At this point you have 2 options:

  1. Expose the Hybrid Service to internet - Not Recommended since opening ports to a virtual machine provides a network vulnerability.
  2. Use Azure Hybrid Connections to enable the Azure Web App to talk to an on-premise site - Recommended approach.

How to Configure an Azure Hybrid Connection between Smart Previews Azure Web App and the Hybrid Service 

Follow these steps:

  1. Make sure you Smart Previews Web App is on a paid Azure subscription (not free, not shared) so that it has access to Azure Hybrid Connections feature.
    Note: this step must be mentioned in step 7....
  2. Connect to the Smart Previews Web App Service in Azure.
  3. Download the connection manager from the Azure Portal UI to your Hybrid Server.
    1. You can find the download link while viewing/configuring the Hybrid Connections in your App Service.


  4. Install the Hybrid Connection Manager on your hybrid server.
  5. Go to Networking Hybrid Connections Configure your hybrid connection endpoints
  6. Click Add hybrid connection.

  7. Fill out the hybrid connection info:
    1. Name - Name as desired.
      1. Example: SmartPreviewsHybrid
    2. Endpoint Host - The host of the Hybrid Service Site.
      1. Example: hybridpreview.contoso.com
    3. Endpoint Port - The port of the Hybrid Service Site.
      1. Example: 6677
    4. Servicebus Namespace - The underlying Service bus namespace used by the hybrid connection.
      1. Create a new one and name as desired.
      2. Example: SmartPreviewsServicebus
      3. Important! - The Endpoint provided above must resolve correctly on the Hybrid Server and must load the Hybrid Site.
        Using the above examples, accessing https://hybridpreview.contoso.com:6677/pages/configure.aspx from the Hybrid Server virtual machine browser must correctly load the Hybrid Service configuration page.
        This address must not be exposed to internet, therefore not publicly available.
  8. Click Ok to create the hybrid connection and wait for the creation process to complete.
  9. Open Hybrid Connection Manager UI program after it is installed.
  10. Click Add a new Hybrid Connection
  11. Connect to your Azure instance and select the subscription where the hybrid connection was created.
  12. Select the hybrid connection created in step 6 and click Save.
  13. Make sure the connection status shows up as Connected in both Hybrid Connection Manager UI (on-premise machine) and Azure Hybrid Connections (Azure).

    Connection shows "Not Connected"

    When you first create the connection in the Hybrid Connection Manager, it will often show "not connected" until you re-start the Azure Hybrid Connection Manager service. 

    This is a Windows service, and can be re-started via the Windows Services Manager.

  14. Make sure to use the Hybrid Service address (Example: https://hybridpreview.contoso.com:6677) in the Smart Previews Web App configuration page for the On-premise Previews Service Address field (described here)

Configure Your Content Sources to Call Smart Previews CEWS

You must configure either your Connector Framework or AutoClassifier to call the Smart Preview CEWS service.

AutoClassifier

Smart Previews