yo vsts

NOTE:  This has been replaced by yo Team.

At Ignite New Zealand 2016 I did a talk where I used a Yeoman generator to build an entire CI/CD pipeline. I promised that I would publish the generator and make it open source. You can now install the vsts generator using Yeoman. Below is everything you need to know to get started using it. I published the code to GitHub.

  • Install Git
  • Install Node.js
  • Install Yeoman using npm (npm is installed with Node.js)
    npm install -g yo

Now using the yo command you can install the vsts generator.

  • Type
  • Select Install a generator
  • Type
  • Select vsts Generates an app with CI/CD in Visual Studio Team Services
  • Once it is installed simply press enter
  • When entering your VSTS account only enter the part before .visualstudio.com. Do not enter the full URL, just the account name. For example if your full VSTS URL is https://mydemos.visualstudio.com you would enter only mydemos.

To use the generator in the future simply type.

yo vsts

You will need a Visual Studio Team Services account and an Azure Subscription to use the generator. You can create a Team Services account for free and start a free trial of Azure.  Once you have your Team Services account create a Personal Access Token.

Comments (26) -

  • Craig Haiden

    11/2/2016 8:12:05 PM | Reply

    Donovan, your sessions at Ignite NZ were inspiring, Thank you!
    I've been looking forward to seeing how you did this ever since the demo.

    • Donovan

      11/3/2016 3:21:38 AM | Reply

      Thank you so much. I am glad I was able to open source everything. I found using the API a bit tricky and now everyone can see how I did it and take it much further.  I am excited to see what we can do with it.

  • Mo Yakubu

    11/3/2016 5:23:25 AM | Reply

    Hi Donovan,

    Thank you very much for making it open source, been looking forward to it. Really enjoyed your session in Auckland. Cheers.

    • Donovan

      11/3/2016 2:34:16 PM | Reply

      My pleasure. Now let's make it do more stuff!

  • Aaron Taylor

    11/3/2016 10:54:05 PM | Reply

    Hi Donovan,

    I loved your demo at Ignite and have been waiting eagerly for you to publish the generator so I could give it a try. When I run the generator I get the error 'Failed to create Azure Service Endpoint. Insufficient privileges to complete the operation.' Do you have any idea what permission I am missing? Thanks

    • Donovan

      11/6/2016 1:34:34 PM | Reply

      When I created my VSTS and Azure sub I used the same email.  So my email account was the owner.  Is that that case with you?

      • Aaron Taylor

        11/6/2016 8:36:35 PM | Reply

        I am the account owner in VSTS but only a co-administrator in Azure subscription. Should that matter?

        • Donovan

          11/7/2016 1:55:15 PM | Reply

          Let me find out.

  • Srivatsa

    11/8/2016 8:56:06 AM | Reply

    Hi Donovan, i tried the above steps for working with Azure App Service but it failed miserably. When it asks me to "install dependencies" i hit enter i.e no it threw an error saying "ERROR VSTS, getaddrinfo  ENOTFOUND https https:443".

    Let me know if i have done something wrong. I would mail you the screenshot.

    • Donovan

      11/10/2016 1:07:28 AM | Reply

      Can you show me the screen of the answers to the prompts?

      • Srivatsa

        11/13/2016 8:13:17 AM | Reply

        That works AWESOMEEEEEEEE! It did work perfectly. Thanks for the cool stuff Donovan!

  • Prafulla

    11/10/2016 10:03:32 AM | Reply

    Hi Donovan,

    Tried using generator but seems not working for me. Frown
    I have done this  in WS2016 datacenter machine and below are inputs that I have provided when prompted. ended up with error as below.
    Error vsts

    getaddrinfo ENOTFOUND https https:443
    PS C:\> yo vsts

        |       |    ╭──────────────────────────╮
        |--(o)--|    │     Welcome to DevOps    │
       `---------´   │ powered by Team Services │
        ( _´U`_ )    ╰──────────────────────────╯
        /___A___\   /
         |  ~  |
    ´   `  |° ´ Y `

    ? What type of application do you want to create? ASP.NET
    ? What's the name of your ASP.NET application? testapp
    ? Where would you like to deploy? Azure App Service
    ? What's your Team Services account name ({account}.visualstudio.com)? https://demoaccount.visualstudio.com
    ? What agent queue would you like to use? Hosted
    ? What's your Team Services Personal Access Token? ***********************************************
    ? What's your Azure subscription name? Visual Studio Enterprise
    ? Install dependencies? No
    Error vsts

    getaddrinfo ENOTFOUND https https:443

    • Donovan

      11/12/2016 4:52:52 PM | Reply

      You only need to enter demoaccount  not the full URL.  Sorry for the confusion. I will update the prompt.

  • Datum Geek

    11/27/2016 1:40:58 PM | Reply

    Hi @Donovan - really awesome stuff...

    Trying to get `yo vsts` working end to end with Docker and VSTS.  I'm guessing that I needed to install marketplace.visualstudio.com/items right?  (this helped me get CI and CD creation working, but my build is still failing)

    Now I'm starting to think I need to create an Agent Pool in VSTS and connect it to a Docker container that will function as a build agent.  (the `Hosted` agent pool doesn't seem to know the `docker` command.

    Can you confirm that I'm on the right path?

  • rs38

    11/28/2016 11:50:38 AM | Reply

    5Will that rest api calls also work with onprem tfs with some modifications?

    • Donovan

      11/28/2016 1:59:11 PM | Reply

      That is correct. If the demand is there it would not take long to create yo tfs a well.

      • Steve

        12/12/2016 6:40:04 PM | Reply

        I'd love to see a yo tfs as well

  • Val H

    5/6/2017 12:33:28 PM | Reply

    Hi Donovan,
    fantastic post, thanks so much! Our developers waste ridiculous hours releasing software; so, I've been trying to implement something like that myself, and stumbled upon your work. That made my day! I'll be looking for ways to add DB deployment as a backend for ASP.NET to you CI/CD pipeline script, potentially with SSDT or RedGate tools. I wonder if someone at Microsoft or in the community has been working on that already.

    Thanks again!

    • Donovan

      5/6/2017 2:57:04 PM | Reply

      I had but I don't know what the sample DB schema should be.

  • Val H

    5/6/2017 5:14:25 PM | Reply

    Wow, that was a super fast response! Thanks Donovan!!!

    I don't know if a sample DB schema is a first and foremost concern to the community, but if it is, then how about rendering Contoso's regional offices on the Contact US page from a database?

    What concerns us most is how to automate/orchestrate deployment of multiple app tiers  (asp.net & MS SQL DB for example) with AD(FS) security between end users and tiers in containers. GMSA seems to be addressing authentication between containerized front end / middle / back end tiers, not sure about ADFS end users hitting containerized ASP.NET front end though. Any (automated) guidance / demo on this use case would be very much appreciated.

    • Donovan

      5/6/2017 5:59:39 PM | Reply

      Smile. I see so you are more interested in project structure and pipeline than an actual database. So even if the project was empty but the db project and the pipeline to provision and deploy the database was in place that would be a win?

      • Val H

        5/6/2017 7:27:41 PM | Reply

        Absolutely. I am an Agile dev architect and managed to convince devs and management to switch to VSTS / Azure / Containers to continuously deliver value. IT Ops drag their feet and (kind of) sabotage the VSTS/ Azure / Container technology stack adoption due to murky waters surrounding the release pipeline of the multi-tiered .NET apps involving Azure ADFS authentication/authorization. Such apps are 90% of our portfolio (our of about 5-6 dozen.) I can't win this business for you and me w/o clear and straightforward demo that IT Ops life won't get any more complicated than it is now. IT Ops don't care what DB schema they release (it's dev responsibility), rather HOW they release it in qa-stage-prod (100% under IT Ops control.)

      • Val H

        5/6/2017 8:03:15 PM | Reply

        DB schema is the responsibility of the dev delivery team, which is I am a member of.
        Release pipeline is the responsibility of IT Ops.

        To get IT Ops on my side, I should not focus of schema which they don't care about. I should focus on what they are responsible for, which is QA-Stage-Prod release of multi-tiered apps based on Asp.NET, MS SQL, ADFS ADFS technology stack.

        I need to get them on my side because they have a final say on technology adoption. If they say they can't maintain / support VSTS / Azure / ADFS combination, this business is lost.

  • Amir Tei

    7/26/2017 8:03:51 PM | Reply

    Hi Donovan,

    Thank you for all inspiring works on DevOps and VSTS.  I just tried to perform " yo vsts" and got the following error.  Furthermore, how do we integrate VSTS generator with SharePoint generator, that is incorporating the "yo @Microsoft/generator-sharepoint" which is based on NodeJS under "yo vsts"?

    Here is the Error:
    yo vsts                                                                                              
      |       |    ╭──────────────────────────╮                                                          
      |--(o)--|    │     Welcome to DevOps    │                                                          
    `---------´   │ powered by Team Services │                                                          
      ( _´U`_ )    ╰──────────────────────────╯                                                          
      /___A___\   /                                                                                      
       |  ~  |                                                                                            
       `  |° ´ Y `                                                                                        
    What's your Team Services account name                                                                
    ({account}.visualstudio.com)? XXXX
    What's your Team Services Personal Access Token? [hidden]                                            
    Getting Agent Queues...                                                                              
    What agent queue would you like to use? Hosted                                                        
    What type of application do you want to create? Node.js                                              
    What's the name of your application? XXXXSP                                                        
    Where would you like to deploy? Azure App Service                                                    
    Getting Azure subscriptions...                                                                        
    What is your Azure subscription name? Visual Studio Enterprise with MSDN                              
    Install dependencies? Yes                                                                            
    Found Team project                                                                                    
    Found agent queue                                                                                    
    Found Visual Studio Enterprise with MSDN Azure subscription                                          
    Creating Visual Studio Enterprise with MSDN Azure Service Endpoint                                    
    Creating CI build definition                                                                          
    DOCTYPE html>                                                                                        
    ntaxError: Unexpected token < in JSON at position 4                                                  
      at Object.parse (native)                                                                            
      at Request._callback (C:\Users\Amir\AppData\Roaming\npm\node_modules\generator-vsts\generators\vsts\
      at Request.self.callback (C:\Users\Amir\AppData\Roaming\npm\node_modules\generator-vsts\node_modules
      at emitTwo (events.js:106:13)                                                                      
      at Request.emit (events.js:191:7)                                                                  
      at Request.<anonymous> (C:\Users\Amir\AppData\Roaming\npm\node_modules\generator-vsts\node_modules\r
      at emitOne (events.js:96:13)                                                                        
      at Request.emit (events.js:188:7)                                                                  
      at IncomingMessage.<anonymous> (C:\Users\Amir\AppData\Roaming\npm\node_modules\generator-vsts\node_m
      at IncomingMessage.g (events.js:291:16)                                                            

    • Donovan

      7/27/2017 12:26:36 AM | Reply

      Please upgrade to using Yo Team and not Yo VSTS.

Pingbacks and trackbacks (4)+

Add comment