FlexiSpooler locations configuration with locations.config file
This file is used by FlexiSpooler to discover servers to connect to in each location, to perform its functions, for non spooling mode it's a server FlexiSpooler to transfer accepted jobs to, for spooling mode it is a Spooler Controller to send spooled job metadata to, accept print requests from, etc. When installing FlexiSpooler, one needs to enter at least one Spooler Controller IP/hostname and if this FlexiSpooler should be spooling, the locations.config file then looks something like this:
{
"discoveryMode"
:
"Manual"
,
"locations"
: {
""
: {
"id"
:
""
,
"name"
:
"Default"
,
"addresses"
: [
"10.0.11.146"
],
"spooling"
:
true
}
},
"currentLocationId"
:
""
}
When you see the discoveryMode set to "DhcpOption9", it means the locations will be discovered automatically via DHCP and this file should not be touched. In "Manual" mode, FlexiSpooler will connect to one of the addresses in the current location (the location whose id matches "currentLocationId") and will then ask that server to give him the most current address list (for a Spooler Controller Group, Spooler Controller will supply IPs/hosts of all the Spooler Controllers in that group) and replace the "addresses" of that location in the locations.config file with the current list. If you do not want them to be updated and want to only configure them manually, set "UpdateLocations" option in spooler.config to false.
Manual location configuration allows advanced scenarios like the file below, with 3 locations (current being Prague):
Prague where FlexiSpooler will be spooling jobs locally and connecting with failover to one of the 2 Spooler Controllers
Brno where FlexiSpooler will not be spooling jobs locally and will instead send them with failover to one of the 2 server FlexiSpoolers
Default location which is everywhere else, FlexiSpooler will be not spooling and connecting to the server FlexiSpooler in Azure cloud
Desktop Interface will display all 3 locations(their names - Default, Prague, Brno) in a pop-up tray menu and will allow the user to manually set location when he moves his machine between them. Naturally, the current location is persisted through FlexiSpooler restarts.
{
"discoveryMode"
:
"Manual"
,
"locations"
: {
"0"
: {
"id"
:
"0"
,
"name"
:
"Default"
,
"addresses"
: [
"flexispooler.ysoft.onazure.com"
],
"spooling"
:
false
},
"1"
: {
"id"
:
"1"
,
"name"
:
"Prague"
,
"addresses"
: [
"10.1.11.120"
,
"10.1.11.122"
],
"spooling"
:
true
},
"2"
: {
"id"
:
"2"
,
"name"
:
"Brno"
,
"addresses"
: [
"10.0.11.146"
,
"10.0.11.145"
],
"spooling"
:
false
}
},
"currentLocationId"
:
"1"
}