Headless installation and configuration on Windows10

Moderators: Site Moderators, FAHC Science Team

LancasterUni
Posts: 7
Joined: Sat Apr 04, 2020 10:07 am

Re: Headless installation and configuration on Windows10

Post by LancasterUni »

wuerfelfreak wrote:I did have the same problems with FAHControl, which is why I am currently working on a similar Program which is geared more to managing hundreds of clients. Maybe i can complete it in the next week. The FAHClient-API is not good, but gets the job done.
That sounds very interesting, if you need some testers....

I may have found a workaround: It appears from initial testing that if you create a copy of the FAHClient data folder on your management box you can then create multiple shortcuts for FAHControl, each with a different working directory. My plan is to divide my clients up in to groups and manage them in different DBs, probably limited to 100 clients each. Not great but at least then I have control back. Like I say, just did a quick test pointing FAHControl to a dir with an old backup copy of FAHControl.db and it started with just those clients (about 120) and worked OK. YMMV, caveat emptor etc!
LancasterUni
Posts: 7
Joined: Sat Apr 04, 2020 10:07 am

Re: Headless installation and configuration on Windows10

Post by LancasterUni »

Yes, that seems to work, so long as you don't try and cross the streams, i.e. run both instances at the same time.
wuerfelfreak
Posts: 9
Joined: Mon Mar 23, 2020 9:03 am

Re: Headless installation and configuration on Windows10

Post by wuerfelfreak »

I am now so far as to release the first prototype of my third-party application similar to FAHControl
FAHCluster - Gitlab

Features
  • Import & Export clients as csv to add hundreds of clients easily
  • Run, Pause, Configure all clients simultaneously
  • Charts for client stats
  • Multiple profiles with different proxies
  • Socks5-proxy support
Image

I hope it helps anyone who has more than a dozen clients to manage.
Any feedback is greatly appreciated.
Last edited by wuerfelfreak on Fri Apr 10, 2020 9:01 pm, edited 1 time in total.
Neil-B
Posts: 1996
Joined: Sun Mar 22, 2020 5:52 pm
Hardware configuration: 1: 2x Xeon [email protected], 512GB DDR4 LRDIMM, SSD Raid, Win10 Ent 20H2, Quadro K420 1GB, FAH 7.6.21
2: Xeon [email protected], 32GB DDR4, NVME, Win10 Pro 20H2, Quadro M1000M 2GB, FAH 7.6.21 (actually have two of these)
3: [email protected], 12GB DDR3, SSD, Win10 Pro 20H2, GTX 750Ti 2GB, GTX 1080Ti 11GB, FAH 7.6.21
Location: UK

Re: Headless installation and configuration on Windows10

Post by Neil-B »

Now I'll just have to go and buy another ten (or more) bits of kit so I can run this and do your hard work justice - Looks really clean :)
2x Xeon E5-2697v3, 512GB DDR4 LRDIMM, SSD Raid, W10-Ent, Quadro K420
Xeon E3-1505Mv5, 32GB DDR4, NVME, W10-Pro, Quadro M1000M
i7-960, 12GB DDR3, SSD, W10-Pro, GTX1080Ti
i9-10850K, 64GB DDR4, NVME, W11-Pro, RTX3070

(Green/Bold = Active)
js2010
Posts: 15
Joined: Tue Mar 24, 2020 4:17 pm

Re: Headless installation and configuration on Windows10

Post by js2010 »

Here's a way to check on the clients using the fahclient api. I can't figure out how to do it without using curl.exe that comes with windows 10 1803 and above.

Code: Select all

'queue-info','exit' | curl.exe -s telnet://localhost:36330 |
  select -skip 3 | select -SkipLast 3 | convertfrom-json

'slot-info','exit' | curl.exe -s telnet://localhost:36330 |
  select -skip 3 | select -SkipLast 3 | % { $_ -replace 'True','true' } |
  convertfrom-json
