Planning and building games using the full power of VSTS: Agile, CI & CD end-to-end demoOn August 18, 2019 by Raul Dinwiddie
>>Hi, to everyone. My name is Rogan Ferguson, I’m a Program Manager working at Microsoft. I work on Visual Studio Team Services. Visual Studio Team Services is an application lifecycle management product that allows you to manage every part of your game’s development lifecycle from the beginning to end with tip offs in the middle. It provides a lot of powerful suites which I want to demo to you today as we go through. In the demo today, we’re going to be working of a game called Galactic Dodge. And Galactic Dodge, it’s one of those never ending games. You’re just continuously dodging asteroids that are coming at you, and if you get into a sticky situation, you can go ahead and shoot a laser to actually get rid of the wall in front of you. But you have to be careful because your lasers recharge over time, so you don’t want to use too many. We have customers playing this game all over the world. One of the things though that they keep coming to us and talking about is the fact that we’re missing a high score feature. In today’s connected game world, people want to be able to brag with their friends about who has the highest score and who’s doing better. Without this feature, our competitors are totally moving past us and we’re not really keeping a strong user base. So, today we’re going to use Visual Studio Team Services to accelerate our development and get this high score feature out with very high quality to our customers as soon as possible. So, here I am on my Visual Studio Team Services account, this is a SAS offering provided by Microsoft, so you sign up for your account, register and then you can get started developing. When I come onto this home page, it’s really an experience centered around you. It’s going to help you figure out what is important to you and get you level set for your day coming ahead. I can look at things like “My favorites” which can show me things that I want to check out very quickly, like my Team Plan for quick reference. I can also go and check out work items that are either assigned to me, so I can understand what work I have still to do or any new work that’s been assigned to me. As well as I can check out work items that I’m following, if I’m interested in following a work item, once Ryan mentioned in as well as recent activity. So, I can check out any work items that I might have been working on previously. I can also look at other things like pull requests, I can see pull requests that are active that belong to me as well as pull requests that I might be requesting a review on. So, it really gives me a good chance to level set at the start of my day, what do I need to get done? What’s new? What’s different? And get that into my mind. Let’s go ahead and jump into the Galactic Dodge project now and get started on actually developing a high score feature. So, when I first come into the project, I’m greeted with a Read Me, something that’s very familiar for a lot of git projects is having a read me to kind of help you get started. And in VSTS, we provide open source get support, you can have an unlimited number of git repos in your account, and of course we give you the support to have native Read Me support just like GitHub. And it last here where you can actually go and edit this file that lives inside with your code. So, any developer that comes into your project can get a quick understanding of how do I contribute? What’s involved with the release process? And they can get up to speed very quickly. We also have a powerful suite of dashboarding features, and the way to think of dashboards, is it’s your view into your data, however, you want to splice it. You can have as many dashboards as you want, you can have as few as you want, you can put whatever you want on it. In this dashboard, we’re choosing to have a hodgepodge of views. We can see or release status, pull requests that are assigned to me, build status bugs and sprint burned down. If you wanted to though, you could have a dashboard that would be just for a telemetry on your game, how is my game doing? I’m I having a lot of players playing it? I’m I seeing crashes? I could have one that’s dedicated to build and release, so it’s really here for you to have a view into anything you want. Let’s go ahead and get started now and jump into the work items. Especially in this modern world where games no longer ship in boxes and that you work on them for years and you ship it out, people are expecting new, great and amazing features on a daily basis, and this is where your Azure backlog management really comes into play. We have several different views that can help you achieve this in Visual Studio Team Services. One of the more traditional views that everyone is familiar with is the good old fashioned prioritization backlog view, where can come in, work with my co-workers and start to rank items based on their priority, and then if I follow a scrum methodology, I can even turn on forecasting after assigning them story points, and I can try to figure out what’s going to fit into a particular sprint. Now, this prioritization view is really great for understanding what work should be done before other work. It’s not great at implying state. This is where the Combo Board comes into play. The Combo Board and VSTS is very rich and powerful and has tons of customizations. You can fully customize your Combo Board to have as many columns as you want as well as as many swim lines as you want. Swim lines are going to be these horizontal bars up here, they can be done to imply anything you want, whether you want to scope it to a particular feature set or you want to do what I’ve done here and say that this lane is to call it importance, i.e, anything up here is something we really need to keep our eye on, that’s why it’s at the top. You can also do other fun things like stylize the color of your cards and add tags to your cards as well, and you can also check out the task view on particular items by blowing them out here. If anyone on your team is confused about what a particular color might mean, you can even provide a customized detailed set of instructions that can help someone new to your team understand what is the difference between something being in progress versus being in pull request. So, when we look at our Combo Board, we’ll notice that our high score features actually down here in the normal priority line. We know, based on feedback from our customers, this is a really high priority, so to make sure the team understands that, I’m going to drag this up to the top here so that way, everyone who comes on Combo Board can see it, digest it and instantly understand that this is important. When I open up the work item in VSTS, I’m welcomed to a lot of items here that are fully customizable. We can get detailed descriptions, conversations with mentions, I can mention my co-workers and they’ll get an email to let them know, also as a Product Manager, I can get a lot of useful information from the development tab. So, when the developer actually starts working on this item, you can come in and get an understanding of well, have they created at the branch to work on it? Have they gone and created a commit and checked it up? Are there any pull request? What’s the status of that pull request? As well as, Has it actually been built? So, you have this rich end to end experience in this product. So, I’m going to go ahead and actually right from here, I’m going to go ahead and create a new branch in git, and you’ll notice it’s automatically going to link that work item, so that’s what’s going to give me that trackability in that development tab right there. I’m going to call my brands, users, RoFerg, and I’m going to name it High score. It’s going to be based off master, and again it’s going into my Galactic Dodge repo. When I create the branch, it’s instantly going to take me to that git view, so I can go ahead and do that. Now, we’re going to switch to development mode and I’m going to go ahead and pull down that new branch. So, I’m going to do a git fetch, like I said, this is open source git, Microsoft’s one of the largest contributors to open source git. I can see that I pulled down that new branch, I’m going to check it out. After I checked it out, let’s make sure I’m on that branch just for safety. I’m going to open up my code file, and I’m actually going to go ahead and implement my highscore feature. Now, I’m so good at coding that I pre-coded this, and I’m just going to remove the comments section. I have such confidence that this works, I’m actually not going to test it locally, we’re just going to push it up and test it out in VSTS. So, we’ll do a git status check. And again, you can use any IDE that has git support. I’m old school, I like to use the command line. Do you want to use Visual Studio, Jetbrains , anything that is git support? Go ahead and do it. So, I can see that I made a modification to my JAS file. So, I’m going to go ahead and stage that commit, and I’m going to say, “Adding high score feature to the game.” Perfect. I’m going ahead and push that up to my remote, actually I need to go set my upstream here, so I’m going ahead and do that. So set my upstream has pushed it up. Let’s go back to VSTS now. The simulated developer coming back to VSTS, I’m going to click “Refresh” and what you’re going to notice right away is actually noshing me to create a pull request. As we all know, code that isn’t checked in the master is worthless code. So, we want to make sure in VSTS that we’re nudging you to always go and check this code in the master when we see you’ve created a new branch and you push in new work and do it. It’s automatic we have to make lactic Dodge team and again for the end to end connectability, it’s actually going ahead and it’s continued to have that work kind of tagged to it, so the Product Manager will know right away that this is in pull request. All right. I’m here on my pull request page and we have a powerful set of pull request tools that you can make everything from the wild wild west, where someone can check in their own code and approve it themselves, don’t do that! Or you can have it set up, so it’s really hard for someone to check in unless they’ve gone through a series of reviews, and their code is generally believed to be in a high quality. I’m actually going to set this feature called autocomplete. What this means is when I’ve met all of my required conditions, these are configurable conditions, one of them being, I need to run a build of the combined new code I’m checking in along with what’s in master to make sure it’s not going to break, as well as making sure I have all the reviews completed. It will go ahead and automatically complete my pull requests for me, which is a really great feature especially when you have a PR build that might expire within a certain time frame. Once you’ve gotten all the sign offs, you want to kick off another PR build, you don’t want to have to come back to what is done. While we’re waiting for that build to finish, so we can jump in and look at some other features we have in pull request. We have a rich commenting experience. It’s actually very stateful. I can mention my co-workers and this is all in Markdown. When I mentioned Kayla I can say, “Can you look at this code for me?” I can go ahead and comment and it’s going to have a stateful nature to it. So, any other co-worker who comes in here to review my code, can instantly tell that, hey, we’re working on a fix or if I’m done with this and it’s closed, it’ll be out of their way so they don’t have to worry about reading something that maybe isn’t the most up-to-date. As I’m running my builds too with the extensibility, I actually have it set up in my slack channel so it’ll let me know when a build’s done. So, if you’re the type of developer that you know following that famous X Cassidy comic, you’re waiting for the build to run so you’re off doing other things, discussing cool cat gifs, you can see that, right there it’s going to tell me that build is actually done. Let’s hop back to the pull request. I’m going to go ahead and approve it. And we’ll notice all my conditions have been met so it’s automatically checked into master. So, we take in the work item, we’ve raised its importance level, we’ve got a developer on it ASAP, we’ve got code checked in, now the next part is we need to get this built and released out to customers. So, let’s hop in to the build system for VSTS and take a look at what’s going on. We can see here when I come to the build page, I get a very detailed overview. And I’m actually on the mine tab which is reflecting to builds that I have requested to be queued. So, in the spirit of continuous integration, every time something gets checked in the master, we’re going to go ahead and run a build. But at a quick glance, I can see what committee it came from, the build history that’s been going on, the status of it is in progress. If I want to get more details, I can actually go ahead and click on the build itself, and we’ll see that it’s currently running. It’s actually pulling down and you get resources. So while it’s doing that, let’s quickly pop into the build and take a look at what makes it tick. One of the things with VSTS is what you can use us for everything and you get that rich end to end integration experience that I showed you where a product manager can follow everything from one step to another and really figure out where it is. You don’t have to use us for that. If you come to me and say, “Hey, all my code is in GitHub Enterprise.” That’s fine. If it’s in GitHub Public, that’s fine. Bitbucket or any Git resource, we can work with that and pull your code in. Everything else is driven based off tasks. You add tasks to it and based on what tasks, and what order we’re going to go ahead and run them in order. And one of the beautiful things here, is we’ll support any system. So if you’re not using the Microsoft stack, you’re developing your game for Android, iOS, we support building and signing for all this. You can go ahead. Add those extensions there. You don’t have to use the Microsoft stack at all. And if you can’t find an extension that you’re looking for, you can check out our marketplace. If you don’t see it here, it’s really quick and easy to build and run. As long as you can run it from a bash prompt or from a command line, you’re good to go. And shameless self plugging here. I highly suggest when you check out VSTS, go download this amazing extension. I totally did code this. You can play the game that we’re actually working on here today in your VSTS account. So let’s go back to the build and see what’s going on here. We won’t make any edits to the build definition. All right. I can see my build succeeded and in a second, the report is going to come up for me. Everyone’s got a love conference internet. It’s the fastest thing ever. So again with the end to end trackability, I can go ahead and see here that, what work item it’s related to, what was actually built and the PR that it came from, and in the spirit of continuous delivery because my build has succeeded, it’s actually gone ahead and kicked off a release to my development environment. So let’s go take a look at that release and see what’s going on. So I’ll go to my dev environment. We’ll go to the galactic dodge release and I can actually see that, I can see previous releases, I can see that this one failed in the first environment but I can see for the most part everything’s been fine. And here’s the release that was automatically cued after that build. I can tell from this that it’s actually already been deployed to my development environment but it’s waiting post deployment approval. That’s something that you can configure a VSTS releases. You can do this in an automated fashion or you can have an old fashioned human go and actually approve something. From a development environment, I would prefer that a human being actually go and check it out. So that’s what I’ve done here. So let’s hop back in again, my slack channel, it’s posted and let me know that my development environment is up with the latest Vitz. Always go ahead and force refresh to make sure everything’s fine there. I’ll zoom out so you all can see the screen and now we’ll go ahead and play the game. I’m going to play this pretty bad right now just to make sure that I can end and that the high score will show up. Perfect. So I can see a high score showing up. As one other test though I’m going to go ahead and play this one more time and try and beat that high score. So maybe I’ll fire a laser to make sure that I can get past, I think it was 146 was my previous high score. I think I’d easily beat that now. Go ahead and die. So I can see that the high score feature looks to be working. So I feel comfortable with approving this to move on to my next set of environments. So we’ll hop back in the visual studio team services. I’ll go ahead and right from here I can actually click to approve and you can set this up, so any developer that’s actually writing code can actually go and approve their own release. Obviously for the demo purposes, I’m just going to be my own approver. I’m going to go ahead and do this. I can add a comment and say, high score feature. Feature looks like it’s working. Okay, I’ll go ahead and approve that and that will automatically kick off my next release going out here. And that will start my blue-green environment. While that’s running, let’s jump into releases to see what makes those tick as well. So I’m going to go ahead and edit my black Dodge thing. And when it comes up here we’re going to see it’s going to give me a view of my environments as well as where we’re getting resources from. As I said before, we’re very open. You can use VSTS for everything or you can use it for one thing or two things. It’s up to you. So if you tell me, ‘Hey, I run all my builds on Jenkins.” You can pull build sources from Jenkins and release using release and VSTS. And we play well with everyone, if you want to deploy it to AWS, that works fine. Azure, that’s fine. OnProm Infrastructure, that’s fine. Iowa store, we can do that. Google Play Store, we can do that as well. So you should never be blocked on figuring out where you can actually go and release your games. I’m going to exit out of this and we’re going to take a quick look at some of these environments here. Now you can’t have a single environment, actually go ahead and deploy to multiple environments. So if you let’s say, after you passed the dev phase, you want to start two separate tracks for your Android and your iOS game, you can have those two separate tracks running there. For this game though, it’s pretty easy, we’ll do a very linear progression going on. You can see I have a post deployment approver set up here. I can also do fun things like with my blue-green environment, we have this new concept of Release Gates. And these are just like I showed you those extensions a minute ago, you can do anything with Release Gates. I have a very simple Release Gate set up here where it’s only going to deploy out after it finishes deploying, it’s going to wait one minute. If you follow a ring deployment model, this is something that’s very useful to actually go ahead and do in the sense that, you might be deploying it to one ring of your customers and you might want to put a 24 hour hold before you go to your next ring. You can also do things like block releases based off Twitter sentiment. This is one thing that we actually have up in the store here. So if you go to the marketplace, search for Twitter. And this is something that we use for Visual Studio team services by the way. So we wrote this, it uses Azure machine learning. And basically what you do is, you say hey, for every particular hash tag or atmention set, I want you to run the tweet through Azure machine learning and figure out if someone is happy or sad or angry or happy about a particular release that just came out and based on a sliding scale, if that sentiment is too negative, it can actually go a walk or release until a human can come in, maybe assess if there’s a code quality issue or not. And again, when I drill into these individual tasks here, they’re just like the build agent. They’re all just running based on tasks. You add tasks. The order that the tasks are in, are what’s going to define what’s run when. This one’s pretty simple. I’m just using a deployment service to send out my Azure webapp and I’m posting something in my slack channel to let me know when that is done. So let’s pop back here in my slack channel. I can see that my production release is actually finished. I’ll go ahead and check it out just to make sure everything looks good. I’m just going to force refresh to make sure I don’t have any caches. And again, I’m playing the game. We want to see if the high score works but maybe I’ll try to play the game a little better than I did before. Lose one life there. And by the ways you can play this all you want. Just go to the Trouble With Tribbles. If you can’t guess by that title, I am a Star Trek nerd, so, live long and prosper. Looks like the high score works. This is in production, it’s out to our customers. So I can easily go hop back, go to my work or go to my backlog’s. And I can tell right now I can go ahead and actually move this item. From here all the way to in-production because we’re done. So now we’re done with that and that’s a quick overview of how you can use Visual Studio Team Services to get high impactful requests from customers very quickly in an agile manner. Pivot. Start working on a new feature and leverage the pull request to check in high quality code with build and release as well to get that code out to your customers as quickly as possible in this world where customers are expecting updates to games almost on a daily basis. I highly suggest you go check out Visual Studio Team Services. You can go to visualstudio.com. You can go and click on Team Services, getting started for free. It’s absolutely free for up to five users. After that, it’s pretty cheap to do as well and stakeholders are free as well. So if you have anyone that doesn’t need access to lets say, source control build a release, they just need to look at work items, they’re always going to be free and you can use them forever. And again, remember, well, this is a Microsoft product. We work well with everyone, iOS, Android. If you want to deploy your backend now to AWS, we’re totally fine with that. We are agnostic to who you’re using. We just want you to have the best development tools possible to make the best games possible to deliver them to your customers. If you have any questions, my colleagues and I am happy to take them after the talk, and my colleagues and I are over there in the Team Services booth. Swing by, I’d be happy to dig into anything in more detail that you might have. Besides that, thank you for listening to my talk.