How to Deploy Power Platform with Azure DevOps

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
tune in to this episode of the devops lab where myself and Karthik are going to walk you through Power Platform and Azure devops you don't want to miss it so tune in [Music] hey everyone and welcome to the devops lab we're going to be talking about some awesome things with Power Platform and Azure devops and with us today we have karchik kartik welcome back April how are you it's been a while it has been a while so tell me I I mean we're going to talk about Power Platform and Azure devops and you're the expert on this so you know everything you're going to make it easy and awesome um tell everyone briefly what does you do for Microsoft uh so I'm responsible for the Power Platform developer Solutions in a nutshell what that essentially means is is that my job is to make sure that code first developers uh people that use visual studio and vs code for a living when interacting with par platform uh don't feel like they're actually having an out of Body Experience because you know our platform is a low code environment um so how do we actually build the experiences that actually Delight them and actually make the entire collaboration experience as fluid and seamless that's kind of what my role is awesome awesome so we're going to talk about Power Platform and Azure devops and this is important because if you're doing things in Power Platform you want to automate as much as you can and that's been really difficult in the past so go ahead and show us how easy it is in Azure devops now because this is really cool absolutely and the key thing to also understand too is the fact that the the reason why we're looking at devops is a lot of these organizations in particular uh because in a typical life cycle of a power app and for all intents and purposes happens to be the fact that it starts off with an individual having an idea just like in either code project and then building an app testing it out and then just deploying it and then suddenly the app just ends up catching on like a wildfire organization and they're like oh wait a minute we've got to manage this so the intent of these Integrations that we've gone ahead and put in place is to make sure that as the application development maturity from a low code standpoint continues to increase you're then able to snap in your governance controls at the appropriate time without necessarily stifling innovation in an organization as such all right so making it scalable governed all the happy stuff that we need exactly exactly cool all right so with that I'm going to go ahead into my handy dandy par platform environment so just for this demo uh what I've gone ahead and done I've called it the power demo and one thing to understand is when you're using part platform um especially in the context when you want to be able to go do Alm you have to go put them in Solutions okay and that's critical in this context because Solutions are think of solutions like a folder if you will that where in which you can have multiple set of apps uh par automate flows uh you know chat Bots and so on and so forth in this context all right so right now within par platform just like any other uh software development project we have environments uh we have something called environments these are usually self-contained all right and all the relevant dependencies and everything else are all put in place and so in this case for the purpose of our demo I have three environments one aptly called as Dev one called QA and the other one called prod and what I'm going to do now is using Azure devops is I'm going to go ahead and select um now this particular app that I've got this mixed reality app that I've got that I've just built um and go have that go through the um effort of going ahead and deploying across my Dev uh my from my Dev QA to prod in this case but before I do that I want to make sure that my app is actually working so here I'm going to go ahead and click edit and for developers that have actually used visual studio and things like that this is essentially how you build applications within par platform all right here in this example it's powerapps but you would do this you have similar experiences when you're building flows uh chat Bots and so on and so forth so here I've gone ahead and built this mixed reality app for all intents and purposes here April so are we going to do some coral reefs or are we going for Smithsonian 3D search well let's uh you know what uh I I'm being I'm focused more on sustainability that's that's a passion project so let's look at Coral and coral reefs right so here what I've gone ahead and done so just to kind of give you an example of what's actually happening in the background this coral Coral Reef stuff is actually coming from a uh one there's a Smithsonian 3D API that I'm calling which is this button here and then I've got a bunch of lists and pictures on my SharePoint Drive which is going to render everything when I click on this button so if I go here click on that it says Hey navigate galleries it will go into the various different screens so in this case it actually goes into the galleries screen and does all these uh things so let me just show you how that works all right so I'm just going to play it here and if I now click on Coral and coral reefs there we go all right so I can I also have a toggle button here so I can let's say I want to go select this thing looks like the brain let me see what that is it's the deploria labyrinthymphormis or whatever it is we just call it Brink yeah there you go but this is a brain coral as you can see I can look under it I can look on the side but this is some of the kind of complex applications the one could go build I mean I know I'm kind of showing this application in jest but for all intents and purposes these are some of the experiences of applications that you can build within Power Platform all right so we now we can we can assume that the fact that this app works as intended as it's intended to be all right now let's switch over to Azure devops okay now one thing to note is the par platform extensions within Azure devops are available in the Azure devops Marketplace so if you don't see some of these actions showing up in your repo all you have to go do is go to the Azure devops Marketplace and install these actions into your uh into your org and they'll be available to all the different uh projects that you have within your Azure devops org in this context okay so uh I already have some uh pipelines over here let me show you exactly how a particular uh pipeline would look like so if I go in and edit this pipeline all right now uh here just to kind of show you the fact that this is a multi-platform set of actions that we have I've actually got my agent pool currently running on Ubuntu all right uh and this is a very simple way of kind of doing things all right so here what I'm actually going ahead and doing is using again one thing please use service principle all right this is this is uh in my early Incarnation as a devops engineer uh I can assure you service principles are the right way to go and deploy applications uh especially if you uh are building it or deploying it for scale if you're deploying it for for one particular utility utilitarian effort then yes go use username and password but when deploying for scale please use service principles sorry I just had to get that PSA message out there no I think that's absolutely important every single pipeline should have a service principle yes so within that and I have different types of service connections I've identified this goes back to the same thing right I have something targeting my Dev environment my QA and my prod that I've identified and uh what I also like to do is and use a lot of variables in this case so what I have is in my variables section I've already gone ahead and defined the solutions I want to give or get and you can create multiple of these variables and remember this is just one simple task that I'm showing you can actually have multiple different agent jobs piped together so you want if you want to Target in multiple platform Solutions together in this context now as you can see uh the way I can go ahead and this is just an example of what's all there but if I just type in part platform if I can type all right you have all these different actions that are available to you all right so if you're using par Pages if you're using uh par automate flows and things like that all these actions are available to you uh to go ahead and incorporate into your pipeline as it is and again you'll always see the latest and greatest version from Marketplace showing up here okay so even if you may have not installed the latest and greatest version every time that we push changes into the marketplace you automatically get it all right and if you're in doubt what particular version or version you're running there it is that's available right there itself all right so here what I have is I have the installer so again just like uh any other CI CD tool before I go ahead and instantiate my Runner I want to make sure all the appropriate tools are downloaded so in this case it actually does that then from there it goes ahead and exports the artifact in this case I want to export the uh solution zip file or the solution name mixed reality Workshop and generate the zip file this is even though it's a zip extension don't use expand archive on Powershell or you know extract our uh capability because it's actually uh fully combined library and the only reason why we use the zip extension primarily is because it's got the Power Platform application has a bunch of proprietary formats along with Json XML and a whole bunch of other things together so when we export that entity it comes out as a zip file uh but you can unzip it but then dependencies get mangled up so we actually have tools uh that allow for you to do that easily which is why we have this unpack action right when you use this particular unpack action all the appropriate dependencies and the uh let's just put it this way it is less mangled uh when you uh when you unpack versus unzipping something just using a a tool like extract expand archive as the case may be all right so I've gone ahead I'm gonna go unpack this and then I've got commit changes so all this is doing is going ahead and committing everything into into my repository now I've already gone ahead and run this run this before so if I go into my repository right now I see this particular uh folder right there and I can as I as you can see my canvas app shows up here all right uh all the different connectors so remember the connector that was connected to the Smithsonian backhand uh Smithsonian uh as such all that is rendered here in Json including the icon uh that I'm using inside Power Platform to represent that particular connection and then all the different environment variables that I've defined are all captured here in this kind of format here so again as I mentioned it's proprietary formats like the MS app file here in addition to Json and XML that constitute that uh that zip file uh when we export that from part platform into a git repository as such right and we don't want to unpack that so noted that's a pro tip yeah yeah we we provide the tools to unpack it it's just that when you Branch off it becomes a problem Patrick all right anyway so so in this case let's say I'm going to go ahead and I've gone ahead and run this particular pipeline here so let me just go ahead and say all right I'm going to go deploy to QA so here I just deployed this very recently and if I can go ahead and look at the tasks if you notice there's some similar tasks that I've already got uh that were part of it so for example uh I checked out everything installed that now this time around I actually packed uh the raw format and actually reconstituted that zip file altogether instead of just going in and using a standard zip file I just constitute everything together and before actually importing it into my QA one of the things that I actually end up doing was something called as uh par platform Checker this is a service that we provide and it's actually a service in the environment so before actually going ahead and uh importing I have to go ahead and use the Power Platform Checker in this case in order to use a checker you have to still authenticate to the uh to the Checker as well before it actually can go ahead and invalidate your your zip file constitution in this context right so in this case it tells me everything seems to be working fine it hits that particular endpoint there and it tells me exactly the kind of bugs that might potentially harm or if it's critical it will stop the pipeline right then and there itself all right in this case I've got a bunch of medium 43 medium inconsistencies you know what that's why not a deal breaker you can click those thresholds right so critical and high will stop it maybe you can proceed and put them in the backlog exactly exactly all right so once that is done it will then go ahead and and import that directly into my uh into my uh QA environment and I'll tell you all these by the way one of the other things that we ended up doing this was a a big pet peeve for a lot of the Azure devops uh community members that were using Power Platform was a lot of the calls initially to our platform were synchronous we have changed them all to asynchronous so now they're all using asynchronous Imports uh and that's all now baked in so by default when you're using the Azure devops task in par platform and you know running your cicd pipelines they will default to asynchronous unless you specifically want them to be synchronous okay so Pro tip again there for you folks that are using this uh asynchronous Is Now by default you don't have to actually switch it on uh every single time well it's great the community spoke out and you guys were able to adapt and make that happen for them yeah yeah well you know um I gotta admit the Azure devops Community is pretty opinion and I appreciate that helps helps us write better products exactly exactly so here uh from my QA environment I can now go ahead and run my uh deployment so again same what I'm going to do here is and the task that we currently have is I'm going to export uh from my QA environment uh but this time around there's a there's a construct Within part platform called manage um the only difference what that means is when a solution is managed it makes it immutable which means it's no longer susceptible to change when something is unmanaged you can continue to keep changing and doing things of that nature as uh to the app as the case may be um so when you uh when you're in Dev when you're in Dev environments you always keep your Solutions as unmanaged now if you do deploy managed uh Solutions in your Dev environment they're usually because you have a dependency with the third like a third-party dll or something of that sort or someone else in your org has gone ahead and built this capability and you've now taken a dependency on it okay so those kind of things again when you Define your environment make sure the right set of dependencies have been deployed you can even automate dependency deployments as well so those are just some of the things that you can go ahead and do all right so in this case again uh this time around I'm exporting all right now this is if you see these purple text this is not usual this is because I actually said enable system diagnostic so if you want to get a more detailed view of what's actually going on this is actually with a part platform with debugging enabled all right so if you want to kind of look at exactly what's going on here that's what this purple text is if you uh switch the uh the debugging 74 to zero you won't see a lot of those debugging tasks and such this is usually helpful when you're running CI CD pipelines and you want to figure out if your pipeline breaks and you can't seem to figure out how to tell it why it's breaking this particular functionality within Azure devops really really helps awesome yeah because troubleshooting pipelines can be obtained exactly all right so here in this case I've gone ahead and done the export uh I go ahead and again just like uh in in some of the prior cases you know just like any other CI CD pipeline I want to make sure I check run some tests and make sure everything's working fine before I actually import it into my uh you know prod environment so to speak so in this case I'm again running a check uh again you're going ahead and this time around you're doing a check against the prod uh envir instance Checker good thing is if you notice just like the way it was in my um in my QA environment nothing has changed which means everything's working as the way it is and again this is not a deal breaker and then I go ahead and import that directly into my target environment in this case how do I know that I'm I'm putting into my target environment this is the URL all right so now using that service connection that I had that service connection is using that uh using the appropriate to the service principle and then importing this particular zip file into my prod environment in that context cool and you have that output as well to see where it's going to to vet that as well yeah exactly exactly all right so that was that's just some kind of things that you can go do and again um you know one of the great things about this is that you know within Azure devops if you are yamo Savvy you can use the ammo Editor to go ahead and create these workflows or you know if you're if you're not so yaml Savvy like myself you can go ahead and uh use the tasks that are already there and drag and drop and put them in place and you'll still be able to get this full TurnKey pipeline all set up in in a matter of in a matter of minutes awesome and I love the fact that you've properly segmented your environment so you segmented them in the Power Platform you segmented them in Azure devops and kept all the variables related to that environment together which is great best practice so we have like for like environments we know exactly what's happening through each of the deployments and we've actually kept everything separate so it lowers our impact if and when something happens exactly I I you know like I said I was I was a former devops engineer myself so I have the scars to prove it awesome that is so cool I love being able to see how we can deploy that with Azure devops um for everyone watching we'll put all the links for all of cartex demos for you to see and to replicate you can also pull out the yaml file if you go to the marketplace fill in all the details it will spit out the ammo so you have both options available to you everyone loves a picture though when they're creating pipelines everyone love the picture yeah thank you so much for showing us how to deploy Power Platform with azure devops April thank you thank you for having me folks thank you all and see you all next time on the devops lab [Music]
Info
Channel: DevOps on Azure
Views: 12,242
Rating: undefined out of 5
Keywords:
Id: iHpSuw8Ap48
Channel Id: undefined
Length: 17min 35sec (1055 seconds)
Published: Tue Mar 14 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.