********************************************
skybow Background Automation
Installing on more than one server
skybow 2026
********************************************

WHO NEEDS THIS

Only a farm where skybow Background Automation should run on more than one server - to stay
available when a server is down, or to share the load. An installation on a single server needs
nothing from this document: readme.txt covers it completely.


HOW IT WORKS

Every server gets the full installation: the IIS site and all five Windows services. All of
them work on the same database, and a load balancer spreads the incoming calls over them. The
servers share the work, and when one of them stops, the others carry on.

SharePoint is configured once, on the first server (readme.txt, step 11). The farm trusts a
single signing certificate for skybow, so the other servers do not get a certificate of their
own. They take over the first server's certificate and settings: with an export on the first
server and an import on each additional one.


WHAT YOU NEED

  - A load balancer for the address of the skybow service. That is the public address you
    entered as WebHookEndPoint, ReceiverEndPoint and HttpTriggerEndPoint in readme.txt, step 5,
    and as the Service URL of the add-in in step 12. If it already is a DNS name of its own,
    only its target changes - from the first server to the load balancer - and nothing has to
    be reconfigured in skybow or in SharePoint.
        - Sticky sessions (session affinity) are not needed.
        - Health check: an HTTP GET on the root address of the site ("/") answers with 200.
        - The address must stay reachable from the users' browsers and from every SharePoint
          server.
  - The same HTTPS certificate for that address on every server (IIS binding, readme.txt
    step 4) - or HTTPS that ends at the load balancer.
  - The same service account on every server, with the rights listed in readme.txt on each.
  - The SQL Server instance, reachable from every server.
  - A shared folder for the files of HTTP-trigger calls, which the service account can change
    from every server - see SHARED FOLDER FOR HTTP-TRIGGER FILES below.
  - IIS, MSMQ and .NET Framework 4.8 on every server, as in readme.txt. Message queues are not
    shared: each server has its own.
  - The clocks of the servers in step, as in any Windows domain. Scheduled actions rely on it.
  - The same skybow version on every server.


SHARED FOLDER FOR HTTP-TRIGGER FILES

Files sent with an HTTP-trigger call are saved by the site and read by the skybow HTTP Trigger
Actions Job. With several servers a call can arrive on one server and run on another, so the
folder has to be one shared folder for all of them.

On the FIRST server, before you export:

  1. Create a shared folder, and give the service account Modify on the folder and Change on
     the share.
  2. Set HttpTriggerLocalStorageFilesPath to its UNC path - for example
     \\fileserver\skybow\HttpTrigger - in both of these files:
        - C:\inetpub\wwwroot\skybowBackgroundAutomation\web.config
        - C:\skybowBackgroundAutomation\Services\skybow.BackgroundAutomation.HttpTriggerWebJob.SPSE.exe.config
     Use the UNC path, not a mapped drive letter: Windows services do not see mapped drives.
  3. Restart the IIS site and the skybow HTTP Trigger Actions Job.


ADDING A SERVER

The first server is installed exactly as readme.txt describes, steps 1 to 12, and has to be
working before you add another one.

On the FIRST server - elevated, in Windows PowerShell 5.1:

     .\export_ba_service_settings.ps1

It asks for a password for the certificate file and writes a folder, service_settings_export,
beside the script. Nothing on the first server is changed.

On the ADDITIONAL server:

  1. Copy the skybow installation package - the same version as on the first server - and the
     service_settings_export folder to it.
  2. Install skybow with the same service account as on the first server (readme.txt, steps 1
     to 3):

          .\install_ba.ps1

  3. Set the IIS bindings of the site as on the first server (readme.txt, step 4).
  4. Import the service settings - elevated, in Windows PowerShell 5.1:

          .\import_ba_service_settings.ps1 -Path <the copied service_settings_export folder>

     It lists what it will change and asks for confirmation. Then it imports the certificate,
     copies the settings into web.config and the five *.exe.config files, and starts skybow.
     At the end it offers to delete the export folder.
  5. Check the message queues (readme.txt, step 10).
  6. Open the site on this server once and check that it answers - for example
     http://localhost:9802/ on the server itself, if the site still has its default binding.
  7. Add the server to the load balancer.
  8. Delete the service_settings_export folder on both servers, unless you still need it for a
     further server.

NOT needed on an additional server: steps 5 to 9 of readme.txt (the import brings the settings
and starts skybow), step 11 (configure_sharepoint.ps1), an iisreset on the SharePoint servers,
and step 12 (the add-in).

Do NOT run configure_sharepoint.ps1 on an additional server. It would issue a second
certificate, and SharePoint would then reject the first server. The script recognises this case
and stops before it changes anything.

THE EXPORT IS SENSITIVE. It holds the settings of the installation, which can include a
database password and a mail password, and the signing key of the SharePoint application
identity, which can act on all content of the farm. Copy it directly from server to server, and
delete it when you are done.


UPDATING TO A NEW VERSION

The servers share one database, and the first server that starts with a new version upgrades
it. So update them one after another, with the others stopped:

  1. On every server except the first, stop skybow - elevated:

          Get-Service skybow* | Stop-Service
          Stop-Website 'skybow Background Automation'

  2. On the first server, run .\install_ba.ps1 from the new package, as for any update.
  3. Open the site on the first server once and check that it answers. By then the database is
     upgraded.
  4. On each other server, run .\install_ba.ps1 from the new package. It starts the services
     again. Then start the site:

          Start-Website 'skybow Background Automation'

  5. Update the add-in as usual.

Your settings are kept on every server, as in any update: no export or import is needed. Do
not leave servers on different versions.


RENEWING THE CERTIFICATE

The signing certificate is valid for five years (readme.txt, step 11). Renewing it replaces it
for the whole farm, so every server needs the new one:

  1. On every server except one, stop skybow - the two commands under UPDATING, step 1.
  2. On the remaining server, run .\configure_sharepoint.ps1 -RenewCertificate, and then
     "iisreset" on the SharePoint servers it lists, as described in readme.txt. Without
     -RenewCertificate the script replaces the certificate only within 90 days of expiry.
  3. On that server, run .\export_ba_service_settings.ps1 again.
  4. On each other server, run .\import_ba_service_settings.ps1 with the new export. It starts
     skybow again.

A server that still has the previous certificate cannot work with SharePoint: its triggered
actions and calculations fail until the new certificate is imported.


CHANGING A SETTING LATER

A setting such as the mail server has to be the same on every server. Either change it by hand
in the configuration files of every server, or change it on one server, export there, and
import on the others - the import restarts skybow.


REMOVING A SERVER

  1. Remove the server from the load balancer.
  2. Stop the skybow services and the site on it - the two commands under UPDATING, step 1.
     The other servers carry on with the work.
  3. The server can stay like that, or you can remove the skybow site and services from it.

********************************************
skybow 2026 - All Rights Reserved
********************************************
