bonjour hi welcome to another video of cloud in five minutes I'm Frank Boucher
and today I want to show you how to deploy our arm template with the azure
DevOps in a previous video I show you how to deploy web app using the azure
DevOps and I was using the azure DevOps repos but a lot of time our code is in
github since it's a very popular repository so today I want to show you
how to use github as code source for your deployment so here just like the
other day I have a frank demo SP net MVC web app but this time I got it in github
repository so we'll use this repository in our deployment inside our DevOps so
to get started let's go in Azure the pops and we'll go in pipeline or create
a new build one last time we use the azure repos but this time we'll use
github because it's the first time I'm trying to connect to my github
repository I'm sure the maps need to be authorized
so we'll do that by clicking the authorize button and now I just need to
select the repository I want to target so Frank demo
perfect now just like last time it asked me detect that my repository container
is peanut core website so we'll use that as a template
excellent and now just like last time we got the azure pipeline
yamo file and we know that this is good enough for the build but not good enough
for a deployment so we'll have here the next task in my file and it will save
and run it this will add the Yama file at the root of my folder so while this
is building let's think about the next step in the previous video I was showing
you how to deploy and I was using Azure CLI command to create the website of
course in a real DevOps process we don't use manual steps the best
practice will be to use arm template so let's add a arm template to our code so
we'll go back in Visual Studio code and since I had a new file in my repository
I will pull the glass news to get latest and greatest and now I have my eyes or
pipeline perfect now we'll add a new a sure deploy JSON file while I'm there I
will also add a new parameter file I won't use it for this demo but it's
always a very good practice to have it so I will show you how to add excellent
since I won't use a parameter file for this demo we'll keep it for another one
well we'll just add like an empty parameter file now for the arm template
we need to create one so we know that to deploy a website we need two things we
need of course the website and a plan service plan so always so let's create
our template containing those two things so first we'll create will create an arm
template and now in the resources I will add another one so on and then plan yep
plan just like that I will call it Frank demo plan excellent and you know what
I'll keep that in my clipboard and add another one so now I need to create a
arm web app just like this and because I'm not using suffix I will just create
a frank demo and add something at the end so I'm sure it's unique so a best
practices will be to use a suffix here but since I want to do it quick I'm just
using 42:42 in the next video we'll show you how to include all those things as
you're deploying so and for the service plan I use
frankly mo plan perfect now we save it and we push it great
now it's time to implement our release pipeline so as we can see here the build
was successful that's excellent and now we'll create a new release so go and
release and we'll create a new pipeline perfect I'm deploying app service
deployment we'll use that as a template and just like last time I will put to
Azure but you put something that is meaningful for you excellent so we'll
use the build because I won't the package that just got build bike Frank
demo and I will use my Frank demo I won't the last version and I will call
this drops and I want that to be trigger every time we commit we have our drops
or whatever built but we don't have access yet to or template or I'm
template so I want to create another artifact that will point to my github
repository to do that we need to click on the plus here and we had a new
artifact so instead of using the build I will use github
now I need to click which one I want to use it was F Bouchet the one I declare
at the beginning and I need to use the repository so here it lists all the
repository and I just need to scroll they are in alphabetic order I just need
to scroll until I have Frank demo just there I will be using master and
everything and I'll change here the name of the source a yes to get up drops so
now I have two artifacts so we'll go here and define our things so now of
course I need to specify the azure subscription nothing new here and then I
will need to authorize it and now I need to specify the app name so a smart way
here will be to use variables or use the template but for now I'm just our coding
everything but right now we are deploying but we should
create our resources so to do this we need to add another step another task so
we'll click here on the plus and if you search for resource you should found the
azure resource group deployment that's what we want so we'll make sure this one
is first because we need to deploy the arm template and then deploy the code
inside of it perfect so now I need to define my arm template and this is the
new thing so the subscription I still need to specify the subscription right
so we'll just pick the same as the other one so now the action I want to create
or update the resource group let's call it cloud 5-minutes location whoops I'm
typing too fast today cloud five minutes and I will use the location east US this
is a resource group that will be used in my deployment so now it's the part where
I use I define my template so I will use the link artifact and because I created
an artifact previously I could go here and see I have now my github drops so I
could expand this and use my adder deployed that JSON file just here this
so I use that click OK and now my deployment will use that file as a
reference the same thing for a parameter file for us it's not it's empty but
still just want to show you that how to do it so here in the parameter so
because here I'm doing a simple demo I'm not doing any validation but it will be
a good practice to add another step just before this one to just do a validation
so here I could deploy mode and say validation only and that will validate
my arm template with my parameter file this way if for example the name already
exists or if I have some typo in the JSON file
my deployment will fail at that level it will be much faster and then I could fix
it and redeploy for now I will use only a current incremental so I have
everything I need I think yes I can save and now it's time to create a release
create a release to Azure really Swan was created let's go there and deploy it
perfect of course and there the usual way will be to have a new
build that will trigger my release but since you know the build was already
done that's why we're doing it manually so I'll get back to you just after there
it is already finished so let's go in our portal as your portal and see if I
have a new resource group yes I have of course now we'll go open it whoever
Frank demo 4242 website created and now we go on the website and it's working if
I go or forgot the about yeah your application was in github and voila it
works whatever your code is in github as your
dev ops or another repository it's very easy to use it with the azure the pups
pipelines I hope you like this video and I hope it was useful every second week I
publish short video to insert technical question so if you have a question just
ask it in the comment section you don't miss any of the other videos subscribe
and click the bell icon thank you for watching see you next time
under if they notice my new t-shirt