Application Lifecycle Management

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to the microsoft fast track partner technical architect program this session is going to focus on application life cycle management my name is phil topness i'm a principal program manager in the powercat team our team helps microsoft's largest customers be successful in the adoption governance and technical architecture behind their power platform solutions in this session we're going to start from the fundamentals we're going to talk about what solutions are so if you're coming in from sharepoint or directly into powerapps never fear you don't have to have that dynamics background we're going to start you from what a solution is what application lifecycle management health is and then i'm going to talk about how azure devops can make all of these processes simple and automated i'm also going to talk a little bit about some of the current gaps in the story and what's coming to fix those now i like to learn by seeing things done so we're going to do a lot of this with demos so we're going to talk about building a solution how to extract your even your no code and low code canvas apps and flows into source control how to automate the solution checker to make sure that it passes before anything goes into test and then also how to create solutions and deploy to test and prod automatically so let's start with the fundamentals let's talk about solutions so solutions are packages of all the components that make up your application so here in our dev environment here you can see we've got several components making up now when it comes time to deploy this into test what a lot of organizations will do is it's up to each developer to deploy their work there and so you know developer will look here and says okay we've got a banana here and they'll take their banana and they'll install it there and this i think that's a sock they'll put their sock over here and so on and try to recreate everything they had in dev in test of course there's lots of problems with that one is we're taking up a lot of the developers times but also too it's very difficult to make sure that you've exactly reproduced what you have in dev in test and so one of the goals of this is to make sure that you have a package a solution around all of these so you can move them wholesale into the other environment so the idea is to make it easy to determine hey is it the code that's broken or the environment or maybe the environment was already sick i had one customer we spent more time fixing their test environment than we did working on the app itself and also make sure that you're not missing a component like that sock or have a component on a date maybe on a blue sock right that's just not right so we want to make sure that we can easily create test uh tests and production environments that match with the developer saw to make it easy to troubleshoot and uh and uh make sure that testing and everything goes easy so why do you care right now there's a lot of studies that show the financial benefits of having good application lifecycle management to an organization into a software product but for you our goal is to make sure that you spend more time building apps and less time responding to bugs you've already fixed because they're showing up in qa or in tests because it hasn't been deployed or been updated recently or troubleshooting the environments themselves or integrating changes trying to replicate what you have in your development environment or even just deploying apps like i was just describing so let's talk about what solution files are so solution files are a grouping of anything that can be in your power platform based app so it could be a canvas app or a model driven app a flow an entity itself and the columns that make it up or an option set and even things like environment variables data flows ai models can all be in there so the idea is you build the solution file and it makes it easier to transfer your so your application and all its configurations from dev to test to prod or to your customer and manage it in source control now the solution file itself is really just a map back to these components in your system that are then gathered up as that solution is exported now solutions are also managed by publishers we're going to talk about publishers and why they're important on the next slide so every solution requires a publisher now when you look in your environment we'll be looking at one here in a second you'll see the the default solution in there and some ones that came with it it's important for you to create your own publisher and share that publisher between all of your solutions this controls a lot of things one of the things as the publisher you can control what can be customized in your application and what can't it also sets the customizations prefix if you're looking along your entities you'll see some that say msdyn for the ones at microsoft ships you'll be able to set your own prefix for your uh free for things that you create in your solution so let's take an existing app and build a solution on top of it so here i've got this app here it's not in a solution it's in my development environment it's called click it's a very sophisticated application what it does is when i click this button that says click it tells me what time i clicked it it's handy right so whenever i need another time like just go into this app and click it now to add this into a solution i come over here into my solutions i'll click new solution give it a name and i can see the default publishers here i can create a new one by clicking new publisher i've already got the five minute power platform here's the one i'm going to add this to and click create that adds a new solution here but my solution is empty so now i can add a new application a new entity a new flow basically anything i can do in power platform i can add in here and when i add it in this way it's automatically owned by the solution gets the right prefix and all that if i want to add an existing one i can add an existing canvas app there's my click app so now i have a solution that has click in it i can export this solution and import it into uh into another environment so let me publish all changes click next and i'll click export now i can export as managed or unmanaged we're going to talk about the difference of this in a second here but usually what i'm going for when it's not in development i'm going here to my test environment i want to click manage so i'll click export we're going to see it download here now let's go into the test environment and let's load that up this will move over to my test environment i'll load up the solution we can notice in here too right the click is not installed yet so i'll click import find the file that was just downloaded click open and next and now this is a simple example this only contains a single app but if this would contain multiple flows or other other aspects of this application they would all be coming along with us and so now when i come in here and i refresh my list of solutions click is now installed contains our app click play and now again we can see what time it is so it's a simple example of how you could take the the components the apps and flows and everything that you've already got built and you can still add them into a solution right this isn't something you have to do from the start now when i exported my click solution i had the choice to be to choose between an unmanaged and a managed solution this is an important choice and each type of these solutions has a specific purpose unmanaged solutions are for use when you're in development when you have something in an unmanaged solution and you load it into another environment those become part of that core environment unmanaged solutions can't be deleted and also the contents of unmanaged solutions can be modified by whoever owns that environment when you have a managed solution managed solutions are what you should use as you move your application to a test environment or production or give it to a customer managed solutions are intact you can control what customizations people can make on the components of your solution they can also be removed in their entirety as long as there isn't another solution that has dependencies on them that is using the same components so as we move forward in the demonstrations we move our application into test and deprod we'll be using managed solutions so let's talk for one moment longer about managed versus unmanaged solutions so unmanaged solutions are a container to the customization but they're on the top layer and we'll talk about layering as a second so that means effectively that unmanaged changes always appear on top of any other changes that you've got and these always allow customization to the components you can't lock these down and really what they are is they're references to the customization to the components but they're not really owned by the solution themselves and so because of their that you they can't be deleted you can't be removed these they can't remove these changes which is why for a test or a prod environment you really want to use managed because you can see a manage is really the complete intact version that gives you control over what's appearing in that environment it can't be modified it can't be customized unless you permit it and components cannot be added or removed by the end user by the consumer of that solution and so it really keeps all the changes intact and talk about layers in a second here and it controls the way that the layers merge one nice thing is now the managed solutions can be deleted as long as there are other things depending on it or they can be upgraded if you have you can then create a patch which is just the differences between version one and version two and just ship that patch to your customer and just the changes will be applied as well now that part about solution layering is important because if you look at your system you've got the base level common data service here at the bottom and then as you add solutions on top of that those customizations like say if you have the contact entity here you make it add a field to it here and another field in this solution those all add up in the order those solutions are added to what the user sees and so solution and solution b are installed in a different order the user could see something different because the these are applied in in this order so they've got the base and you have each application of changing what was below it in addition anything that the user makes outside of a solution any changes are made upside of a solution are unmanaged customizations and those exist on the top as well so now we're going to take a solution that we created even with a canvas app and flows and low code things and we're going to move that into source control source control will give us a place where we can keep it track changes on it so we'll never lose any of our changes we'll have one central version of what the application looks like and so before we get started on that let me open up my solution here power cats and just show you kind of what this application looks like so it's got an environment variable it's got the entity so that we can store the uh store our cats in the common data service we have a canvas app and two flows one flow loads the image which you'll see in a second and the other one is a flow that when we have a highly rated cat it sends out an email so let me just open up the canvas app so you can get an idea i'm going to play it here and what this canvas app does is it loads up an image of a cat from this cat does not exist and if you haven't seen this website what it is is these are different websites that generate realistic looking photos but all based on ai so it's it's a fictional cat it's a realistic looking one and they have these ones this person doesn't exist which i'll just pull up here right so that's just ai made up image of a person it's uh pretty good if you haven't seen this site you're welcome for the hours of your life you just lost exploring it so here in my canvas app what this does is this takes an image this load from this cat does not exist gives us a chance to name it which uh this one we'll call lazy and then you can rate it uh with uh one to five stars that one looks like a little bit of a ai warning oh this one's good okay so this one's fluffy we'll give it five stars and of course it's all stored in the common data service so we also have a gallery here of all of them in our ratings and then that other flow i mentioned this part of our solution is going to mail us we have a five-star cat it's going to give us a new kitty gram so our goal now is to take this solution and to get this uh to get this entire solution into source control right so we don't want to have this all stuck in environment what if someone overwrites and we lose that environment we want to have one common place for this and so to do that we're going to use azure devops so here in azure devops i've got a repository it's empty except for its readme and soon this is going to have the contents of that solution and we do that using pipelines and so pipelines are kind of automated jobs a lot like a flow where we could then have it run against things in our environment and so we're going to start by creating a new pipeline and so we're going to use the classic editor and it's going to go against our repository an empty repository we want our code to go and we're just going to choose empty job and we're going to i'm going to call this here uh bootcamp extract solution to source control now one change i'm going to make also is i want all these groups to be able to authenticate as me so i'm allowed to access the oauth token and then let's add our first step now the first time you do this you'll search for power platform it'll take you to the marketplace in the marketplace which you saw briefly here is where you can add in additional add-ins so by searching the marketplace you'll find power platform get it free and then you'll see the same uh the same actions that i see and the first one we're going to add is the power platform tool installer that basically initializes everything so we can use the next uh the next steps so the first thing we're going to do is we're going to publish customizations so right just like we publish customizations to make sure that our app is up to date we're going to have this do it before we get uh before we get an extract of it public customizations needs a few things one it needs a service connection this is a connection into your environment using username and password or service principle i'm going to create a new one now using their using username and password so do a new service connection this is just going to be a generic one it needs the url and i know the url of my environment but you can get it from the settings as well and then our username password and we'll give it a name and this is how we'll refer to it in here so i'm going to call this dev2 call this bootcamp video so now when i come back here if i refresh my list of service connections i can see the connection we just made and that'll allow it to connect into our server and publish customizations so now let's export our solution just like we did when i with click we clicked export solution we downloaded it we're going to have azure devops exported for us and so here again we'll choose our service connection we need a solution name now our solution name is listed here power cats so we could copy that in but instead we're going to be using that over and over again so let's use a variable so i'm going to come over here to variables i'm going to add a new variable for solution name and put power caps in there and now when we come in here we can come solution name and then it'll pull right out of that variable now for the solution output file so there's some folders that are they're special for azure devops if we click in variables we can see predefined variables this link here is going to tell us about some of these variables like one of them is the artifact staging directory that's where we want to put our downloaded files and so here in our task we'll use that build artifact staging directory and then inside that folder we're going to use our solution name and solutions.zip so now we have an exported file let's run it through power platform checker so we don't get it in test unless i pass the the checker so look for the power platform checker it needs a connection to it needs a service principle connection a little different to set up and it wants the location of our files so we'll just paste that from the step above it's the location of our solution and we're just running solution checker if this wave doesn't pass solution checker this will stop and it'll never get to get to our source control right so this will give us a nice check that we make sure we get good code into our source control and the next thing we're going to do is we're going to unpack the solution it's going to take that zip file and open it up into its individual components and so our solution input file here is going to be exactly what we had here let's get that right our target folder to impact unpack is going to be from a different um pre-built variable the sources directory and we want it to be unmanaged right we've exported it here as an unmanaged because we didn't click managed and so we wanted to unpack as managed so it recognizes the format and the last step then is we're going to use a script that will then put this into github for us or into our repository our source code repository so our command line we'll add this and then this is in the documents i'll provide a link to this at the end with this little script here it's provided by the product team and so now if we save and cue this and run it we can watch uh once it kicks off we'll watch each step unfold now that's done we can come here and we can see power platform checker found eight medium issues so no high issues so it didn't stop and also we can see that it checked it out into our source control so if we come back here to our repo we open up powercats and now we can see all of the elements including our canvas app which is our powercat raider our entity felines everything that we use to uh to run that app has now been checked into source control this is going to be our master copy when we deploy to any other environment we're going to build a new solution out of here and take it there so we're always making sure we've got known set of code we're not dependent on what's happened in any one environment or wonder why it worked yesterday and it didn't doesn't today coming back to powerapps i'm going to move to my test environment inside my test environment we have our click solution and everything else is just powerapps out of the box so our goal then is to deploy our catfisher solution here so we're going to do that here in azure devops using a different pipeline we're going to use this pack solution pipeline let me just show you what this one does this uses the same steps we did before it installs the tools and then instead of unpacking it and putting in source control we're packing it but we're packing it from source control and then we import it into our build server we export a managed version from our build server and then those get stored as solution artifacts so that way we'll have a point in time version of this solution both unmanaged and managed that we can use however we need to so let's run this one so now azure devops is installing the power platform tools it's packing the solution from source control importing it into our build environment exporting a managed solution and now viewing this we can see the artifacts that were produced here and we can see now we have a managed and unmanaged version of our solution those came from our build server and sold job is to then take the source control files and produce these so now we're ready to take this managed version and deploy it to our test environment and to do that we're going to use a release it releases a lot like uh like like a pipeline but it can be triggered based upon certain events so if i edit this release we can see that this is taking the outcome of those so it's taking those uh the solutions from that pipeline and we can have it trigger so that whenever that is finished it automatically deploys to qa but in our case we're going to just create a release and we're going to watch this deploy to qa so this has a similar set of steps using those same controls we can see here it's queued to deploy to qa then this release will install the power platform tools import that solution into our test environment and publish customization so we're ready to test so now let's look at what it did so install the tools it imported the solution and then publish customization so now if we come back here to the test environment and refresh our list of solutions caps is now installed and because it's the solution we've got all the components but because it's managed we can't edit these directly however we can make updates to their configuration and we'll need to and that's one of the gaps in the current alm for the alm story for power platform that i was mentioning earlier one that will be fixed in the next uh fixed later this year and so if we look at our kitty gram flow for instance this is the flow that sends an email when a cat is rated five stars we'll notice that it's turned off and to fix that we need to reconnect it so you can see when we clicked reconnect it found the reconnection and found the connections because i'd already connected connected them one time otherwise we just click the plus sign and they'll connect and now it's connected so we'll save this we'll come back here and now we can turn on the ketogram flow another change we'll need to make is in the app itself because the app also has connections to a flow because it's loading an image from uh that this cat does not exist and so let's take the uh the application itself let's edit it so we can already see the dreaded red x here in fact up here we can see where i'm calling the flow that loads the image that's that's what's broken here connection not configured so here again we're falling victim to a connection that doesn't exist and so if we go to power automate we can reconnect that flow load image and now it becomes load image 2. so let's put that code back in there call it load image 2 and now it's reconnected now load image is also in here we don't need to reconnect because it's already been reconnected we just need to reference what's now called load image 2. and now catfisher once we close it reopen it now we're back raiding cats again including with the uh ketogram flow now that process of reconnecting you probably experienced if you've moved your app between environments that's not really part of using alm or using a solution but it is something that makes it diff difficult to move to easily move your applications between solutions that's something that the product team is working on and has a way to to remedy and it's uh it's coming short later this year shortly so finally now going back to the environment environment map we pass tests it's now time to release from test to prod and really what we'll do is we'll go by taking those same assets that exact same solution that was released to test we're going to deploy it to prod back in azure devops we'll take this release it's already gone to qa just click prod and we'll deploy to prod now what this will do is it's going to take that same solution that we that we sent to qa and send it over to prod now in this case i've also got an approver in line so here our qa team i created an office 365 group anyone in that group and has to approve this going to prod and so until i click approve it won't go and so now it's been queued and now it starts so that way we have a gateway nothing will get to prod until we get the right approver saying that it should and then once it goes to prod we'll need to do the same reconnection but then we'll have the exact same thing that we saw in qa headed over to production so let's talk about what healthy application life cycle management looks like the first thing is to use solutions right create a publisher use a common publisher across all of your solutions and segment them out so that they are not too broad right you want solutions to be relevant to the what's contained in it and even if you're like bringing in an entity in a solution don't bring in the entire entity bring in only the fields that are relevant to what you're building that'll help release reduce your dependencies and make it easier to track the changes in your solution deployment should always be managed solutions to test and prod anything that isn't in a development environment that will make it easier to remove them and clean up and make sure they stay intact and aren't changed make sure you know what was deployed and should be deployed via an automated process you see the power platform tools for azure devops makes that pretty easy and once you set them up then you've always got the same deployment process it's also going to save your developers time in the process you also want to make sure that even your no code and low code objects are being stored in source control so you have one version of the truth too many times i see people they have a magic environment and that's where their app lives if something happens to that environment or someone goes in and changes something dependency that they don't understand they have to go hunt it down it can cause huge problems and then finally developer environment should be one disposable so that means if it's if it's five o'clock in the afternoon and your your developer environment just goes up and smoke you shouldn't care because you could also create a pipeline that's going to take what you have in source control create an unmanaged solution deploy it to any developer environment for you and they should also be isolated every developer should have their own environment or maybe even sometimes separate by applications that will reduce dependencies and make sure that that there are fewer things going on in that environment that can cause the application problems so that you have to hunt down so let's talk about some of the current gaps in power platform to really make this easy these are things that are currently underway in fact coming into preview very shortly so one is it's difficult to maintain separate connections so if you have two sql or two cds connections can be hard to keep them straight because you have to edit them in the uh when you load them up and we saw that also for the second bullet flows and apps lose connections so you've got to add them manually and what's worse is that creates an unmanaged solution layer on top and then finally it's difficult to change input parameters we have environment variables now but it can still be tough to parameterize your flows and things so that they they update per environment that they go into so my example was a very simple example of a set of environments right dev test prod and that's just for one application now as you look across your tenant across your organization you're gonna have multiple environments and multiple applications with similar stages uh like dev test prod going on and i wanted to show you just one example of a set of environments and of course it always starts with your default environment right you'll always have a default environment and then you might have some simple developer kind of proof of concept environment and then you've got the enterprise environments here that have dev test and prod specific for that environment and for business units maybe separate development environments for different projects that go into a shared test environment which is you know makes managed solutions all the more important and then also go into a shared production environment but an important thing to note on this is as you get more application or more environments you need to keep track of them and that's where the center of excess toolkit can come in handy to give you real metrics and real visibility across your tenant on what's going on in these environments so you can buy monitor the environments as they're created who owns them who owns the contents the apps and flows within them and also filter them out so this is a free app that's maintained by the powercat team and it's available at the url center of excellence you can install it within your tenant and you'll get access to these types of reports here and then of course if you haven't used azure devops to maintain your processes explore it the power platform tools are just released in the last week this will give the ability then to manage this process both your your uh pro code and your no code assets in one repository one source code repository and then automate the processes of creating solutions building them and releasing them in the same way it's going to save time in doing that as well so just a few key takeaways and a few resources to leave you with source control is not just for pro devs power platform canvas apps flow low code still needs to go into source control so that you have one source of truth for your application and it will protect you so you don't lose the changes that you've made unmanaged solutions are for development only create managed solutions so they stay intact and they're protected as they move to other environments don't wait to automate it's easier than ever with the power platform tools so those tasks will help you automate core power platform functionality like building solutions unpacking them into source control and you can then lay the groundwork for this so that as you're building your application the rest of your testing user acceptance testing deployment to prod is much much easier a few resources here for you a link into the build tools so you can see the documentation for them there's a hands-on lab that goes through a lot of what i did here today so you'll be able to get deeper into it and actually build it out your own environment easily there's also some build tools for more complex yaml-based pipelines not the not the classic editor that i use here there's more documentation follow this path i'm a developer package to distribute apps and then here on the slides i've got a few links into mark schweigert on the powercat team and a few other people from the community that have this and i'll be putting videos of this entire process building out from end to end uh on my site here
Info
Channel: Microsoft Power Platform
Views: 9,141
Rating: 5 out of 5
Keywords: PowerApps, power automate, power bi, power virtual agents, power platform alm, power platform architecture, power platform, microsoft power platform, power cat, cat team, microsoft cat team, microsoft flow, power platform admin, power platform administration, power platform learning, upskill, power platform education, learn the power platform, powerusers, microsoft, office365, dynamics365, alm, admin, process automation, business process, apps, power apps, build power apps
Id: xwCUJmrRI9E
Channel Id: undefined
Length: 32min 42sec (1962 seconds)
Published: Mon Sep 14 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.