Özgür Demirtaş
Bimar Teknoloji Blog
3 min readAug 1, 2023

--

DevOps Practices with File Synchronization and Example Use Cases

If you are working on a .NET Core-based and distributed application, topics like table replication or file synchronization may come up in your DevOps processes. The file synchronization feature, which can be provided by data replication tools, allows you to execute PowerShell commands in remote environments.

Overall architecture

With the open-source tool “SymmetricDS,” it is possible to execute commands on connected clients from a central server through its “File Synchronization” feature. The results of these processes can then be reported back to the central environment using table synchronization.

The server system can be connected to multiple client systems as follows:

In the “File Trigger” configuration, the last step can be defined as the Bean Shell “After Copy Script,” which can be used to trigger any PowerShell script in the target environment.

Bean Shell “File Trigger After Copy Script” Template :

As per the example provided, file movements under the “c:\Nodes” directory on the main server can be captured using “File Synchronization.” These files can be sent to systems such as “dev1,” “dev2,” etc., which are considered as “node” systems. Additionally, if desired, commands related to the transmitted files can be executed during the final step of the file copy process.

https://github.com/JumpMind/symmetric-ds

Now, let’s move on to the usage scenarios. This method, enriched and customized with various requirements, can be utilized for different purposes across numerous systems, as described below:

1. Scalable Version Management: Asynchronous data delivery to systems containing a large number of “nodes,” such as a fleet of ships, which may operate online/offline.

2. .NET Core Migration Transfer and Remote Execution: Maintaining the database schema structure consistently among multiple systems.

3. Remote SSL Automation: Remotely adding up-to-date certificates to systems with expiring certificate durations.

4. Updating .NET Core API Service Configurations Remotely: Customizing service settings at points such as appsettings.json files during module transitions in agile processes.

5. Updating On-premises IIS Pool Settings: Remotely updating settings for components like web servers when instant access to systems is not feasible due to internet connections.

--

--