Wyn Enterprise Administration Guide

Wyn Enterprise: Deploying in a Distributed Linux Environment

This article explains how to set up Wyn Enterprise in a distributed environment for Linux.

Caution: Make sure to deploy the services before the worker modules in a distributed deployment environment.

Note: Please contact GrapeCity Sales for a distributed license key.

Basic Steps

This section explains the basic steps required to set up the primary and secondary nodes in Wyn Enterprise. They should be followed before you proceed further to deploy any worker module or service on the secondary node machine.

  1. Install Wyn Enterprise on the primary node machine.
  2. When installed successfully, open the Wyn Enterprise portal, i.e., http://localhost:51980/admin on the web browser.
  3. Then, navigate to the Node Management page on the Admin Portal.
  4. Configure the global settings for the primary node machine.
    Configure Primary Node Settings
  5. Then, add a secondary node.
    Add Secondary Node
    Observe that the status of the secondary node is Offline.
  6. Install the secondary node on the machine using the How To Install section at the bottom of the secondary node page.
    i. Download and install ASP.NET Core Runtime (recommended version 6.0.4) on the secondary node machine.
    ii. Click and download the binary.zip file. Unzip the file and copy it to the secondary node machine to a newly created folder Wyn, at this location – /opt/Wyn/.
    iii. Run the command line as an administrator and execute the shell script using the following command.

    sudo sh ./install.sh

    Observe that the status of the secondary node now changes to Online.

    Tip: Turn off the firewall on the machines or ensure the ports listed in this article are opened.

To install multiple secondary nodes, please repeat the steps from 5 to 6.

Deploy Server Module

Deploying multiple Server modules effectively distributes the workload between the machines. This reduces the burden on each machine and makes them more efficient.

Note: The servers in a distributed deployment environment use the same data store.

Ensure the following software prerequisites are installed on any accessible machine before deploying the Server module.

Follow these steps to remotely deploy the Server module within a distributed environment.

  1. Open the Wyn.conf file on the primary node machine located here - /opt/Wyn/Monitor/conf.
  2. Add this section under the Server element of the file where the ConfigString denotes the connection string for Redis.

    <EnableMultipleServers>true</EnableMultipleServers>
      <Cache>
        <DistributedMemoryCache>              
         <ConfigString>Server=address:port_number,Expire=0,Db=0,ThrowOnFailure=true,Timeout=3000</ConfigString>
        </DistributedMemoryCache>
      </Cache>  
    

    Note: Replace localhost or 127.0.0.1 with the primary node machine IP address in the Wyn.conf file.

  3. Open the Wyn Enterprise portal on the web browser, and switch to the Admin Portal.
  4. Navigate to the Node Management page and choose a secondary node where you want to install the Server module.
  5. Under the Service Information section of the node, click download to install the Server module.
    Installing the Server Module on the secondary node machine
    Once the Server module is installed successfully on the machine, the Status changes from Not Installed to Running.
    For more information, please see Node Management.
  6. Then, save the changes.
  7. Open the Nginx.conf file and add these configurations to set up the load balance among multiple servers. The upstream servers represent the IP address of the machines on which the Server modules are installed.

    map $http_upgrade $connection_upgrade {
        default upgrade;
        ''      close;
    }
    
    upstream wyn {
        server IP_address1:51980 max_fails=3 fail_timeout=15s;
        server IP_address2:51980 max_fails=3 fail_timeout=15s;
    }
    
    server {
        listen  8089;
        location / {
            add_header backendIP $upstream_addr;
            add_header backendCode $upstream_status;
            proxy_pass http://wyn;
            # support websocket
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
            proxy_set_header Host $host:$server_port;
            proxy_connect_timeout       300s;
            proxy_send_timeout          300s;
            proxy_read_timeout          300s;
            send_timeout                300s;
            sendfile on;
            proxy_buffer_size 64k;
            proxy_buffers   32 32k;
            proxy_busy_buffers_size 128k;
            fastcgi_buffers 8 16k;
            fastcgi_buffer_size 32k;
            client_max_body_size 100M;
        }
    }
    
  8. On the Node Management page of the Admin Portal, change the Identity Server URL in the Global Settings to http://<Nginx IP Address>:<Listening Port>. The Nginx IP address is the IP address of the machine where Nginx is installed.
  9. Restart the primary and secondary node machines.
  10. Open the web browser on the primary node machine and visit the Wyn Enterprise portal, i.e., http://<Nginx IP Address>:<Listening Port>. In case, the portal does not work properly, please visit http://<Nginx IP Address>:<Listening Port>/logout to re-login.

