forked from microsoft/azure-pipelines-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 2.102.0 docs * 2.102.0 role changes * 2.102.0 status update * remove dupe message * start links * troubleshooting md * typo * troubleshooting content - didn't save * tweak * system.debug note * fiddler docs
- Loading branch information
1 parent
b8fff64
commit 902a7c4
Showing
11 changed files
with
132 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
# Configure Account and Roles | ||
|
||
VSTS only for now. On-prem coming with NTLM support in the works. | ||
## VSTS | ||
|
||
Create a PAT token. [Step by Step here](http://roadtoalm.com/2015/07/22/using-personal-access-tokens-to-access-visual-studio-online/) | ||
|
||
Add the user you created the PAT token for to *both*: | ||
## On Premises TFS | ||
|
||
1. Agent Pool Administrators (allows to register) | ||
2. Agent Pool Service Accounts (allows listening to build queue) | ||
You can use a domain user but it's recommended to create a local windows user on each of your application tiers specifically for registering build agents. | ||
|
||
## Add to Role | ||
|
||
Add the user from above to only the Agent Pool Administrators which allows you to register the agent. | ||
|
||
![Agent Roles](roles.png "Agent Roles") | ||
|
||
>> TIPS: | ||
>> You can add to roles for a specific pool or select "All Pools" on the left and grant for all pools. This allows the account owner to delegate build administration globally or for specific pools. [More here](https://msdn.microsoft.com/en-us/Library/vs/alm/Build/agents/admin) | ||
>> The PAT token is only used to listen to the message queue for a build job | ||
>> When a build is run, it will generate an OAuth token for the scoped identity selected on the general tab of the build definition. That token is short lived and will be used to access resource in VSTS | ||
>> The role is only needed to register the agent. A token is downloaded to listen to the queue. | ||
>> When a build is run, it will generate an OAuth token for the scoped identity selected on the general tab of the build definition. That token is short lived and will be used to access resource in VSTS. The account used to register the agent has no bearing on the build run time credentials |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Troubleshooting | ||
|
||
The agent sends logs to the server but some failures such as configuration, networking or permissions prevent that. It requires investigating within the agent. | ||
|
||
Often these logs are most relevant to the product but they can sometimes provide hints to a user as what could be wrong. | ||
|
||
## System.Debug | ||
|
||
If you are having issues with a build, the first step is to set System.Debug to true on the build definitions variables tab. The agent and tasks will emit [debug]xxx lines for more detailed insight into what the specific task is doing. | ||
|
||
## Agent Trace Logs | ||
|
||
Logs are in the _diag folder. | ||
|
||
The agent has two parts. The agent which listens to the build queue. When it gets a build message, it creates a worker process to run that build. | ||
|
||
For example: | ||
```bash | ||
$ ls -la _diag/ | ||
-rwxr--r-- 1 bryanmac staff 23126 Jun 11 06:43 Agent_20160611-104223-utc.log | ||
-rwxr--r-- 1 bryanmac staff 26046 Jun 11 08:39 Agent_20160611-123755-utc.log | ||
-rwxr--r-- 1 bryanmac staff 240035 Jun 11 08:38 Worker_20160611-123825-utc.log | ||
-rwxr--r-- 1 bryanmac staff 220196 Jun 11 08:38 Worker_20160611-123843-utc.log | ||
-rwxr--r-- 1 bryanmac staff 220012 Jun 11 08:39 Worker_20160611-123858-utc.log | ||
``` | ||
|
||
If the agent isn't picking up builds, the agent logs are likely the most relevant. If a build starts running and you want to get details of that build, the specific worker log is relevant. | ||
|
||
Secrets are masked out of the logs. | ||
|
||
## Http Tracing Windows | ||
|
||
Start [Fiddler](http://www.telerik.com/fiddler). | ||
It's recommended to only listen to agent traffic. File, Capture Traffic off (F12) | ||
|
||
Let the agent know to use the proxy: | ||
|
||
```bash | ||
set VSTS_HTTP_PROXY=https://127.0.0.1:8888 | ||
``` | ||
|
||
Run the agent interactively. If you're running as a service, you can set as the environment variable in control panel for the account the service is running as. | ||
|
||
Restart the agent. | ||
|
||
TODO: video | ||
|
||
## Http Tracing OSX / Linux | ||
|
||
It's easy to capture the http trace of the agent using Charles Proxy (similar to Fiddler on windows). | ||
|
||
TODO: video | ||
|
||
Start Charles Proxy | ||
Charles: Proxy > Proxy Settings > SSL Tab. Enable. Add URL | ||
Charles: Proxy > Mac OSX Proxy. Recommend disabling to only see agent traffic. | ||
|
||
```bash | ||
export VSTS_HTTP_PROXY=https://127.0.0.1:8888 | ||
``` | ||
|
||
Run the agent interactively. If it's running as a service, you can set in the .env file. See [nix service](start/nixsvc.md) | ||
|
||
Restart the agent. | ||
|
||
## Security Notice | ||
|
||
HTTP traces and trace files can contain credentials. | ||
|
||
1. Do not POST them on a publically accessible site. | ||
2. If you send them to the product team, they will be treated securely and discarded after the investigation. |