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
    yo
  • Select Install a generator
    image
  • Type
    vsts
  • Select vsts Generates an app with CI/CD in Visual Studio Team Services
    image
     
  • Once it is installed simply press enter
    image
  • 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 (24) -

  • 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.
    • 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.
  • Hi Donovan,

    Thank you very much for making it open source, been looking forward to it. Really enjoyed your session in Auckland. Cheers.
    • My pleasure. Now let's make it do more stuff!
  • 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
    • 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?
      • I am the account owner in VSTS but only a co-administrator in Azure subscription. Should that matter?
  • 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.
    • Can you show me the screen of the answers to the prompts?
      • That works AWESOMEEEEEEEE! It did work perfectly. Thanks for the cool stuff Donovan!
  • 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
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------
    • You only need to enter demoaccount  not the full URL.  Sorry for the confusion. I will update the prompt.
  • 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?
  • 5Will that rest api calls also work with onprem tfs with some modifications?
    • That is correct. If the demand is there it would not take long to create yo tfs a well.
      • I'd love to see a yo tfs as well
  • 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!
    • I had but I don't know what the sample DB schema should be.
  • 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?
    technet.microsoft.com/en-us/library/mt775342.aspx

    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.
    • 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?
      • 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.)
      • 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.

Pingbacks and trackbacks (4)+

Add comment

Loading