Devops and continuous delivery - Кабринский Рдуард
<h1>Devops and continuous delivery</h1>
<p>[youtube]</p>
Devops and continuous delivery <a href="http://remmont.com">Breaking news today</a> Devops and continuous delivery
<h1>Devops and continuous delivery</h1>
<p>Embracing Continuous Delivery with Azure Pipelines <br /></p>
<h2>Overview</h2>
<p>In this lab, you will learn about the release management features available in Azure Pipelines that automate the deployment of applications. These features help development and operations teams integrate with Azure DevOps Server to configure and automate complex deployments of their automated builds to target stages more easily. Development teams can also model their release processes and track approvals, sign-offs, and visualize their release status.</p>
<h3>Prerequisites</h3>
<p>Complete task 1 from the prerequisite instructions.</p>
<h2>Exercise 1: Embracing Continuous Delivery with Azure DevOps</h2>
<h3>Task 1: Setting up Azure resources</h3>
<p>Start off by creating the Azure resources needed for this lab. This includes a database and two app services: one for QA and one for production. Log into your account at
https://portal.azure.com.
<p>Click <strong>Create a resource</strong> and search for <strong>?sql?</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/000.png" /></p>
<p>Select <strong>SQL Database</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/001.png" /></p>
<p>Click <strong>Create</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/002.png" /></p>
<p>Under <strong>Resource group</strong>, click <strong>Create new</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/003.png" /></p>
<p>Enter a <strong>Name</strong> of <strong>?partsunlimited?</strong> and click <strong>OK</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/004.png" /></p>
<p>Enter a <strong>Database name</strong> of <strong>?partsunlimited?</strong> and click <strong>Create new</strong> to create a new server.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/005.png" /></p>
<p>Enter a unique name for <strong>Server name</strong>, such as by including your name. Enter an admin username and password you can remember. Note that <strong>?P2ssw0rd?</strong> meets the password requirements. Click <strong>OK</strong> to confirm these options.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/007.png" /></p>
<p>Click <strong>Review + create</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/008.png" /></p>
<p>Click <strong>Create</strong>. It?ll take some time to complete, but you can move on to the next step while it works in the background.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/009.png" /></p>
<p>Click <strong>Create a resource</strong> and search for <strong>?web?</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/010.png" /></p>
<p>Select the <strong>Web App</strong> template.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/011.png" /></p>
<p>Click <strong>Create</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/012.png" /></p>
<p>Under <strong>Project Details</strong>, select the same <strong>Subscription</strong> and <strong>Resource Group</strong> used for the database.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/013.png" /></p>
<p>For <strong>Name</strong>, enter a unique name, such as by using your name as part. Since this will be for our QA deployment, append the name with <strong>?-qa?</strong>. Select the <strong>ASP.NET 4.8 Runtime stack</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/014.png" /></p>
<p>Click <strong>Review and create</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/015.png" /></p>
<p>Click <strong>Create</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/016.png" /></p>
<p>Repeat the process above to create a second app service for the production stage. This time, append the <strong>Name</strong> with <strong>?-prod?</strong> instead.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/017.png" /></p>
<p>While the Azure resources are created, go ahead and configure the SQL server.</p>
<p>Click the <strong>Resource groups</strong> tab from the left menu. Locate and click the <strong>partsunlimited</strong> group.</p>
<p>Click the SQL server resource created earlier.</p>
<p>Select the <strong>Firewalls and virtual networks</strong> tab from the <strong>Security</strong> section.</p>
<p>Set <strong>?Allow Azure services and resources to access this server?</strong> to <strong>Yes</strong> to allow the App Services to access this SQL server.</p>
<p>Click <strong>Save</strong> on the top of the tab.</p>
<p>Continue on to the next task. Leave this browser tab open for later.</p>
<h3>Task 2: Creating a continuous release to the QA stage</h3>
<p>Navigate to your team project on Azure DevOps in a new browser tab. It should be at
https://dev.azure.com/YOURACCOUNT/Parts%20Unlimited.
<p>Navigate to <strong>Pipelines | Releases</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/018.png" /></p>
<p><strong>Delete</strong> the existing <strong>PartsUnlimitedE2E</strong> release pipeline. We?ll start fresh here.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/019.png" /></p>
<p>Click <strong>New pipeline</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/020.png" /></p>
<p>There are many starting templates to choose from, or you can even begin with an empty process template. In this case, select the <strong>Azure App Service Deployment</strong> and click <strong>Apply</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/021.png" /></p>
<p>Rename the default stage to <strong>?QA?</strong>. This template will deploy to QA, and then to a production stage. We?ll set up this one first.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/022.png" /></p>
<p>Rename the release pipeline to <strong>?PUL-CICD?</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/023.png" /></p>
<p>The first thing to define is exactly what should be deployed. Click <strong>Add</strong> in the <strong>Artifacts</strong> section to specify the artifact to deploy.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/024.png" /></p>
<p>There are many types of artifacts, but this one will be pretty simple: a project built from the <strong>PartsUnlimitedE2E</strong> build pipeline that already exists in this team project. Click <strong>Add</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/025.png" /></p>
<p>Now that the artifact has been defined, it?s time to configure the deployment to QA. Click <strong>1 job, 1 task</strong> in the <strong>QA</strong> stage.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/026.png" /></p>
<p>Select the <strong>Azure subscription</strong> you used earlier to create the resources and click <strong>Authorize</strong>. If you need to create a connection to an Azure account associated with a different Microsoft account, click <strong>New</strong> and follow that workflow before continuing.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/027.png" /></p>
<p>Follow the workflow to authorize access to your Azure account.</p>
<p>Enter the <strong>App service name</strong> used earlier when creating the QA app service.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/028.png" /></p>
<p>Return to the <strong>Pipeline</strong> tab.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/029.png" /></p>
<p>Click the <strong>Triggers</strong> button to define what triggers will invoke this deployment.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/030.png" /></p>
<p><strong>Enable</strong> the <strong>Continuous deployment trigger</strong>. Add a <strong>Build branch filter</strong> that points at the <strong>The build pipeline?s default branch</strong>. This will kick off the deployment when the build completes.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/031.png" /></p>
<p><strong>Save</strong> the release pipeline.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/032.png" /></p>
<h3>Task 3: Configuring the Azure app services</h3>
<p>Return to the browser tab open to the Azure portal.</p>
<p>Click the <strong>Resource groups</strong> tab from the left menu. Locate and click the <strong>partsunlimited</strong> group created earlier.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/033.png" /></p>
<p>Click your SQL database (something like <strong>pul-johndoe/partsunlimited</strong>). Make sure you click the database you created and not the server. Note that it may take a few minutes for the database and server to become available, so click the <strong>Refresh</strong> button every once in a while to check in.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/034.png" /></p>
<p>In the new blade, click <strong>Show database connection strings</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/035.png" /></p>
<p>This will provide you with a list of connection strings based on platform. Copy the <strong>ADO.NET</strong> string to your clipboard so you can configure your new web site to use it. Close this blade.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/036.png" /></p>
<p>Open a new instance of <strong>Notepad</strong> and paste the connection string into it. This will make it easier to edit and retrieve later on in case anything happens to the clipboard copy.</p>
<p>Use the breadcrumb navigation to return to the <strong>partsunlimited</strong> resource group.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/037.png" /></p>
<p>Click the <strong>QA</strong> app service created earlier.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/038.png" /></p>
<p>Select the <strong>Configuration</strong> tab from the <strong>Settings</strong> section.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/039.png" /></p>
<p>On this blade you can configure settings for your app, such as connection strings. Click <strong>New connection string</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/040.png" /></p>
<p>Locate the <strong>Connection strings</strong> section and add a new entry with the key <strong>?DefaultConnectionString?</strong> and the value pasted from the clipboard. You?ll need to locate the ?<your_username>? and ?<your_password>? sections and replace them (including braces) with the actual SQL credentials entered earlier. Be sure the <strong>Type</strong> is set to <strong>SQLAzure</strong> and click <strong>OK</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/041.png" /></p>
<p>Click <strong>Save</strong> to commit.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/042.png" /></p>
<p>Repeat the process above to add the same connection string to the production app service.</p>
<h3>Task 4: Invoking a continuous delivery release to QA</h3>
<p>Return to the browser tab open to your Azure DevOps project.</p>
<p>Now that the release pipeline is in place, it?s time to commit a change in order to invoke a build and release. You?ll need to make a few changes like this over the course of this lab, so it?s recommended that you use a separate tab for <strong>Code | Files</strong> to keep that part of the process separate.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/043.png" /></p>
<p>Navigate to <strong>PartsUnlimited-aspnet45/src/PartsUnlimitedWebsite/Views/Shared/_Layout.cshtml</strong>. This is a file that defines the general layout of the site and is a good place to make a change that will be easily visible after deployment.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/044.png" /></p>
<p>Click <strong>Edit</strong> to edit the file inline.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/045.png" /></p>
<p>Locate the <strong>Parts Unlimited Logo</strong> and add the text <strong>?v2.0?</strong> after it. This will be an easy thing to check for after deployment.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/046.png" /></p>
<p><strong>Commit</strong> the changes back to the repo. This will kick off a build based on the preconfigured build pipeline.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/047.png" /></p>
<p>Navigate to the <strong>Pipelines</strong> hub.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/048.png" /></p>
<p>Open the most recent build for <strong>PartsUnlimitedE2E</strong>. It may be queued, in progress, or already completed.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/049.png" /></p>
<p>Follow the build until completion.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/050.png" /></p>
<p>Click the <strong>Releases</strong> tab to see the new release get going.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/051.png" /></p>
<p>Click the release. As with the build, it may be queued, in progress, or already completed when you get here.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/052.png" /></p>
<p>Follow the release until it succeeds.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/053.png" /></p>
<p>You can now close this tab if you prefer.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/054.png" /></p>
<p>In a new browser tab, navigate to the QA site. It will be the name of your app service plus <strong>?.azurewebsites.net?</strong>. It should show the <strong>v2.0</strong> added earlier.</p>
<p style="clear: both">### <img style="float: left; margin: 0 10px 5px 0;" src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/055.png" />###</p>
<h3>Task 5: Creating a gated release to the production stage</h3>
<p>Return to the Azure DevOps browser tab.</p>
<p>As release pipelines get more sophisticated, it becomes important to define gates to ensure quality throughout the release pipeline. Since the next stage we?re deploying to is production, we?ll need to be sure to include both automated quality gates as well as a manual approver gate. Return to the release pipeline browser tab and click <strong>Clone</strong> in the <strong>QA</strong> stage. Since the production stage is virtually the same, we can reuse almost all of the existing configuration.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/056.png" /></p>
<p>The new stage is added after the current one, which is what we want. However, before we can consider the QA deployment successful, we?ll need to define a post-deployment condition. Click the <strong>Post-deployment conditions</strong> button on the <strong>QA</strong> stage.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/057.png" /></p>
<p><strong>Enable</strong> the <strong>Gates</strong> option.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/058.png" /></p>
<p>There are several kinds of gates available that can automatically test virtually anything you need to make sure a deployment is in good shape. These could be the return values of Azure functions or REST APIs, queries to Azure for alerts, or work item queries in Azure DevOps. You can also configure how long the platform should delay before evaluating the gates for the first time. In this case, change that to <strong>0</strong> so it will test them immediately after deployment. Then click <strong>Add</strong> | <strong>Query Work Items</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/059.png" /></p>
<p>Select the <strong>Query</strong> for <strong>Shared Queries | Critical Bugs</strong>. We will make it our policy that the QA deployment cannot be considered a success until all critical bugs have been resolved.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/060.png" /></p>
<p>Expand <strong>Evaluation options</strong> and update the <strong>Time between re-evaluation of gates</strong> to <strong>5</strong>. If this gate fails, we want it to reevaluate the query every 5 minutes until it clears because engineers will need some time to confirm those critical bugs are fixed in the current version. However, if those bugs aren?t cleared and the release isn?t manually failed, this configuration will automatically fail the gate after 1 day.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/061.png" /></p>
<p>For the Query Gate to work, Project Build Service would require Read permission to queries. Go to <strong>Azure Boards > Queries > All > Shared Queries > ??? > Security</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/permissions.png" /></p>
<p>Search for the <strong>?(YOUR PROJECT NAME) Build Service ?</strong>, if not included by default (not Project Collection Build Service!) and give it <strong>Read > Allow</strong> permission.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/permissions2.png" /></p>
<p>We can now turn our focus to the production stage. Select the <strong>Copy of QA</strong> stage.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/062.png" /></p>
<p>Rename it to <strong>?Prod?</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/063.png" /></p>
<p>Click its <strong>Pre-deployment conditions</strong> button.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/064.png" /></p>
<p><strong>Enable</strong> the <strong>Pre-deployment approvals</strong> and add yourself as an <strong>Approver</strong>. The idea here is that you won?t be asked to approve the production deployment until after the QA deployment has succeeded. At that point, someone on this list will need to approve the deployment to production. Also clear the box for <strong>User requesting a release of deployment should not approve</strong> if it?s checked. For the purposes of this lab, you can approve releases you have requested.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/065.png" /></p>
<p>Click the <strong>Prod</strong> stage?s <strong>1 job, 1 task</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/066.png" /></p>
<p>Update the <strong>App service name</strong> to reflect the ?<strong>-prod</strong>? (instead of <strong>?-qa?</strong>).</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/067.png" /></p>
<p><strong>Save</strong> the release pipeline.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/068.png" /></p>
<p>Repeat the process for changing the codebase at <strong>?PartsUnlimited-aspnet45/src/PartsUnlimitedWebsite/Views/Shared/_Layout.cshtml?</strong> followed earlier in a new tab. This time, update the version number from <strong>?2.0?</strong> to <strong>?3.0?</strong>. This will invoke the release pipeline.</p>
<p>As before, follow the release until it is deploying to QA. Click to follow the release itself once available.</p>
<p>Eventually there will be an issue with the QA deployment. While it deployed out successfully, one of the quality gates failed. This will need to be resolved for that stage to be approved. Click the <strong>View post-deployment gates</strong> button.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/069.png" /></p>
<p>It looks like the <strong>Query Work Items</strong> gate is failing. This means that there is a critical bug that must be cleared.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/070.png" /></p>
<p>Open a new tab to <strong>Boards | Queries</strong> to locate the bug.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/071.png" /></p>
<p>Use the query list on the <strong>All</strong> tab to open the <strong>Shared Queries | Critical Bugs</strong> query.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/072.png" /></p>
<p>Open the one bug by clicking it.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/073.png" /></p>
<p>Ordinarily you?d check the site to confirm the bug was fixed, but we?ll skip ahead here and mark it <strong>Done</strong>. Click <strong>Save</strong> and close the tab.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/074.png" /></p>
<p>Return to the release pipeline tab. Depending on timing, it may take up to five minutes for Azure DevOps to check the query again. Once it does, the bugs will be cleared and the release will be approved. You can then click <strong>Approve</strong> to approve deployment to production.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/075.png" /></p>
<p>Confirm the deployment.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/076.png" /></p>
<p>Click the <strong>In progress</strong> link to follow the release workflow.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/077.png" /></p>
<p>It may take a moment for the release to kick off and complete.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/078.png" /></p>
<p>Once the release has completed, open a new tab to the production app service URL. It should be the same as your QA URL, but with <strong>?-prod?</strong> instead of <strong>?-qa?</strong>. Note the <strong>v3.0</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/079.png" /></p>
<h3>Task 6: Working with deployment slots</h3>
<p>Return to the browser window open to the Azure portal.</p>
<p>Azure App Services offer <strong>deployment slots</strong>, which are parallel targets for application deployment. The most common scenario for using a deployment slot is to have a staging stage for your application to run against productions services, but without replacing the current production application. If the staging deployment passes review, it can immediately be ?swapped? in as the production slot with the click of a button. As an additional benefit, the swap can be quickly reversed in the event an issue is uncovered with the new build. Locate the resource group created earlier and click the <strong>prod</strong> app service.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/080.png" /></p>
<p>Select the <strong>Deployment slots</strong> tab. If you see a message indicating that your current pricing tier does not support slots, follow the workflow to upgrade this service to a <strong>Production</strong> tier or higher and then return here. You may need to refresh the browser for the <strong>Add Slot</strong> option to become enabled.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/081.png" /></p>
<p>Click <strong>Add Slot</strong>. Note that the <strong>production</strong> slot is considered a ?default? slot and is not shown as a separate slot in the user experience.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/082.png" /></p>
<p>Enter a <strong>Name</strong> of <strong>?staging?</strong> and select the <strong>Configuration Source</strong> that matched your existing deployment (there should be only one). Click <strong>Add</strong> to create the slot.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/083.png" /></p>
<p>Return to the Azure DevOps tab with the <strong>Prod</strong> stage pipeline editor.</p>
<p>Select the <strong>Deploy Azure App Service</strong> task.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/084.png" /></p>
<p>Check <strong>Deploy to Slot?</strong> and set the <strong>Resource group</strong> and <strong>Slot</strong> to those created earlier.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/085.png" /></p>
<p><strong>Save</strong> the release pipeline.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/086.png" /></p>
<p>Follow the workflow from earlier to commit a change to the codebase at <strong>?PartsUnlimited-aspnet45/src/PartsUnlimitedWebsite/Views/Shared/_Layout.cshtml?</strong> by updating the layout template from <strong>?3.0?</strong> to <strong>?4.0?</strong>.</p>
<p>Follow the release pipeline through deployment and approve the release to production when requested.</p>
<p>When the production deployment has completed, refresh that browser tab. Note that there shouldn?t be any change since the deployment was pushed to a different slot.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/087.png" /></p>
<p>Open a new tab to the <strong>staging</strong> slot. This will be the same as your production URL, but with <strong>?-staging?</strong> appended to the app service name within the domain. This should reflect the new <strong>v4.0</strong>.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/088.png" /></p>
<p>Return to the browser window open to the <strong>Azure portal</strong>. Click <strong>Swap</strong> in the deployment slots blade.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/089.png" /></p>
<p>The default options here are exactly what we want: to swap the production and staging slots. Click <strong>Swap</strong>. Note that if your apps rely on <strong>slot-level configuration settings</strong> (such as connection strings or app settings marked ?slot?), then the worker processes will be restarted. If you?re working under those circumstances and would like to warm up the app before the swap completes, you can select the <strong>Swap with preview</strong> swap type.</p>
<p style="clear: both"><img src="https://www.azuredevopslabs.com/labs/azuredevops/continuousdeployment/images/090.png" /></p>
<p>Return to the <strong>prod</strong> browser window (not the staging slot) and refresh. It will now be the 4.0 version.</p>
<h2>Devops and continuous delivery</h2>
<h3>Devops and continuous delivery</h3>
<p>[youtube]</p>
Devops and continuous delivery <a href="http://remmont.com">Today's news stories</a> Devops and continuous delivery
<h4>Devops and continuous delivery</h4>
Devops and continuous delivery Embracing Continuous Delivery with Azure Pipelines Overview In this lab, you will learn about the release management features available in Azure Pipelines
<h5>Devops and continuous delivery</h5>
Devops and continuous delivery <a href="http://remmont.com">Devops and continuous delivery</a> Devops and continuous delivery
SOURCE: <h6>Devops and continuous delivery</h6> <a href="https://dev-ops.engineer/">Devops and continuous delivery</a> Devops and continuous delivery
#tags#[replace: -,-Devops and continuous delivery] Devops and continuous delivery#tags#
https://ssylki.info/?who=remmont.com/all-cars-video-3 https://ssylki.info/?who=unemployment-i ... emmont.com https://ssylki.info/?who=cars-and-autom ... emmont.com https://ssylki.info/?who=remmont.com/st ... in-video-2 https://ssylki.info/?who=remmont.com/ctc-video