├── 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 |
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 |
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 |
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 | 
14 |
15 | ## Use case of self-hosted agents
16 |
17 | 
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 |
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 |
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 |
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 | 
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 | 
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 |
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 |
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 | 
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 |
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 | 
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 |
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 | 
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 |
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 | 
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 |
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 |
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 |
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 | 
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 |
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 | 
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 |
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 | 
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 |
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 | 
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 |
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 |
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 | -
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 |
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 | 
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 | 
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 | 
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 |
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 | 
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 | 
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 | 
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 |
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 | 
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 | 
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 |
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 | 
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 |
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 | 
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 |
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 |
44 |
45 |
46 | ## Run Terraform apply
47 |
48 | **terraform apply**
49 |
50 |
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 | 
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 |
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 |
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 | 
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 | 
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 | 
182 |
183 | Destroy → Removal of every copy of a data item from an organization.
184 |
185 |
186 |
187 | ### Hands-On 🗂️ - Day-8 (Azure Terraform Pipeline — DevOps) ✅
188 |
189 | 👉 https://medium.com/@ibrahims/azure-terraform-pipeline-devops-b57005a37936 👈
190 |
191 |
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
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 |
11 |
12 | 3. Accept the permission requests for accessing your subscription.
13 |
14 | 4. Select the PartsUnlimited template and click Select Template.
15 |
16 |
17 |
18 | 6. Click Create Project and wait for the process to complete.
19 |
20 |
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 | 
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 |
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 |
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 |
223 |