├── InterviewQuestions └── README.md ├── Day9 ├── npm_install.sh └── README.md ├── Day16 └── README.md ├── Day15 └── README.md ├── Day14 └── README.md ├── Day12 └── README.md ├── Day5 └── README.md ├── Day7 └── README.md ├── Day3 └── README.md ├── Day6 └── README.md ├── Day13 └── README.md ├── Day4 └── README.md ├── Day1 └── README.md ├── Day10 └── README.md ├── Day8 └── README.md ├── Day2 └── README.md ├── README.md └── Day11 └── README.md /InterviewQuestions/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Day9/npm_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo apt-get update 3 | sudo apt-get install -y npm 4 | -------------------------------------------------------------------------------- /Day16/README.md: -------------------------------------------------------------------------------- 1 | # Day 16/16 Azure DevOps Zero to Hero: Troubleshooting & Solutions for Common Issues 2 | 3 | 1. No hosted parallelism has been purchased or granted 4 | 2. No Configuration Files Found Error: Terraform 5 | 3. Classic Editor (or) Release pipeline not visible in Azure DevOps 6 | 4. After Deployment, Deployment Succeded but did not load any data 7 | 5. Deployment Slots 8 | 9 | ## Hands-On 🗂️ - Day-16 (Azure DevOps Troubleshooting & Solutions for Common Issues — DevOps) ✅ 10 | 11 | 👉 https://ibrahims.medium.com/azure-devops-troubleshooting-solutions-for-common-issues-devops-6b51d0bbae58 👈 12 | 13 | Classic editir ibbus 14 | 15 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 16 | -------------------------------------------------------------------------------- /Day15/README.md: -------------------------------------------------------------------------------- 1 | # Day 15/16 Azure DevOps Security Best Practices | What are Azure DevOps Best Practices 2 | 3 | DevOps Security or DevSecOps is a set of practices, cultural approaches, and tools that bring together software development (Dev), IT operations (Ops), and security (Sec) to increase an organization's ability to deliver applications and services at high velocity, securely. 4 | 5 | Azure DevOps employs many security concepts to ensure only those users who should have access to features, functions, and data have access. 6 | 7 | ## Account types 8 | - Users 9 | - Organization owner 10 | - Service accounts 11 | - Service principals or managed identities 12 | - Job agents 13 | 14 | ## Authorization 15 | - Security group membership 16 | - Role-based access control 17 | - Access levels 18 | - Feature flags 19 | - Security namespaces & permissions 20 | 21 | ## Authentication 22 | - User credentials 23 | - Windows authentication 24 | - Two-factor authentication (2FA) 25 | - SSH key authentication 26 | - Personal access tokens 27 | - Oauth configuration 28 | - Active Directory authentication library 29 | 30 | ## Policies 31 | - Privacy policy URL 32 | - Application connection and security policies 33 | - User policies 34 | - Git repository and branch policies 35 | 36 | ## Hands-On 🗂️ - Day-15 (Azure Security Best Practices — DevOps) ✅ 37 | 38 | 👉 https://medium.com/@ibrahims/azure-security-best-practices-devops-b61a4d06e235 👈 39 | 40 | Security ibbus 41 | 42 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 43 | 44 | -------------------------------------------------------------------------------- /Day14/README.md: -------------------------------------------------------------------------------- 1 | # Day 14/16 - Azure DevOps Wiki | Azure DevOps Zero to Hero Full Course 2 | 3 | Azure DevOps Wiki is a documentation solution within the Azure DevOps Suite. It can help developers address their documentation needs at various stages of their product development, such as creating specifications, writing meeting reports, or any general information that they would like to share with the team. 4 | 5 | There are two types of Wiki, 6 | 1) Project wiki (Provisioned) 7 | 2) Code wiki 8 | 9 | Refer Official documentation **https://learn.microsoft.com/en-us/azure/devops/project/wiki/provisioned-vs-published-wiki?view=azure-devops** 10 | 11 | ## Project wiki (Provisioned) 12 | 13 | - Creation limit →Only one per project 14 | - Edit → Only editable from the Wiki page 15 | - Revert to the previous version → Revert page by page from the Wiki page 16 | - Version-by-version wiki → uncreatable 17 | - Reference → Stakeholders are also available 18 | - Location → Not conscious. Internally, a location called {ProjectName} .wiki is automatically created and managed there. 19 | 20 | ## Code wiki (as a code) 21 | 22 | - Creation limit → Multiple creations can be made in the project 23 | - Edit → Editable with Git Push to Wiki page or Repos page or Repos 24 | - Revert to the previous version → Revert with Repos page (or) Git Push. Same procedure as Git Revert 25 | - Version-by-version wiki → Can be created using Repos’ Git branch 26 | - Reference → Stakeholder cannot be referenced 27 | - Location → Repos Git. Select the location of the Folder on Git and create it. It is also possible to set multiple settings for one Git. 28 | 29 | ## Access Level 30 | 31 | 1. Stakeholder → Reference to the project wiki only. 32 | 2. Basic (or) Visual Studio Subscription → Same as Permission. 33 | 34 | ## Hands-On 🗂️ - Day-14 (Azure Wiki — DevOps) ✅ 35 | 36 | 👉 https://medium.com/@ibrahims/azure-wiki-devops-f14132e47d62 👈 37 | 38 | Wiki ibbus 39 | 40 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Day9/README.md: -------------------------------------------------------------------------------- 1 | # Day 9/16 - Azure DevOps Self-hosted agents on Virtual Machine Scale Sets 🏗 2 | 3 | Self-hosted agents give you more control to install dependent software needed for your builds and deployments. Also, machine-level caches and configuration persist from run to run, which can boost speed. 4 | 5 | Create and manage a group of load-balanced VMs. The number of VM instances can automatically increase or decrease in response to demand or a defined schedule. Scale sets provide the following key benefits: Easy to create and manage multiple VMs 6 | 7 | ## Microsoft-hosted vs. self-hosted agents 8 | 9 | Microsoft-hosted agents are run in individual VMs, which are re-imaged after each run. Each agent is dedicated to a single organization, and each VM hosts only a single agent. 10 | 11 | An agent that you set up and manage on your own to run jobs is a self-hosted agent. You can use self-hosted agents in Azure Pipelines or Azure DevOps Server, formerly named Team Foundation Server (TFS). Self-hosted agents give you more control to install dependent software needed for your builds and deployments. 12 | 13 | ![self host agent difference ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/67b3870a-06fe-40ec-834d-bdfed262516b) 14 | 15 | ## Use case of self-hosted agents 16 | 17 | ![Self hosted use ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/6414b5d5-ddae-432d-a32f-7f71b6755352) 18 | 19 | ### Ways to setup self-hosted agents: 20 | - Azure Virtual Machine 21 | - Azure Virtual Machine Scale Sets (VMSS) 22 | - Containers etc. 23 | 24 | ### What is a Virtual machine scale set 25 | - A group of one or more identical Virtual machines that can be scaled out and scaled in based on the demand/schedule and manual actions. 26 | - This ensures high availability and fault tolerance so that if one VM crashes, another gets provisioned using the template. 27 | - This is similar to AWS AutoScaling Groups or GCP Managed Instance Groups. 28 | 29 | ## Hands-On 🗂️ - Day-9 (Azure Virtual Machine Scale Set Agents | VMSS — DevOps) ✅ 30 | 31 | 👉 https://medium.com/@ibrahims/azure-virtual-machine-scale-set-agents-vmss-devops-45f8fa40523d 👈 32 | 33 | VMSS ibbus 34 | 35 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 36 | 37 | 38 | -------------------------------------------------------------------------------- /Day12/README.md: -------------------------------------------------------------------------------- 1 | # Day 12/16 - Azure DevOps Advance Security | DevSecOps in Azure DevOps 🔐 2 | 3 | Azure Advanced Security from Servent helps organizations address the challenges of securing their hybrid infrastructure and data whilst meeting the growing demands of a rapidly changing threat landscape by utilizing Azure security capabilities. 4 | 5 | Azure DevOps Advanced Security provides a range of security features to help organizations identify and address security vulnerabilities in their development processes. 6 | 7 | - Dependency Scanning 8 | - Secret scanning-during the push 9 | - Secret scanning inside the repository 10 | - Code scanning 11 | 12 | ## Dependency Scanning 13 | Dependency Scanning can automatically find security vulnerabilities in your software dependencies while you're developing and testing your applications. 14 | 15 | ## Secret scanning-during the push 16 | Secret scanning as push protection currently scans repositories for secrets issued by some service providers. If access to a resource requires paired credentials, then secret scanning may create an alert only when both parts of the pair are detected in the same file. 17 | 18 | ## Secret scanning inside the repository 19 | Secret scanning for your repository scans for any secrets that may already exist in your source code across history and push protection prevents any new secrets from being exposed in the source code. 20 | 21 | ## Code scanning 22 | Code scanning is the process of examining code to identify bugs, errors, and security flaws. Any issues found are displayed, enabling you to address them quickly and enhance the security of your application. 23 | 24 | Azure DevOps supports enforcing certain types of conditional access policies (for example, IP fencing) for custom Azure DevOps authentication mechanisms. These mechanisms include personal access tokens, alternate authentication, OAuth, and Secure Shell (SSH) keys. 25 | 26 | Microsoft is only responsible for securing physical hosts, networks, and the data center. Customers are responsible for securing the operating system, network control, applications, identity, and directory infrastructure, accounts and identities, devices, and information and security. 27 | 28 | ## Hands-On 🗂️ - Day-12 (Azure Advance Security — DevOps) ✅ 29 | 30 | 👉 https://medium.com/@ibrahims/azure-advance-security-devops-078a2df40e2a 👈 31 | 32 | Azure security ibbus 33 | 34 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 35 | -------------------------------------------------------------------------------- /Day5/README.md: -------------------------------------------------------------------------------- 1 | # 🚀 Azure DevOps Release Pipeline - Continous Delivery of a YouTube Clone Website 2 | 3 | Azure Pipelines provide a highly configurable and manageable pipeline for releases to multiple stages such as development, staging, QA, and production. 4 | 5 | ibbus 1 clone 6 | 7 | ## Blue Green Deployments 8 | 9 | - 𝐁𝐥𝐮𝐞-𝐆𝐫𝐞𝐞𝐧 - In this deployment method, two identical production environments work in parallel. 10 | - One is the currently running production environment. It receives all user traffic (𝐁𝐥𝐮𝐞). 11 | - The other environment is a clone of it, but idle (𝐆𝐫𝐞𝐞𝐧). Both use the app configuration. 12 | 13 | ✔ The new version of the application is deployed in the 𝐠𝐫𝐞𝐞𝐧 environment and tested for functionality and performance. Once the testing results are successful, application traffic is routed from 𝐛𝐥𝐮𝐞 to 𝐠𝐫𝐞𝐞𝐧. Then 𝐆𝐫𝐞𝐞𝐧 becomes the new production. 14 | 15 | ✔ Blue-Green deployment means to have two identical environments at a given time, one of which is active (blue), and the other idle (green). 16 | 17 | ✔ The updates are pushed to an idle environment and are tested. Then traffic is switched to an idle environment (green). 18 | 19 | ✔ Hence idle (green then) becomes active(blue now) now and the previously active (blue then) becomes idle (green now). 20 | 21 | ✔ If things go wrong (even after thorough testing!) then traffic is switched back to the previously active environment. 22 | 23 | ![Blue green deployment ibbus 1](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/fcc56ec0-9ec1-480d-a02b-83453433a938) 24 | 25 | ## End-to-End CICD Pipeline using Azure DevOps Build and Release Pipeline 26 | 27 | A Build Pipeline is used to generate Artifacts out of Source Code. A Release Pipeline consumes the Artifacts and conducts follow-up actions within a multi-staging system. 28 | 29 | ![CI?CD NPM ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/f9a67033-3990-441e-bcf4-5739c318617e) 30 | 31 | ## Pipeline code used in the demo 32 | 33 | ``` 34 | trigger: 35 | - main 36 | 37 | stages: 38 | - stage: Build 39 | jobs: 40 | - job: Build 41 | pool: 42 | vmImage: 'ubuntu-latest' 43 | steps: 44 | - task: Npm@1 45 | inputs: 46 | command: 'install' 47 | - task: Npm@1 48 | inputs: 49 | command: 'custom' 50 | customCommand: 'run build' 51 | 52 | 53 | - task: PublishBuildArtifacts@1 54 | inputs: 55 | PathtoPublish: 'build' 56 | ArtifactName: 'drop' 57 | publishLocation: 'Container' 58 | ``` 59 | ## Hands-On 🗂️ - Day-5 (Azure Release Pipelines-DevOps) ✅ 60 | 61 | 👉 https://medium.com/@ibrahims/azure-release-pipelines-devops-c23bd4c43066 👈 62 | 63 | Youtube final ibbus 64 | 65 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 66 | -------------------------------------------------------------------------------- /Day7/README.md: -------------------------------------------------------------------------------- 1 | # Day 7 - Azure Artifacts 👨‍💻 2 | 3 | Azure Artifacts is an extension for Azure DevOps that can host NuGet and npm packages and organize them in feeds. 4 | 5 | ## Setup your Azure repos with the same application code 6 | 7 | Import the below repository to clone the Nike landing page sample website code to your Azure Repos: 8 | 9 | https://github.com/Ibrahimsi/nike_landing_page.git 10 | 11 | **Note:** You must set the app settings as below to disable all file caching: 12 | 13 | Caching is the process of storing copies of files in a cache, or temporary storage location so that they can be accessed more quickly. 14 | 15 | * WEBSITE_DYNAMIC_CACHE=0 16 | * WEBSITE_LOCAL_CACHE_OPTION=Never 17 | 18 | These settings are about your Azure Web App files. They decide where the files are written and read from your web apps. 19 | 20 | Cache ibbus 21 | 22 | ## Architectural diagram 23 | 24 | A build pipeline contains the stages that define the build process for successfully compiling, testing, and running software applications before deployment. 25 | 26 | A Release Pipeline consumes the Artifacts and conducts follow-up actions within a multi-staging system. 27 | 28 | Azure Artifacts enables developers to efficiently manage all their dependencies from one place. With Azure Artifacts, developers can publish packages to their feeds and share them within their team, across organizations, and even publicly across the internet. 29 | 30 | Triggers are events on which you can start your pipeline run automatically. You can enable triggers on your pipeline by subscribing to both internal and external events. 31 | 32 | ![ibbus Day 7](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/8d67a8be-90dc-45f7-8a43-9b72f21a5151) 33 | 34 | Azure App Service enables you to build and host web apps, mobile backends, and RESTful APIs in the programming language of your choice without managing infrastructure. 35 | 36 | ## NPM Pipeline YAML code: 37 | 38 | ``` YAML 39 | trigger: 40 | - main 41 | 42 | stages: 43 | - stage: Build 44 | jobs: 45 | - job: Build 46 | pool: 47 | vmImage: 'ubuntu-latest' 48 | steps: 49 | - task: Npm@1 50 | inputs: 51 | command: 'custom' 52 | customCommand: 'install -D tailwindcss postcss autoprefixer' 53 | - task: Npm@1 54 | inputs: 55 | command: 'custom' 56 | customCommand: 'run build' 57 | - task: Npm@1 58 | inputs: 59 | command: 'publish' 60 | workingDir: './dist' 61 | publishRegistry: 'useFeed' 62 | publishFeed: '515a2edb-27f5-416f-88c0-0c50138edec1/336630b1-903f-4ae3-88c6-69149d01550e' 63 | ``` 64 | 65 | 66 | 67 | ### Post-deployment inline script in the Release pipeline 68 | 69 | A script runs code as a step in your pipeline using command line. 70 | 71 | ``` 72 | cp -rf /home/site/wwwroot/package/* /home/site/wwwroot/ 73 | ``` 74 | 75 | ## Hands-On 🗂️ - Day-7 (Azure Artifacts- DevOps) ✅ 76 | 77 | 👉 https://medium.com/@ibrahims/azure-artifacts-devops-6298adae0ce5 👈 78 | 79 | Nike ibbus 80 | 81 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 82 | -------------------------------------------------------------------------------- /Day3/README.md: -------------------------------------------------------------------------------- 1 | # Day3 - Azure Repos 2 | 3 | ## What is Azure repos? 4 | 5 | Azure Repos is a set of **version control tools** that you can use to manage your code. Whether your software project is large or small, using version control as soon as possible is a good idea. Version control systems are software that helps you track changes you make in your code over time. 6 | 7 | ![Repo 1 ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/64f045de-682e-4807-b08e-3cbde8d83af6) 8 | 9 | Version control, also known as source control, is the practice of tracking and managing changes to software code. It's software tools that help software teams manage changes to source code over time. 10 | 11 | Even if you are working on a personal project, version control helps you stay organized as you fix bugs and develop new features. Version control keeps your development history so you can quickly review and even roll back to any code version. 12 | 13 | - Helps you track changes in the codebase 14 | - Maintains the history of your codebase, who made the changes, what changes were made, why the changes were made, etc 15 | - Helps you stay organized 16 | - Gives you the ability to rollback the changes as needed 17 | 18 | 19 | ## Git vs. TFVC 20 | 21 | Azure Repos supports two types of version control 22 | - Git 23 | - Team Foundation Version Control (TFVC) 24 | 25 | **CheetSheet** 26 | 27 | GIT   TFVC ibbus 28 | 29 | ### Git 30 | Git is a DevOps tool used for source code management. It is a free and open-source version control system used to handle small to very large projects efficiently. Git is used to tracking changes in the source code, enabling multiple developers to work together on non-linear development. 31 | 32 | ### TFVC 33 | Team Foundation Version Control (TFVC) is a centralized version control system. Typically, team members have only one version of each file on their dev machines. Historical data is maintained only on the server. Branches are path-based and created on the server. You can host TFVC on hosting services such as Perforce, SVC, Azure Repos, etc. 34 | 35 | 36 | ## Working with branches 37 | 38 | ![Git branches 3 ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/b351cc0b-aa09-4326-863e-351659c0d22d) 39 | 40 | 𝗕𝗿𝗮𝗻𝗰𝗵𝗶𝗻𝗴, 𝗶𝗻 𝗮𝗻𝘆 𝘃𝗲𝗿𝘀𝗶𝗼𝗻 𝗰𝗼𝗻𝘁𝗿𝗼𝗹 𝘀𝘆𝘀𝘁𝗲𝗺, 𝗶𝘀 𝗯𝗮𝘀𝗶𝗰𝗮𝗹𝗹𝘆 𝗹𝗶𝗸𝗲 𝗰𝗼𝗽𝘆𝗶𝗻𝗴 𝗼𝗻 𝘀𝘁𝗲𝗿𝗼𝗶𝗱𝘀. 𝗜𝘁 𝗮𝗹𝗹𝗼𝘄𝘀 𝘆𝗼𝘂 𝘁𝗼 𝘄𝗼𝗿𝗸 𝗼𝗻 𝗺𝘂𝗹𝘁𝗶𝗽𝗹𝗲 𝘃𝗲𝗿𝘀𝗶𝗼𝗻𝘀 𝗶𝗻 𝗽𝗮𝗿𝗮𝗹𝗹𝗲𝗹 𝘄𝗵𝗶𝗹𝗲 𝗸𝗲𝗲𝗽𝗶𝗻𝗴 𝗹𝗶𝗻𝗸𝘀 𝗯𝗲𝘁𝘄𝗲𝗲𝗻 𝘁𝗵𝗲𝗺 𝘀𝗼 𝘁𝗵𝗮𝘁 𝘁𝗵𝗲𝘆 𝗰𝗮𝗻 𝗯𝗲 𝗺𝗲𝗿𝗴𝗲𝗱 𝗯𝗮𝗰𝗸 𝘁𝗼𝗴𝗲𝘁𝗵𝗲𝗿. 41 | 42 | Some common branching patterns used in Git include: 43 | 44 | 𝗠𝗮𝘀𝘁𝗲𝗿: The "master" branch is usually the main branch that contains the production-ready code. It is usually the default branch in a Git repository. 45 | 46 | 𝗗𝗲𝘃𝗲𝗹𝗼𝗽: The "develop" branch is used for ongoing development work. It contains the latest version of the code, which is updated regularly as new features are added or changes are made. 47 | 48 | 𝗙𝗲𝗮𝘁𝘂𝗿𝗲 𝗯𝗿𝗮𝗻𝗰𝗵𝗲𝘀: "Feature" branches are used to isolate development work on specific features or changes. They are created from the "develop" branch and are typically merged back into "develop" when the work is complete. 49 | 50 | 𝗥𝗲𝗹𝗲𝗮𝘀𝗲 𝗯𝗿𝗮𝗻𝗰𝗵𝗲𝘀: "Release" branches are used to prepare for a release. They are created from the "develop" branch and are used to stabilize and test the code before it is released to production. 51 | 52 | 𝗛𝗼𝘁𝗳𝗶𝘅 𝗯𝗿𝗮𝗻𝗰𝗵𝗲𝘀: "Hotfix" branches are used to address urgent issues that need to be fixed immediately. They are created from the "master" branch and are used to make quick fixes that can be merged back into "master" and "develop." 53 | 54 | ## Hands-On 🗂️ - Day-3 (Azure Repos — DevOps) ✅ 55 | 56 | 👉 https://medium.com/@ibrahims/azure-repos-devops-59242c7ab529 👈 57 | 58 | Azure repo final 59 | 60 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 61 | 62 | -------------------------------------------------------------------------------- /Day6/README.md: -------------------------------------------------------------------------------- 1 | # Azure Test Plans 2 | 3 | Azure Test Plans is a test management module within Azure DevOps that lets users manage test plans, test suites, and test cases for everyone in the software development process. 4 | 5 | ![ibbus azure test plan](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/9f1a5c6b-e053-4c05-a989-232af51f89a1) 6 | 7 | ## Manual and Exploratory Testing 8 | 9 | ### Planned Manual Testing 10 | A test plan is a detailed document that describes software testing areas and activities. 11 | 12 | ### User Acceptance Testing 13 | Evaluate a product, prototype, (or) software application to make sure it is up to specifications and quality before putting it into production. 14 | 15 | ### Exploratory Testing 16 | Approach to software testing that is often described as simultaneous learning, test design, and execution. 17 | 18 | ### Stakeholder Feedback 19 | Any information or opinion that you receive from the people who are affected by or interested in your business activities. 20 | 21 | ## Automated Testing :robot: 22 | 23 | Software testing technique that automates the process of validating the functionality of the software and ensures it meets requirements before being released into production. 24 | 25 | ### Integration with Azure Pipelines 🚀 26 | Increases collaboration between product management and development teams with cross-functional transparency. 27 | 28 | ### Result Capture and Review 📃 29 | Pipeline tasks capture and publish test results, which can be reviewed using progress and pipeline reports. 30 | 31 | ## Traceability :link: 32 | 33 | Ability to discover information about where and how a product was made 34 | 35 | ### Linking to User Stories/Requirements 36 | Test cases and suites are linked to user stories, features, or requirements for end-to-end traceability. 37 | It helps in tracking the quality of requirements. 38 | 39 | User Stories to define requirements demonstrate an intention to work collaboratively with the users to discover what they really need. 40 | 41 | ## Reporting and Analysis :chart_with_upwards_trend: 42 | 43 | Reporting includes creating, configuring, consolidating, organizing, formatting, and summarizing. An analysis is based on a “pull” methodology in which a data analyst uses the information to further investigate and answer business questions. 44 | 45 | ### Configurable Tracking 46 | Change tracking and controlled change ensure that there is a record of the state of a system and if issues arise the cause. 47 | 48 | ### Built-in Reports 49 | Quickly generate reports on all files and user activities within the repository. Keep track of every action taken on a document, with event date, time, and user that acted. 50 | 51 | Build in reports ibbus 52 | 53 | # Running Tests :running: 54 | 55 | A run test is a statistical analysis that helps determine the randomness of data by revealing any variables that might affect data patterns. 56 | 57 | Runner test plan ibbus 58 | 59 | ## Options 60 | - Test Runner: for web and desktop 61 | - Mark test passed or failed 62 | - Capture the results 63 | 64 | ## Test and Feedback Extension :mag_right: 65 | 66 | Gather results in the form of screen recording and capture. 67 | 68 | Add-Ons 69 | 70 | Feedback addons ibbus 71 | 72 | ## Access level 73 | - You should have Basic + test plan access to execute, create, and publish test cases 74 | - To execute the test cases using Test Runner, you should have at least basic access 75 | - To run exploratory testing with the Feedback extension, you should have stakeholder access 76 | 77 | ![Scenerio test ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/5e38af8e-15f3-4026-b916-61776ae11a98) 78 | 79 | ### Test Plan :clipboard: 80 | 81 | - Group of test suites and test cases 82 | 83 | ### Test Suites :package: 84 | 85 | - Group of test cases into separate test scenarios 86 | 87 | ### Test Cases :heavy_check_mark: 88 | 89 | - Actual steps to test an application 90 | 91 | ### Shared Steps :two_men_holding_hands: 92 | 93 | - Steps that can be shared across test cases 94 | 95 | ## Hands-On 🗂️ - Day-6 (Azure Test Plan-DevOps) ✅ 96 | 97 | 👉 https://medium.com/@ibrahims/azure-test-plan-devops-07bf9dc561ab 👈 98 | 99 | Final ibbus 100 | 101 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 102 | -------------------------------------------------------------------------------- /Day13/README.md: -------------------------------------------------------------------------------- 1 | # Day 13/16 - Azure Functions CI CD With Azure DevOps | What is Azure Function 🚀 2 | 3 | Azure Functions is an event-driven, serverless computing platform that helps you develop more efficiently using the programming language of your choice. 4 | 5 | ## To publish the Azure function from your CLI to Azure, follow the instructions given in the below repo: 6 | 7 | ```bash 8 | https://github.com/rishabkumar7/azure-qr-code 9 | ``` 10 | 11 | ## Azure DevOps CI/CD Process diagram: 12 | 13 | ![Day 13 ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/70288380-ef53-4e3b-ac1d-866e449c19bc) 14 | 15 | Azure subscription is a logical container used to provision related business or technical resources in Azure. It holds the details of all your resources like virtual machines (VMs), databases, and more. When you create an Azure resource like a VM, you identify the subscription it belongs to. 16 | 17 | Azure Pipelines automatically builds and tests code projects. It supports all major languages and project types and combines continuous integration, continuous delivery, and continuous testing to build, test, and deliver your code to any destination. 18 | 19 | Azure Artifacts enables developers to efficiently manage all their dependencies from one place. With Azure Artifacts, developers can publish packages to their feeds and share them within their team, across organizations, and even publicly across the internet. 20 | 21 | ## Prerequisites 22 | 1. Node.js (or) brew install node 23 | 2. Azure Functions Core Tools 24 | 3. Azure CLI 25 | 4. An Azure account and an Azure Blob Storage account. 26 | 27 | ## Azure DevOps pipeline code: 28 | 29 | ```YAML 30 | # # Node.js Function App to Linux on Azure 31 | # Build a Node.js function app and deploy it to Azure as a Linux function app. 32 | # Add steps that analyze code, save build artifacts, deploy, and more: 33 | # https://docs.microsoft.com/azure/devops/pipelines/languages/javascript 34 | 35 | trigger: 36 | - iac-implementation 37 | 38 | variables: 39 | 40 | # Azure Resource Manager connection created during pipeline creation 41 | azureSubscription: '37035b62-6584-46fa-83fe-a8b418991be4' 42 | 43 | # Function app name 44 | functionAppName: 'ibrahims' 45 | 46 | # Environment name 47 | environmentName: 'ibrahims' 48 | system.debug: true 49 | 50 | # Agent VM image name 51 | vmImageName: 'ubuntu-latest' 52 | 53 | stages: 54 | - stage: Build 55 | displayName: Build stage 56 | jobs: 57 | - job: Build 58 | displayName: Build 59 | pool: 60 | vmImage: $(vmImageName) 61 | 62 | steps: 63 | - task: NodeTool@0 64 | inputs: 65 | versionSpec: '18.x' 66 | displayName: 'Install Node.js' 67 | 68 | - script: | 69 | cd qrCodeGenerator 70 | npm install 71 | npm run build --if-present 72 | npm run test --if-present 73 | displayName: 'Prepare binaries' 74 | 75 | - task: CopyFiles@2 76 | inputs: 77 | SourceFolder: '$(System.DefaultWorkingDirectory)/qrCodeGenerator/GenerateQRCode/' 78 | Contents: '**' 79 | TargetFolder: '$(System.DefaultWorkingDirectory)/qrCodeGenerator/' 80 | - task: ArchiveFiles@2 81 | displayName: 'Archive files' 82 | inputs: 83 | rootFolderOrFile: '$(System.DefaultWorkingDirectory)/qrCodeGenerator/' 84 | includeRootFolder: false 85 | archiveType: zip 86 | archiveFile: $(Build.ArtifactStagingDirectory)/qrCodeGenerator/$(Build.BuildId).zip 87 | replaceExistingArchive: true 88 | 89 | - upload: $(Build.ArtifactStagingDirectory)/qrCodeGenerator/$(Build.BuildId).zip 90 | artifact: drop 91 | 92 | - stage: Deploy 93 | displayName: Deploy stage 94 | dependsOn: Build 95 | condition: succeeded() 96 | jobs: 97 | - deployment: Deploy 98 | displayName: Deploy 99 | environment: $(environmentName) 100 | pool: 101 | vmImage: $(vmImageName) 102 | strategy: 103 | runOnce: 104 | deploy: 105 | steps: 106 | - task: AzureFunctionApp@2 107 | inputs: 108 | connectedServiceNameARM: 'Pay-As-You-Go (f30deb63-a417-4fa4-afc1-813a7d3920bb)' 109 | appType: 'functionApp' 110 | appName: 'ibrahims' 111 | package: '$(Pipeline.Workspace)/drop/$(Build.BuildID).zip' 112 | deploymentMethod: 'zipDeploy' 113 | ``` 114 | 115 | ## Hands-On 🗂️ - Day-13 (Azure Functions CI CD — DevOps) ✅ 116 | 117 | 👉 https://medium.com/@ibrahims/azure-functions-ci-cd-devops-b6770ec8417f 👈 118 | 119 | QR code ibbus 120 | 121 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 122 | -------------------------------------------------------------------------------- /Day4/README.md: -------------------------------------------------------------------------------- 1 | 2 | # 🚀 Azure DevOps Build Pipeline - Build and Deploy a YouTube Clone 3 | 4 | Azure Pipelines automatically builds and tests code projects. It supports all major languages and project types and combines continuous integration, continuous delivery, and continuous testing to build, test, and deliver your code to any destination. 5 | 6 | ## Steps 7 | - Login to VSCode (or) any other IDE of your choice (https://vscode.dev) 8 | - Run the below commands to download the application code 9 | ``` 10 | mkdir day4_youtube_clone; cd day4_youtube_clone 11 | git init 12 | git clone https://github.com/Ibrahimsi/Youtube_clone.git 13 | ``` 14 | - Create a project in Azure DevOps for Day4 and push the code by running the below commands on VSCode: 15 | ``` 16 | git remote add origin $YOURAZUREREPO 17 | git push -u origin all 18 | ``` 19 | **Note:** Make sure to update your Azure repo in the above command 20 | 21 | - Go to the Azure Portal and Create the Azure App Service 22 | 23 | Azure App Service enables you to build and host web apps, mobile backends, and RESTful APIs in the programming language of your choice without managing infrastructure. 24 | 25 | - Implement the build pipeline using the classic editor 26 | 27 | The classic editor is a WordPress content editor that was previously used to create, edit, and format posts and pages. 28 | 29 | - Understand the use of service connection and service 30 | 31 | Service Connection” is a configuration that securely stores information required to connect and authenticate to external services or resources, such as cloud providers, container registries, version control systems, and more. 32 | 33 | ![Service connection ibbus 4](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/1698713d-d512-4a75-8263-2276b19ee637) 34 | 35 | **Note: You must set the app settings WEBSITE_DYNAMIC_CACHE=0 and WEBSITE_LOCAL_CACHE_OPTION=Never to disable all file caching** 36 | 37 | 38 | ## Structure of Azure DevOps build Pipeline 39 | 40 | The DevOps pipeline typically has eight stages. In the Development phase, they are: 41 | Plan, Code, Build, and Test. 42 | 43 | Operations phase, the stages are: Release, Deploy, Operate, and Monitor. 44 | 45 | Structure of devops pipeline ibbus 46 | 47 | * A trigger tells a Pipeline to run. It could be CI or Scheduled, manual(if not specified), or after another build finishes. 48 | * A pipeline is made up of one or more stages. A pipeline can deploy to one or more environments. 49 | * A stage organizes jobs in a pipeline, and each stage can have one or more jobs. 50 | * Each job runs on one agent, such as Ubuntu, Windows, macOS, etc. A job can also be agentless. 51 | * Each agent runs a job that contains one or more steps. 52 | * A step can be a task or script and is the smallest building block of a pipeline. 53 | * A task is a pre-packaged script that acts, such as invoking a REST API or publishing a build artifact. 54 | * An artifact is a collection of files or packages published by a run. 55 | 56 | ![Azure pipeline ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/84a2d632-2abe-44aa-946b-c89249d53dde) 57 | 58 | ## Pipeline code used in the demo 59 | 60 | ``` YAML 61 | trigger: 62 | - main 63 | 64 | stages: 65 | - stage: Build 66 | jobs: 67 | - job: Build 68 | pool: 69 | vmImage: 'ubuntu-latest' 70 | steps: 71 | - task: Npm@1 72 | inputs: 73 | command: 'install' 74 | - task: Npm@1 75 | inputs: 76 | command: 'custom' 77 | customCommand: 'run build' 78 | 79 | 80 | - task: PublishBuildArtifacts@1 81 | inputs: 82 | PathtoPublish: 'build' 83 | ArtifactName: 'drop' 84 | publishLocation: 'Container' 85 | 86 | - stage: Deploy 87 | jobs: 88 | - job: Deploy 89 | pool: 90 | vmImage: 'ubuntu-latest' 91 | steps: 92 | - task: DownloadBuildArtifacts@1 93 | inputs: 94 | buildType: 'current' 95 | downloadType: 'single' 96 | artifactName: 'drop' 97 | downloadPath: '$(System.ArtifactsDirectory)' 98 | - task: AzureRmWebAppDeployment@4 99 | inputs: 100 | ConnectionType: 'AzureRM' 101 | azureSubscription: 'f2d858b2-0b52-4d8e-a750-adae9358c49a' 102 | appType: 'webAppLinux' 103 | WebAppName: 'ibrahimsi' 104 | packageForLinux: '$(System.ArtifactsDirectory)/drop' 105 | RuntimeStack: 'STATICSITE|1.0' 106 | ``` 107 | ## Hands-On 🗂️ - Day-4 (Azure Pipeline — DevOps) ✅ 108 | 109 | 👉 https://medium.com/@ibrahims/azure-pipeline-devops-b6fe8d8505ba 👈 110 | 111 | youtube final ibbus 112 | 113 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 114 | 115 | -------------------------------------------------------------------------------- /Day1/README.md: -------------------------------------------------------------------------------- 1 | ## Pre-requisites ✅ 2 | 3 | - Sign up for Azure DevOps by clicking 👉[here](https://azure.microsoft.com/en-us/products/devops/)👈 4 | - Click **Start free** 5 | 6 | Start free ibbus 7 | 8 | - It will create a default organization for you with the name as your email address and then redirect you to your Azure DevOps homepage at **https://dev.azure.com/{yourorganizationname}** 9 | - You can create a sample project with the name **Day1_project** and start your learning journey. 10 | 11 | - Day_1 ibbus 12 | 13 | ## What is Cloud Computing? 14 | Cloud computing is about hardware-based services (involving computing, network, and storage capacities). 15 | 16 | Services are provided on demand. 17 | 18 | What is cloud computing ibbus 19 | 20 | Customers can pay for them as they go, without the need to invest in a data center. 21 | 22 | Hardware management is abstracted from the customers. 23 | 24 | Infrastructure capacities are elastic and can easily scale up and down. 25 | 26 | **Cloud Computing aims purpose** 27 | 28 | Cloud computing makes data backup, disaster recovery, and business continuity easier and less expensive because data can be mirrored at multiple redundant sites on the cloud provider's network. 29 | 30 | ## IaaS VS PaaS VS SaaS 31 | 32 | IaaS -> Infrastructure-as-a-service 33 | PaaS -> Platform-as-a-service 34 | SaaS -> Software-as-a-service 35 | 36 | ![IAAS PAAS ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/984187bd-76d9-4af5-bf16-22db9e3b89f5) 37 | 38 | IaaS builds the infrastructure of cloud-based technology. 39 | 40 | PaaS helps developers build custom apps via an API delivered over the cloud. 41 | 42 | SaaS is cloud-based software companies can sell and use. 43 | 44 | ## Shared Responsibility Model in Azure, 45 | 46 | Microsoft Azure operates under a shared responsibility model for maintaining a secure environment. While Azure focuses on infrastructure security, users are responsible for data protection, access controls, and account management. 47 | 48 | ![article-azure-shared-responsibility-model_Img0](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/69daad3d-e671-42e9-92f0-b6a932b87246) 49 | 50 | ## Traditional Build and Deployment workflows 51 | 52 | Traditional cloud computing makes use of local hardware and software, cloud computing depends on the internet and distant servers. 53 | 54 | The workflow for deploying a process or component to an environment involves building the component, creating a packaged component, and then deploying the packaged component. 55 | 56 | ## What is the Waterfall model? 57 | 58 | The Waterfall Model is a linear application development model that uses rigid phases: When one phase ends, the next begins. 59 | 60 | ![Waterfall model ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/bfb2d5a8-75b5-4db6-8168-ac1a17d08eca) 61 | 62 | ## What were the challenges with the waterfall model? 63 | 64 | The waterfall model has lacked interaction among phases. Users have little interaction with projects. This feedback is not taken during development. After a development process starts, changes can not be accommodated easily. 65 | 66 | 1) Lack of flexibility 67 | 2) Delayed testing and integration 68 | 3) High dependency and risk 69 | 70 | ## What is Agile? 71 | 72 | Agile is not a solitary, inflexible strategy; rather, a bunch of standards and practices focus on cooperation, client input, and iterative advancement. It started in the product advancement industry yet has since spread to different fields like promoting, assembling, and even training. 73 | 74 | What is Agile ibbus 75 | 76 | 1) Customer-Centric 77 | 2) Iterative and Incremental 78 | 3) Collaborative 79 | 4) Flexible and Adaptive 80 | 5) Deliver Value Early 81 | 82 | ## What is DevOps, and why does it matter? 83 | 84 | DevOps is not a technology per se, but it covers everything from the organization to culture, processes, and tooling. 85 | 86 | Initial steps usually include Continuous integration and continuous delivery (CI/CD), real-time monitoring, incident response systems, and collaboration platforms. DevOps adoption is growing. 87 | 88 | 89 | ## What is Azure DevOps 🤷‍♂️ 90 | Azure DevOps provides an integrated set of services and tools to manage your software projects, from planning and development through testing and deployment. Azure DevOps delivers services through a client/server model. 91 | 92 | ![what is Azure Devops ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/3d45fd13-2777-4bb7-87e1-c2cfce0c7e11) 93 | 94 | Azure DevOps is a suite of services you can implement end-to-end DevOps in your organization. It includes services such as Azure Repos, Boards, Wiki, Build and Release pipelines, Test plans, Artifacts, etc... 95 | 96 | ## Type of Hosting Options 🚀 97 | Azure DevOps Server is a set of collaborative software development tools, hosted on-premises. Azure DevOps Server integrates with your existing IDE or editor, enabling your cross-functional team to work effectively on projects of all sizes. 98 | 99 | ## Pricing **₹** 100 | In the basic plan, you will get the first 5 users free of cost with all the services within certain limits except the Azure test plan, for which you need a Basic+Test plan subscription/ 101 | 102 | ### Below are the details of both plans: 103 | ![Pricing plan - ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/ed92fe8c-1281-4d69-bf67-4b707889526d) 104 | 105 | ## Pricing Models 106 | Free Tier 107 | Pay as You Go 108 | Spot Virtual Machines 109 | Reservations 110 | 111 | ### Below are the service limits applicable to these plans 112 | 113 | ![Service limit plan - ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/085d1fd6-425e-4228-9d41-8d47653ff7db) 114 | 115 | ## **Visual Studio subscriber** 116 | 117 | **If you are a Visual Studio subscriber, you can get access to any number of organizations and don't count against your 5 free users.** 118 | Visual Studio Professional --> Subscription that provides access to Visual Studio development tools and services. It costs $45/month per user or $539/year per user. 119 | 120 | ## Hands-On 🗂️ - Day-1 (Azure Basic — DevOps) ✅ 121 | 122 | 👉 https://medium.com/@ibrahims/azure-devops-basic-a5825154df8d 👈 123 | 124 | New project add last ibbus 125 | 126 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 127 | -------------------------------------------------------------------------------- /Day10/README.md: -------------------------------------------------------------------------------- 1 | # Day 10/16 - Azure DevOps CICD Pipeline on Azure Container Instances 🐳 2 | 3 | Azure Container Instances (ACI) is a service that enables a developer to deploy containers on the Microsoft Azure public cloud without having to provision or manage any underlying infrastructure. 4 | 5 | ## Understanding Virtual machine V/s Containers. 6 | 7 | Containers virtualize the operating system, allowing multiple isolated user-space instances to run on a single OS kernel. Containers package an application and its dependencies into a single unit that can be easily deployed across different environments. 8 | 9 | Virtual Machines virtualize the hardware layer, allowing multiple operating systems to run on a single physical machine. Each VM includes a complete OS, along with the application and its dependencies. 10 | 11 | ![Container differ ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/a0db526a-a1d6-4e75-bad3-477ef17b2a02) 12 | 13 | ## Challenges with the non-containerized applications 14 | 15 | 1) Complexity 16 | 2) Security 17 | 3) Persistent Storage 18 | 4) Networking 19 | 5) Monitoring and Debugging 20 | 21 | ## Docker Architecture 22 | 23 | The Docker architecture defines all the components, such as the docker daemon, the docker client, (or) the docker registries, and their interconnections upon which Docker is built. Scrolling down you will learn how it actually looks and works inside Docker and the different components that make use of it. 24 | 25 | ![Docker Architecture ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/9553f09e-9222-4551-a88e-559cf5627a03) 26 | 27 | ## Containerize a sample To-Do list web app written in React JS. 28 | 29 | To-do lists help you organize your work and keep track of tasks. A good digital to-do list makes it easier to get work done—and makes it harder to miss deadlines. 30 | 31 | **GitHub repo for the App:** 32 | https://github.com/Ibrahimsi/todoapp-docker.git 33 | 34 | **DockerFile** 35 | 36 | A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. 37 | 38 | ``` 39 | FROM node:18-alpine AS installer 40 | WORKDIR /app 41 | COPY package*.json ./ 42 | RUN npm install 43 | COPY . . 44 | RUN npm run build 45 | FROM nginx:latest AS deployer 46 | COPY --from=installer /app/build /usr/share/nginx/html 47 | ``` 48 | 49 | ## Benefits of a multi-stage docker file 50 | 51 | Multi-stage build means the resulting container will be more secure because your final image includes only what it needs to run the application. Faster deployment. 52 | 53 | Multi stage ibbus 54 | 55 | Smaller images mean less time to transfer or quicker CI/CD builds, faster deployment time, and improved performance. 56 | 57 | **Efficient Use of Layers:** 58 | Docker layers play a pivotal role in image-building efficiency. By strategically placing instructions in your Dockerfile and optimizing your image creation process you can reduce build times and enhance resource utilization. 59 | 60 | **Security:** 61 | Docker containers are, by default, quite secure; especially if you run your processes as non-privileged users inside the container. You can add an extra layer of safety. 62 | 63 | Container security is knowing that a container image you run in your environment includes only the libraries, base image, and any custom bits you declare in your Dockerfile, and not malware or known vulnerabilities. 64 | 65 | **Build Isolation and Clarity:** 66 | Isolation provides an additional layer of security to prevent malicious workloads running in containers from compromising the Docker Desktop or the host. 67 | 68 | **Faster Builds:** 69 | Docker builds is by using the power of Docker layer caching. It is a feature that allows you to cache intermediate build layers, reducing the need to rebuild them from scratch every time you make changes to your code. 70 | 71 | **Optimized for Production:** 72 | Consolidate Dockerfile instructions to reduce layer count. Trim any unnecessary files or packages from your image. Utilize Docker's built-in build cache. 73 | 74 | **Docker Scout:** 75 | Docker Scout gives you the list of discovered vulnerabilities in your container images and offers guidance for remediation in an iterative small-improvement style. 76 | 77 | You can compare your scores from one deployment to the next and show improvement to create a sense of accomplishment for your teams, not an overwhelming bombardment of vulnerabilities and risks that seem insurmountable. 78 | 79 | ## What are Azure container instances(ACI) 80 | 81 | Azure Container Instances is a solution for any scenario that can operate in isolated containers, without orchestration. Run event-driven applications, quickly deploy from your container development pipelines, and run data processing and build jobs. 82 | 83 | ![Azure container instances ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/22405602-9e46-482e-a159-d5e671db3135) 84 | 85 | ## Azure DevOps CICD Pipeline to deploy to ACI 86 | 87 | **Pipeline Code**: 88 | 89 | ``` YAML 90 | # Docker 91 | # Build and push an image to Azure Container Registry 92 | # https://docs.microsoft.com/azure/devops/pipelines/languages/docker 93 | 94 | trigger: 95 | - main 96 | 97 | resources: 98 | - repo: self 99 | 100 | variables: 101 | # Container registry service connection established during pipeline creation 102 | dockerRegistryServiceConnection: 'ce86373d-4d75-4b34-b778-d5b8eb8dd4b0' 103 | imageRepository: 'todoapp' 104 | containerRegistry: 'ibrahims.azurecr.io' 105 | dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile' 106 | tag: '$(Build.BuildId)' 107 | 108 | # Agent VM image name 109 | vmImageName: 'ubuntu-latest' 110 | 111 | stages: 112 | - stage: Build 113 | displayName: Build and push stage 114 | jobs: 115 | - job: Build 116 | displayName: Build 117 | pool: 118 | vmImage: $(vmImageName) 119 | steps: 120 | - task: AzureCLI@2 121 | inputs: 122 | azureSubscription: 'Pay-As-You-Go(f30deb63-a417-4fa4-afc1-813a7d3920bb)' 123 | scriptType: 'bash' 124 | scriptLocation: 'inlineScript' 125 | inlineScript: 'az acr login --name=$(containerRegistry)' 126 | 127 | - task: Docker@2 128 | displayName: Build and push an image to container registry 129 | inputs: 130 | command: buildAndPush 131 | repository: $(imageRepository) 132 | dockerfile: $(dockerfilePath) 133 | containerRegistry: $(dockerRegistryServiceConnection) 134 | tags: | 135 | $(tag) 136 | - task: AzureCLI@2 137 | inputs: 138 | azureSubscription: 'Pay-As-You-Go(f30deb63-a417-4fa4-afc1-813a7d3920bb)' 139 | scriptType: 'bash' 140 | scriptLocation: 'inlineScript' 141 | inlineScript: | 142 | az container create \ 143 | --name ibrahims \ 144 | -g ibbus-container-RG \ 145 | --image $(containerRegistry)/$(imageRepository):$(tag) \ 146 | --registry-login-server $(containerRegistry) \ 147 | --registry-username ibrahims \ 148 | --registry-password lxkaWa1MtCG3Li0M8ZPDaVJmFzsj9Kwf79B5UaLwGh+ACRBJQQS9 \ 149 | --dns-name-label aci-demo-ibrahimsi 150 | ``` 151 | 152 | ## Hands-On 🗂️ - Day-10 (Azure Docker Container — DevOps) ✅ 153 | 154 | 👉 https://medium.com/@ibrahims/azure-docker-container-devops-4b487c4a1903 👈 155 | 156 | Last add ibbus 157 | 158 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 159 | -------------------------------------------------------------------------------- /Day8/README.md: -------------------------------------------------------------------------------- 1 | # Day 8/16 - Azure DevOps with Terraform 🏗 2 | 3 | Terraform is built into Azure Cloud Shell and authenticated to your subscription, so it's integrated and ready to go. 4 | 5 | Terraform is an IAC tool, used primarily by DevOps teams to automate various infrastructure tasks. The provisioning of cloud resources, for instance, is one of the main use cases of Terraform. It's a cloud-agnostic, open-source provisioning tool written in the Go language and created by HashiCorp. 6 | 7 | Why Terraform? 8 | 9 | 1) Free of cost 10 | 2) The manual tasks are error-prone and inconsistent 11 | 3) Multiple platform support 12 | 4) Easy to write (JSON based) 13 | 5) Easy integration with configuration management tool (Ansible). 14 | 15 | ## How Terraform works 16 | 17 | Terraform is the IAAS(Infrastructure as the service) tool. It is used to automate the infra provision on the various cloud providers (more than 75). It has become the industry standard for IAAC. 18 | 19 | ![Azure terraform how it works ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/4961519b-9a4f-4ccf-a30f-52f6be92716b) 20 | 21 | Terraform can be thought of as consisting of two main parts: **Terraform Core** and **Plugins**. A core is responsible for the life cycle management of infrastructure. It is the open-source binary that you download and use from the command line. 22 | 23 | Terraform Plugins provide a mechanism for Terraform Core to communicate with your infrastructure host or SaaS providers. Terraform Providers and Provisioners are examples of plugins as mentioned above. Terraform Core communicates with the plugins via Remote Procedure Call (RPC). 24 | 25 | 26 | ## Initialize the Terraform repo 27 | 28 | Terraform init" again to reinitialize your working directory. Terraform Cloud has been successfully initialized! You may now begin working with Terraform Cloud. 29 | 30 | **terraform init** 31 | 32 | tf init ibbus 33 | 34 | 35 | ## Run Terraform plan 36 | 37 | **terraform plan** 38 | 39 | The Terraform plan command creates an execution plan, which lets you preview the changes that Terraform plans to make to your infrastructure. 40 | 41 | When Terraform creates a plan it → Reads the current state of any already-existing remote objects to make sure that the Terraform state is up-to-date. 42 | 43 | tf paln ibbus 44 | 45 | 46 | ## Run Terraform apply 47 | 48 | **terraform apply** 49 | 50 | tf apply ibbus 51 | 52 | The terraform apply command executes the actions proposed in a terraform plan. It is used to deploy your infrastructure. Typically apply should be run after terraform init and terraform plan. 53 | 54 | ### Import the below repository into Azure DevOps for Terraform configuration 55 | 56 | https://github.com/Ibrahimsi/Terraform-AzureDevOps-Sample.git 57 | 58 | ## Let's implement this using Azure DevOps 59 | 60 | ![Implement tf ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/c7f1c6cd-3b7b-4143-947f-d4e861d3e49c) 61 | 62 | Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular cloud service providers as well as custom in-house solutions. 63 | 64 | Configuration files describe to Terraform the components needed to run a single application or your entire data center. 65 | 66 | Terraform generates an execution plan describing what it will do to reach the desired state and then executes it to build the described infrastructure. As the configuration changes, Terraform is able to determine what changed and create incremental execution plans that can be applied. 67 | 68 | ### You can use the below Azure CLI commands to set the terraform remote backend, or you can do it via the portal 69 | 70 | ``` shell 71 | #!/bin/bash 72 | ## The Storage account name must be unique, and the values below should match your backend.tf 73 | RESOURCE_GROUP_NAME=demo-rg 74 | STORAGE_ACCOUNT_NAME=ibrahimsi 75 | CONTAINER_NAME=prod-tfstate 76 | 77 | # Create resource group 78 | az group create --name $RESOURCE_GROUP_NAME --location West Europe 79 | 80 | # Create storage account 81 | az storage account create --resource-group $RESOURCE_GROUP_NAME --name $STORAGE_ACCOUNT_NAME --sku Standard_LRS --encryption-services blob 82 | 83 | # Create blob container 84 | az storage container create --name $CONTAINER_NAME --account-name $STORAGE_ACCOUNT_NAME 85 | ``` 86 | 87 | ## Azure DevOps CICD Pipeline 88 | 89 | Azure CI/CD refers to the practice of Continuous Integration and Continuous Deployment, which are key components of the software development lifecycle. 90 | 91 | CI/CD helps automate and streamline the process of building, testing, and deploying applications, resulting in faster and more reliable software releases. 92 | 93 | CI:CD Pipeline ibbus 94 | 95 | ## YAML Code for Build Pipeline 96 | 97 | ``` YAML 98 | trigger: 99 | - main 100 | 101 | stages: 102 | - stage: Build 103 | jobs: 104 | - job: Build 105 | pool: 106 | vmImage: 'ubuntu-latest' 107 | steps: 108 | - task: TerraformTaskV4@4 109 | displayName: Tf init 110 | inputs: 111 | provider: 'azurerm' 112 | command: 'init' 113 | backendServiceArm: 'Pay-As-You-Go(f30deb63-a417-4fa4-afc1-813a7d3920bb)' 114 | backendAzureRmResourceGroupName: 'demo-resources' 115 | backendAzureRmStorageAccountName: 'ibrahimsi' 116 | backendAzureRmContainerName: 'prod-tfstate' 117 | backendAzureRmKey: 'prod.terraform.tfstate' 118 | - task: TerraformTaskV4@4 119 | displayName: Tf validate 120 | inputs: 121 | provider: 'azurerm' 122 | command: 'validate' 123 | - task: TerraformTaskV4@4 124 | displayName: Tf fmt 125 | inputs: 126 | provider: 'azurerm' 127 | command: 'custom' 128 | customCommand: 'fmt' 129 | outputTo: 'console' 130 | environmentServiceNameAzureRM: 'Pay-As-You-Go(f30deb63-a417-4fa4-afc1-813a7d3920bb)' 131 | 132 | - task: TerraformTaskV4@4 133 | displayName: Tf plan 134 | inputs: 135 | provider: 'azurerm' 136 | command: 'plan' 137 | commandOptions: '-out $(Build.SourcesDirectory)/tfplanfile' 138 | environmentServiceNameAzureRM: 'Pay-As-You-Go(f30deb63-a417-4fa4-afc1-813a7d3920bb)' 139 | 140 | - task: ArchiveFiles@2 141 | displayName: Archive files 142 | inputs: 143 | rootFolderOrFile: '$(Build.SourcesDirectory)/' 144 | includeRootFolder: false 145 | archiveType: 'zip' 146 | archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip' 147 | replaceExistingArchive: true 148 | - task: PublishBuildArtifacts@1 149 | inputs: 150 | PathtoPublish: '$(Build.ArtifactStagingDirectory)' 151 | ArtifactName: '$(Build.BuildId)-build' 152 | publishLocation: 'Container' 153 | ``` 154 | 155 | ## Release Pipeline 156 | 157 | A Release Pipeline consumes the Artifacts and conducts follow-up actions within a multi-staging system. 158 | 159 | Release pipeline new ibbus 160 | 161 | Variables give you a convenient way to get key bits of data into various parts of the pipeline. The most common use of variables is to define a value that you can then use in your pipeline. All variables are strings and are mutable. 162 | 163 | ![Variable ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/f8832bd3-6453-491a-9c08-88d29961c562) 164 | 165 | ### Deployment stage 166 | 167 | The deployment phase is the final phase of the software development life cycle (SDLC) and puts the product into production. After the project team tests the product and the product passes each testing phase, the product is ready to go live. 168 | 169 | ![Deployment stage ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/be2f00ac-316f-444a-ae8a-5de55c784a58) 170 | 171 | 1) Pre-deploy 172 | 2) Deploy 173 | 3) Post-deploy 174 | 175 | During the Pre-Deploy testing phase, both the development team and the QA engineer should be tasked with the following items --> Ask developers to make Production and Stage environment backups. 176 | 177 | ### Destroy stage 178 | 179 | The destroy stage of the data life cycle might involve which of the following actions? The removal of all copies of a data item from an organization is known as data destruction or purging. Usually, it is carried out from a storage facility for archives. 180 | 181 | ![Destroy ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/e8238949-efc3-4907-9b30-ab5f5fc5ccb1) 182 | 183 | Destroy → Removal of every copy of a data item from an organization. 184 | 185 | Destroy 1 ibbus 186 | 187 | ### Hands-On 🗂️ - Day-8 (Azure Terraform Pipeline — DevOps) ✅ 188 | 189 | 👉 https://medium.com/@ibrahims/azure-terraform-pipeline-devops-b57005a37936 👈 190 | 191 | LAst add ibbus 192 | 193 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 194 | 195 | -------------------------------------------------------------------------------- /Day2/README.md: -------------------------------------------------------------------------------- 1 | # Day2 Azure Boards and Agile Project Management Azure boards ibbus 1 2 | 3 | ## Azure DevOps Demo Generator 4 | The Azure DevOps Services Demo Generator is a service that helps you provision projects in your organization with pre-populated sample content that includes source code, work items, iterations, service connections, and build and release pipelines based on a template you choose. 5 | 6 | 1. Navigate to **https://azuredevopsdemogenerator.azurewebsites.net**. This utility site will automate the creation of a new Azure DevOps project within your account that is prepopulated with content (work items, repos, etc.) required for the lab. 7 | 8 | 2. Sign in using the Microsoft account associated with your Azure DevOps subscription. 9 | 10 | Azure devops generator 2 ibbus 11 | 12 | 3. Accept the permission requests for accessing your subscription. 13 | 14 | 4. Select the PartsUnlimited template and click Select Template. 15 | 16 | parts unlimited 3 ibbus 17 | 18 | 6. Click Create Project and wait for the process to complete. 19 | 20 | parts unlimited project 4 ibbus 21 | 22 | ## Azure Boards Overview 23 | Azure Boards is a web-based service that enables teams to plan, track, and discuss work across the entire development process, while it supports agile methodologies. 24 | 25 | ## Defining Teams and Work Items 26 | 27 | A team is defined as a group of people who perform interdependent tasks to work toward accomplishing a common mission or specific objective. 28 | 29 | A work item is the primary unit of work completion in an application, and the primary collection of data that a flow operates on. Work items to plan and manage your project. 30 | 31 | ### What is a Work Item 32 | 33 | Work items are also used to represent the Product Backlog. A list of Epics, Features, User Stories and Bugs in a certain order. 34 | 35 | The "Board" provides an alternative view of the product backlog by state, often referred to as a Kanban Board. On each card, you can also visualize tasks. 36 | 37 | The Sprint Backlog breaks down the work on the Product Backlog into tasks that can be picked up in an Iteration/Sprint. This view represents what used to be called the "Scrum board" in old revisions of the Scrum Guide. 38 | 39 | * Task to do 40 | * A bug to fix 41 | * An issue 42 | 43 | ![work item types 5 ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/fa916e9d-5d8d-47d5-b205-a6085a861df1) 44 | 45 | ## Kanban Board 📃 46 | 47 | A kanban board is an agile project management tool designed to help visualize work, limit work-in-progress, and maximize efficiency (or flow). It can help both agile and DevOps teams establish order in their daily work. It can be divided into multiple stages such as 48 | 49 | 1) To Do 50 | 2) Doing 51 | 3) Done 52 | 53 | Kanban board 6 ibbus 54 | 55 | ## Azure Boards Processes 56 | 57 | Azure DevOps has three processes out of the box 58 | 59 | 1) Basic 60 | 2) Agile 61 | 3) Scrum 62 | 4) CMMI 63 | 64 | Each of these processes adheres to a particular methodology. Agile is the most universal and widely used. 65 | 66 | **Choose Basic when your team wants the simplest model that uses Issues, Tasks, and Epics to track work.** 67 | 68 | The basic process contains three work item types: 69 | 70 | Basic azure boards epics 7 ibbus 71 | 72 | - Epics: Epics are used to group work under larger scenarios (or) Epics are large bodies of work that can be broken down into many smaller tasks (called stories). 73 | - Issues: General problems (or) concerns in the product or project. 74 | - Task: Tasks are the smallest amount of work that can be assigned to someone, act as a pipeline, and packaged scripts (or) procedures that are abstracted with a set of inputs. 75 | 76 | 77 |

