Configuring CloudBees Build Acceleration on Microsoft Windows

4 minute read

Disable the Windows Error Reporting service (if applicable to your Windows version). This prevents popup windows from appearing after applications crash, which could cause builds to time out while the service is waiting for user input.

On Windows 8 and Windows Server 2012 eMake and Agent machines, you must disable Admin Approval Mode. Follow these steps:

  1. Type secpol.msc in the Start menu and then press Enter.

  2. Double-click Local Policies, then double-click Security Options.

  3. Scroll to the bottom of the entry. Locate and double-click User Account Control: Run all administrators in Admin Approval Mode

  4. Set it to disabled and click OK.

  5. 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 C:\Ecloud\i686_win32\64\bin\ecagent.exe from the firewall block list.

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 CloudBees Technical Support for additional information. For contact information, see https://support.cloudbees.com/.)

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:

  • Use the psexec tool from Microsoft to run the application as different users. You need the password for the account (for ECloudInternalUser1, and so on, contact CloudBees Technical Support for the user password).

  • Sign 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, creating a .reg file, and copying the user files to create those entities for all users.

You should consider the following information when using CloudBees Build Acceleration to build Microsoft Visual Studio projects.

Running vspcheck.exe

Use the 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.

  1. Invoke the utility on an agent installation and redirect the output to a text file.

    For example:

    vspcheck > vspcheck.agent1
  2. Repeat step 1 on another agent installation in the cluster that you want to compare.

    For example:

    vspcheck > vspcheck.agent2
  3. Use a text “diff” tool to compare the files.

    For example:

    diff vspcheck.agent1 vspcheck.agent2

The files should be identical except their host names (as noted in Ensure a Consistent Build Environment ).

Before building the Visual Studio project

If you do not virtualize your Visual Studio toolchain (as CloudBees recommends), then before using CloudBees Build Acceleration to build your project, you must install those applications on each agent host and then lsign in on each agent host and run devenv as the user that owns the respective agent processes. (These processes are usually named ECloudInternalUser1, 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 CloudBees Build Acceleration , you must register the Visual Studio add-in by running install_ecaddin<N>.bat, where <N> is 70, 71, 80, 90, 100, or 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:

  1. In Visual Studio, select Tools > Options.

  2. In the Options dialog, open Projects and Solutions > Build and Run.

  3. Set the maximum number of parallel project builds to 1.

For more information about virtualizing the Visual Studio toolchain and about using CloudBees Build Acceleration with Visual Studio, see the Visual Studio Integration Guide, Version 5.4.0.

Initializing Visual Studio

If you don’t virtualize the toolchain, and if you did not choose Initialize Visual Studio for ECloudInternalUsers during CloudBees Build Acceleration 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 .

CloudBees strongly recommends that the installation location be the same on all agents. The install location must also be the same on all eMake machines. The mount mode must be the same for all machines.