-skiplast 2 in folding 7.6. Pyon is invalid json? ('True')
Last edited by js2010 on Thu Apr 30, 2020 2:22 pm, edited 1 time in total.
js2010
Posts: 15
Joined: Tue Mar 24, 2020 4:17 pm

Re: Headless installation and configuration on Windows10

Post by js2010 »

Here's a way to run it under the restricted windows "local service" account:

Code: Select all

icacls c:\users\myuser\appdata\roaming\fahclient /grant "local service:(OI)(CI)(M)"
sc config "folding@home client" obj="NT AUTHORITY\LocalService"
The service name gets changed to "fahclient" in 7.6.
ladewig
Posts: 9
Joined: Fri Mar 27, 2020 1:53 pm

Re: Headless installation and configuration on Windows10

Post by ladewig »

For folks who are interested, I put together an installation package using the PowerShell App Deployment Toolkit. Handy if you're looking to deploy to your systems. We deployed the client to a few hundred machines here, and afterwards I took what we learned and put together this package. (Unfortunately now that we have it, we don't seem to be installing it on any more of our idle machines back at the office.)

A couple things to note:
1. Client configured to run as Local Service not SYSTEM.
2. Data directory is at C:\ProgramData\FAHClient
3. Client runs as a service if a supported GPU is not found and as a scheduled task if a supported GPU is found.

If anyone is interested, you can grab it at: https://github.com/ladewig/psadt-foldingathome-client The README.md has info on what you need to configure your options, etc.
Scott Ladewig
WashU IT | Washington University in St. Louis
Twitter: @Ladewig
Web: https://www.ladewig.com
bruce
Posts: 20824
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: Headless installation and configuration on Windows10

Post by bruce »

Reminder: Windows does not support running a GPU from a service. You have to be logged on to the device. MS (sort of) believes that the sole purpose of a GPU is to display the desktop.
js2010
Posts: 15
Joined: Tue Mar 24, 2020 4:17 pm

Re: Headless installation and configuration on Windows10

Post by js2010 »

I wonder if the gpu would work under windows sandbox or WSL?

If you allow remote users on, you might want some combination of these settings. If you want command-allow-no-pass, you also need allow. Or just turn it off with command-enable. Multiple addresses are space seperated. Or you could just set a password and make command-allow-no-pass empty string. The password doesn't apply to the web interface though.


<allow v='192.168.1.1'/>
<command-allow-no-pass v='192.168.1.1'/>
<web-enable v='false'/>
<command-enable v='false'/>
<password v='pass'/>

Maybe there should be a new post under the 7.6 area?
PantherX
Site Moderator
Posts: 6986
Joined: Wed Dec 23, 2009 9:33 am
Hardware configuration: V7.6.21 -> Multi-purpose 24/7
Windows 10 64-bit
CPU:2/3/4/6 -> Intel i7-6700K
GPU:1 -> Nvidia GTX 1080 Ti
§
Retired:
2x Nvidia GTX 1070
Nvidia GTX 675M
Nvidia GTX 660 Ti
Nvidia GTX 650 SC
Nvidia GTX 260 896 MB SOC
Nvidia 9600GT 1 GB OC
Nvidia 9500M GS
Nvidia 8800GTS 320 MB

Intel Core i7-860
Intel Core i7-3840QM
Intel i3-3240
Intel Core 2 Duo E8200
Intel Core 2 Duo E6550
Intel Core 2 Duo T8300
Intel Pentium E5500
Intel Pentium E5400
Location: Land Of The Long White Cloud
Contact:

Re: Headless installation and configuration on Windows10

Post by PantherX »

