In this demonstration we're now going to look at creating and deploying our web apps to Azure.
So we have our app service plan already created.
Now we want to go out and deploy web applications into it.
So let's start out first by deploying this from the portal.
OK.
So in the azure portal let's select create a resource and Let's type in a web and then select web app
from the dropdown and go ahead and click Create.
And this will take us to the web app creation screen.
So first thing we need to do is give it a name so clueless one skylines portal because we're going to
do another one from Visual Studio in a moment select our subscriptions or use pay as you go.
And I'm going to change the Resource Group it does create a new one for you when you create in a web
app.
But I want to just put everything together in my SL dash app services resource groups I can just delete
everything at the end and then I'm going to make this say Windows based one and then from my app service
plan I can choose to create a new one or I can simply select my existing one that I created in the previous
demos.
We'll go ahead and choose that one.
Finally do have an option to turn app insights on this as a monitoring techniques if we wanted to get
application insights similar to like New Relic and app dynamics tools like that you can turn this on.
At this point as well but we're not going to do that right now.
So we'll go ahead and click Create and that will begin deploying our web app and we'll just fast forward
here until that completes K and that deployment succeeded.
So we'll go to that resource
and we can see the skylines portal and if we select this you are all you will notice that they already
put in a dummy Web site for us to kind of prove that the service is up and running.
So we can see that that web app is deployed.
So that's one way to deploy it and we'll get into all the configuration settings a little bit later
on.
But what if we want to kind of do this from Visual Studio what have you got some code you actually want
to deploy.
So that's the other great thing if we go to visual studio and start off with a new projects or create
a brand new dot net application.
So new projects and we'll choose a web will choose a speed on that core web application.
Give us a name we'll just quote skylines web app and go ahead and select.
Okay that's gonna create a skeleton web app for us.
I'm going to select the default here I'm going to use the model view controller model the MVC model
and select okay.
That's a pretty typical model for a lot of different developers and then it goes ahead and creates everything
there.
If I want to just check this locally first of all I can go ahead and run that so debug and select start
without debugging.
So I'm not trying to do any kind of monitoring or anything at this point and that will open up this
application.
Let's just take a look at it locally first of all before we push it up Tiger so that we can see they've
also given us a sample web page.
So what we'll do is go ahead and click about and we're going to add some information to the screen such
as I use this area to provide additional information.
We'll go back into visual studio.
Let me close this out and go to the about section so if we're going to W WW route and look for might
be under our control as you know it's under our view and go to about and we can see that your title
is about the message actually comes from the controller but you can use this area to provide additional
information so we'll change this and we'll call this visual studio deploy
and we will go ahead and save that.
And now we can go ahead and publish that to as you now to do that simply scroll back up on the right
hand side right click your web app and choose publish select start and then we have the choice of creating
new or selecting an existing.
So if we select existing and go ahead and select publish you'll see we've got a subscription and our
resource group you if we expand this out we can see skylines portal there.
That's the one we deployed from the portal earlier on.
But you can't see we can deploy into this.
We can deploy into deployment slots if we create one as well.
We'll come back to that a little bit later on but council it's going and creating you.
So I said create new click publish and then ask me to create an app service.
But I can choose my existing app service plan so I can go and select the one I've already got.
So I can share both these web apps on the same plan but I can give it a different name so we'll call
it skylines Visual Studio and that's there that's going to work for us.
Pay as you go subscription and then our resource group will want to use the SL app services Resource
Group as well.
And then I'll go ahead and click Create
can.
That's currently now publish and that's created the web app on Azure.
And now it's publishing basically deploying directly into it to we'll fast forward again here.
Well that completes okay everything completed successfully.
And so now it's pulling up the Web site at Skyline the Visual Studio or as your Web sites dot net and
we can see that publish successfully and select the about page and we can see that Visual Studio deploy
is there.
And so that's it we'll jump back to the portal very quickly just to show you the app service plans if
I go back to home go back to app services on the left hand side and you can see we've got skylines portal
skylines Visual Studio and both of them we're using the same SL dash app service plan that we created
in the first demo.
And with that that concludes this demonstration and hope it gives you an idea of the different ways
you can create web apps either from the portal or from Visual Studio you can certainly do five command
line as well but these are very common ways to get things done.