Successfully reported this slideshow.
Your SlideShare is downloading. ×

Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anything to Anywhere with Azure DevOps

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
Introduction to CI/CD
Introduction to CI/CD
Loading in …3
×

Check these out next

1 of 88 Ad

Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anything to Anywhere with Azure DevOps

Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anything to Anywhere with Azure DevOps
Janusz Nowak
@jnowwwak
https://www.linkedin.com/in/janono
https://github.com/janusznowak
https://blog.janono.pl

Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anything to Anywhere with Azure DevOps
Janusz Nowak
@jnowwwak
https://www.linkedin.com/in/janono
https://github.com/janusznowak
https://blog.janono.pl

Advertisement
Advertisement

More Related Content

Slideshows for you (20)

Similar to Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anything to Anywhere with Azure DevOps (20)

Advertisement

Recently uploaded (20)

Continues Integration and Continuous Delivery with Azure DevOps - Deploy Anything to Anywhere with Azure DevOps

  1. 1. Continues Integration and Continuous Delivery with Azure DevOps Ci, Cd, Why ? Deploy Anything to Anywhere with Azure DevOps Janusz Nowak @jnowwwak https://www.linkedin.com/in/janono https://github.com/janusznowak https://blog.janono.pl
  2. 2. About me - Janusz Nowak • I graduated 2008 • Father of • Over 14 years of professional experience as software developer about 9 year also with TFS/VSTS/Azure Dev Ops and over 3 years with Azure • Working now for as DevOps It Manager • Passionate about ALM, Cloud, Server less, Infrastructure as Code
  3. 3. What is Continues Integration ? “Continuous integration (CI) is the practice, in software engineering, of merging all developer working copies to a shared mainline several times a Day” Grady Booch (1991) https://en.wikipedia.org/wiki/Continuous_integration
  4. 4. What is CD ? Continuous deployment (CD) is a software engineering approach in which software functionalities are delivered frequently through automated deployments.CD contrasts with continuous delivery, a similar approach in which software functionalities are also frequently delivered and deemed to be potentially capable of being deployed but are actually not deployed.
  5. 5. What is DevOps? “DevOps is the union of people, process, and products to enable continuous delivery of value to our end users.” Donovan Brown
  6. 6. Waste – DevOps – Agile - Value It means anything that does not add value to the customer. According to Lean Software Development: An Agile Toolkit, “A part that is sitting around waiting to be used is waste. Making something that is not immediately needed is waste. Motion is waste. Transportation is waste. Waiting is waste. Any extra processing steps are waste. And of course defects are waste.” Think about that for a moment and think about all the activities your organization does on a daily basis.
  7. 7. Lean software development / management / manufacturing • Lean software development is a translation of lean manufacturing principles and practices to the software development domain. Adapted from the Toyota Production System The Seven Waste of Manufacturing The Seven Wastes of Software Development Inventory Partially Done Work Extra Processes Extra Processes Overproduction Extra Features Transportation Task Switiching Waiting Waiting Motion Motion Defects Defects
  8. 8. Understand your Cycle Time
  9. 9. How to get there - Azure DevOps Deliver value to your users faster using proven agile tools to plan, track, and discuss work across your teams. Build, test, and deploy with CI/CD that works with any language, platform, and cloud. Connect to GitHub or any other Git provider and deploy continuously. Get unlimited, cloud-hosted private Git repos and collaborate to build better code with pull requests and advanced file management. Test and ship with confidence using manual and exploratory testing tools. Create, host, and share packages with your team, and add artifacts to your CI/CD pipelines with a single click. Azure Boards Azure ReposAzure Pipelines Azure Test Plans Azure Artifacts
  10. 10. 2016 .NET Core 1.0 PowerShell Core Windows Subsystem for Linux in Windows 10 Microsoft joins Linux foundation GitHub recognizes Microsoft as a top open source contributor 2017 Team Foundation Server 2017 Team Foundation Server 2018 Microsoft Azure Kubernetes Service launched Draft, Brigade, Kashti projects submitted to Kubernetes community Microsoft joins Cloud Native Computing & Cloud Foundry Foundations SQL 2017 on Linux Windows source code moved to Git Azure Databricks (Apache Spark) announced 2005 Azure DevOps History Azure History Microsoft Open Source 2019 Microsoft Azure
  11. 11. Track work with Kanban boards, backlogs, team dashboards, and custom reporting Azure Boards Connected from idea to release Track all your ideas at every development stage and keep your team aligned with all code changes linked directly to work items. Scrum Ready Use built-in scrum boards and planning tools to help your teams run sprints, stand-ups, and planning meetings. Built for insights Gain new insights into the health and status of your project with powerful analytics tools and dashboard widgets.
  12. 12. Work Items - list
  13. 13. Fields State Areas Iterations Links History Discussion Work Items – details
  14. 14. Live update Fields display Styling Rules Tag color Columns Swim lanes Board
  15. 15. Priority Sprints Levels Forecasting Work Items - backlog
  16. 16. Sprints – task board
  17. 17. Analytics
  18. 18. Queries
  19. 19. Queries
  20. 20. Get unlimited private Git repository hosting and support for TFVC that scales from a hobby project to the world’s largest repository. Azure Repos Support for any Git client Securely connect with and push code into your Git repos from any IDE, editor, or Git client. Web hooks and API integration Add validations and extensions from the marketplace or build your own using web hooks and REST APIs. Semantic code search Quickly find what you’re looking for with code-aware search that understands classes and variables.
  21. 21. History
  22. 22. Branch policies
  23. 23. Pull requests - crate
  24. 24. Pull requests and branch policy
  25. 25. Git Flow - A successful Git branching model
  26. 26. Get cloud-hosted pipelines for Linux, macOS, and Windows. Build web, desktop and mobile applications. Deploy to any cloud or on-premises. Azure Pipelines Any language, any platform Build, test, and deploy Node.js, Python, Java, PHP, Ruby, C/C++, .NET, Android, and iOS apps. Run in parallel on Linux, macOS, and Windows. Extensible Explore and implement a wide range of community-built build, test, and deployment tasks, along with hundreds of extensions from Slack to SonarCloud. Best-in-class for open source Ensure fast continuous integration/continuous delivery (CI/CD) pipelines for every open source project. Get 10 free parallel jobs with unlimited build minutes for all open source projects. Containers and Kubernetes Easily build and push images to container registries like Docker Hub and Azure Container Registry. Deploy containers to individual hosts or Kubernetes. Implement continuous delivery (CD) of your software to any cloud, including Azure, AWS, and GCP. Visualize deployment to any number of interdependent stages. Take advantage of easy build chaining and multi-phased builds. Support for YAML, test integration, release gates, reporting— and more. Advanced workflows and features Deploy to any cloud
  27. 27. Create build definition - Select the Build Source
  28. 28. Select the Build Template
  29. 29. Configure the Build Tasks
  30. 30. Select the Build Agent
  31. 31. Build definition history
  32. 32. Build Retention
  33. 33. Build Triggers
  34. 34. Pipelines Variables
  35. 35. Variable Groups Key Vault Integration
  36. 36. Run Build
  37. 37. Unit Tests
  38. 38. Pipelines Analytic
  39. 39. Yaml
  40. 40. Much faster then on premise Easy adopt Pay as You Go Real Staging Infostructure as code Any cloud Containers Cloud as Opener
  41. 41. Where we stooped ? Deploy…
  42. 42. Arm, Azure Cli, Azure PowerShell, Terraform
  43. 43. Release pipeline - Stages
  44. 44. Release pipeline
  45. 45. Release pipeline- Artifact download
  46. 46. Release pipeline
  47. 47. Release pipeline – Artefacts
  48. 48. Release pipeline - Post-deployment conditions
  49. 49. Release pipeline - Post-deployment conditions
  50. 50. Release pipeline - Post-deployment conditions
  51. 51. Release pipeline - Post-deployment conditions
  52. 52. Release pipeline - Post-deployment conditions
  53. 53. Release pipeline History
  54. 54. Build and release agents • Microsoft-hosted agents • Ubuntu 16.04 (ubuntu-16.04) • Visual Studio 2017 on Windows Server 2016 (vs2017-win2016) • Xcode 9 on macOS 10.13 (xcode9-macos10.13) • Windows Server 1803 (win1803) - for running Windows containers • Visual Studio 2015 on Windows Server 2012R2 (vs2015-win2012r2) • Self-hosted agents • Linux agents • macOS agents • Windows agents • Capabilities
  55. 55. Agents pools
  56. 56. Parallel jobs
  57. 57. Marketplace
  58. 58. Azure DevOps release by Azure DevOps
  59. 59. Improve your code quality using planned and exploratory testing services for your apps. Azure Test Plans Capture rich data Capture rich scenario data as you execute tests to make discovered defects actionable. Test across web and desktop Test your application by executing tests across desktop or web apps. Get end-to-end traceability Take advantage of end-to-end traceability and quality for your stories and features.
  60. 60. Unit Tests Integration Tests UI Tests Manual and Automated Manual QA Testing Smoke tests Performance Tests Cloud load tests Multiple technology and languages Test – what kind of test there are
  61. 61. Azure Test Plans – Crete test cases
  62. 62. Crete test cases from requirement - board
  63. 63. Crete test case in Test suite in current iteration Crete test cases from requirement - board
  64. 64. Crete test cases steps
  65. 65. Crete test cases from requirement
  66. 66. Crete test suite from requirement
  67. 67. Crete test cases
  68. 68. Crete test cases – grid
  69. 69. Crete test parameters
  70. 70. Run Tests
  71. 71. Run Tests
  72. 72. Run Tests
  73. 73. Run Tests
  74. 74. Run Tests – crate bug
  75. 75. Run Tests – crate bug
  76. 76. Run Tests – results
  77. 77. Create and share Maven, npm, NuGet, and Python package feeds from public and private sources Azure Artifacts Easily share code across small teams and large enterprises. Add packages to any pipeline Get universal artifact management for Maven, npm, NuGet, Python and Gradle. Share code efficiently Share packages, and use built-in CI/CD, versioning, and testing. Manage all package types Preview - Package caching Preview – Public Packages Can be used as Symbol server
  78. 78. Azure Artifacts
  79. 79. Azure Artifacts – create feed
  80. 80. Azure Artifacts – connect to feed
  81. 81. Azure Artifacts
  82. 82. Azure Artifacts
  83. 83. Summary • One to run them All • Full traceability out of the box • Hosted SaaS solution • Always up to date • No maintenance of own build machines • Hosted in various regions world wide • Option to self host • Build, deploy anything anywhere • Free for open Source
  84. 84. What is DevOps? “DevOps is the union of people, process, and products to enable continuous delivery of value to our end users.” Donovan Brown
  85. 85. Demo
  86. 86. Continues Integration and Continuous Delivery with Azure DevOps Ci, Cd, Why ? Deploy Anything to Anywhere with Azure DevOps Janusz Nowak @jnowwwak https://www.linkedin.com/in/janono https://github.com/janusznowak https://blog.janono.pl Thank you

Editor's Notes

  • Few words about me
  • So set start with, what is Continuous integration
    First time use of meaning “Continuous integration” in 1991 year
  • So let talk what is CD now.
  • What is DevOps.

    Quota

    Ci, CD and DevOps are path of Agile approach.
  • So what is Waste
    And this is connected to ->
  • Lean software development / management / manufacturing

    And we have translation of seven waste from Manufacturing to Software Development

    Partially done work
    Have you ever written a feature that didn’t have fully fleshed out requirements because of a lack of grooming? Have you ever written code and found that the feature clearly needs more work but by definition you’ve completed the feature? If so, these are a perfect examples of partially done work. They require us to go back and ask the Product Owner to go back to the stakeholders and rethink what they asked for. It introduces testing challenges such as incomplete unit tests. It’s also difficult to measure the impact of the feature if we have to repeatedly go back and ask for more details.
    Extra Processes
    Do you have to get management approval before creating a new feature? Do you have to get a sign-off before a new release? Does your cyber team have to review the code before it is released? Do you have to document unnecessarily? Some of these questions may seem like they are absolutely necessary. For example, we need to have our code reviewed for security vulnerabilities, right? Of course, but do we need to have another team do this? Could we not have the cyber team teach developers how to write secure code so that they don’t have to wait? Couldn’t we automate this process with some tool as part of our build process? Oh yeah!
    Extra Features
    Ever agreed to work on something from the backlog and had the creative juices start flowing and find that before you know it you’ve added extra features that weren’t originally called for? I certainly have. It’s part of the creative act of software development. Even though it is fun it can also lead to waste because it isn’t what the customer asked for. It leads to extra testing, extra builds, extra releases and potentially extra bugs and defects. Gold plating is a form of waste and no matter how tempting it is we should avoid it.
    Task Switching
    Ever been working on something to be only be interrupted with another request? Yep, happens all the time in most organizations? Often IT professionals are asked to work on not just two projects but in some cases as many as a dozen. This is a waste. Every time a manager or project manager comes asks someone to stop what they’re doing and turn their attention to a higher priority item it requires a context switch. That context switch makes the person stop what they were working on and begin working on something else. We can control this in agile planning by setting our Work in Progress. See here. We can also self-organize our teams as I’ve shown here.
    Waiting
    Have you ever waited on another team to complete their part of something you needed? I would expect so. This is another form of waste and something we want to eliminate. We also want to deliver value faster by automating. If it takes an entire day to release a new version of the app we’re developing before we start working on something new then that is waiting time. We can solve this via automation in multiple ways.
    Motion – Ruch zbędny
    Ever had a question but it requires that you gather people from across the organization? If so, this creates waste in that you have to have everyone move to a meeting room, participate in a meeting, and then eventually return to their workplace. What if we invited the wrong person which leads us astray?
    Another form of motion is around things like artifacts such as requirements. For example, if we have a requirement that changes a lot during the sprint then it requires a lot of potential re-work and confusion. This is unnecessary motion.
    Defects
    Defects in software or operations are the same as they are in manufacturing. It produces waste because we have to go back and fix the problem which prevents us from delivering new features. We can mitigate this by doing things like code reviews, automated code quality scans, following modern coding patterns, etc.
  • Corresponding to DORA with is DevOps Research and Assessment with was acquired now by google.
    DORA is creating free report named “State of DevOps Report” starring from 2014 year comparing over 31 thousands surveys. Comparing different values.
    And corresponding to report. Hight performer can do …
    46 faster.

    Remember that:
    DevOps is the union of people, process, and products to enable continuous delivery of value to our end users
    So if we can reduce cycle we can deliver value faster.
  • So if we are able to unstart the cycle and act on it meaning continuous improve, to fast fail, fast learn, fast deliver we are to deliver value to customer and be top performer.
  • Some funny twit
    So we can end presentation ?
    No
    We need to remember that “DevOps is the union of people, process, and products to enable continuous delivery of value to our end users”
    And Azure DevOps is just tool and process that allow to do go this direction.


  • How to achieve this, by Azure DevOps
  • Lets first see history of Azure DevOps in time and see some related events in time. To have better context where we are now.
    There is Git.
    There Is DevOps
    There Is Open Source
    There Is Cloud.
    There Are Containers.
    There is Kubernetes or AKS there is Service Fabric or Fabric Mesh.

  • We show history and now let talk about Azure Boards
  • We have work items list to see items that are projects.
  • We can create /edit word items. We can also extend it to additional staff. Bu out from the box we have items that also to plan work and collaborate on them. So we have process that alow to work in it.
  • We have also board view so in easy way we can see what is going on and bringing transparency to team.
    All this can be extra customize if needed.
  • We have also work item backlog so we can prioritize, plan work. When we also work for longer time is we can try to forecast when we can deliver something and on this take decision on what and when deliver or not.
  • Depending from kind or work we can use sprint approach or kanban board.
  • We have option trace what is going on and we have analytics about status of projects.
  • What more about work items there are queries with alow to query work items.
  • There is option to crate or work with work items in bulk mode using excel.
  • Set switch now to talk about Azure Repos.
  • History.
  • We have branch policy so we can secure quality of code and process.
    Check for comment.
  • We can create pull request. So it is easy to trace what is changing.
    We can assignee work item, if we did not that this in commit.
  • So we create PR and branch policy is forcing us. To follow process and rules .
  • When we talk about git and code repository we need to talk about branch strategy. One best switch is covering 99% cases if Git Flow.
    And when we are following it is making it so much easier corresponding to not having standard approach how to and what to do when.
    Crate feature branch, hot fix. Release branch etc.
  • Let now talk about Azure Pipelines. What they are brining to us.
    ….


    Remember that we can build anything.

  • We create build definition by selecting source of code with can be
    Azure Repository, GitHub, GitHub Enterprise Server, Subversion ,Bitbucket or other git repository it can be also TFS Version Control.
    We chose project, repository and default branch.
  • Next we are select template of build and this can be anything that can run on Windows, Linux, Mac OS.
    We can create our own templates and share them with make sense if we are repeating the same pastern.
    We can also crate this as YAML definition but later about that.
  • When we chose some template or use empty one we are adding and configure build task.
    We are adding them to specific agent job. We have possibility to use multiple build agents at the same time or use different agent phases like agent less pahse.
    We can run job for multiple configurations to parallel it.
  • Here we are hosing the Agents pool on with we what to run job.
  • There variable group allow to integrate with Key vault. So we can easy integrate and keep secrets, certificate in one place.
  • So we schedule build and we are getting a lot of information.
    Like who trigger it, all logs tests that was run, linked work items types.
    We can see also history of runed build to see how it behave in time.
  • When we have unit tests in any technology stack and they have wrapper to generate output in specific format we are able to upload it and see test result and metrics.
  • There is build in analytic to see all the metric and also extension to use powerbi and crate custom reports.
  • YAML, I sad I will get back to it right now there is option to crate build definitions in GUI with are really a json under hood. But we have option to crate it as YAML. Definition and version it together with source code. But it is still in progress and work in going on to add more capabilities with are missing now.
  • Before we go next let put some words about cloud to understand time where we are now.
  • So we put some words about cloud and now let continue.
    Where we stopped,
    And what next that all no.
    Now we want to deploy our application.
    So we will copy it to our servers but we need to get budget hire multiple administrators, order servers, get electricity internet and backup for it, get licenses…, install systems, update systems. Open other location….
    Backup policy….., use DSC OR PowerShell remoting to deploy it.


    What we wanted to do we wanted to do because I forgot.

    We wanted to deploy our application, and there is cloud, there is docker there is Infrastructure as code, there is docker.
  • So we care new git repository create project that is storing azure arm template with we also parametrize.
    We can use arm, azure cli, PowerShell, terraform but arm in best in that case that is described in way it will be later running under the hood, and it is independent. When comparing to others.
    So we describe what investiture we want and it will be setup this way, also there is way to validate it with out deploy.
    So we will create PaaS when we will have 2 azure function with are small web application connected to traffic manager witch is balancing traffic and also we will use application insight to monitor what is going on.
  • So we care release definition with can look like like this when we have multiple stages.
  • Each state looks very similar to build definition.
  • Each state looks very similar to build definition.
  • In Release pipeline we have also variable groups and key vault integration but we have also Scope to variable witch is connects to while release or to specific stage.
  • We have also artifacts for release definition with can be build definition, azure repository, GitHub, TFVC, Azure Artefacts, GitHub Release, Docker Hub, Jenkins.
    Also remember that inside each stage you can add task to for example download something from external source. Each artifacts cat trigger Release or we can setup time schedule.
    When we have multiple artefacts we can filtering for specific branch tag etc or use Gateawys.
  • Each stage can also have schedule. There is also pre deployment approval so specific person/group need to approve it.
  • Thee is artefact filter
  • Each state can have also Gats check to check external service of state and validate like azure policy, azure function, invoke rest api.
  • After Stage triggers when we orchestrate what stage is trigger after what stages
  • There are also post deployment for each stage.
  • Each release keep the history of used artefact so it easy to trace what when was release and what work items was assigned to it. So if can be used also to generate release notes.
  • Few word about build infrastructure.
  • There is Azure DevOps to is allowing to extend and crate custom extensions for Azure DevOps like GUI extension but also task build extensions.
  • Azure DevOps release by Azure DevOps
  • There are multiple types of tests the case is just to use them, smart.
  • We can crate test case from board from requirement
  • We can see that if is connected to User Story but this can by any other work item type
  • When we switch to test Plans

    We can see that test case “Welcome message ‘Name’” was create in Test Suite: 16:”
    And this test suit was create in as Test Plan (devOps_Team_Storeis_Iteration 1) with user current iteration and team name.
    So the level are
    Test Plans
    Test Suits
    Test Cases

    Crate test case is empty so let open it and add content.
  • So we can create suites for selected Requirements.
  • So no we created test suite from requirement and there is not test case
    , we have 3 option that we will add existing one, we will create new test case or we will crate test cases using grid.
  • So when we open grid view put the title and action or copy them from exel/csv we are able to build crate them.
    When we save tow new test cases will be crate and we can also see this on board of work item.
  • So we there is option to create parameters using @ and me test more usable passing multiple combinations, also there is option to create this as shared parameters so later on the set of parameters can be reused.
  • So we can select test cases or test plan containing test cases and we have few option to run.
    The is not also to use web browser testing, this is also used for desktop application testing. There can be more staff added like specific services working on stage servers to collect data from executing code that is running on server side.
    Usually how it is done, the test plan is prepared. And people are assigned to some test and they are doing test run. So by teas approach test that can not be automated or need to be run manual can be done by almost any one that will be introduced to this tool.
  • We have manual using web browser with is extension to Chrome or Fire Fox,
    Manual test using Test Runner
    Next one is Automated test using release stage with can we be can use build in test recording or we can use external one using like selenium and combine with attributes to integrate.
    Or can create fully programmatic test and decorate them to connect to test cases.
    https://docs.microsoft.com/en-us/azure/devops/test/run-automated-tests-from-test-hub?view=azure-devops

    2 Last one are the Manual testing using old Test Plans client that was create from visual studio 2010 up to 2017 version, then there was no much web experiencers for Test Plans in web browser.
    Few years ago there was whole tool called Lab Center to setup environment by vms etc.
  • We have chose option to run with option so then we have option to assignee it with specific build.
  • So we have selecte test to run and we are doing this step by step of test case.
    There are few option we can capture screen/windows when need or we can crate screen capture for each step or we can event record video.
    At the end we can create bug from current windows or we can go to specific test run history in create bug from there.
  • So we have a vide or action log with is html with all screen that we taken and current test step.
    What is import
  • All kind of test can be wrapped and linked to work items to genera metrics with late on can be used.
    We can integrate with this tests from multiple lkangugae to have reports.
  • Any Packages
    Share efficient
    Package Caching for pipeline for hosted agent in preview
    In preview also public packages to share outside organization
    In can be used as symbol server so we are able having option of released version possibility to debug code.
  • We can manage mange Package
    When we crate Package our self and share across organization or projects we can manga with version in official release or prerelease
    We are able to secure build and deploy process by having it in out feed and do not be able to build when like few years ago npm was down for fee days.
    We can trace of usage for external and internal packages.
    What is important that Azure artefact can be used as symbol server.
  • How to crate feed
  • How to connect to feed
  • To use feed we can modify build restore step that will crate temporary nuget.config file,
    We select feed that what to use and unselect nuget.org depending from out setup.
  • And when running build we can see that packaged are added to feed because we use upstream source option for feed.
  • So when we will return what is DevOps so Azure DevOps is process, product, tool that is allowing to do this.
  • Thank You

×