Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Advanced Serverless Architectures with Microsoft Azure

You're reading from   Advanced Serverless Architectures with Microsoft Azure Design complex serverless systems quickly with the scalability and benefits of Azure

Arrow left icon
Product type Paperback
Published in Feb 2019
Publisher Packt
ISBN-13 9781788479127
Length 278 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Daniel Bass Daniel Bass
Author Profile Icon Daniel Bass
Daniel Bass
Arrow right icon
View More author details
Toc

Chapter 6: Chaos Engineering


Activity 7: Chaos Experiment to Check the Resilience to Loss of a Function App

  1. Delete the OrdersApi function in the portal and observe the issue on the orders.html page by submitting orders. The errors will become visible in the developer tools of your browser:

    Figure 6.64: Failed request to order api

  2. Create a backup OrdersApi.

  3. Create a backup connection string on the orders.html file by using the JavaScript mentioned.

  4. Navigate to the builds page in Azure DevOps. Click on the build definition you already have, click on the ellipses, and click Clone:

    Figure 6.65: Build clone

  5. You will be taken to your new build pipeline. Click on Pipeline and change the Path to solution or packages.config field to point to the path of the OrdersApi function, Lesson6/Activity7/OrdersApi/*.csproj:

    Figure 6.66: Modify the build path to the solution

  6. Click Save & queue and Save and Queue again. Click the build number to view the build progress:

    Figure 6.67: Build process successful

  7. Open the Releases page. Click the ellipses next to the existing release and click Clone:

    Figure 6.68: Clone release

  8. You will be taken to your pipeline screen. Open the Production stage. Modify the –appName value in the template parameters field on the Azure Deployment task to advancedserverlessorderapi:

    Figure 6.69: -appName variable modified

  9. Right-click on the Azure deployment task and clone it:

    Figure 6.70: Clone task

  10. Again, modify the –appName value in the template parameters field on the Azure Deployment cloned task to advancedserverlessorderapibackup:

    Figure 6.71: -appName template parameter

  11. Right-click on the Deploy Azure App Service task and click Remove Selected Tasks:

    Figure 6.72: Clone release

  12. Click the + button and search for "Azure App Service Deploy". Click Add:

    Figure 6.73: Azure App Service Deploy task

  13. Set the Azure subscription to advancedserverless, the App Service type to Function App on Windows, and the App Service name to advancedserverlessorderapi:

    Figure 6.74: Setting up App Service task

  14. Right-click the Azure App Service Deploy task and click Clone task(s):

    Figure 6.75: Clone tasks

  15. Modify the App Service Name on the cloned task to advancedserverlessorderapibackup:

    Figure 6.76: Backup App Service Name

  16. Click on Pipeline and click on the Add option next to Artifacts. Set the Source (build pipeline) to the cloned build pipeline:

    Figure 6.77: Add source pipeline

  17. Click Add. Select the other artifact and click Delete:

    Figure 6.78: Delete original build artifact

  18. Change the Source alias field to remove the -clone on the end. This ensures all the tasks are looking in the correct place for the code:

    Figure 6.79: Rename build artifact alias

  19. Click Save. Click Release, and then Create a Release:

    Figure 6.80: Create a release

  20. Click the Continuous Chaos stage to remove it from the automated release, as we haven't configured that stage. Select the latest build artifact. Click Create:

    Figure 6.81: Configure release

  21. Click the link to the release that will appear at the top left of the screen. Click Deploy on the production stage. Click Deploy again. The release will start:

    Figure 6.82: Release summary

  22. Now delete the advancedserverlessorderapi function app and visit the order.html page. Submit an order, and see it succeed:

    Figure 6.83: order.html page

lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime