Mass deployment

I am running SLE (SUSE Linux Enterprise Server) 11sp3 and have over 100 machines. Is there an easy way to set this all up to sync a directory with 21GB of data wihtout the WebUI? I have Syncthing running on one host and have the directory setup but wondering if there is a method to deploy this configuration to the other 99 machines without needed to manually interact with each one. I was looking back at some older posts but some of the links were broken as it looks like the Document page is relatively new or I am relatively behind. :slight_smile: If I set my “master” server that will house my files which is where we will be updating, modifying, and deleting from and set that as the Folder Master and then when I add new devices is that when I add them as Introducer? I’m also curious about deploying the syncthing installation and is there a way to edit configs based on the hostname and what folder I am syncing from my “Master” machine?

I think that is a good start back to checking out the other postings. This looks like an amazing project! Is anyone currently using this in the Enterprise in a similar fashion as I intend? Have one server that keeps other files up-to-date on 100 others across a network of T1 lines? Some Offices have dual T1’s.

Also, does syncthing just sync deltas? One of the files is a Windows wim file and I discovered rsync is able to sync just the diffs on a wim file. This is useful for Windows patching instead of sending out another 6G wim file it will just send out 200M or whatever the patches were. Delta syncs are nice so wondering.

I think there was somebody posting a puppet script or something a while back. Is it down?

Also, yes, syncthing just uses deltas - but large files will be copied during transfer and then renamed, so make sure there’s enough space. This also standard behaviour of rsync btw.

Also, I remember something asking if syncthing is “business ready”, so maybe you can share your experiences :wink:

I think this is somewhat of an unsolved problem, as none of the core developers have experienced it yet. :wink: There are some parts of it you may be able to glue together though;

syncthing -generate someDir generates a new key pair and default config in the named directory. You can repeat this for dirs st01 to st99 to have 99 keys and configs ready for deployment.

However the configs are default configs, and you need to build something a little better. Specifically you need to add the device ID:s to the config. You can grab them all and print them in XML format with something like:

$ for dir in st?? ; do
   syncthing -generate "$dir" |
   grep 'Device ID' |
   awk '{print "<device id=\"" $5 "\"><address>dynamic</address></device>"}'
done
<device id="HBLRMT2-2LJV2WK-UXTSIZY-EKHG2PI-WGRRPKP-KZMIAP4-SMCHLKM-4ASJBAS"><address>dynamic</address></device>
<device id="IU33ZNG-5OXGTLU-IIW54WU-JRGXQEP-245EAJE-4YJRI2U-4XBG6PZ-3TJUBAB"><address>dynamic</address></device>
...

Paste those into the devices and folder sections of an otherwise appropriate config. Copy that config to everyone - there’s nothing individual to it, the identity is in the keys.

Going forward, having one device be an introducer may be helpful.

By which I mean we haven’t mass deployed Syncthing, that I know of, so haven’t needed to solve this. Someone who needs it solved could figure out the smoothest way to get it done, and we could implement whatever might be missing to make it work. One idea that’s been floated before is to auto accept devices with certificates signed by a local CA.