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

Agent Authorization and Unauthorization

Version 1 by Robin Shen
on Jun 05, 2013 12:17.


 
compared with
Current by Robin Shen
on Jun 05, 2013 12:19.


 
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.

 Build agent can be authorized and unauthorized via RESTful call.
  {note}This feature is available since QuickBuild 5.0.23 {note}
 h1. Authorize build agent
 h2. Syntax
 New build agent can be authorized to join the build grid by accessing below url:
 {code}http://localhost:8810/rest/tokens/authorize?ip=<ip address of build agent>&port=<port of build agent>{code}
  
 The response is of mime type _text/plain_ and the content is identifier of the newly created token for the build agent.
  
 h2. Security
 You will need to use http BASIC authentication to login as administrator to authorize the build agent.
  
 h2. Demo
 We use [curl|http://curl.haxx.se/] to demonstrate how to authorize the build agent:
 # Download the build agent package from Grid page and run it from a machine not authorized to join the grid. Assume IP address of the build agent is _192.168.2.100_ and port is _8811_.
 # Open grid page of QuickBuild server and you should see the new build agent appearing in unauthorized agent list.
 # Now run below command from anywhere:
 {code}curl -u admin:admin "http://<QB server>:8810/rest/tokens/authorize?ip=192.168.2.100&port=8811"{code}
 # If above command succeeds, the newly connected agent will appear in active node list after a while in grid page.
  
 h1. Unauthorize build agent
 h2. Syntax
 Authorized build agent can be unauthorized by accessing below url:
 {code}http://localhost:8810/rest/tokens/unauthorize?ip=<ip address of build agent>&port=<port of build agent>{code}
  
 The response is of mime type _text/plain_ and the content is identifier of the removed token representing the build agent.
  
 h2. Security
 You will need to use http BASIC authentication to login as administrator to unauthorize the build agent.
  
 h2. Demo
 We use [curl|http://curl.haxx.se/] to demonstrate how to unauthorize the build agent:
 # Assume you have an existing active build agent with ip address _192.168.2.100_ and port _8811_.
 # Now run below command from anywhere:
 {code}curl -u admin:admin "http://<QB server>:8810/rest/tokens/unauthorize?ip=192.168.2.100&port=8811"{code}
 # If above command succeeds, the build agent will be removed from active node list after a while.