How to install on a Linux(CentOS) server

Setting up the application server

Before starting deployment make sure you have followings installed in your up to date Linux CentOS

  • Docker

  • Docker Composer

  • Azure CLI

Or, you can use following bash commands to update the OS and install all the required applications

#!/bin/bash

echo "Update Existing OS"
sudo yum Update -y

echo "Setting Up Repository before install Docker"
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

echo "Installing Docker Engine"
sudo yum install -y docker-ce docker-ce-cli containerd.io
sudo usermod -aG docker $(whoami)
sudo systemctl enable docker
sudo systemctl start docker

echo "Install Docker Compose"
sudo yum install -y epel-release
sudo yum install -y python-pip
sudo yum install docker-compose
sudo yum upgrade python*

echo "Install Azure Cli"
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo'
sudo yum install -y azure-cli 
 

Once you installed required applications, Restart the server before starting Flowdoh installation

Setting up the Database server

Install Microsoft SQL Server 2019 in your database server, then download & restore following bacpac files

Download bacpac files for Flowdoh databases

Here is the list of databases you get after the restorations, make sure you have everything

  • flowdoh-is

  • flowdoh-ne

  • flowdoh-workflow

  • flowdoh-scheduler

  • flowdoh-settings

  • flowdoh-tables

  • flowdoh-workspace

  • flowdoh-forms

After restoring databases, execute following SQL scripts to add some default data

Replace {hosturl} in the scripts with your actual application URL

Database names are given in Tab Titles