Basic Azure Board

78 | 79 | Azure board is an interface that lets you track tasks, features, and even bugs that may be associated with your project. Here you are aided by three work item types 80 | 81 | ``` 82 | Epics Issues Tasks 83 | ``` 84 | Basic azure boards epics 7 ibbus 85 | 86 | Work gets completed the status gets updated stage by stage from 87 | 88 | ``` 89 | To Do Doing Done 90 | ``` 91 | 92 | To do ibbus 8 93 | 94 | Each time we create (or) add an issue, task (or) an epic, it means we are creating a work item. Every work item we create would represent an object. This object is stored in the work item data store. Every item here will have an identifier, assigned to it. **These IDs are unique** to a particular project. 95 | 96 | ## Features Of Azure 97 | 98 | 1) Kanban Implementation 99 | 2) Collaborate using Azure Boards 100 | 3) Flexibility to work in sprints and to implement Scrum 101 | 4) Integrate with GitHub 102 | 103 | ## Scrum process 104 | Scrum is an agile project management framework that helps teams structure and manage their work through a set of values, principles, and practices. 105 | 106 | **A scrum-based process typically involves below work items:** 107 | 108 | ![work item types 5 ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/36718531-48ea-4456-a18d-ddb1abe7d4d9) 109 | 110 | 1. **User Stories:** 111 | - A user story is the smallest unit of work in an agile framework. 112 | 113 | 2. **Tasks:** 114 | - A task is a piece of work that needs to be done. The process is a series of actions that are done for a particular purpose. 115 | 116 | 3. **Bugs:** 117 | - Specific issue related to a defect (or) flaw in the software code. 118 | 119 | 4. **Epics:** 120 | - Epics are used to group work under larger scenarios. An epic may be broken down into smaller, more manageable pieces, known as user stories or features. 121 | 122 | 5. **Features:** 123 | - More detail on how a product should be built, while user stories provide further detail on what needs to be done by each team member. 124 | 125 | 6. **Product Backlog:** 126 | - Your project plan, which shows what your team intends to deliver. It contains user stories, backlog items, and (or) requirements that you add to it. 127 | 128 | 8. **Sprint Backlog:** 129 | - Subset of the product backlog that the Development Team commits to completing during a specific sprint. All the Sprint To-dos. list of work items your team plans to complete during a project sprint. 130 | 131 | 9. **Impediments:** 132 | - Track items that may block work from getting done. 133 | 134 | 10. **Test Cases:** 135 | - Develop test cases to define the things that you must validate to ensure that the system is working correctly and is built with a high level of quality. 136 | 137 | 138 | ## Defining Sprints 📅 139 | 140 | A sprint is a time-boxed effort to complete a set of predetermined work. 141 | A Sprint (also known as Iteration in Azure DevOps) is the amount of time we have to complete our tasks. Sprints help keep us focused. 142 | At the end, we can have a short retrospective meeting to share what we've accomplished. 143 | 144 | After that, we can plan the next one. 145 | 146 | ![Sprint what is ibbus](https://github.com/Ibrahimsi/Test-Azure/assets/41462796/8b0570d0-f40f-462e-a425-ab48ba7a7982) 147 | 148 | Sprints are time-boxed periods of one week to one month, during which a product owner, scrum master, and scrum team work to complete a specific product addition. 149 | 150 | **Sprints should last anywhere from 1 to 4 weeks**. 151 | 152 | ### Acceptance Criteria 153 | 154 | **Acceptance criteria** Conditions a software product must meet to be accepted by a user, a customer, or other systems. They are unique for each user story and define the feature behavior from the end-user's perspective. 155 | 156 | ## Important member of Agile/Scrum 🕵️‍♂️ 157 | 158 | Scrum was the creation of Done Increments each Sprint. All the other good stuff that Scrum brings to product development starts and builds from this core concept. 159 | 160 | 1) Product owner 161 | 2) Scrum master 162 | 3) Development team members 163 | 164 | **Product Owner:** Plan the feature set to deliver, set priorities, and track the status of work, code defects, and customer issues. Product Owner is the person that is responsible for maximizing the results of the development team. 165 | 166 | **Scrum Master:** Servant leader for the rest of the team to help them through the project and remove obstacles out of the way so they can achieve the desired results. 167 | - What went well 168 | - What could be improved 169 | - Planning adjustments for the next sprint 170 | 171 | **Development Team:** Developers and IT operations working collaboratively throughout the product lifecycle, in order to increase the speed and quality of software deployment. The team self-organizes and collaborates to achieve the sprint goals. 172 | 173 | **Stakeholders:** Are users with free but limited access to Azure DevOps features and functions. They provide input feedback and may attend sprint reviews and demos to assess progress. Stakeholders could include customers, end-users, managers, (or) other teams. 174 | 175 | **Scrum Team:** A scrum team is a small and nimble team dedicated to delivering committed product increments. A scrum team's size is typically small, at around 10 people, but it's large enough to complete a substantial amount of work within a sprint. 176 | 177 | **Customers/Users:** Users can include human users, service accounts, and service principals. 178 | 179 | **Management:** Refers to the tasks and processes required to maintain your business applications and the resources that support them. 180 | 181 | **External Vendors/Partners:** External users are individuals who are not part of your organization such as customers, partners, suppliers, vendors, clients, (or) other third parties. 182 | 183 | ## Hands-On 🗂️ - Day-2 (Azure Boards — DevOps) ✅ 184 | 185 | 👉 https://medium.com/@ibrahims/azure-boards-devops-05413ae466c8 👈 186 | 187 | Azure Board ibbus 188 | 189 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 190 | 191 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AzureDevOps-Zero-to-Hero with real-time projects 2 | 3 | Welcome to our comprehensive course on Azure DevOps, where we'll dive deep into concepts, demos, and real-time projects to help you master Azure DevOps and bolster your DevOps skills. 4 | 5 | Refer to my blog 6 | 7 | 8 | ### Day 1: Introduction to Azure DevOps and Basic Concepts 🌟 9 | **Status**: Check out 👉 [Day1](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day1) 👈 folder for notes and useful links ✅ 10 | 11 | - What is Cloud Computing 12 | - IaaS VS PaaS VS SaaS 13 | - What is a Shared Responsibility Model 14 | - What is a Traditional Build and Deployment workflow 15 | - What is a Waterfall model in SDLC 16 | - Problems with the traditional software development life cycle (SDLC) 17 | - What is Agile, and how does it solve the above challenges 18 | - What is DevOps and Why It Matters 19 | - What is CI/CD 20 | - What is Azure DevOps and a quick walkthrough 21 | - Creating an Azure DevOps Organization 22 | - Creating an Azure DevOps Project 23 | - Azure DevOps Pricing 24 | - Azure DevOps hosting options: Azure DevOps Services VS Azure DevOps Server 25 | 26 | ### Day 2: Azure Boards and Agile Project Management 📊 27 | **Status**: Check out 👉 [Day2](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day2) 👈 folder for notes and useful links ✅ 28 | 29 | - What are Azure DevOps Boards 30 | - What are Azure board processes, agile, scrum, basic, and CMMI 31 | - Managing work items in Azure boards 32 | - Azure board implementation using basic process 33 | - Working with teams, areas, and iterations 34 | - Filters in backlogs and boards 35 | - Azure board implementation using the scrum process 36 | - Sprint planning and capacity planning 37 | - Product backlog and taskboard 38 | - Customizing Kanban boards 39 | - Customizing dashboards 40 | - Work item query 41 | - Customizing team process 42 | 43 | ### Day 3: Mastering Git and Source Control in Azure DevOps 🌿 44 | **Status**: Check out 👉 [Day3](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day3) 👈 folder for notes and useful links ✅ 45 | 46 | - Introduction to Source Control and Azure Repos 47 | - Git vs TFVC 48 | - Configure Visual Code 49 | - Cloning the repo 50 | - Commit changes 51 | - Reviewing history 52 | - Working with branches 53 | - Tagging a release 54 | - Managing repository 55 | - Managing Pull requests 56 | - Sample application code 57 | 58 | ### Day 4: Build Pipeline 🚀 59 | **Status**: Check out 👉 [Day4](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day4) 👈 folder for notes and useful links ✅ 60 | 61 | 62 | #### Note: For the demo, We will be using the YouTube Clone website 63 | 64 | - Provision Azure App Service to host the website. 65 | - Creating Build Pipelines using the classic editor 66 | - Creating build pipeline using YAML 67 | - YAML pipeline structure, the difference between jobs, stages, steps, and tasks 68 | - Creating a multi-stage CICD pipeline 69 | - variables, triggers, Build properties, agents 70 | - Publishing and Download Build Artifacts 71 | 72 | 73 | ### Day5: 🚀 Continuous Delivery with Azure DevOps Release Pipeline 74 | **Status**: Check out 👉 [Day5](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day5) 👈 folder for notes and useful links ✅ 75 | 76 | #### Note: this is a continuation of the previous blog. 77 | 78 | - Automating Deployment with a multi-stage Release Pipelines 79 | - Continuous Deployment Triggers 80 | - Continuous delivery using deployment slots to enable **Blue-Green deployment** 81 | - Deployment gates such as Query Work Items and Approvals before the prod deployment 82 | - Update the code to test the entire CICD process with the Build and Release pipeline 83 | 84 | 85 | ### Day 6: Azure Test Plans and Testing 🧪 86 | **Status**: Check out 👉 [Day6](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day6) 👈 folder for notes and useful links ✅ 87 | 88 | #### Note: We will be using the Youtube Clone website to implement the below steps 89 | - Azure Test Plan Overview 90 | - Features of Azure test plan 91 | - Managing Test Plans, Suites and Cases 92 | - Subscribe to the test plan free trial 93 | - Authoring, Running, and Analyzing Manual Tests 94 | - Azure Test and Feedback extension 95 | 96 | ### Day 7: Basic Project Artifacts with Azure Artifacts 📦 97 | **Status**: Check out 👉 [Day7](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day7) 👈 folder for notes and useful links ✅ 98 | 99 | #### Note: In this blog, We will use a ✔ Nike Landing page as a sample application for CICD using Azure Artifacts 100 | 101 | - Overview of Azure Artifacts 102 | - Create the Azure DevOps project and check out the application code 103 | - Set up the infra using Azure Web App 104 | - Create Azure Artifacts feed to host the packages 105 | - Create the CI pipeline that builds the package and pushes it to the feed 106 | - Create the CD pipeline that consumes the package 107 | - Promote the package to trigger the release pipeline 108 | - Upstream packages in Azure Artifacts 109 | 110 | ### Day 8: Infrastructure as Code (IaC) with Terraform and Azure DevOps🚀 111 | 112 | **Status**: Check out 👉 [Day8](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day8) 👈 folder for notes and useful links ✅ 113 | 114 | - Introduction to IaC and Tools 115 | - Various Terraform commands and workflow 116 | - Creating Terraform configuration files 117 | - Setting up terraform backend with Azure storage 118 | - Executing Terraform commands using CLI 119 | - Azure DevOps CI Pipeline to init, plan, and archive the plan file 120 | - Azure DevOps CD pipeline to apply the changes 121 | 122 | 123 | ### Day9: Self Hosted agents 👨‍🔧 on Azure Virtual machine scale sets 🧑‍💻 124 | 125 | **Status**: Check out 👉 [Day9](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day9) 👈 folder for notes and useful links ✅ 126 | 127 | - Microsoft-hosted vs. self-hosted agents 128 | - Use case of self-hosted agents 129 | - Ways to setup self-hosted agents: VM, VMSS, container 130 | - What is a Virtual machine scale set 131 | - Set up a self-hosted agent using VMSS 132 | - Register the agent on an agent pool 133 | - Install custom utilities on the agent 134 | - Use the self-hosted agent on a pipeline 135 | - Comparison between self-hosted and Microsoft-hosted agents 136 | - work folder walkthrough on agent 137 | 138 | ### Day 10 Managing Containers with Azure DevOps 139 | **Status**: Check out 👉 [Day10](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day10) 👈 folder for notes and useful links ✅ 140 | 141 | - What is a container 142 | - Understanding Virtual machine V/s Containers. 143 | - Challenges with the non-containerized applications 144 | - Docker Architecture 145 | - Containerize a sample To-Do list web app written in React JS. 146 | - Benefits of a multi-stage docker file 147 | - What are Azure container instances(ACI) 148 | - Azure DevOps CICD Pipeline to deploy to ACI 149 | 150 | 151 | ### Day 11 Implementing end-to-end CI/CD using Azure DevOps on Kubernetes. 152 | **Status**: Check out 👉 [Day11](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day11) 👈 folder for notes and useful links ✅ 153 | 154 | - Basic Introduction of Kubernetes and its benefits 155 | - Kubernetes Architecture 156 | - What is the control plane and its components 157 | - What are Nodes and types of Nodes 158 | - What is a Pod/Deployment/Service 159 | - Azure DevOps CICD Pipeline for a web app running on Kubernetes 160 | - Sample application: My Health Care - Microservices-based Healthcare management app 161 | 162 | 163 | 164 | ### Day 12 Security and Permissions in Azure DevOps 🔐 165 | **Status**: Check out 👉 [Day12](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day12) 👈 folder for notes and useful links ✅ 166 | 167 | - Enabling advanced security in Azure DevOps 168 | - Dependency Scanning 169 | - Secret scanning and managing alerts 170 | - How to use secrets in your pipeline 171 | - Code scanning for vulnerabilities 172 | - Sample Application: My Health Care - Microservices-based Healthcare management app 173 | 174 | ### Day 13: Serverless app CI/CD 🐳 175 | **Status**: Check out 👉 [Day13](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day13) 👈 folder for notes and useful links ✅ 176 | 177 | - Introduction to Azure functions 178 | - Use case and benefits of an Azure function 179 | - Introduction to the sample app to be used for this demo: Serverless QR Code Generator 180 | - Demo creating the Azure function and deploying locally 181 | - Publishing the function to Azure using CLI tools 182 | - Build and release pipeline for building and deploying the code to Azure Functions 183 | 184 | 185 | ### Day 14: Azure DevOps wiki 186 | **Status**: Check out 👉 [Day14](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day14) 👈 folder for notes and useful links ✅ 187 | 188 | - Overview of wiki 189 | - Creating and editing a project Wiki 190 | - Publishing code as Wiki 191 | - How we can use Azure DevOps wiki to collaborate on a project 192 | 193 | 194 | ### Day 15: Azure DevOps Security best practices 🚢 195 | **Status**: Check out 👉 [Day15](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day15) 👈 folder for notes and useful links ✅ 196 | 197 | - Azure DevOps Access Control 198 | - Organization Settings 199 | - Agent pools Management 200 | - Pipeline settings 201 | - Project-level Settings 202 | - Pipeline security 203 | - Repo settings 204 | - Authentication and Authorization 205 | - Secrets and credentials access 206 | 207 | 208 | ### Day 16: Issue and troubleshooting Azure DevOps 209 | **Status**: Check out 👉 [Day16](https://github.com/Ibrahimsi/Azure-DevOps-Zero-to-Hero/tree/main/Day16) 👈 folder for notes and useful links ✅ 210 | 211 | Most common issues you have faced throughout the series and solutions. 212 | 213 | - No hosted parallelism has been purchased or granted 214 | - No Configuration Files Found Error: Terraform 215 | - Classic Editor (or) Release pipeline not visible in Azure DevOps 216 | - After Deployment, Deployment Succeded but did not load any data 217 | - Deployment Slots 218 | 219 | 220 | ## 🔗 Join our community 👇 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | -------------------------------------------------------------------------------- /Day11/README.md: -------------------------------------------------------------------------------- 1 | # Day 11/16 - Azure DevOps CICD Pipeline on Azure Kubernetes Services 🛳️ 🐳 2 | 3 | Azure Kubernetes Service (AKS) offers the quickest way to start developing and deploying cloud-native apps in Azure, datacenters, or at the edge, with built-in code-to-cloud pipelines and guardrails. Azure handles critical tasks like health monitoring and maintenance as a hosted Kubernetes service. 4 | 5 | ## Kubernetes Architecture 6 | 7 | The Kubernetes Architecture has mainly 2 components – the master node and the worker node. 8 | 9 | K8s architecture ibbus 10 | 11 | The master node machine components include the Kubernetes API server, Kubernetes scheduler, Kubernetes controller manager, etcd. Kubernetes worker node components include a container runtime engine or docker, a Kubelet service, and a Kubernetes proxy service. 12 | 13 | 14 | ## Kubernetes components 15 | 16 | 𝗠𝗮𝘀𝘁𝗲𝗿 𝗖𝗼𝗺𝗽𝗼𝗻𝗲𝗻𝘁𝘀: 17 | 1️⃣ API Server - Exposes the Kubernetes API. 18 | 2️⃣ Controller - Helps in maintaining the desired state of your cluster. 19 | 3️⃣ Scheduler - Schedules pods onto nodes. 20 | 4️⃣ etcd - Persistent storage which stores all cluster data. 21 | 22 | 𝗪𝗼𝗿𝗸𝗲𝗿 𝗖𝗼𝗺𝗽𝗼𝗻𝗲𝗻𝘁𝘀: 23 | 1️⃣ Kubelet - An agent that runs on each node in the cluster. 24 | 2️⃣ Kube Proxy - Takes care of Kubernetes networking. 25 | 3️⃣ Container Runtime - Responsible for running containers. 26 | 27 | ## Pre-requisites 28 | 29 | ### Infrastructure provisioning 30 | 31 | **Using the below script, you can provision infra for this demo** 32 | 33 | The following resources will be provisioned: 34 | 35 | * Resource Group 36 | * AKS Kubernetes Cluster 37 | * Image container registry 38 | * SQL Server 39 | * SQL Database 40 | 41 | ``` bash 42 | 43 | #!/bin/bash 44 | REGION="westus" 45 | RGP="day11-demo-rg" 46 | CLUSTER_NAME="day11-demo-cluster" 47 | ACR_NAME="day11demoacr" 48 | SQLSERVER="day11-demo-sqlserver" 49 | DB="mhcdb" 50 | 51 | 52 | #Create Resource group 53 | az group create --name $RGP --location $REGION 54 | 55 | #Deploy AKS 56 | az aks create --resource-group $RGP --name $CLUSTER_NAME --enable-addons monitoring --generate-ssh-keys --location $REGION 57 | 58 | #Deploy ACR 59 | az acr create --resource-group $RGP --name $ACR_NAME --sku Standard --location $REGION 60 | 61 | #Authenticate with ACR to AKS 62 | az aks update -n $CLUSTER_NAME -g $RGP --attach-acr $ACR_NAME 63 | 64 | #Create SQL Server and DB 65 | az sql server create -l $REGION -g $RGP -n $SQLSERVER -u sqladmin -p P2ssw0rd1234 66 | 67 | az sql db create -g $RGP -s $SQLSERVER -n $DB --service-objective S0 68 | 69 | ``` 70 | 71 | ## Change the Firewall settings of the SQL server 72 | 73 | If you have the Allow Azure Services and resources to access this server setting enabled, this counts as a single firewall rule for the server. You can configure server-level IP firewall rules by using the Azure portal. 74 | 75 | Firewall setting ibbus 76 | 77 | ## Setup Azure DevOps Project 78 | 79 | ### Pre-requisites 80 | 81 | Make sure the below Azure DevOps extensions are installed and enabled in your organization 82 | - Replace Token 83 | - Kubernetes extension 84 | 85 | Replace Tokens is an extension that can be used in Azure DevOps to replace tokens in the code files with variable values (which can be configured in the Pipelines Library) during the execution of the CI/CD process. 86 | 87 | Quarkus can automatically generate Kubernetes resources based on sane defaults and user-supplied configuration using dekorate. It currently supports generating resources for vanilla Kubernetes, OpenShift, and Knative. 88 | 89 | Once the infra is ready, go to dev.azure.com --> Project --> repos 90 | and import the below git repo, which has the source code and pipeline code 91 | 92 | https://github.com/Ibrahimsi/MyHealthClinic-AKS.git 93 | 94 | ### Build and Release Pipeline 95 | 96 | - You can create your pipeline by following along with the editing of the existing pipeline. The below details need to be updated in the pipeline: 97 | - Azure Service connection 98 | - Token pattern 99 | - Pipeline variables 100 | - The Kubectl version should be the latest in the release pipeline 101 | - Secrets should be updated in the deployment step 102 | - ACR details in the pipeline should be updated 103 | 104 | **Azure Pipeline Code** 105 | 106 | ``` 107 | # Starter pipeline 108 | # Start with a minimal pipeline that you can customize to build and deploy your code. 109 | # Add steps that build, run tests, deploy, and more: 110 | # https://aka.ms/yaml 111 | 112 | trigger: 113 | - main 114 | 115 | pool: 116 | vmImage: ubuntu-latest 117 | 118 | steps: 119 | - task: replacetokens@4 120 | displayName: 'Replace tokens in appsettings.json' 121 | inputs: 122 | rootDirectory: '$(build.sourcesdirectory)/src/MyHealth.Web' 123 | targetFiles: 'appsettings.json' 124 | encoding: 'auto' 125 | tokenPattern: 'rm' 126 | writeBOM: true 127 | escapeType: 'none' 128 | actionOnMissing: 'warn' 129 | keepToken: false 130 | actionOnNoFiles: 'continue' 131 | enableTransforms: false 132 | enableRecursion: false 133 | useLegacyPattern: false 134 | enableTelemetry: true 135 | 136 | - task: replacetokens@3 137 | displayName: 'Replace tokens in mhc-aks.yaml' 138 | inputs: 139 | targetFiles: 'mhc-aks.yaml' 140 | escapeType: none 141 | tokenPrefix: '__' 142 | tokenSuffix: '__' 143 | 144 | - task: DockerCompose@0 145 | displayName: 'Run services' 146 | inputs: 147 | containerregistrytype: 'Azure Container Registry' 148 | azureSubscription: 'Pay-As-You-Go(1)(f30deb63-a417-4fa4-afc1-813a7d3920bb)' 149 | azureContainerRegistry: '{"loginServer":"day11demoacrs.azurecr.io", "id" : "/subscriptions/f30deb63-a417-4fa4-afc1-813a7d3920bb/resourceGroups/day11-demo-rg/providers/Microsoft.ContainerRegistry/registries/day11demoacrs"}' 150 | dockerComposeFile: 'docker-compose.ci.build.yml' 151 | action: 'Run services' 152 | detached: false 153 | 154 | - task: DockerCompose@0 155 | displayName: 'Build services' 156 | inputs: 157 | containerregistrytype: 'Azure Container Registry' 158 | azureSubscription: 'Pay-As-You-Go(2)(f30deb63-a417-4fa4-afc1-813a7d3920bb)' 159 | azureContainerRegistry: '{"loginServer":"day11demoacrs.azurecr.io", "id" : "/subscriptions/f30deb63-a417-4fa4-afc1-813a7d3920bb/resourceGroups/day11-demo-rg/providers/Microsoft.ContainerRegistry/registries/day11demoacrs"}' 160 | dockerComposeFile: 'docker-compose.yml' 161 | dockerComposeFileArgs: 'DOCKER_BUILD_SOURCE=' 162 | action: 'Build services' 163 | additionalImageTags: '$(Build.BuildId)' 164 | 165 | - task: DockerCompose@0 166 | displayName: 'Push services' 167 | inputs: 168 | containerregistrytype: 'Azure Container Registry' 169 | azureSubscription: 'Pay-As-You-Go(1)(f30deb63-a417-4fa4-afc1-813a7d3920bb)' 170 | azureContainerRegistry: '{"loginServer":"day11demoacrs.azurecr.io", "id" : "/subscriptions/f30deb63-a417-4fa4-afc1-813a7d3920bb/resourceGroups/day11-demo-rg/providers/Microsoft.ContainerRegistry/registries/day11demoacrs"}' 171 | dockerComposeFile: 'docker-compose.yml' 172 | dockerComposeFileArgs: 'DOCKER_BUILD_SOURCE=' 173 | action: 'Push services' 174 | additionalImageTags: '$(Build.BuildId)' 175 | 176 | - task: DockerCompose@0 177 | displayName: 'Lock services' 178 | inputs: 179 | containerregistrytype: 'Azure Container Registry' 180 | azureSubscription: 'Pay-As-You-Go(1)(f30deb63-a417-4fa4-afc1-813a7d3920bb)' 181 | azureContainerRegistry: '{"loginServer":"day11demoacrs.azurecr.io", "id" : "/subscriptions/f30deb63-a417-4fa4-afc1-813a7d3920bb/resourceGroups/day11-demo-rg/providers/Microsoft.ContainerRegistry/registries/day11demoacrs"}' 182 | dockerComposeFile: 'docker-compose.yml' 183 | dockerComposeFileArgs: 'DOCKER_BUILD_SOURCE=' 184 | action: 'Lock services' 185 | outputDockerComposeFile: '$(Build.StagingDirectory)/docker-compose.yml' 186 | 187 | - task: CopyFiles@2 188 | displayName: 'Copy Files' 189 | inputs: 190 | Contents: | 191 | **/mhc-aks.yaml 192 | **/*.dacpac 193 | 194 | TargetFolder: '$(Build.ArtifactStagingDirectory)' 195 | 196 | - task: PublishBuildArtifacts@1 197 | displayName: 'Publish Artifact' 198 | inputs: 199 | ArtifactName: deploy 200 | ``` 201 | 202 | #### Steps in the pipeline 203 | 204 | Steps pipeline ibbus 205 | 206 | Azure DevOps provides integration with popular open-source and third-party tools and services—across the entire DevOps workflow. 207 | 208 | **https://azuredevopslabs.com/labs/vstsextend/kubernetes/** 209 | 210 | ## Destroy the resources 211 | 212 | ``` 213 | #!/bin/bash 214 | 215 | 216 | # Set environment variables 217 | REGION="westus" 218 | RGP="day11-demo-rg" 219 | CLUSTER_NAME="day11-demo-cluster" 220 | ACR_NAME="day11demoacr" 221 | SQLSERVER="day11-demo-sqlserver" 222 | DB="mhcdb" 223 | 224 | # Function to handle errors 225 | handle_error() { 226 | echo "Error: $1" 227 | exit 1 228 | } 229 | 230 | # Function to check if the resource exists 231 | resource_exists() { 232 | az resource show --ids $1 &> /dev/null 233 | } 234 | 235 | # Delete Azure Kubernetes Service (AKS) 236 | if resource_exists $(az aks show --resource-group $RGP --name $CLUSTER_NAME --query id --output tsv); then 237 | az aks delete --resource-group $RGP --name $CLUSTER_NAME || handle_error "Failed to delete AKS." 238 | else 239 | echo "AKS not found. Skipping deletion." 240 | fi 241 | 242 | # Delete Azure Container Registry (ACR) 243 | if resource_exists $(az acr show --name $ACR_NAME --resource-group $RGP --query id --output tsv); then 244 | az acr delete --name $ACR_NAME --resource-group $RGP || handle_error "Failed to delete ACR." 245 | else 246 | echo "ACR not found. Skipping deletion." 247 | fi 248 | 249 | # Delete SQL Database 250 | if resource_exists $(az sql db show --resource-group $RGP --server $SQLSERVER --name $DB --query id --output tsv); then 251 | az sql db delete --resource-group $RGP --server $SQLSERVER --name $DB || handle_error "Failed to delete SQL Database." 252 | else 253 | echo "SQL Database not found. Skipping deletion." 254 | fi 255 | 256 | # Delete SQL Server 257 | if resource_exists $(az sql server show --resource-group $RGP --name $SQLSERVER --query id --output tsv); then 258 | az sql server delete --resource-group $RGP --name $SQLSERVER || handle_error "Failed to delete SQL Server." 259 | else 260 | echo "SQL Server not found. Skipping deletion." 261 | fi 262 | 263 | # Delete Resource Group 264 | if resource_exists $(az group show --name $RGP --query id --output tsv); then 265 | az group delete --name $RGP || handle_error "Failed to delete Resource Group." 266 | else 267 | echo "Resource Group not found. Skipping deletion." 268 | fi 269 | 270 | echo "Resources successfully deleted." 271 | 272 | ``` 273 | 274 | ## Hands-On 🗂️ - Day-11 (Three Tier Architecture CI CD On Kubernetes — Azure DevOps) ✅ 275 | 276 | 👉 https://medium.com/@ibrahims/three-tier-architecture-ci-cd-on-kubernetes-azure-devops-bf558c16ea07 👈 277 | 278 | Health clinic ibbus 279 | 280 | If you are doing a project on Hands-on follow the above blog it would be more helpful. 281 | --------------------------------------------------------------------------------