Engage in a detailed walkthrough when using OneDrive to deploy a prepackaged Web App into the Azure App Service portal.
- [Instructor] We have seen how to publish a web app from Visual Studio into Azure, now let's use another method. We're going to publish a web app from OneDrive. As you can see I have logged into One Drive and I'm currently in the apps folder. And this is really important. For this to work, your folder must be apps and it must be right off the files folder. After that, the directory structure is up to you. I'm going to go ahead and click into Azure web apps, and that folder happens to contain the Adatum website.
I'm going to be perfectly honest here, I am not a programmer. And I am using the Microsoft website demo for our demonstration purposes here today. As we can see, all the files are here for our website. Now let's go ahead, flip back into Azure, and take a look at how we set this up. We're back in Azure. And I'm in the resource group DeployFromOneDrive, very descriptive name, and I've already created an empty web app called AppFromOneDrive.
I'm going to go ahead and open up our AppFromOneDrive. And we have our URL here. Let's go ahead and launch that URL. And we can see this is just an empty web app. Let's go back into Azure. Now let's go ahead and configure OneDrive to publish a web app to Azure. To do so, you'll click under deployment options under deployment. And the first thing we need to do is configure our source.
Now, we're doing this with OneDrive, but that is not our only option here as you can see. We can use Visual Studio Team Services, a Local Git Repository, GitHub, Bitbucket, Dropbox, and even an external repository that you maintain. Again, for our purposes today, we're going to use OneDrive. But the steps will be similar for each of these. You may need to set up and provide your credentials for your OneDrive account. I have already done so previously, therefore I do not have to do it.
Again, your screen may look a little different. If that's the case, just enter in your email address for your windows account and your password. Next, you're going to go ahead and choose a folder. I actually don't have a folder called AppFromOneDrive. That name is being provided because Azure thinks that's what my website is going to be called. We're actually going to use the Microsoft pre-configured website, the Adatum website. I'm going to go ahead and select that.
And next, I can go ahead and configure performance tests if I wish to do so. For our demonstrations, I'm actually going to close this window. We don't need to run the performance test, but the option is there. Next, simply click okay. And we'll wait a few moments. It'll not take long for the website to be published to Azure. Let's click back and overview. And again, let's go ahead and launch that URL. And depending on the size of your website and the number of files, it could take a few minutes for all those files to be populated into Azure.
Ours is very simple. As you can see, we do have the A. Datum Corporation website up and running. Let's flip back into OneDrive and make a change to the website. I'm back in OneDrive. I'm going to go ahead and edit the index CSHTML, and then push that change into Azure and we can see what happens to our website. I know that file happens to be in views, and home... ...and again I'm looking for index CSHTML.
This happens to be our first page on our website. The nice thing is I can actually edit this within OneDrive itself. We're just going to change the A. Datum... ...to My Demo Corporation, nothing fancy. Click save. Now let's pop back into Azure. And we're going to go back into deployment options.
And I'm going to go ahead and sync this. We're now prompted are we sure, yes we are. We can see that our repository is being updated. We can see that our sync is complete. And let's go back to our website. And here I'm just going to refresh the website using F5. After a few moments, you notice that we went from A. Datum Corporation to My Demo Corporation. Quick and easy. And there you have it.
Now your dev team can easily publish to Azure using OneDrive.
- Deploying Web Apps
- Creating App Service plans
- Deploying and moving apps
- Configuring app settings
- Managing Web Apps using PowerShell and CLI
- Configuring alerts
- Enabling diagnostic logs
- Retrieving and streaming logs
- Configuring Web Apps for scale and resilience