declare @categorypath nvarchar(max)
set @categorypath = '{hosturl}/wfengine/images/categoryicons/'
insert into [WorkflowCategory]([Name], [Icon]) values ('Other', concat(@categorypath,'Other.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Admin', concat(@categorypath,'Admin.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Banking Finance', concat(@categorypath,'BankingFinance.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Construction Development', concat(@categorypath,'ConstructionDevelopment.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Education', concat(@categorypath,'Education.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Entertainment', concat(@categorypath,'Entertainment.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Government', concat(@categorypath,'Government.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Health', concat(@categorypath,'Health.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('HR', concat(@categorypath,'HR.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Legal', concat(@categorypath,'Legal.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Maintenance', concat(@categorypath,'Maintenance.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Manufacturing', concat(@categorypath,'Manufacturing.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Real Estate', concat(@categorypath,'Realestate.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Communication', concat(@categorypath,'Signal-tower.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Technology', concat(@categorypath,'Technology.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Telecommunication', concat(@categorypath,'Telecommunication.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Tourism', concat(@categorypath,'Tourism.svg'))
insert into [WorkflowCategory]([Name], [Icon]) values ('Travel', concat(@categorypath,'Travel.svg'))

declare @other bigint
set @other = (select top 1 [Id] from [WorkflowCategory] where [Name] = 'Other')
update [Workflow] set CategoryId = @other

UPDATE TaskProperty SET IsApprovalTask=0

Installing Flowdoh

First Login to Azure using the terminal.

[john@flowdohserver ~]$ az login

then login to the Azure Container Registry ,

[john@flowdohserver ~]# az acr login --name zenregistry  

After a successful login, execute following Bash script to start installation

#!/bin/bash

echo -e "\e[92m Make Flowdoh directory for Host \033[0m "

mkdir flowdoh
cd flowdoh


echo -e "\e[92m Copy Source Files \033[0m "

scp -r [email protected]:/home/zenadmin/Fresh/*.* .


echo -e "\e[92m Create DiskPersistanceRuntimeContextData and UDR directories \033[0m "

mkdir DiskPersistanceRuntimeContextData
mkdir UDR
mkdir Blobs


echo -e "\e[92m Replace Directory Path \033[0m "

CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
LOC="PWD"
sed -i "s+${LOC}+${CWD}+g" docker-compose.yml


echo -e "\e[92m Replace Flowdoh URI Path \033[0m "
URISt="http://{hostname}"
URICr="$(ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')"
read -p "Enter IP address: " -e -i "$URICr"  IP
echo -e "\e[92m Replacing with this hostname $IP \033[0m "
sed -i "s+${URISt}+http://${IP}+g" *.*


echo -e "\e[92m Replace Falcon URI Path \033[0m "
URIFalconAuth="FalconAuth"
URIFalconUMApi="FalconUMApi"
URIFalconUMUi="FalconUMUi"
URIFalconMyprofile="FalconMyprofile"
read -p " Enter FalconAuth  address: " -e -i "$URIFalconAuth"  FalconAuth
read -p " Enter FalconUMApi address: " -e -i "$URIFalconUMApi"  FalconUMApi
read -p " Enter FalconUMUi  address: " -e -i "$URIFalconUMUi"  FalconUMUi
read -p " Enter FalconMyprofile address: " -e -i "$URIFalconMyprofile"  FalconMyprofile

echo -e "\e[92m Replacing with this hostname $FalconAuth \033[0m "
sed -i "s+${URIFalconAuth}+${FalconAuth}+g" *.*
sed -i "s+${URIFalconUMApi}+${FalconUMApi}+g" *.*
sed -i "s+${URIFalconUMUi}+${FalconUMUi}+g" *.*
sed -i "s+${URIFalconMyprofile}+${FalconMyprofile}+g" *.*


echo -e "\e[92m Replace SQL Server Path \033[0m "
SQLSrvO="ZenSQLServerName"
SQLUsrO="ZenUsername"
SQLPwdO="ZenPassword"
SQLCon0="Persist Security Info=False;User ID=ZenUsername;Password=ZenPassword;MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False;"
SQLCon1="User ID=ZenUsername;Password=ZenPassword;"

read -p "Enter SQL Server Details: " -e -i "$SQLSrvO" server

if [[ $server = *.database.windows.* ]];
then
        echo "azure"
                sed -i "s+${SQLSrvO}+${server}+g" *.env

else
        echo "OnPrem"
                svr="tcp:zenworkflowdevqa.database.windows.net,1433"
                sed -i "s+${SQLCon0}+${SQLCon1}+g" *.env
                sed -i "s+${svr}+${server}+g" *.env
                fi

                #sed -i "s+${SQLSrvO}+${server}+g" *.env
                read -p "Enter SQL Server UserName: " -e -i "UserName" USR
                sed -i "s+${SQLUsrO}+${USR}+g" *.env
                read -s -p "Enter SQL Server Password: " pass
                sed -i 's+'${SQLPwdO}'+'${pass}'+g' *.env

echo -e "\e[92m Flowdoh Compose Up in Detach mode \033[0m"
docker-compose up -d

Configuration Changes

Adding an Email server

Update following environment(env) variables in ZenServices.Proteus.Api.env and ZenServices.UserWorkspace.API.env files

  • EmailConfigurations_FromAddress= {from email address}

  • EmailConfigurations_FromPassword= {password}

  • EmailConfigurations_FromName= {Sender name}

  • EmailConfigurations_SmtpHost= {smtp host}

  • EmailConfigurations_SmtpPort= {port}

  • EmailConfigurations_isFullNameInSalutation= {true/false}

  • EmailConfigurations_salutation= {salutation}

  • EmailConfigurations_smtpEnableSSL= {true/false}

Updating Gateway with domain & SSL.

  • Get the .crt and .key files from client and create a custom gateway docker image for each customer.

  • Change the Docker-compose gateway ( zenregistry.azurecr.io/zen-gateway ) port from “80” to “443

  • Replace “http” to “https” in compose file and env files. (Only in domain urls)

  • Restart the docker-compose.

Installing Falcon ( In a Windows Server )

The current version of Falcon requires an IIS Server.

Install .NET Core 2.2 and 3.1 hosting bundles respectively in the server.

Click here to Get the latest version of Falcon

Create the following folder structure in inetpub , and copy the Falcon source files.

C:\inetpub\enadocRoot\Falcon

Run the following commands in PowerShell or in the Command Prompt.

New-WebAppPool -Name falconauth
New-WebAppPool -Name falconlanding
New-WebAppPool -Name falconmyprofile
New-WebAppPool -Name falconumapi
New-WebAppPool -Name falconumui

New-WebApplication -Name falconauth -Site "Default Web Site" -PhysicalPath "C:\inetpub\enadocRoot\Falcon\auth" -ApplicationPool falconauth -Force
New-WebApplication -Name falconlanding -Site "Default Web Site" -PhysicalPath "C:\inetpub\enadocRoot\Falcon\landing" -ApplicationPool falconlanding -Force
New-WebApplication -Name falconmyprofile -Site "Default Web Site" -PhysicalPath "C:\inetpub\enadocRoot\Falcon\myprofile" -ApplicationPool falconmyprofile -Force
New-WebApplication -Name falconumapi -Site "Default Web Site" -PhysicalPath "C:\inetpub\enadocRoot\Falcon\umapi" -ApplicationPool falconumapi -Force
New-WebApplication -Name falconumui -Site "Default Web Site" -PhysicalPath "C:\inetpub\enadocRoot\Falcon\umui" -ApplicationPool falconumui -Force

Restore the below databases from the 'Databases.zip' file that you downloaded previously.

  • Falcon.bacpac

  • FalconLogs.bacpac

After restoring databases, execute following SQL scripts to add default data.

Use [Falcon]
GO
update [dbo].[Application]
set BaseUrl = 'http://{falconhost}/falconumui/',
RedirectUrl = 'http://{falconhost}/falconumapi/authorize/code'
where Name = 'Falcon-Portal'
GO
update [dbo].[Application]
set BaseUrl = 'http://{flowdohhost}/workspaceui',
RedirectUrl = 'http://{flowdohhost}/is/api/Authentications/GetAuthCode'
where Name = 'Flowdoh'
GO
update [dbo].[Application]
set BaseUrl = 'http://{falconhost}/falconmyprofile/',
RedirectUrl = 'http://{falconhost}/falconmyprofile/#/authorize/'
where Name = 'EnadocMyProfile'
GO

Updating host url in the web application

Update the below files with the Falcon host url.

  • appsettings.json file in falconauth, falconlanding and falconumapi

  • main.xxxx.js file in falconumui and falconmyprofile

Creating a Tenant

Go to the below link and create a tenant.

http://{falconhost}/falconlanding

Adding Connectors

Download the below files.

Connectors

Log in to Flowdoh, go to Workflow Designer and click on 'Apps' in the header panel.

Enadoc Connector

Register Flowdoh in Enadoc Developer Portal, enter the below urls to 'Redirect URL'.

{Flowdoh Host}/is/api/Authentications/GetAuthCode; {Flwdoh Host}/is/api/Settings/GetAuthCode; {Flwdoh Host}/settingsportalapi/api/binarystorageconnections/AuthCode; {Flwdoh Host}/wfengine/api/oauth2connections/receiveauthcodefromserver; {Eadoc Host}/api/v3/token;

Get the app id and app secret for the registered app.

Follow the below steps to install the connector in Flowdoh.

  • Open the Enadoc swagger file(enadoc.json) and update servers:url with the client Enadoc host url.

servers": [
    {
      "url": "https://enadocapp.com"
    }
  ],
  • Click “New App” tile in Workflow Designer -> Apps.

  • Give a title for the app.

  • Upload the swagger file(enadoc.json).

  • Select Authentication type as OAuth2.

  • Enter the app id and app secret received from Enadoc developer portal to 'Oauth2 ClientID' and 'Oauth2 Client Secret'.

  • Prepare the OAuthURL as follows and enter it to 'Oauth2 Auth Url'.

{Client Host Enadoc Auth}/oauth2/authorize?client_id={app id}&redirect_uri={flowdoh host }/wfengine/api/oauth2connections/receiveauthcodefromserver

  • Enter {Client Host Enadoc}/api/v3/token for 'Oauth2 Token Url' and 'Oauth2 Refresh Url'.

  • Click the 'Create' button.

Forms Connector

  • Click “New App” tile in Workflow Designer -> Apps.

  • Give a title for the app.

  • Upload the swagger file(forms.json).

  • Select Authentication type as OAuth2

  • Execute the following stored procedure to get the authentication data and fill the fields with them accordingly.

  • Click the 'Create' button.

USE [flowdoh-forms]
DECLARE @return_value int

EXEC    @return_value = [dbo].[AddOAuth2App]
        @ClientId = N'Password',
        @ClientSecret = N'Password',
        @WorkflowUrl = N'{flowdoh host}/wfengine',
        @FormsUrl = N'{flowdoh host}/formsapi',
        @OrgId = 1

SELECT 'Return Value' = @return_value

Outlook Connector

  • Go to portal.azure.com and create an Azure AD app.

  • Click “New App” tile in Workflow Designer -> Apps.

  • Give a title for the app.

  • Upload the swagger file(outlook.json).

  • Select Authentication type as OAuth2

  • Get the app id and app secret from the Azure AD app created previously and enter them to 'Oauth2 ClientID' and 'Oauth2 Client Secret'.

  • Prepare the OAuthURL as follows and enter it to 'Oauth2 Auth Url'.

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id={app id}&redirect_uri={flowdohhost}/wfengine/api/oauth2connections/receiveauthcodefromserver&response_type= code&scope=Offline_Access https://outlook.office.com/mail.read https://outlook.office.com/mail.send

SMTP Connector

  • Click “New App” tile in Workflow Designer -> Apps.

  • Give a title for the app.

  • Upload the swagger file(smtp.json).

  • Select 'NoAuth' as the Authentication Type.

  • Click the 'Create' button.

Tables Connector

Execute the following stored procedure to install the table connector.

Use [flowdoh-workflow]
[dbo].[AppRegScript_Install_ZenTables]

Configuring storage connection

There should be a library with a text index and a tag profile in Enadoc. The Enadoc user account that is used to create the storage connection should have permission to upload documents.

  • Go to Forms Designer -> Settings.

  • Click on 'Storage Connection'.

  • Click on 'Enadoc' radio button.

  • Enter a name for the storage connection, Enadoc host, Enadoc app id and Enadoc app secret in the popped up form.

  • Click on 'Submit.(The Enadoc login page will prompt)

  • Login to Enadoc with the Enadoc user account.

  • After a successful login the library list will be populated in the form.

  • Select the library, tag profile and index.

  • Click on 'Save'.

Last updated