1. Нам важно Ваше мнение!
    и обсуждайте вместе! Нажимайте "мне нравится" и рекомендуйте друзьям ;)
    Понравилось тема? Напишите в ней свой отзыв.
    Считаете что тема не достаточно полно раскрыта? Расскажите свою точку зрения!
    С Вашей помощью сделаем форум еще лучше!

Santa Clara :ibm cloud continuous delivery - Кабринский Эдуард

Тема в разделе 'Горячие новости для тех кто следит за собой', создана пользователем SHALOMEn, 11 май 2021.

  1. SHALOMEn

    SHALOMEn Member

    Vsts agents - Kabrinskiy Eduard


    <h1>Vsts agents</h1>
    <p>[youtube]</p>
    Vsts agents <a href="http://remmont.com">Current news stories</a> Vsts agents
    <h1>Howto: Install TFS2018 / VSTS Build Agent on Windows Server Core</h1>
    <h4>January 11, 2018 by Ben Day </h4>
    <p>Here’s a guide to walk you through the process of creating a build server on Windows Server Core. If you’re not already familiar with Windows Server Core, here’s a quick overview. Think of it as Windows Server 2016 with all the extra, unnecessary stuff pulled out. This means that it uses a lot less disk space and a whole lot less memory.</p>
    <p>The minor downside is that you don’t get the pretty and helpful graphical user interface (GUI) that you’re used to. You get a command line window (cmd and PowerShell) and that’s about it.</p>
    <p>Another way of thinking of this chapter is that it will walk you through how to install the TFS2018 / VSTS build agent using only the command line.</p>
    <p>Since the command line is available on the full version of Windows, you can use these same steps to install the build agent on pretty much any version of Windows.</p>
    <h4>Verify the Download URL for the Build Agent Installer</h4>
    <p>You’ll need to do this step from a machine with a web browser. <em>If you’re planning to install the Agent on Windows Core, then you’ll have to do this chunk of steps from a different machine</em>.</p>
    <p>Just to keep people guessing, Microsoft sometimes changes the URL for downloading the build agent bits. In order to make sure that you’re installing the latest version of the build agent, I’m going to walk you through how to get the URL for the latest version.</p>
    <p><ul>
    <li>Open a web browser</li>
    <li>Navigate to your TFS web interface. Depending on what security settings you chose, this is probably one of the following: <ul>
    <li>https://servername</li>
    <li>http://<em>servername</em>:8080/tfs</li>
    <li>http://servername</li>
    </ul>
    </li>
    </ul>
    </p>
    <p>You should see a screen that looks like this.</p>
    <p style="clear: both"><img src="https://i1.wp.com/www.benday.com/wp-content/uploads/2018/01/img_5a5686477db5c.png" /></p>
    <p>On the right side of the menu bar, there is a gear icon.</p>
    <p style="clear: both"><img src="https://i2.wp.com/www.benday.com/wp-content/uploads/2018/01/img_5a56865c422bc.png" /></p>
    <p style="clear: both"><img src="https://i1.wp.com/www.benday.com/wp-content/uploads/2018/01/img_5a5686647ebb3.png" /></p>
    <p><ul>
    <li>Click the <strong>gear icon</strong> to bring up the <strong>Settings menu</strong></li>
    <li>Choose <strong>Agent Pools</strong></li>
    </ul>
    </p>
    <p>You should now see the admin screen for you team project collection and you should be looking at the Agent Pools tab. There should be a button that says “Download agent”.</p>
    <p style="clear: both"><img src="https://i2.wp.com/www.benday.com/wp-content/uploads/2018/01/img_5a568684afc8b.png" /></p>
    <p><ul>
    <li>Click the <strong>Download agent</strong> button</li>
    </ul>
    </p>
    <p>A dialog should pop up that shows you the download and installation info for Windows, Mac OS / OS X, and Linux.</p>
    <p style="clear: both"><img src="https://i1.wp.com/www.benday.com/wp-content/uploads/2018/01/img_5a5686a2be8c5.png" /></p>
    <p><ul>
    <li>Make sure the <strong>Windows tab</strong> is selected</li>
    <li>Click the “copy to clipboard” icon that is directly to the right of the <strong>Download</strong> button</li>
    </ul>
    </p>
    <p>The URL for the build agent download should now be in your clipboard. The value should look something like https://go.microsoft.com/fwlink/?linkid=858950. You’re going to need this value in a later step. <em>Make sure that you don’t lose this value!</em></p>
    <h4>Create the Download & Extract Script</h4>
    <p>Next I’m going to walk you through the process of creating a PowerShell script to download the build agent zip and extract it. You might be wondering why I’m doing this. You’re probably thinking “why doesn’t he just simply open a browser and download the zip?” Well, the reason why is that there isn’t a browser on Windows Server Core and that means that downloading the agent installer zip is kind of tricky.</p>
    <p><ul>
    <li>Log in to your <em>build server machine</em> as a user with administrator rights</li>
    <li>Open notepad.exe</li>
    <li>Paste in the following script</li>
    </ul>
    </p>
    <p><ul>
    <li>Verify that the url on line 1 of the script ($url’s value) is the same URL value that you copied to the clipboard</li>
    <li>Save the script to a file named <strong>download-agent-and-extract.ps1</strong></li>
    </ul>
    </p>
    <p>Now that you have that script, it’s time to run it from PowerShell. But chances are pretty good that you’re looking at a command prompt window rather than a PowerShell window. That’s easy enough to fix.</p>
    <p><ul>
    <li>In the command prompt window, type <strong>powershell</strong> and press</strong></li>
    </ul>
    </p>
    <p>Your window should look something like this next image.</p>
    <p style="clear: both"><img src="https://i0.wp.com/www.benday.com/wp-content/uploads/2018/01/img_5a56875e0805e.png" /></p>
    <p>Let’s run the script.</p>
    <p><ul>
    <li>Type <strong>.\download-agent-and-extract.ps1</strong> and press</li>
    </ul>
    </p>
    <blockquote><p>NOTE: Did you get an error that says “An error occurred while sending the request”? Are you using a self-signed SSL certificate for TFS2018? If you followed the TFS install instructions and enabled SSL, you probably are using a self-signed SSL certificate. Check out this blog post for how to fix this. https://www.benday.com/2017/12/21/t...self-signed-ssl-certificate/</p></blockquote>
    <p>When the command is done, you should not see any errors and the prompt should say “PS C:\agent>”. (NOTE: this might take a few minutes to run.)</p>
    <p>Let’s verify that this extracted as expected.</p>
    <p style="clear: both"><img src="https://i2.wp.com/www.benday.com/wp-content/uploads/2018/01/img_5a568793d6d48.png" /></p>
    <p><ul>
    <li>(Optional) To clear the screen, type “cls” and press Enter</li>
    <li>Type “dir” and press Enter</li>
    </ul>
    </p>
    <p>The screen should look something like the image above.</p>
    <h4>Configure the Agent</h4>
    <p>Now that the agent bits are deployed to disk, you’re ready to start configuring it. This guide assumes that you’re planning to run this agent in a Windows domain and that the TFS machine is in the same domain as the agent. I’m also assuming that you intend to run this agent as a service rather than as an interactive process.</p>
    <p>Recommendation: The agent can be configured to run as NT AUTHORITY\NETWORK SERVICE but I think that this makes permissions management confusing when you’re creating and running builds. I strongly recommend that you run the agent as a service using a known service account that is based on an Active Directory user rather than one of the build-in service accounts like NETWORK SERVICE. This guide will assume that you’re following this recommendation.</p>
    <p>You’re going to be prompted for a handful of values during the configuration process:</p>
    <p><ul>
    <li><strong>TFS server URL:</strong> This is the same URL that you used to access the TFS web interface. By default this will be something like https://<em>servername</em> or http://<em>servername</em>:8080/tfs</li>
    <li><strong>Authentication Type:</strong> By default, authentication is based on the service account’s Windows logon. This mode is called Interactive. In order support more complex scenarios and multiple platforms, there are also several other options. This guide will show you how to do Interactive mode.</li>
    <li><strong>User name & password for the agent service:</strong> These are the credentials for the service. In my case, I’ve created an Active Directory user named “tfsbuild”. The fully qualified username for this user is “DEMO\tfsbuild”.</li>
    </ul>
    </p>
    <p>When you’ve got these values, you’re ready to run the config process.</p>
    <p><ul>
    <li>In the PowerShell window, type “<strong>.\config.cmd</strong>” and press Enter</li>
    </ul>
    </p>
    <p>When prompted, enter the following values.</p>
    <p style="clear: both"><img src="https://i0.wp.com/www.benday.com/wp-content/uploads/2018/01/img_5a5687af8396e.png" /></p>
    <p><ul>
    <li>“Enter server URL”: <br />Type the <strong>URL for your TFS instance</strong> and click <strong>Enter</strong></li>
    <li>“Enter authentication type (press enter for Integrated)”: <br />Press <strong>Enter</strong></li>
    <li>“Enter agent pool (press enter for default)”: <br />Press <strong>Enter</strong></li>
    <li>“Enter agent name (press enter for <em>[local server name]</em>)”: <br />Press <strong>Enter</strong></li>
    <li>“Enter run agent as service? (Y/N)”: <br />Type ‘<strong>Y</strong>’ and press <strong>Enter</strong></li>
    <li>“Enter User account to use for the service”: <br />Type the <strong>fully qualified name of the service account</strong> (example: demo\tfsbuild) and press <strong>Enter</strong></li>
    <li>Enter Password for the account <em>[service account]</em>”: <br />Enter the <strong>password for the service account</strong> and press <strong>Enter</strong></li>
    </ul>
    </p>
    <p>When the config process has completed, you should see a message that says something like “Service vstsagent.demo17-tfs.DEMO17-BUILD started successfully”.</p>
    <p>If you open the browser and go back to the Agent Pools tab for TFS, you should now see your new build agent in the list of Agents.</p>
    <p style="clear: both"><img src="https://i1.wp.com/www.benday.com/wp-content/uploads/2018/01/img_5a5687c81c240.png" /></p>
    <p>You’ve successfully configured a build agent on Windows Server Core.</p>
    <h2>Vsts agents</h2>

    <h3>Vsts agents</h3>
    <p>[youtube]</p>
    Vsts agents <a href="http://remmont.com">Current news events</a> Vsts agents
    <h4>Vsts agents</h4>
    Howto: Install TFS2018 / VSTS Build Agent on Windows Server Core January 11, 2018 by Ben Day Here’s a guide to walk you through the process of creating a build server on Windows Server Core.
    <h5>Vsts agents</h5>
    Vsts agents <a href="http://remmont.com">Vsts agents</a> Vsts agents
    SOURCE: <h6>Vsts agents</h6> <a href="https://dev-ops.engineer/">Vsts agents</a> Vsts agents
    #tags#[replace: -,-Vsts agents] Vsts agents#tags#
    new

Поделиться этой страницей