This documentation relates to QuickBuild 8.0.x
Select here if you are using a different version

Launch Node in Azure

Version 5 by Robin Shen
on Jan 11, 2018 12:38.


compared with
Current by Robin Shen
on Jan 11, 2018 12:42.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 1 changes. View first change.

 h2. 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:
 !azure-setting.png!
  
 Then one can follow the [cloud profiles|Working with Cloud Profiles] guide to create cloud profiles using Azure launchers like below:
 !azure-launcher.png!
  
 {anchor:create build agent image}
 The Azure launcher requires either a custom Windows image or Linux image being equipped with build agent and your build environment.
 h2. Create custom Windows build agent image
 # Manually launch a Windows virtual machine, and install Java Runtime Environment version 7 or higher on the machine. You may also want to install other software required by your build.
 # Download QuickBuild build agent package from Grid page, and upload it to the virtual machine.
 # Login to the machine and extract build agent package to your chosen agent installation directory.
 # 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.
 # 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.
 # Edit file _<agent install dir>/conf/attributes.properties_ to define necessary user attributes for the build agent.
 # Open a command window as Administrator and run _<agent install dir>/bin/agent.bat install_ to install agent as system service.
 # Configure firewall rules of the machine to allow incoming connection to build agent port.
 # Edit network security group associated with the machine from Azure portal to allow incoming connection to build agent port.
 # 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.
 # 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.
 # Follow [this instruction|https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource] to prepare the machine for image capture.
 # Capture the virtual machine as a custom image from Azure portal.
  
 h2. Create custom Linux build agent image
 # Manually launch a Linux virtual machine, and install Java Runtime Environment version 7 or higher on the machine. You may also want to install other software required by your build.
 # Download QuickBuild build agent package from Grid page, and upload it to the virtual machine.
 # Login to the EC2 instance and extract build agent package to your chosen agent installation directory.
 # 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.
 # 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.
 # Edit file _<agent install dir>/conf/attributes.properties_ to define necessary user attributes for the build agent.
 # 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
 {code}
 #RUN_AS_USER=
 {code}
 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:
 {code}
 sudo -n cat /var/lib/waagent/ovf-env.xml
 {code}
 # Run _sudo <agent install dir>/bin/agent.sh install_ to install agent as system service.
 # Edit network security group associated with the machine to allow incoming connections to agent port.
 # 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.
 # 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.
 # Run _waagent -deprovision_ to prepare the machine for image capture.
  {note}Do not add the _+user_ option when run _waagent_, as otherwise the current user will be erased{note}
 # Capture the virtual machine as a custom image from Azure portal.