Skip to main content
Version: QB11

Launch Node in Azure

Azure cloud profile

Cloud profiles rely on cloud providers to do its job. QuickBuild 8.0 ships with the Azure cloud provider. To use it, one has to enable the Azure plugin by providing an authentication file in Administration/Plugin Management page as demonstrated below:

Then one can follow the cloud profiles guide to create cloud profiles using Azure launchers like below:

{#LaunchNodeinAzure-createbuildagentimage}

The Azure launcher requires either a custom Windows image or Linux image being equipped with build agent and your build environment.

Create custom Windows build agent image

  1. Manually launch a Windows virtual machine, and install Java Runtime Environment version 8 or higher on the machine. You may also want to install other software required by your build.
  2. Download QuickBuild build agent package from Grid page, and upload it to the virtual machine.
  3. Login to the machine and extract build agent package to your chosen agent installation directory.
  4. Edit file <agent install dir>/conf/wrapper.conf to define property wrapper.java.command to point to java binary if it is not in system path.
  5. Edit file <agent install dir>/conf/node.properties to configure QuickBuild server URL. You may also run <agent install dir>/bin/config.(bat|sh) to config node properties such as SSL setting.
  6. Edit file <agent install dir>/conf/attributes.properties to define necessary user attributes for the build agent.
  7. Open a command window as Administrator and run <agent install dir>/bin/agent.bat install to install agent as system service.
  8. Configure firewall rules of the machine to allow incoming connection to build agent port.
  9. Edit network security group associated with the machine from Azure portal to allow incoming connection to build agent port.
  10. Restart the virtual machine. After the system comes up, the build agent should be started automatically and will contact QuickBuild server to download necessary plugins. You may check file <agent install dir>/logs/console.log for the progress and possible errors.
  11. If agent starts up normally, you should be able to see this agent appears at unauthorized nodes list at grid page. Authorize the node and wait for a while to make sure it appears as active node in the grid.
  12. Delete file C:\AzureData\CustomData.bin if exists.
  13. Create an empty file <agent install dir>/azure_windows.txt.
  14. Follow this instruction to prepare the machine for image capture.
  15. Capture the virtual machine as a custom image from Azure portal. Make sure to select "No, capture only a managed image" for option "Share image to Azure compute gallery"

Create custom Linux build agent image

  1. Manually launch a Linux virtual machine, and install Java Runtime Environment version 8 or higher on the machine. You may also want to install other software required by your build.

  2. Download QuickBuild build agent package from Grid page, and upload it to the virtual machine.

  3. Login to the EC2 instance and extract build agent package to your chosen agent installation directory.

  4. Edit file <agent install dir>/conf/wrapper.conf to define property wrapper.java.command to point to java binary if it is not in system path.

  5. Edit file <agent install dir>/conf/node.properties to configure QuickBuild server URL. You may also run <agent install dir>/bin/config.sh to config node properties such as SSL setting. However this program requires GUI terminal, and if your console does not have that facility, you may run this program at your desktop to populate the node.properties, then transfer this file to launched instance.

  6. Edit file <agent install dir>/conf/attributes.properties to define necessary user attributes for the build agent.

  7. Edit file <agent install dir>/bin/agent.sh to uncomment below line and define RUN_AS_USER as the user specified when creating the virtual machine

    #RUN_AS_USER=

    You may also specify other user here. However the user should have sudo permission without password prompt, as the build agent needs to access the file /var/lib/waagent/ovf-env.xml to get the grid token. Azure makes this file only accessible by root user. If you are using other users, make sure below command can run successfully as that user:

    sudo -n cat /var/lib/waagent/ovf-env.xml
  8. Run sudo <agent install dir>/bin/agent.sh install to install agent as system service.

  9. Edit network security group associated with the machine to allow incoming connections to agent port.

  10. Restart the virtual machine. After the system comes up, the build agent should be started automatically and will contact QuickBuild server to download necessary plugins. You may check file <agent install dir>/logs/console.log for the progress and possible errors.

  11. If agent starts up normally, you should be able to see this agent appears at unauthorized nodes list at grid page. Authorize the node and wait for a while to make sure it can come active.

  12. Run sudo waagent -deprovision to prepare the machine for image capture.

    warning

    Do not add the +user option when run waagent , as otherwise the current user will be erased

  13. Capture the virtual machine as a custom image from Azure portal. Make sure to select "No, capture only a managed image" for option "Share image to Azure compute gallery"