js2010 wrote:I wonder if the gpu would work under windows sandbox or WSL?...
I doubt it for Windows Sandbox but for WSL, not possible yet... GPU support is planned for WSL 2 (https://devblogs.microsoft.com/commandl ... 0-summary/).

Currently, the only way you can fold on a GPU in a VM is by configuring a PCI pass-through which means that you need 2 GPUs. Once for the host and one for the VM. Not sure how that would work in WSL 2.
ETA:
Now ↞ Very Soon ↔ Soon ↔ Soon-ish ↔ Not Soon ↠ End Of Time

Welcome To The F@H Support Forum Ӂ Troubleshooting Bad WUs Ӂ Troubleshooting Server Connectivity Issues
ladewig
Posts: 9
Joined: Fri Mar 27, 2020 1:53 pm

Re: Headless installation and configuration on Windows10

Post by ladewig »

bruce wrote:Reminder: Windows does not support running a GPU from a service. You have to be logged on to the device. MS (sort of) believes that the sole purpose of a GPU is to display the desktop.
Right. Which is why if we find a GPU, we run it as a scheduled task. The folks at our engineering school figured out if they ran it that way, the GPU was available. They're doing 10M point per day using labs with GPU-equipped systems.
Scott Ladewig
WashU IT | Washington University in St. Louis
Twitter: @Ladewig
Web: https://www.ladewig.com
MeeLee
Posts: 1339
Joined: Tue Feb 19, 2019 10:16 pm

Re: Headless installation and configuration on Windows10

Post by MeeLee »

My recommendation?
Download this pack on your PC:
https://download.foldingathome.org/rele ... se.tar.bz2
Unpack it in a folder.
Download and install the latest version of FAH on your PC.
Replace FAHControl and FAHClient (the exe files) in your folder, with the ones installed on your PC (newer ones).
Also copy config.xml to that folder.
Transfer the entire folder over SSH to one computer you want to run FAH on.
Start the service on that computer.
Close SSH, and check if the PC still runs FAH.
If it does, open an SSH window to each client, upload the folder, and run.

I ran FAH this way quite successfully like this on a few PCs.
Chichiburichi
Posts: 1
Joined: Tue Jun 16, 2020 2:16 pm

Re: Headless installation and configuration on Windows10

Post by Chichiburichi »

Here is my way to deploy the client silently in a large user-environment (W10 PC / VDI / WS2019 RDS (...))

First you need to prepare the configuration that will be shared to the user-systems. Do the following steps:
1. Download and install fah-installer_7.6.13_x86.exe
2. Use FAHControl to configure the settings like Project > COVID-19 and proxy-servers if you have.
3. From the data-dir (which you defined through the installation) copy config.xml to share it to the users systems like shown below.

Now, these are the steps to automate the silent installation on a user-system. I use the SYSTEM-account for installation.
1. Download fah-installer_7.6.13_x86.exe
2. Install silently by using fah-installer_7.6.13_x86.exe /S
3. Install service using <AppDir>\FAHClient.exe --install-service
4. Copy the config.xml to the data-dir (in my case i chose C:\ProgramData\FAHClient)
4. Set the data-dir by adding RegKey "HKLM/SOFTWARE/WOW6432Node/Microsoft/Windows/CurrentVersion/Uninstall/FAHClient" >> "DataDirectory" (REG_SZ)
5. Tell the software, that the service is already installed by adding the key: "HKLM/SOFTWARE/WOW6432Node/Microsoft/Windows/CurrentVersion/Uninstall/FAHClient" >> "InstalledService"=1 (REG_DWORD)
6. NET START FAHClient

Now the client will start downloading files and computing immediately.

To uninstall, just use <AppDir>\Uninstall.exe /S and delete the data-dir.

Important: The generated shortcuts in startmenu are set to an empty working-dir. You must set the working-dir to the data-dir, otherwise a new configuration will be generated on the user-desktop and a second computing-instance will start.

Tip: I deleted all shortcuts for the users except the webcontrol, so the user can't easily access the settings but still can control the service.

If you are using Matrix42 Empirum, i can offer you my Setup.inf for free. Just text me.

Let's fight COVID-19 together!
Post Reply