title | description | services | documentationcenter | author | manager | editor | ms.assetid | ms.service | ms.workload | ms.tgt_pltfrm | ms.devlang | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Tutorial: DevOps with the Azure Portal | Microsoft Docs |
Learn the various DevOps workflows in the Azure Portal. |
azure-portal |
mlearned |
douge |
mlearned |
4f1c5bc1-c732-4d35-b5df-0fd68e547d38 |
multiple |
na |
na |
na |
hero-article |
06/05/2016 |
mlearned |
The Azure platform is full of flexible DevOps workflows. In this tutorial, you learn how to leverage the capabilities of the Azure Portal to develop, test, deploy, troubleshoot, monitor, and manage running applications. This tutorial focuses on the following:
- Creating a web app and enabling continuous deployment
- Develop and test an app
- Monitoring and Troubleshooting an app
- General application management tasks
Create a Web app with Azure App Service, which you’ll use in the rest of this tutorial. You’ll initially enable continuous deployment from your source code repository into our running Azure environment.
-
Sign into the Azure Portal
-
Choose App Services > Add icon and enter a name, choose your subscription, and create a new resource group to serve as the container for the service.
Resource groups allow you to manage various aspects of the solution such as billing, deployments and monitoring all as a single group via Azure Resource Manager.
-
After a few moments, your app service is created. Take a few minutes to explore the various menu options for the service in the portal.
-
Click the URL. Notice the variety of available choices for tools and repositories. You can also use the languages and frameworks of your choice including .NET, Java, and Ruby.
-
The Azure portal makes continuous deployment an easy process that involves only a few simple steps. In the Azure portal, choose settings from the icon for the app service you just created.
From the blade that opens on the right, scroll to the publishing section.
-
Next, configure some settings to enable continuous deployment for the app. Click Deployment Source and then click Choose Source. Notice the variety of options you have for repository sources.
-
For this example choose GitHub. Optionally choose the repository of your choice and setup the authorization credentials.
-
After authorization to your repository, you can then choose a project and branch you wish to deploy. There are several fictitious sample examples listed below.
-
Once you choose your project and branch, click ok. You should start to see notifications of a deployment.
-
Navigate back to GitHub to see the webhook that was created to integrate the source control repo with Azure. The Azure Portal enables integration with GitHub with only a few simple steps.
-
To demonstrate continuous deployment, you quickly add some content to the repository. For a simple example, add a sample text file to a GitHub repo. You are free to use .NET, Ruby, Python, or some other type of application with App Service. Feel free to add a text file, ASP.NET MVC, Java, or Ruby application to the repo of your choice.
-
After committing changes to your repository, you see a new deployment initiate in the portal notifications area. Click Sync if you do not quickly see changes after committing to your repository.
-
At this point, if you try and load the page for the app service, you may receive a 403 error. In this example, it is because there is no typical default document setup for the page such as a file like index.htm or default.html. You can quickly remedy this with the tooling in the Azure Portal. In the Azure Portal choose Settings > Application Settings.
-
A blade opens for application settings. Enter the name of the page “SamplePage.html” and click Save. Take a few minutes to explore the other settings.
-
Optionally refresh your browser URL to ensure you see the expected changes. In this case, there is some simple text now populating the page. Each additional change to the repository would result in a new automatic deployment.
Enabling continuous deployment with the Azure Portal is an easy experience. You can also build more complex release pipelines and use many other techniques with existing source control and continuous integration systems to deploy to Azure, such as leveraging automated build and release management systems.
Next, make some changes to the code base and rapidly deploy those changes. You will also setup up some performance testing for the Web app.
-
In the Azure Portal choose App Services from the navigation pane, and locate your App Service.
-
Click Tools
-
Notice the develop category under Tools. There are several useful tools here that allow us to work with apps without leaving the Azure Portal. Click on Console.
-
In the console window, you can issue live commands for your app. Type the dir command and hit enter. Note that commands requiring elevated privileges do not work.
-
Move back to the Develop category and choose Visual Studio Online. Note: Visual Studio Online is now named Visual Studio Team Services.
-
Toggle on the in-browser editing experience for your App.
-
A web extension installs for your app. Extensions quickly and easily add functionality to apps in Azure. Notice some of the other extension types available in the screenshot below.
-
Once the Visual Studio Online extension installs, click Go.
-
A browser tab opens where you see a development IDE directly in the browser. Notice the experience below is in Chrome.
-
You can perform several activities such as edit files, add files and folders, and download content from the live site. Make a quick edit to the SamplePage.html file.
-
In a few moments, the changes are automatically saved. If you navigate back to the page, you can see the changes. Keep in mind live edits like these are most likely not suitable for production environments. However, the tools make it very easy to make quick changes for dev and test environments.
-
Move back to the tools blade and under the Develop category, click on Performance Test.
-
You need to set a team services account. See here for more details: Create a Team Services Account
-
Click on New to create a performance test.
Configure the various values and click Run Test at the bottom of the dialogue to initiate a performance test.
-
Once the test starts running, you can monitor the state.
Once the test finishes, clicking on the result shows more details.
-
In this example, you created a small test run, so there is limited data to analyze, but you can see various metrics as well as rerun your test from this view. The Azure Portal makes creating, executing, and analyzing web performance tests an easy process. The screenshots below display the performance data.
Azure provides many capabilities for monitoring and troubleshooting running applications.
-
In the Azure Portal for our Web app choose Tools.
-
Under the Troubleshoot category, notice the various choices for using tools to troubleshoot potential issues with a running app. You can do things like monitor Live HTTP traffic, enable self-healing, view logs, and more.
-
Choose Site Metrics to quickly get a view of some HTTP codes.
-
Choose Diagnostics as a Service. Choose your application type, then choose Run.
A collection begins.
-
You may choose the appropriate log to diagnose potential issues. You need to enable logging to see all of the available data options such as HTTP Logs.
By clicking on the Memory Dump file you can download and analyze a DebugDiag analysis report to help find potential issues.
-
To view more data, you need to enable additional logging. In the Azure Portal, navigate to the Web app and choose Settings.
-
Scroll down to the features category, and choose Diagnostic logs.
-
Notice the various options for logging. Toggle on Web server logging and click save.
-
Move back to the tools area for the app and choose Diagnostics as a service and click Run to rerun the data collection.
-
With the HTTP logging setting enabled, you now see data collected for HTTP Logs.
-
By clicking the HTML file log, you produce a rich browser-based report for further investigation.
-
Move back to the tools section in the Azure Portal for the app. Scroll to the Tools section and choose Process Explorer.
-
By choosing Process Explorer, you can view details about running processes. Notice below you can drill into processes and even kill processes all from the Azure Portal.
-
Move back to the Settings blade on the left. Click New support request.
-
From the blade on the right, you can fill out details about the issues, enter contact information, and even upload diagnostic data. The Azure Portal enables working with Microsoft support a seamless experience.
The Azure Portal helps provide powerful and familiar tooling experiences to help monitor and troubleshoot our running applications. You are also able to take action quickly by performing tasks such as recycling processes, enabling and disabling various data collections, and even integrating with Microsoft professional support.
When managing applications, you often need to perform a broad variety of activities such as configuring backup strategies, implementing and managing identity providers, and configuring Role-based access control. As with the other DevOps experiences, the Azure platform integrates these tasks directly into the portal.
-
To ensure you are keeping the Web App safe from data loss you need to configure backups. Navigate to the Settings area for your Web app.
-
In the blade on the right, scroll down to the Features category.
-
Choose Backups; a blade opens on the right.
-
Click Configure, choose a storage account from the blade on the right.
-
Now create and choose a storage container to hold your backups. Click create at the bottom of the blade. Then select the container.
-
Once you have chosen the container, you can configure schedules, as well as setup backups for your databases. For this scenario, click the save icon.
-
After saving, scroll back to the blade on the left for Backups. Click Backup Now to back the application.
-
In a few moments, you see a backup created. Notice the Restore Now option on the screen-shot below.
-
Click on Restore Now and examine the options to the blade on the right. You can choose an appropriate backup and easily restore to an earlier state as necessary. The Azure portal has helped us easily enable a simple disaster recovery strategy for the app.
-
Move back to the Settings blade on the left, and under Features and choose Authentication/Authorization.
-
In the blade on the right choose App Service Authentication. Notice the variety of options you can configure with popular providers.
-
Choose the provider of your choice and notice the options for the scope. You can provide an App ID and App Secret and quickly enable Facebook authentication for the app. The Azure Portal enables authentication as a turnkey solution for apps.
-
Move back to the Settings blade and choose Users under the Resource Management category.
-
In the blade on the right examine the various options for adding roles and users. The Azure Portal lets you easily control RBAC (Role-based access control) for the application.
This tutorial demonstrated some of the power with the Azure platform by quickly enabling continuous deployment for a web app, performing various development and testing activities, monitoring and troubleshooting a live app, and finally managing key strategies such as disaster recovery, identity, and role-based access control. The Azure platform enables an integrated experience for these DevOps workflows, and you can work efficiently by staying in context for the task at hand.
- Azure Resource Manager is important for enabling DevOps on the Azure platform. To learn more visit Azure Resource Manager overview.
- To learn more about Azure App Service deployment visit Deploy your app to Azure App Service