Getting Started Config - Gadreel/divconq GitHub Wiki

Config TOC

Separate Computers
Tasks
File Server Upload Trigger

Config for Separate Computers

Don't forget to update your firewall to allow listening on the following ports:

  • dcFileServer needs 8443
  • dcFileGateway needs 4443, 7443 and 7444
  • dcFileTasks needs 6443
  • if you have a firewall between dcFileServer and dcFileGateway then be sure that dcFileServer can access ports 7443 and 7444 so that it may reach dcFileGateway.

File Server and File Client both need additional configuration when running the components on separate computers.

dcFileServer

On the computer with dcFileServer edit the config file (for example C:\dcFileServer\config\dcFileServer\_config.xml). Find line 4 which should appear:

<Connector Kind="Interface" Address="localhost" HubId="00100"  Port="7443" Ssl="True" Number="1" StreamNumber="1" TargetThumbprint="F7:15:BB:A0:68:01:B3:4A:C0:ED:19:58:26:77:1D:E8:98:13:27:AF" />

And change the Address attribute to the IP Address of your Gateway.

dcFileClient

On the computer with dcFileClient edit the config file (for example C:\dcFileClient\config\dcFileClient\_config.xml). Find line 3 which should appear:

<ApiSession Name="h1" Class="divconq.api.HyperSessionFactory" Host="localhost" Port="4443" Secure="True" />

And change the Host attribute to the IP Address of your Gateway.

Assuming no connectivity issues - firewalls - you may now run Foreground on all three computers.

Config for Tasks

On the computer with dcFileTasks edit the config file (for example C:\dcFileTasks\config\dcFileTasks\_config.xml).

Scheduled Tasks

Find line 2 which should appear:

<Scheduler>
	<!--
	<Task Title="Test Scheduled Task" Script="./packages/dcTest/dcs/test/06-scheduler.dcs.xml">
		<CommonSchedule>
			<Period Value="PT10S" />   
		</CommonSchedule>
		<Params>{ val: 'Silver' }</Params>
	</Task>
	-->
</Scheduler>

Uncomment the example task to test it. Requires restart of dcFileTasks if you already have it running. The Script attribute may point to any script file. If you would like to build your own scripts the prescribed place to put them would be ./packages/zCustomPrivate/dcs.

For Period use the standard ISO8601 format of PyYmMwWdDThHmMsS.

File System Triggered Tasks

Find line 24 which should appear:

<!--
<Watch FilePath="/Work/Temp/Watch">
	<CreateTask Title="Test Watch Task" Script="./packages/dcTest/dcs/test/07-watch-file.dcs.xml">
		<Params>{ val: 'Bronze' }</Params>
	</CreateTask>
</Watch>
-->

Uncomment the example task to test it. Requires restart of dcFileTasks if you already have it running. The Script attribute may point to any script file. If you would like to build your own scripts the prescribed place to put them would be ./packages/zCustomPrivate/dcs.

Config for File Server Upload Trigger

On the computer with dcFileServer edit the config file (for example C:\dcFileServer\config\dcFileServer\_config.xml).

Upload Tasks

Find line 16 which should appear:

<Settings FileStorePath="./files/store" BestEvidence="SHA512" />

Add the default test script so that now your XML is:

<Settings FileStorePath="./files/store" BestEvidence="SHA512">
	<Watch FilePath="/User/Salt">
		<UploadTask Title="Test Upload Task" Script="./packages/dcTest/dcs/test/08-watch-upload.dcs.xml">
			<Params>{ val: 'Gold' }</Params>
		</UploadTask>
	</Watch>
</Settings>

Requires restart of dcFileTasks if you already have it running. The Script attribute may point to any script file. If you would like to build your own scripts the prescribed place to put them would be ./packages/zCustomPrivate/dcs.

Note that FilePath may be any sub-path of your file store, use just plain "/" to watch all uploads.

⚠️ **GitHub.com Fallback** ⚠️