GithubHelp home page GithubHelp logo

vstsdsc's Introduction

VSTSDsc

A class-based Desired State Configuration Resource to deploy the VSTS Agent

Resources

VSTSAgent

Parameters

  • Pool (String, Required) - The Agent pool for which to add this agent to
  • DestinationPath (String, Required) - The local file path where the agent will be deployed to, must be a directory
  • PAT (String, Required) - The Personal Access Token for the user that will be used to register the VSTS Agent
  • AgentUri (String, Required) - The URL where the Agent can be downloaded from
  • AccountUri (String, Required) - The URL of the VSTS Account

Examples

VSTSAgent VSTSAgentInstall #ResourceName  
{  
    DestinationPath = "C:\Agent\"  
    PAT = "wt26usi4zdhqagzyb4xvox2fq362qlqet4a3o2veej2brbmgapja"  
    Pool = "Default"  
    AgentUri = "https://vstsagentpackage.azureedge.net/agent/2.133.3/vsts-agent-win-x64-2.133.3.zip"
    AccountUri = "https://waynehoggett.visualstudio.com"  
}  

Planned Future Releases

0.4 - Support of running interactively (not as a service)
0.3 - Support for changing the agent name and working directory
0.2 - Pester tests for the module, clean-up zip file, add ensure to support uninstall, BREAKING - PAT should be of type PSCredential
0.1 - The ability to deploy the vsts agent on Windows Server 2016 running PowerShell 5.1

Related Links

Deploy an agent on Windows - https://docs.microsoft.com/en-us/vsts/build-release/actions/agents/v2-windows
vsts-agent - https://github.com/Microsoft/vsts-agent
Build and Release Agents - https://docs.microsoft.com/en-us/vsts/build-release/concepts/agents/agents

vstsdsc's People

Contributors

waynehoggett avatar

Stargazers

Ryan Spletzer avatar

vstsdsc's Issues

Error while running DSC configuration

Hi,

I am using this module to install the VSTS agent. Find my configuration file below :

Configuration VSTSAgentInstall
{
Import-DscResource -ModuleName 'VSTSDsc'

node 'localhost'
{
    VSTSAgent VSTSAgentInstall #ResourceName  
    {  
        DestinationPath = "C:\Agent"  
        PAT = "Personal Access Token"  
        Pool = "Default"  
        AgentUri = "https://vstsagentpackage.azureedge.net/agent/2.133.3/vsts-agent-win-x64-2.133.3.zip"
        AccountUri = "https://XXXX.visualstudio.com"  
    } 
}

}

When I run the above configuration file I get the following error :

Cannot find a process with the name "Agent.Listener". Verify the process name and call the cmdlet again.
+ CategoryInfo : ObjectNotFound: (Agent.Listener:) [], CimException
+ FullyQualifiedErrorId : NoProcessFoundForGivenName,Microsoft.PowerShell.Commands.GetProcessCommand
+ PSComputerName : localhost

Cannot find a process with the name "AgentService". Verify the process name and call the cmdlet again.
+ CategoryInfo : ObjectNotFound: (AgentService:) [], CimException
+ FullyQualifiedErrorId : NoProcessFoundForGivenName,Microsoft.PowerShell.Commands.GetProcessCommand
+ PSComputerName : localhost

The PowerShell DSC resource '[VSTSAgent]VSTSAgentInstall' with SourceInfo '::8::9::VSTSAgent' threw one or more non-terminating
errors while running the Test functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational.
Refer to this channel for more details.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : NonTerminatingErrorFromProvider
+ PSComputerName : localhost

The SendConfigurationApply function did not succeed.
+ CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MI RESULT 1
+ PSComputerName : localhost

The zip file do not get downloaded in the mentioned destination path. I am not sure how to resolve this issue. Could you please help me understand and resolve it.

Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.