Configuring ElectricAccelerator on Windows
On Windows 8 and Windows Server 2012 eMake and Agent machines, you must disable Admin Approval Mode. Follow these steps:
secpol.mscin the Start menu and then press Enter.
Double-click Local Policies, then double-click Security Options.
Scroll to the bottom of the entry. Locate and double-click
User Account Control: Run all administrators in Admin Approval Mode
Set it to disabled and click OK.
Reboot the machine.
|This configuration is required because of a change in the Windows 8 and Windows Server 2012 Admin Approval Mode defaults. Leaving Admin Approval Mode enabled might result in performance degradation.|
Because the ports used to communicate with agents are dynamic, issues might exist on Windows agent hosts depending on your firewall settings.
If you must lock down communication with an agent host, exclude the following programs from the firewall block list. 64-bit agents:
Applications that are running on agents must be properly initialized for the users that run the agent processes. By default, the users ECloudInternalUser1, ECloudInternalUser2, and so on, own the processes run by agents. Agents can be run as any user, but each agent must have a unique user, which is a requirement for agents to function properly. (Contact Electric Cloud Technical Support for additional information. For contact information, see https://support.cloudbees.com/hc/en-us/categories/360002059512 .)
|The users ECloudInternalUser1, ECloudInternalUser2, and so on (or the users you choose to run agent processes), must be local administrators on the agent machines.|
This requirement requires additional setup steps for agent machines, because some applications require per-user setup (WinZip, Visual Studio 2005 and 2008, Microsoft Office, and so on). Setup is particularly important for applications that display a dialog if they are not properly initialized, because this might cause stalled jobs (the application remains in interactive mode until the agent times it out for lack of activity) during the use of eMake.
To initialize applications, do one of the following:
psexectool from Microsoft (https://docs.microsoft.com/en-us/sysinternals/downloads/psexec) to run the application as different users. You need the password for the account (for ECloudInternalUser1, and so on, contact Electric Cloud Technical Support for the user password).
Log in as each of the configured agent users, and run the relevant application to initialize it.
Identify which files and registry keys must be set for a user by using Microsoft’s procmon tool (https://docs.microsoft.com/en-us/sysinternals/downloads/procmon), creating a .reg file, and copying the user files to create those entities for all users.
You should consider the following information when using Accelerator to build Microsoft Visual Studio projects.
vspcheck.exe utility (in
C:\ECloud\i686_win32\bin) to check agent installations that will be used for Visual Studio-based builds. This utility is included with eMake.
Invoke the utility on an agent installation and redirect the output to a text file.
vspcheck > vspcheck.agent1
Repeat step 1 on another agent installation in the cluster that you want to compare.
vspcheck > vspcheck.agent2
Use a text “diff” tool to compare the files.
diff vspcheck.agent1 vspcheck.agent2
The files should be identical except their host names (as noted in Ensuring a Consistent Build Environment).
If you do not virtualize your Visual Studio toolchain (as Electric Cloud recommends), then before using Accelerator to build your project, you must install those applications on each agent host and then log in on each agent host and run
devenv as the user that owns the respective agent processes. (These processes are usually named
ECloudInternalUser2, and so on.)
You can use the
psexec tool to avoid logging in and out multiple times. Using this tool is more efficient, because applications such as Visual Studio or Excel store user settings in the registry and create files in the My Documents folder. Also, you must ensure that you can build your solutions or projects with the Visual Studio setup on each host.
If you install Visual Studio after installing Accelerator, you must register the Visual Studio add-in by running
110, depending on your Visual Studio version.
If you are using Visual Studio 2005 or new, you should reduce the number of parallel builds that Visual Studio performs:
In Visual Studio, select Tools > Options.
In the Options dialog, open Projects and Solutions > Build and Run.
Set the maximum number of parallel project builds to 1.
For more information about virtualizing the Visual Studio toolchain and about using Accelerator with Visual Studio, see the Visual Studio Integration Guide.
If you don’t virtualize the toolchain, and if you did not choose Initialize Visual Studio for ECloudInternalUsers during Accelerator installation, you must initialize Visual Studio on every agent host for each ECloudInternalUser. Use the
psexec method to initialize Visual Studio as follows:
psexec -u ECloudInternalUser1 "C:\Program Files\Microsoft Visual Studio <visual_studio_version>\Common7\IDE\devenv.exe"
As an alternative, disable profiles for Visual Studio by running this Microsoft Registry Editor (regedit.exe) script:
REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\<visual_studio_version>\Profile] "AppidSupportsProfiles"="0"
You must run Microsoft Office by using
psexec (or logging in directly), because there is no registry setting to initialize Microsoft Office easily.
Ensure that the Visual Basic setting for Security is set to Medium or Lower (assuming the build tries to run VB scripts). Find this under Tools > Options > Security > Macro Security.