Configuring Central Server - PDQ Deploy
Purpose
You wish to configure PDQ Deploy in Central Server mode. If you will be converting an existing PDQ Deploy console to Client Mode and have custom packages on that console's repository and database, see the Migrating Custom Packages and Schedules from a Local Installation section of this article first.
Resolution
There are three available options when configuring PDQ Deploy:
- Local Mode: a standalone console of PDQ Deploy with the Repository installed on the same machine, using its own local database.
- Server Mode: a console of PDQ Deploy used to house the central database and repository. Consoles in Client Mode will connect to this machine through a TCP port.
- Client Mode: the console(s) of PDQ Deploy used to connect to the Central Server's database and Repository. No Repository or local database is installed on this machine.
Feature overview
Central Server addresses the need to share packages between PDQ Deploy consoles by creating a Server/Client relationship. In this model, the PDQ Deploy consoles in Client Mode initiate all deployments, post-deployment notifications, and Wake-on-LAN events on the PDQ Deploy console running in Server Mode, using the Server's database and Repository. The PDQ Deploy console in Server Mode may also initiate deployments and all other tasks; however, they are initiated in the same way a standalone, locally-installed PDQ Deploy console would.
A Server/Client relationship consists of one Server Mode console and one or more Client Mode consoles. Although a Client Mode console can connect to only one Central Server, organizations can maintain multiple independent Server/Client relationships. See the Central Server limitations section for additional details.
What changes when you enable Central Server
- In existing PDQ installations, PDQ Deploy consoles configured in Server Mode will retain all packages, including custom packages. On the other hand, PDQ Deploy consoles configured in Client Mode will not retain any packages, imported or custom.
- As a corollary to the above, shared packages are also not retained between PDQ Deploy Server/Client Mode consoles. Sharing will be disabled on PDQ consoles where Server or Client Mode is selected and the packages will be retained on the console where they were created.
- You may receive a warning if the number of concurrent sessions between the client consoles of the PDQ program exceeds the number of licenses that exist for the account. For more information on this warning, see the Concurrent Sessions Exceeded the Licensed Limit article for more information.
Setting up PDQ Deploy in Server Mode
- Upon installing a new PDQ Deploy console, you will be prompted to complete the post-installation wizard:
- You will be prompted to enter your PDQ Deploy license. Central Server requires an Enterprise license. Enter the license or browse to the license text file and click OK.
- Click Next on the License Key window.
- In the Enterprise Installation Type window, select Server, then click Next.
-
In the Server Network Configuration window, select the appropriate values.
- TCP Port: By default, PDQ Deploy will use port number 6336. If you are already using port 6336 within your environment, change this to an unassigned port (for example: 7777, 8181). If Windows Firewall is enabled, check the Create exception in firewall for service executable box to open up the TCP port in Windows Firewall.
- Server IP Addresses: For a multi-homed PDQ Deploy console machine, select either Listen on all IP addresses (default) or enumerate the Server IP Addresses in the text field. Values are comma-delimited (for example: 172.16.155.200,10.144.144.42).
- Background Service User Credentials: These credentials are used to run the PDQ Deploy service. The user must have administrative privileges on the PDQ Deploy server console computer and any Client Mode PDQ Deploy consoles. Credentials must be entered before continuing the Initialize PDQ Deploy wizard. See this article for more information: PDQ Deploy & Inventory Credentials Explained
- Enable Role-Based Access Control: By default, PDQ Deploy will be installed with Role-Based Access Control (RBAC) enabled.
Role-Based Access Control management and configuration are done in PDQ Inventory. See here for more information: Role-Based Access Control (RBAC) in PDQ Deploy & Inventory
The Windows Firewall exception that's created is equivalent to running the following command:
netsh advfirewall firewall add rule name="PDQ Deploy" dir=in action=allow program="C:\Program Files (x86)\Admin Arsenal\PDQ Deploy\PDQDeployService.exe" enable=yes localport=6336 remoteport=6336 protocol=tcp profile=any
- Click Finish to complete the wizard.
Setting up PDQ Deploy in Client Mode
In order to set up a PDQ Deploy console in Client Mode, a server PDQ Deploy console must already be configured and operational.
- Upon installing a new PDQ Deploy console, you will be prompted to complete the post-installation wizard:
- You will be prompted to enter your PDQ Deploy license. Central Server requires an Enterprise license. Enter the license or browse to the license text file and click OK.
- Click Next on the License Key window.
- In the Enterprise Installation Type window, select Client and then Next.
- Type the name of the PDQ Deploy console operating in Server Mode and the port used by that server.
- Click Finish to complete the wizard.
Background Service and Credentials
PDQ Deploy consoles in Client Mode do not run the Background Service and therefore do not need access to this option. Instead, the PDQ Deploy clients use the Background Service running from the Server console.
When running in Server Mode, PDQ Deploy Options > Background Service shows the following window:
When running in Client Mode, PDQ Deploy Options > Background Service shows the following window since the background service now runs on the PDQ Deploy server console:
Central Server limitations
- While the PDQ Deploy console running in Server Mode performs the majority of tasks initiated from the PDQ Deploy Client Mode consoles, certain limitations apply, such as running Remote Repair and local commands, both of which are performed by the local PDQ Deploy console.
- It is possible to have multiple PDQ Deploy consoles operating in Server Mode, but it is not possible for a PDQ Deploy console running in Client Mode to connect to more than one server at a time.
- Connections from a Client to the Server, including the Server's connection to itself, are limited by the number of concurrent client connections as defined by the quantity enumerated in your Enterprise license.
Migrating custom packages and schedules from a local installation
If you have existing Local Mode installations that will be converted into Client Mode it may be necessary to export / import packages from the Local Mode installation prior to changing an existing PDQ Deploy console to Client Mode.
Exporting custom packages
Before you export packages, note the following:
- As install files and script references in the packages might exist in several locations, check the packages to see where any files are stored. You should consider moving all locally-stored install files and scripts to the Repository (path can be found in Options > Preferences > Repository) prior to exporting the packages. The default location for the Repository is
%PUBLIC%\Documents\Admin Arsenal\PDQ Deploy\Repository. Instructions for organizing your file paths (especially utilizing the$(Repository)variable), can be found in the Updating package file paths section of this article.
To export/import from a PDQ Deploy console that will be converted to Client Mode, perform the following (this assumes all package files and scripts are stored in the local repository):
- In the main console of a PDQ Deploy installation running in Local Mode, select one, some, or all packages. You can also just select the entire package folder. Right-click the selection and click Export from the context menu.
- Save the XML file in a location accessible by the PDQ Deploy console in Server Mode (e.g. a UNC share) or to external media.
If you have admin access to the PDQ Deploy console that will be converted to Client Mode, you can access the C$ of the potential client from the server console of PDQ Deploy.
Exporting custom schedules
- In the main console of a PDQ Deploy installation running in Local Mode, select one, some, or all schedule(s). Right-click the selection and click Export from the context menu.
- Save the XML file in a location accessible by the PDQ Deploy console in Server Mode (e.g. a UNC share) or to external media.
If you have admin access to the PDQ Deploy console that will be converted to Client Mode, you can access the C$ of the potential client from the server console of PDQ Deploy.
Importing custom packages and schedules
If you are using DFS or other centrally-accessible UNC share, you will not need to move any files. Simply set the Repository on the PDQ Deploy in Server Mode (Options > Preferences > Repository) to point to the appropriate DFS/UNC share.
- Navigate to the location of the Repository on the computer that will be converted to Client Mode.
- Place any repository files referenced by the packages you exported in the same UNC share or external media (or access the C$ from the PDQ Deploy server console). See the Updating package file paths section for more information.
- Log in to the PDQ server console and transfer the files from the Repository into the Server's repository (Skip this step if you are using DFS or centrally accessible UNC share).
- On the PDQ Deploy console in Server Mode, open File > Import (or Ctrl+I), navigate to the saved XML file that you exported and import the XML.
- The packages will then be imported to the Server's package list in the navigation tree and reference the files you moved into the server's Repository, assuming they are in the correct location. All Client consoles will then have access to those packages.
- Proceed to configure Client Mode on the PDQ Deploy console designated to be the client.
If a PDQ console in Client Mode needs access to any packages that exist on their local repository, it can be switched back to Local Mode, which will only use the original/local Repository and database for the Local Mode console.
If the file paths for your files are in disarray or otherwise not neat and tidy, you can clean that up with a little PowerShell magic and SQLite. See our blog post, Using PowerShell and SQLite to Update Package File Paths.
Additionally, you can use this SQL command from Options > Preferences > Database > SQLite Console prompt:
update InstallSteps set FileName = '[new path]' || substr(filename, length('[old path]') + 1) where FileName like '[old path]' || '%';For example:
update InstallSteps set FileName = '\\Server\NewShare' || substr(filename, length('\\Server\OldShare') + 1) where FileName like '\\Server\OldShare' || '%';If you have additional files listed in your packages that are not saved in your Repository, you can use the following SQL script to change that (changing the paths as appropriate using the same method outlined above):
update InstallSteps set Files = (select Files from (
select PackageStepId, group_concat(part, x'0a') as Files from (
WITH RECURSIVE cte(PackageStepId, part, rest, pos) AS (
select PackageStepId, '', Files || x'0a', 0 from InstallSteps
UNION ALL
SELECT PackageStepId,
SUBSTR(rest, 1, INSTR(rest, x'0a') - 1),
SUBSTR(rest, INSTR(rest, x'0a') + 1),
pos + INSTR(rest, x'0a') + 1
FROM cte
WHERE INSTR(rest, x'0a') > 0
)
SELECT PackageStepId,
case when part like '[old path]' || '%'
then '[new path]' || substr(part, length('[old path]') + 1)
else part end as part
FROM cte
WHERE pos <> 0)
group by PackageStepId)
where PackageStepId = InstallSteps.PackageStepId);