Deploy Services

The Wyn architecture comprises of scheduler service, datasource service, memory db service, analysis db primary node service, and analysis db service. Each service has its own set of functions and usage. For more information about the Wyn Enterprise architecture, please see this article.

  1. Stop the Wyn Enterprise service on the primary node machine using this command.

    sudo systemctl stop wyn
    
  2. Copy the DatasourceService, jre, MemoryDBService, MonetDB, SchedulerService, AnalysisDBPrimaryNode, and AnalysisDBService folders from the primary node machine to the secondary node machine, here – /opt/Wyn/. You can access these folders on the primary node machine from the installation directory.

    Note: Apart from the service folders, we have also copied the jre and MonetDB folders. This is because the datasource and memory db services are dependent on jre, while the analysis db service is dependent on MonetDB.

  3. Install MonetDB (specific version 11.41.5) on the secondary node machine. This is because the built-in MonetDB version is 11.41.5 and is an actively updated database. By installing different versions, you may face breaking changes or unknown issues.
  4. From the primary node machine, copy the wyndw folder present at this location - /var/monetdb5/dbfarm/ to the secondary node machine at the same location.
  5. Update these configuration settings in the Wyn.conf file of the secondary node machine, located here - /opt/Wyn/Monitor/conf.
    i. Set the ServerHost of the SchedulerConfig element to the IP address of the secondary node machine where the scheduler service is enabled.
    ii. Set the IP address of the AnalysisDBSeedNodes to the IP address of the secondary node machine where the analysis db service is enabled.
    iii. Add the Services element to include the other services, that is, scheduler service, datasource service, memory db service, analysis db primary node, and analysis db service.

    Modifying the conf file on secondary node

  6. Then, save the changes.
  7. Update these configuration settings in the Wyn.conf file on the primary node machine, located here - /opt/Wyn/Monitor/conf.
    i. Set the Serverhost of the SchedulerConfig element to the IP address of the secondary node machine where scheduler service is enabled.
    ii. Set the IP address of the AnalysisDBSeedNodes to the IP address of the secondary node machine where analysis db service is enabled.
    iii. Set the IP address of the DataSourceProxy to the IP address of the secondary node machine where DataSource service is enabled.
    iv. Set the IP address of the MemoryDBProxy to the IP address of the secondary node machine where MemoryDBService is enabled.
    v. Remove the services deployed on the secondary node machine - scheduler service, datasource service, memory db service, analysis db primary node, and analysis db service.

    Update Primary Node Conf File

  8. Then, save the changes.
  9. Restart the primary and secondary node machines.

Deploy Worker Modules

Wyn Enterprise architecture consists of four worker modules - Cot Worker, Dashboard Worker, Report Worker, and Server. Each module has its own set of functions. For more information about their functionalities, please visit this article.

  1. Open the Wyn Enterprise portal on the web browser, and switch to the Admin Portal.
  2. Navigate to the Node Management page and choose a secondary node where you want to install the worker module(s).
  3. Under the Service Information section of the node, click download next to the worker module(s) you want to install.
    Install worker module
    Once the worker module is installed successfully on the machine, the Status changes from Not Installed to Running.
    For more information, please see Node Management.
  4. Save the changes.

Customer Scenarios

Here is a list of most common scenarios when deploying Wyn Enterprise in a distributed environment.

Scenario 1: Deploy backup server

This section describes multi-server deployment in an environment. Now to choose a server on the secondary node machine to act as a backup server, you need to shut the machine and remove its configuration from the Nginx.conf file.

Ensure deploying the services associated with Wyn Enterprise on a separate machine for better availability. For more information, please see this section.

Caution: A few administrator functions will not work properly in case the server on the primary node machine goes down while enabling the backup server. Once the primary node machine is restored, all the functions start working normally.

Note: In case both the primary and secondary node machines are down, please ensure that the machines are in good working conditions.

Scenario 2: Deploy active-active cluster

Active-active clusters are easily deployed by enabling the multi-server deployment in an environment. For more details, please see this section.

Troubleshooting

This section describes the most common problems you might encounter while deploying Wyn Enterprise in a distributed environment.

  1. Secondary node machine fails to start and no logs are created
    Ensure ASP.NET Core Runtime (recommended version 6.0.4) is installed on the machine.
  2. Primary node machine is offline
    Check the configuration settings defined in the Wyn.conf file. If the configurations are fine, there may be an issue in your machine causing the primary node to go offline. You need to check the machine and after the resolution, just restart Wyn Enterprise service.