• Devops
    • The term DevOps is a combination of two words, namely Development and Operations. DevOps is a practice that allows a single team to manage the entire application development life cycle: development, testing, deployment, and monitoring.
    • The ultimate goal of DevOps is to decrease the duration of the system’s development life cycle while delivering features, fixes, and updates frequently in close synchronization with business objectives.
    • DevOps is a software development approach with the help of which you can develop superior quality software quickly and with more reliability. It consists of vaarious stages such as continuous development, integration, testing, deployment, and monitoring.
    • Before DevOps, We had two approaches for software development namely the Waterfall and the Agile.
    • Waterfall:
      • The waterfall model is a software development model that is pretty straight forward and linear. This model follows a top-down approach.
      • This model has various starting with Requirements gathering and analysis. This is the phase where you get the requirements from the client for developing an application. After this, you try to analyze these requirements.
      • The next phase is the Design phase where you prepare a blueprint of the software. Here, you think about how the software is actually going to look like.
      • Once the design is ready, you move further with the Implementation phase where you begin with the coding for the application. The team of developers works together on various components of the application.
      • Once you complete the application development, you test it in the Verification phase. There are various tests conducted on the application such as unit testing, integration testing, performance testing, etc.
      • After all the tests on the application are completed, it is deployed onto the production servers.
      • At last, comes the Maintenance phase. In this phase, the application is monitored for performance. Any issues related to the performance of the application are resolved in this phase.
      • Advantages of the Waterfall Model:
      • Simple to understand and use
      • Allows for easy testing and analysis
      • Saves a significant amount of time and money
      • Good for small projects if all requirements are clearly defined
      • Allows for departmentalization & managerial control
      • Disadvantages of Waterfall Model:
      • Risky and uncertain
      • Lack of visibility of the current progress
      • Not suitable when the requirements keep changing
      • Difficult to make changes to the product when it is in the testing phase
      • The end product is available only at the end of the cycle
      • Not suitable for large and complex projects
    • Agile:
      • In Agile, a company releases an application with some high-priority features in the first iteration.
      • After its release, the end-users or the customers give you feedback about the performance of the application.
      • Then you make the necessary changes to the application along with some new features and the application is again released which is the second iteration.
      • You repeat this entire procedure until you achieve the desired software quality.
      • Advantages of Agile Model
      • It adaptively responds to requirement changes favorably
      • Fixing errors early in the development process makes this process more cost-effective
      • Improves the quality of the product and makes it highly error-free
      • Allows for direct communication between people involved in software project
      • Highly suitable for large & long-term projects
      • Minimum resource requirements & very easy to manage
      • Disadvantages of Agile Model
      • Highly dependent on clear customer requirements
      • Quite Difficult to predict time and effort for larger projects
      • Not suitable for complex projects
      • Lacks documentation efficiency
      • Increased maintainability risks
    • Continuous Integration (CI) and continuous delivery (CD): It is the process where any changes made will be and start complete process automatically. 
      • Multiple developers committing code to a central repository, this will make sure  branches remain healthy and create a build using the code.
    • Continuous Delivery: Taking the successsful build and packing it ready to be deployed into production systems.
    • DevOps tools for continuous development (CD): Continuous development includes both the planning and coding of the program in the DevOps life cycle. Jira and Git are two of the most well-liked DevOps tools for this stage of development
    • DevOps tools for continuous testing: Continuous testing in the DevOps life cycle refer to a regular inspection of developed software for errors, and flaws. Continuous testing is especially beneficial when using DevOps automation technologies. Through functions like automated test execution and parallel testing across many codebases, they enable quality assurance (QA) teams to broaden the scope of testing. Two of the most useful continuous testing tools are Selenium and Bamboo:
    • DevOps tools for continuous deployment: 
    • DevOps tools for continuous feedback:
    • DevOps tools for continuous monitoring:
    • DevOps tools for continuous operation: 
    • Code
  • Azure Devops 
    • Azure Devops Organization
      • Azure Devops Account & Portal
        • Azure Devops Overview:
        • Benefits of using Azure Devops:
        • Create Account:
          • Azure devops is Microsofdt Azure service, to create Azure account go to https://devops.azure.com 
          • Portal access: https://dev.azure.com/organization_name/project_name (https://dev.azure.com/star2024/star_basic)
          • create a free account with your email credentials/git hub/Bank details.
        • Azure Devops Portal:
          • Go to All Services / Devops and click organization.
          • DevOps Tools
            • Chaos Studio
            • Azue Deployment Environments
            • Dev Centers
            • Azure DevOps Organizations
              • My Azure DevOps Organizations:  It is like a container in which all your organization projects created.
              • Create new organization, select default directory/Microsoft Account
              • Enter name of Azure DevOps Organization: star2024 (dev.azure.com/star2024), Create a project 
              • You can also create Projects by visiting directly in organization https://dev.azure.com/star2024
              • Organization settings:
                • General:

                  • Overview:
                    • Name: Name of organization. Click enable to get URL to get access to organization through browser.  Microsoft renamed from visual studio team services (VSTS) to Azure Devops services in September 2018.  URL: https://dev.azure.com/star2024
                    • Privacy URL: users personal data handling, it is define in the policy and this url refer to that policy defined.
                    • Description: organisations description.
                    • Time zone: select time zone.
                    • Region: all project data will be stored in this region, selected region cannot be changed.
                    • Organization Usage Limit:
                    • Projects: 0/1000
                    • Work Item Tags: 0/150000
                    • Organization Owner: change organization owner.
                    • Recently deleted project: deleted projects will remain here for 28 days.  You can restore deleted projects within 28 days.
                    • Delete organization. Delete organization which deletes all its projects.
                  • Projects:
                    • Lists the projects created in this organization.
                    • Recently deleted projects.
                    • Create a new project.
                      • Name: Enter name of the project
                      • Description: Enter description
                      • Visibility: Select public/Private
                        • Public: anyone can access public project without sign in. it is used in open source software.  It can be activated in organization settings/security/policies/Allow public projects.
                        • Private: users required login credentials. User need to add to this project and assign permission
                      • Advanced: 
                        • Version control: Git
                        • Work Item Process: Basic, Agile, CMMI, Scrum or custom created.
                      • Edit project:
                  • Users:
                    • Add users:
                      • Users: select users which are created in Azure Entra ID or enter email for external users.
                      • Access Level: select 
                        • Basic: Provides access to most features.  5 license are free.
                        • Stakeholder: Can be assigned to unlimited users. Provides partial access to private and full access to public projects.  Assign to users with no license.  It is free of cost.  New user get this access level.
                        • Basic + Test plan: Features of both. It is grayed out,  to enable go to organization settings / billing and enable free trial.
                        • Visual Studio Subscriber: Assign to users who already got visual studio subscription.
                      • Add to projects
                        • select projects to which user will work. 
                      • Azure DevOps Groups: select 
                        • Project Reader.
                        • Project Contributor
                        • Project Administrator.
                      • To change user's access level, select user and click three dots and change user access level.
                    • Code
                  • Billing:
                    • Setup Billing: by default billing is not set.  need to setup billing.
                    • Enable Basic + Test plans, user access level.
                    • Default access level for new users: Stakeholder.
                    • Artifacts billing.
                  • Global Notifications:
                  • Usage:
                  • Extensions:
                    • With the help of extensions we can install tools and use its capabilities in the project. (for example, maven, kubernetes, docker etc..)
                    • During code development or due to dependency, developer has mention open source packages/tools in the code which required to add in the extension.
                    • Go to General and click extensions.  Click Browse market place.  there will be number of third party tools available,  select white source bolt tool (it is used to check any third party vulnerability and security).
                    • select Mend Bolt (formerly known as white source) free version.
                    • click install and click proceed to organization.
                    • click on extension and see installed : mend bolt
                    • scroll down in organization settings and in the bottom in Extension/Mend, click mend.
                    • create a free account.  close window.
                    • Lab:  Adding extension to check the vulnerabilities.
                    • Step 1: Create a VM
                      • Create a VM on prem using vmware workstation and it will be used for self hosted agent to build source code in azure pipeline.
                      • Install visual studio 2022, Git
                    • Step 2: Create a project in visual studio
                      • open visual studio/create a new project.
                      • select ASP.Net Core Web App (Razor Pages)
                      • Location of the project = C:\Users\Admin\source\repos
                      • Name = extension_project
                      • .NET 8.0
                    • Step 3: Create a project in Azure devops
                      • login to dev.azure.com/star2024
                      • Create a project, name = extension_project, select Git, Work Item = Agile, public
                      • Go to project/repos and copy path = https://star2024@dev.azure.com/star2024/extension_project/_git/extension_project
                    • Step 4: Integrate local repository of visual studio with azure repos.
                      • In the visual studio click /Git/create git repository
                      • select existing remote, paste the path and click create and push.
                      • code files are pushed to azure repos, refresh and check.
                    • Step 5: Add self hosted agent (computing resource to perform build step) 
                      • Go to project settings/Pipelines/Agent pools/Default/agents/new agent
                      • name = onprem-agent1
                      • Download the agent (windows) copy downloaded file in VM in step 1
                      • Create a folder extension-agent and move into folder and extract files and open powershell in the folder where files are extracted.
                      • PS:\extension-agent\.\config.cmd
                      • Enter server URL >https://dev.azure.com/star2024
                      • Enter authentication type (press enter for PAT) > enter
                      • Enter personal access token > To generate the token, go to project/user settings (click right top corner) and click personal access token enter name, full access, duration and generate, paste it here and enter.
                      • Enter agent pool (press enter for default) > enter
                      • Enter agent name (press enter for AGENT) > onprem-agent Enter
                      • Enter work folder (press enter for _work) > enter
                      • Enter run agent as service? (Y/N) (press enter for N) > Y Enter
                      • Enter enable SERVICE_SID_TYPE_UNRESTRICTED for agent service (Y/N) (press enter for N) > Enter
                      • Enter User account to use for the service (press enter for NT AUTHORITY\NETWORK SERVICE) > Enter
                      • This service required one of the following version of .NET Framwork, check for windows o/s (2016 server) install it.
                      • agent - offline (at powershell command  .\run.cmd)
                    • Step 6: Create a pipeline
                      • create pipeline, select Azure Repose Git (YAML) as code has been pushed here.
                      • select repository = extension_project
                      • select ASP.NET Core (.Net Framework)
                      • it will open azure-pipeline.yml 
                      • Add self hosted agent in yaml file.
                        • pool:
                        • ..name:- 'Default'
                        • ..vmImage:- 'extension-agent' 
                      • mention extension in the yaml file: 
                      • Click show assistant on right hand side of YAML file.
                      • list of tasks shown, search mend bolt and select.  before selecting keep cursor in the bottom as wherever cursor is there it will add.
                      • save and run.  job will start and check white source as a task has been started.
                      • Go to pipeline and see next to summary Mend Bolt.  It it detects any vulnerability will show here.
                    • Uninstall: To uninstall any extensions, go to organization settings/extension and select extension and click uninstall.
                    • How to Manage Security of Organization's Extension:
                      • Any user cannot install extensions, should have organization owner/project collection administrator group.
                      • To check while installing extension, click organiation settings/extension/security next to browse marketplace.
                      • add user to project collection administrator group to grant access to install extensions.
                      • If a user is not a member of project collection administrator group, then user keep continue installing extension and at the time to click install there will be a form which request with owner to grant permission to install extension.
                      • Once it is approved user can install.
                      • In organization settings/extensions/Requested : request will show here for approval.
                  • Microsoft Entra: 
                    • Integrate Azure Entra ID with azure devops with similar email address.  aziz.azure0410@gmail.com is used to create azure account and tenant, Azure creates account aziz.azure0410@azizazure0410gmail.onmicrosoft.com and this is linked with default directory. 
                    • The user (aziz.azure0410@azizazure0410gmail.onmicrosoft.com) must be added to Project Collection Administrator seucirty group.
                    • This user type must be Member in Azure Entra ID.
                    • click connect directory, select Azure directory (default directory) in our case and click connect.
                    • Your organization stardevops0410 is successfully connected to Default Directory Microsoft Entra tenant. Signout and sign in again.
                    • all users of Azure Entra ID will reflect here.
                    • Integrate Azure Entra ID with azure devops with different email address.
                    • Go to Organization settings / users and add user: aziz27uk@yahoo.co.uk
                    • Accept invitation in yahoo.co.uk
                    • The user policy, External guest access, must be On
                    • Try again to with accept invitation, if prompted to enter password as it has not been set, click send code and enter code received in email.
                    • Accept Permission requested by: default directory.
                    • This user is not reflected in azure entra ID, connect to Entra ID and it show a message that a user is not a member of target directory.
                    • Click on Resolve.
                    • create a user in Azure Entra ID and map this user or any existing user in Azure Entra ID.
                    • user is mapped.

                  Security:

                  • Security Overview
                  • Policies:
                  • Permissions:

                  Boards:

                  • Process: Change process of project form basic to agile/cmmi/scrum.
                    • Go to Organization settings/Board/click Process in which project is created/All processes/projects/choose project and click three dots/change process and select new process.

                  Pipelines:

                  • Agent pools:
                  • Settings:
                  • Deployment pools:
                  • Parallel jobs:
                    • Error get : No hosted parallelism has been purchased or granted.  To request a free parallelism, please fill out the following form https://aka.ms/
                    • Check status of parallel jobs grant:
                    • In private projects:
                      • Microsoft-hosted, If free tier is granted then you can run 1800 minutes per month
                      • self-hosted: you can run 1 parallel job at a time
                      • In the above you can run 1 job at a time.
                    • In Public Projects:
                      • Microsoft-hosted, If free tier is granted then you can run 1800 minutes per month
                      • self-hosted: you can run 1 parallel job at a time
                  • OAuth Configuration:

                  Repos:

                  • Repositories:

                  Artifacts:

                  • storage:
            • DevTest Labs
            • Github
            • Azure Lab Services
            • Azure Load Testing
            • Managed DevOps Pools
            • Microsoft Dev Box
            • Network Connections
            • Playwright Testing
            • Projects
          • Integration
            • API Connections
            • API Management services
            • App Configuration
          • Monitoring
            • Application Insights
            • Datadog - An Azure Native ISV Service
            • Elastic Cloud (Elasticsearch) -An Azure Native
            • Monitor
            • Azure Native Dynatrace Service
            • Aure Native New Relic Service
        • code
      • Code
      • Types of Project in Azure
        • Types of projects can be created in Azure devops
          • Agile
          • Basic
          • CMMI
          • SCRUM
        • Visibility
          • Local
          • Public
        • Version Control System
          • Git
      • Azure Boards
        • Lets understand the Azure boards functionality with the above dinner invitation example.
        • A family members of 5 is inviting guest for dinner.
        • Head of the family contact the guest and take their choice of dishes/requirement.
        • After gathering the information made a list of dishes and working strategy.
        • Create a Process and make 3 teams and distribute the work to team members.
        • Azure boards provides software development team which is required to deveope/manage software with interactive and customizable tools.
        • Product owner represents the business or connection between development team and customer.
        • Backlog is a list of task.
        • Sprint is a set period of time during which work has to be completed.
        • Task is the work which needs to be complete.
        • code
      • Basic Work Item process
        • code
        • code
        • code
      • Agile work item process
        • code
        • code
        • code
      • CMMI work item process
        • code
        • code
        • code
    • Azure Projects with Git 
      • Create Basic/Agile/CMMI/SCRUM Project with Git (distributed version control)
        • Go to All Services/Devops/DevOps tools/Azure DevOps Organizations/select organization/create project
        • Enter Project Name: star_project_basic/star_project_agile/star_project_cmmi/star_project_scrum
        • Description: star project 
        • select:
          • Private (only assigned projects a user can view) 
          • Public (every user can view other public projects even which is not assigned to user but has very limited access)
        • Advance:
          • version control = Git / Team Foundation Version Control (TFVC)-Discontinued
          • work item process = Basic/Agile/CMMI/Scrum/Custom.
            • CMMI
            • Epic: (user Interaction channel) 1 quarter.
              • Feature: (Phone and chat Integration) 1 month
                • Requirement: (user story in Agile): Telephone Integration 1 week.
                  • Task: Database for Caller Identification Verification.
                  • Bugs:
            • Change Request: Additional Work item (facebook chat) on top of agreed tasks (phone and chat), track of this change.
            • Review:
            • Risk:  Address the potential risk, 
            • Issue: During the delivery of product, an unexpcted problem occurs which need to address.
            • Test case:
            • CMMI comparision with Agile:

            • SCRUM:
            • Epic:
              • Feature:
                • Product Backlog Item (user story in Agile):
                  • Task: 
            • Impediment (Issue in Agile, CMMI):  If you have known issues, you want to track than you can do so by defining an implediment, It is used for unplanned activity.
            • Test Case:
            • Bug: 
          • Create project.
        • Change project process:
          • Go to Organization settings/Board/click Process in which project is created/All processes/projects/choose project and click three dots/change process and select new process.
      • Project Blade:
        • star_project_basic/agile/cmmi/scrum +: click to select work items 
        • Overview:
          • Members: list of users associated with this project.
          • Invite or add user: Invite external users for this project. Ener user email address and select which security group/teams membership.  To add organization users go to organization settings/Active directory.  To manage users select user and click three dots where you can change access level, select/deselect security group/team.  When you create a team a security group is created and another security group contributor also added.  Users created will get project contributor role,  you can change to project reader and project administrator.
            • Access Level: users will be assign different access level to get different features. Charges are different at different level.  To change user access level select user and click three dots and click mange user.
              • Basic: Provides access to most features.
              • Stakeholder: Can be assigned to unlimited users. Provides partial access to private and full access to public projects.  Assign to users with no license.  It is free of cost.  New user get this access level.
              • Basic + Test plan: Features of both. It is grayed out,  to enable go to organization settings / billing and enable free trial.
              • Visual Studio Subscriber: Assign to users who already got visual studio subscription.
          • Add to favourites.
        • Summary:
        • Dashboards: Create your custom dashboard.
        • Wiki: 
        • Boards
          • Work Items
            • Work item comparision
               
                    Azure Devops Account: aziz.azure2024@gmail.com
              Organization: star2024 (https://dev.azure.com/star2024)
               star_Project_Basic  star_Project_Agile   star_Project_CMMI  star_Project_Scrum

              New Project Configuration:

              Click + next to project: 

              New Work Item: 

              1. Epic:
              2. Task:
              3. Issue:

               

               

               

               

              New Project Configuration:

              Click + next to project: 

              New Work Item: 

              1. Epic:
              2. Feature:
              3. Issue:
              4. Task:
              5. Test Case:
              6. user story:
              7. Bug

               

               

               

              New Project Configuration:

              Click + next to project: 

              New Work Item: 

              1. Change Request:
              2. Epic:
              3. Feature:
              4. Issue:
              5. Requirement:
              6. Review:
              7. Risk:
              8. Task:
              9. Test case:
              10. Bug

               

               New Project Configuration:

              Click + next to project: 

              New Work Item: 

              1. Epic:
              2. Feature:
              3. Impediment:
              4. Product Backlog Item:
              5. Task:
              6. Test Case:

               

               

               

               

               

               

               

               

               

               

               

               

               

               

               

               

               

            • Basic work items
              • Assigned to me:  
              • Following:
              • Mentioned:
              • My Activity:
              • Recently updated:
              • Recently completed:
              • Recently created:
              • + New Work Item in Basic:
                • Epic
                  • Create work item Epic
                • Issue
                  • Create work item Issue
                • Task
                  • Create work item task
              • Open in Queries:
              • Import Work items
              • Recycle Bin
            • Agile work items
              • Assigned to me:  
              • Follwing:
              • Mentioned:
              • My Activity:
              • Recently updted:
              • Recently completed:
              • Recently created:
              • + New Work Item in Agile:
                • Epic
                • Feature
                • Issue
                • Task
                • Test case
                • User Story
                • Bug
              • Open in Queries:
              • Import Work items
              • Recycle Bin
            • CMMI work items
              • Work items:
                • Assigned to me:  
                • Follwing:
                • Mentioned:
                • My Activity:
                • Recently updted:
                • Recently completed:
                • Recently created:
                • + New Work Item in CMMI:
                  • Change Request
                  • Epic
                  • Feature
                  • Issue
                  • Requirement
                  • Review
                  • Risk
                  • Task
                  • Test case
                  • Bug
                • Open in Queries:
                • Import Work items
                • Recycle Bin
            • Scrum work items
              • Work items:
                • Assigned to me:  
                • Follwing:
                • Mentioned:
                • My Activity:
                • Recently updted:
                • Recently completed:
                • Recently created:
                • + New Work Item in Scrum:
                  • Epic
                  • Feature
                  • Impediment
                  • Product Backlog Item
                  • Task
                  • Test Case
                  • Bug
                • Open in Queries:
                • Import Work items
                • Recycle Bin
          • Boards: It shows all work items created in backlogs.
            • Boards is the place where work is assgined to users, check the progress and change the work.
            • Lets understand the Azure boards functionality with the above dinner invitation example.
            • A family members of 5 is inviting guest for dinner.
            • Head of the family contact the guest and take their choice of dishes/requirement.
            • After gathering the information made a list of dishes and working strategy.
            • Create a Process and make 3 teams and distribute the work to team members.
            • Azure boards provides software development team which is required to deveope/manage software with interactive and customizable tools.
            • Product owner represents the business or connection between development team and customer.
            • Backlog is a list of task.
            • Sprint where time period is set to complete the task.
            • Task is the smallest unit of work which needs to be complete.
            • Boards Blade in Basic work item process:
              • Boards:
                • It has three starges.
                • To Do: when work in initial stage
                • Doing: work in progress
                • Done: work is done
                • state of work can be change by drag and drop or click three dots and move to column.
                • You can also create new work item under epic or issues.
                • Click on any item to check its settings.
                • unassigned: Assign this work item to a team member, make sure the user is added to this project.
                • state =To Do and reason = backlogs.  if you change state = Doing than reason = started and state = done than reason = completed.
                • Iteration = star_project_basic\sprint1
                • Tag: add a keyword, which help in searching work item.
                • Discussion: you can discuss with team member, type @membername and start writing.  click save and message will deliver to recepient.  On the top of this window it will show 1 comments.
                • Planning:
                  • Priority: default is 2, you have options 1 to 4
                  • Star date: enter date
                  • Target date: enter date
                • History: it shows the list of changes made in this work item.
                  • State Graph: it shows current state of work item.
                • Link:  you can link current work item to another work item.
                • Attachment: attach a file with this work item.
                • Notification Settings: works with follow.
                  • Not subscribed: only receive notification from this work item when you have been @mentioned.
                  • subscribed:Received all notifications from this work item.
                  • Custom: you will only received notification selected from the below:
                    • state change: when state change from to do to doing or done, checkbox
                    • Assigned to changed: when work item is assigned to some one, checkbox
                    • Iteration changed:if you change sprint, checkbox
                • Follow: when you click follow, you will receive notification, which is defined in notiification.
                • Three dots:
                  • New linked work item:
                  • Change type:
                  • Move to team project
                  • create copy of work item
                  • email work item
                  • delete
                  • copy link
                  • templates
                  • new branch
                  • customize.
                • Related Work:
                • Save or Save & Close:  save and stay in the same window, save & close will save and close the current window.
            • Boards Blade in Agile work item process:
              • Boards:
                • It has Four starges.
                • New: 
                • Active: 
                • Resolved: 
                • Closed:
                • state of work can be change by drag and drop or click three dots and move to column.
                • You can also create new work item under epic or issues.
                • Click on any item to check its settings.Boards:
                • Image
                • unassigned: Assign this work item to a team member, make sure the user is added to this project.
                • state =To Do and reason = backlogs.  if you change state = Doing than reason = started and state = done than reason = completed.
                • Iteration = star_project_basic\sprint1
                • Tag: add a keyword, which help in searching work item.
                • Discussion: you can discuss with team member, type @membername and start writing.  click save and message will deliver to recepient.  On the top of this window it will show 1 comments.
                • Planning:
                  • Priority: default is 2, you have options 1 to 4
                  • Star date: enter date
                  • Target date: enter date
                • History: it shows the list of changes made in this work item.
                  • State Graph: it shows current state of work item.
                • Link:  you can link current work item to another work item.
                • Attachment: attach a file with this work item.
                • Notification Settings: works with follow.
                  • Not subscribed: only receive notification from this work item when you have been @mentioned.
                  • subscribed:Received all notifications from this work item.
                  • Custom: you will only received notification selected from the below:
                    • state change: when state change from to do to doing or done, checkbox
                    • Assigned to changed: when work item is assigned to some one, checkbox
                    • Iteration changed:if you change sprint, checkbox
                • Follow: when you click follow, you will receive notification, which is defined in notiification.
                • Three dots:
                  • New linked work item:
                  • Change type:
                  • Move to team project
                  • create copy of work item
                  • email work item
                  • delete
                  • copy link
                  • templates
                  • new branch
                  • customize.
                • Related Work:
                • Save or Save & Close:  save and stay in the same window, save & close will save and close the current window.
            • Boards Blade in CMMI work item process:
              • Boards:
                • It has Four starges.
                • Proposed: 
                • Active: 
                • Resolved: 
                • Closed: 
                • state of work can be change by drag and drop or click three dots and move to column.
                • You can also create new work item under epic or issues.
                • Click on any item to check its settings.Boards:
                • Image
                • unassigned: Assign this work item to a team member, make sure the user is added to this project.
                • state =To Do and reason = backlogs.  if you change state = Doing than reason = started and state = done than reason = completed.
                • Iteration = star_project_basic\sprint1
                • Tag: add a keyword, which help in searching work item.
                • Discussion: you can discuss with team member, type @membername and start writing.  click save and message will deliver to recepient.  On the top of this window it will show 1 comments.
                • Planning:
                  • Priority: default is 2, you have options 1 to 4
                  • Star date: enter date
                  • Target date: enter date
                • History: it shows the list of changes made in this work item.
                  • State Graph: it shows current state of work item.
                • Link:  you can link current work item to another work item.
                • Attachment: attach a file with this work item.
                • Notification Settings: works with follow.
                  • Not subscribed: only receive notification from this work item when you have been @mentioned.
                  • subscribed:Received all notifications from this work item.
                  • Custom: you will only received notification selected from the below:
                    • state change: when state change from to do to doing or done, checkbox
                    • Assigned to changed: when work item is assigned to some one, checkbox
                    • Iteration changed:if you change sprint, checkbox
                • Follow: when you click follow, you will receive notification, which is defined in notiification.
                • Three dots:
                  • New linked work item:
                  • Change type:
                  • Move to team project
                  • create copy of work item
                  • email work item
                  • delete
                  • copy link
                  • templates
                  • new branch
                  • customize.
                • Related Work:
                • Save or Save & Close:  save and stay in the same window, save & close will save and close the current window.
            • Boards Blade in SCRUM work item process:
              • Boards:
                • It has Four starges.
                • New: 
                • Approved: 
                • Committed: 
                • Done:
                • state of work can be change by drag and drop or click three dots and move to column.
                • You can also create new work item under epic or issues.
                • Click on any item to check its settings.
                • unassigned: Assign this work item to a team member, make sure the user is added to this project.
                • state =To Do and reason = backlogs.  if you change state = Doing than reason = started and state = done than reason = completed.
                • Iteration = star_project_basic\sprint1
                • Tag: add a keyword, which help in searching work item.
                • Discussion: you can discuss with team member, type @membername and start writing.  click save and message will deliver to recepient.  On the top of this window it will show 1 comments.
                • Planning:
                  • Priority: default is 2, you have options 1 to 4
                  • Star date: enter date
                  • Target date: enter date
                • History: it shows the list of changes made in this work item.
                  • State Graph: it shows current state of work item.
                • Link:  you can link current work item to another work item.
                • Attachment: attach a file with this work item.
                • Notification Settings: works with follow.
                  • Not subscribed: only receive notification from this work item when you have been @mentioned.
                  • subscribed:Received all notifications from this work item.
                  • Custom: you will only received notification selected from the below:
                    • state change: when state change from to do to doing or done, checkbox
                    • Assigned to changed: when work item is assigned to some one, checkbox
                    • Iteration changed:if you change sprint, checkbox
                • Follow: when you click follow, you will receive notification, which is defined in notiification.
                • Three dots:
                  • New linked work item:
                  • Change type:
                  • Move to team project
                  • create copy of work item
                  • email work item
                  • delete
                  • copy link
                  • templates
                  • new branch
                  • customize.
                • Related Work:
                • Save or Save & Close:  save and stay in the same window, save & close will save and close the current window.
          • Backlogs:
            1. My team backlogs:
              1. star_project_basic Team backlogs
              2. star_project_basic_team1 backlogs
            2. All team backlogs:
              1. star_project_basic Team backlogs
              2. star_project_basic_team1 backlogs
            3. select team and define work item and work schedule (sprint).
            4. In any basic work item process projects, you can create three work items(epic,issues and task).
              1. You create an epic and under epic one or more issues can create and in issues can create one or more tasks. 
              2. select epic and click new work item select top or bottom or at selection.  (if you have many work items than this new item where you want to place)
              3. To add issue under epic (membership), hoover mouse below + sign Add issue will appear, 
              4. save or save & close.  login functionality created under membership.
              5. create two more issue (sign up and password change functionality) under membership.
              6. Now create 2 tasks under issue (DB Table Cration & Desing Login Page).  select + sign under which issue want to create task.
          • Sprints: 
            1. Planning: click on backlog and in planning section, sprint 1 displayed and 4 tasks are there. click on sprint 1
            2. No iteration date: click set dates, you can modify name, start date, target date, save and close.  shows working days, to set working days, click on team settings in planning and click on working days.
            3. Create new sprint: click and give name Sprint2, start date, end date and project. 
            4. Assign work item to sprint2.  create a issue2 and add it to sprint 2.  go to backlogs and in shopping cart click + and add issue2, it is linked with sprint1, change it to sprint2.
            5. You can change issue from one sprint to another sprint, go to backlog and select issue(login functionality which has 2 taks) and drag and drop to sprint2.
          • Queries: To search a specific work items when they are in big quantity using query.  Query is a combination of logics.  
            1. Go to project/Boards/Queries:
              1. Favorites: It will display quries which is selected as favourtie.
                1. click three dots to run query, edit query, rename query, delete query and add to dashboard.
                2. select for favourite.
              2. All: it shows all queries of my Queries and Shared Queries.
                1. click three dots to run query, edit query, rename query, delete query and add to dashboard.
                2. select for favourite.
              3. New Query: create new query.
              4. Click three dots: import work item and deleted queries.
            2. New Query: Search work item which I am following (click items to follow)
              1. It will show all work items which you are following.
                1. example1: Field=work item type, Operator = , Value = epic, issue, task.
                2. Example2: work item type = user story
                3. Example3: Assigned to = @Me
              2. Edit query, go to query and click three dots.  you can run query, edit query, rename query, delete query or add to dashboard.
              3. To organise queries, create folders and keep queries in folders.  on Quries section, click three dots and create folder.
              4. you can select favourite to any query and it will be added to favourites.
              5. Run the query and click three dots for,
                1. Email query
                2. Copy query URL
                3. Export to CSV.
          • Delivery Plans:
          • Analytics Views:
          • Integration of Azure Boards with Git Hub:
            • Create a new project and select public and git with agile.
            • click boards and it is empty.
            • Create a project in visual studio and create remote repository with git hub,  visual studio creates a default files and folders which can be integrated into boards.
              • click create git repository: 
              • click create and push.
              • Go to git hub and confirm remote repository.
              • In azure devops go to project integration_board_github: click project settings and in Boards click git hub connections.  click connect you github account.
              • select the repository integration_board_github and uncheck all others and click save.
              • Repository Access: select the required repository and click approve.
              • under github connection, repository has been added.
              • Check in github, click on settings and in Integrations click github apps.
              • To check the effect of integration, go to boards and create a work item task (name= change welcome message to "Welcome to Star Devops Training" assign to it-user2 and save it), 
              • Now it-user2 should perform the task and change welcome message and complete the task.  go to visual studio and go to solution explorer and go to pages and change index.cshtml and change welcome message and save it.
              • right click on index.cshtml and click commit and provide message "Fixed AB#30". and click commit all.  30 is the task number 
              • Go to git repository Push this to remote repository.  check in git hub repository/index.cshtml has been modified.
              • Go to boards/work items/task has been moved, when we click commit and provie task message "Fixed AB#30" it is pushed and completed.  click work item and now task has beem moved.
        • Repos:
          • Create local repository & initialize Git:
            • Create a folder (project_alpha) and some files (file1.txt & file2.txt) in it.
            • C:\project_alpha\git init (it will create a git local repository .git), initialize the git.
            • C:\project_alpha\git status (check git status)  files are untracked.
            • C:\project_alpha\git add .
            • C:\project_alpha\git commit -m "first commit"
            • C:\project_alpha\git log
          • Create remote repository in Azure Repos.
            • Login to https://dev.azure.com/star2024 and go to project (star_project_basic) and click repos
            • star_project_basic is empty.  Add some code (add folder and files created in local repository)
            • First integrate local repository with remote azure repos.
          • Integration local repository with azure repo: 
            • Go to local repo and run from folder where you have files: C:\project_alpha\ git remote add origin https://star2024@dev.azure.com/star2024/star_project_basic/_git/star_project_basic 
            • enter the credentials of Azure devops.
            • Push local repository to azure repo: Go to local repository and run
            • D:\git push -u origin --all
            • Refresh the browser, you will see files in contents and check history will show versions.
            • Click history to check the author who commits.
            • File Edit: Go to local repository and open file2.txt and make changes, file will come to working directory, move to staging area and commit and then commit with remote origin.
            • C:\project_alpha\git status
            • C:\project_alpha\git add .
            • C:\project_alpha\git commit -m "second commit file1"
            • Perform push step to reflect this changes with azure repos. 
            • git push -u origin --all
          • Repos Blade:
            • Files:
            • Commit:
            • Pushes:
            • Branches:
            • Tags:
            • Pull Requests:
            • Advanced Security:
            • Setup Build:
            • Clone:
              • When you clone a repository than a copy will be created in local computer.  
              • Create a project in azure devops and push files to repos.
                • project name = git_clone, basic, git
                • Repos = copy url git remote add origin https://star2024@dev.azure.com/star2024/git_credentials/_git/git_clone
                • run this command from git folder = git remote add origin https://star2024@dev.azure.com/star2024/git_credentials/_git/git_clone
                • push code = git push -u origin --all (files are pushed to repos)
              • Clone repository:
                • select repository and click clone
                • HTTPS : URL or SSH : URL
              • Clone Repository with Git 
                • Create a folder in local computer: mkdir clone_gitcredentials
                • C:\clone_gitcredentials\git clone https://star2024@dev.azure.com/star2024/git_credentials/_git/git_credentials
                • System will prompt to enter credentials(it can be generated from clone repository window)
                • Generate Git Credentials: click and copy username and Password.  These credentials can be used for git clone.
              • Clone Repository with Visual Studio 2022.
                • Access visual studio and click Clone a repository (Get a code from online repository like GitHub or Azure Repository)
                • Enter remote repository: https://star2024@dev.azure.com/star2024/git_credentials/_git/git_credentials
                • Path : define path whre clone can be created.
              • Clone Repository with Visual Studio 2022.
                • Access visual studio and click continue without code
                • paste the url: https://star2024@dev.azure.com/star2024/git_credentials/_git/git_credentials
                • enter path and click clone.
              • Clone Repository with Git Tortoise
            • Fork:
              • It is a complete copy of a repository, including all files, comits, and (optionally) branches.
              • The new fork acts as if someone cloned the original repository, then pushed to a new empty repository.
              • After fork has been created, new files, folders, and banches are not sharedbetween the repositories nless a pull request carries them along.
              • Create a fork:  clik on fork.
              • Enter name and select branches to be copied.
              • drop down the repository and you can view folk repository.  symbols is different than normal repository.
              • Create a file in the fork repository by creating a task.
              • go to boards/new work item/task
              • Title=add a new file
              • asigned = user
              • save it.
              • Go to Repos/fork repository/ click three dots and click create a file
              • file4.txt (In real time a code file is created/uploaded)
              • add content/commit
              • Work item to link: select above created task. and click commit
              • These changes has been made in fork repository and no change in original repository.
              • Replicate the changes to original repository, need to create a pull request.
              • Create a pull request along with a reviewer who will approve this request.
              • click on Create a pull request in fork repository, 
              • Enter required details, enter reviewer details, work item to link, and create.
              • Reviewer user logged in the system and approve this request.
                • Go to Repos/pull request where user will approve.  complete, complete merge.
              • Check file4.txt has been added to star_basic_project.
            • Upload files:
            • Download as Zip:
            • New Repository:
              • Click down arrow on top bar, Click new repository, enter details and create.
            • Import Repository from Github:
              • Repository in GitHub (star_visualstudio_project)
              • Azure Devops basic Project (star_visualstudio_project), repository name (star_visualstudio_project)
              • Go to devops basic project/repos/click dropdown/import repository
              • select repository type = Git, Enter GitHub Repository URL, repository name and click import.
              • Repository will be imported into the given name,  Check the repository that all files, commits etc has been imported.
            • Manage Repositories:
              • Browse, Rename, Delete repositories.
              • Settings:
                • Default branch name for new repositories
                • Disable creation of TFVC repositories
                • Allow users to manage permissions for their created branches
                • Create PRs as draft by default.
              • Policies
                • commit author email validation
                • File path validation
                • Case enforcement
                • Reserved names
                • Maximum path length
                • Maximum file size
              • Security
                • User Permissions
                  • Azure Devops Groups
                    • Build Administrators
                    • Contributors
                    • Project Administrators
                    • Readers
                    • Project Collection Administrators
                    • Project Collection Build Service Accounts
                    • Project Collection Service Accounts
                  • Users
                    • repository Build Service
                • Inheritance (on/off)
                • Repository\Build Administrators (Not set, Allow, Deny)
                  • Advanced Security: manage and dismiss alerts (Not set, Allow, Deny)
                  • Advanced Security: manage settings 
                  • Advanced Security: view alerts
                  • Bypass policies when completing pull requests
                  • Bypass policies when pushing
                  • Contribute
                  • Contribute to pull requests
                  • Create branch
                  • Create repository
                  • Create tag
                  • Delete or disable repository
                  • Edit policies
                  • Force push (rewrite history, delete branches and tags)
                  • Manage notes
                  • Manage permissions
                  • Read
                  • Remove others' locks
                  • Rename repository
          • Branches: 
            • In the above steps we have created two files (File1 & File2) in local respository in master branch,  we push both files in remote repository in master branch, we made some changes in file1 and commit in both places.  Now we create a branch in local repository.
            • D:\git branch Check list of branch (there is only one master branch)
            • D:\git branch branch1 Create Branch in Local repository:  (branch will be created with all files of master copied)
            • D:\git checkout branch1 Go to branch: 
            • Merge: If you make changes in file1 in master branch (move to staging and commit with version4). now if you run git log, head shows version4 in master and version3 in branch,  so master is ahead one version with branch1, now perform merge action.  
            • D:\git merge branch1  (you should be in master branch)  master branch is sync with branch.  still remote branch is behind with local branch.
            • Push Repositories: Push Local Repository to Remote Repository.  
            • D:\git push -u origin master: sync local master repository with remote master repository only
            • D:\git push -u origin --all : it will sync all branches with remote repository along with contents.
            • Pull Repositories:  Pull Remote repository to Local repository.
            • create a file/make changes in remote repository and commit.
            • Push and Pull Scenario1:
            •  
            • Pull Scenario: Master and branch1 has 2 files (File1 and File2) and 3 versions (Version1, 2, 3). 
            • Modify the file1 in the master branch/ click file 1 and edit, commit "Modified file1.txt or Version4" and save it.
            • Now in local repository modify file2, add to staging and commit "version5".
            • Push modified file2 into remote repository:  D:\git push -u origin master  (it throughs an error that file1 was modified in remote master repository and it was not sync with local repository).
            • user trying to push a commit which performed after commit performed on remote master repository, so user first pull the commit and than push this commit.
            • D:\git pull 
            • There are 2 insertions and 1 deletion from the file1.  you can also check the modification, Go to Files\File1.txt and click compare.
            •  
            • Perform Push now D:\git push -u origin master
            • Graphs show how commits were executed.
            • New user join the project and perform pull request.
            • user should create a directory in D drive (user2_git) in local computer and perform git init to initialize.
            • Add remote repository to local repository by D:\user2_git\git remote add origin https://stardevops0410@dev.azure.com/stardevops0410/star_project_basic/_git/star_project_basic
            • pull the repositories from remote repository D:\user2_git\git pull origin --all 
            • Pull Request/Reviewer approval: 
            • When a user make changes in code in local repository then request goes to reviewer than once it is approved commit takes place.  Instead of committing changes directly into remote repository by a user, it required approval from reviewer.
            • Create a project with public visibility, select agile work item process.
            • Create a local repository in your computer, create a folder and initialize (git init).
            • add local repository to repo: c:\star_agile_project\git remote add origin https://stardevops0410@dev.azure.com/stardevops0410/star_project_Agile/_git/star_project_Agile
            • c:\star_agile_project\git branch branch1 (create a branch)
            • Push local branches with remote, c:\star_agile_project\git push -u origin --all
            • In repos there are two branches, master and branch1 with file1,file2
            • make changes in file1 of branch1 (git checkout branch1) and commit -m "Version2".
            • Merge:  merge master branch with branch1, it will update master branch with branch1 where we made changes,
            • c:\star_agile_project\git checkout master
            • c:\star_agile_project\git merge branch1 
            • git head is updated with master and branch1 locally but it is a commit behind with remote repository.
            • setup reviewer: go to project\repo\branch\master and click on three dots and select branch policies. (if a user push from master branch then it first go for review).
            • enable require a minimum number of reviewers.
            • if you run c:\star_agile_project\git push -u origin --all (you will get the error).
            • In branch1 file has been reflected while master is not as we enable reviewer in master branch.
            • In master branch click pull request or select pull request from repo menu and assign a reviewer.
            • Login with it-user1 and go to project\repo\pull request\approve and complete.  check on main branch and it reflects.
          • .gitignore: Exclude files to be copied in every commit.
            • With every commit git creates a complete copy of previous version,  it includes all files and folders,  If you want to omit or does not want to copy certain files in every commit then define those files in .gigignore file.
            • create a folder (gitignore_project), create file1, file2,file3,secret1,secret2 text files.
            • create a .gitignore file and add name secret1.txt & secret2.txt and save it.
            • git status, it will show only files:  .gitignore, file1, file2, file3 only
            • Move to staging area and commit (version1),  File1. File2 and File3 will be copied to version1.
            • if you create any new files4, file5, file6, file7 .... and you dont want to copy files file5,file7 then open .gitifnore file and add file5 and file7 and save it.  Run git status and it will show only file 4 and file6, peform git staging and git commit.
          • Git Remote Repository / Azure repos using Visual Studio:
            • Download & Install Microsoft Visual Studio community 2022 in local system.  select ASP.NET and web development, Azure development workloads.
            • Create a new project in visual studio code
              • select asp.net core web app
              • Project name = webapplication1
              • Location = C:\Users\Admin\source\repos
              • .NET 8.0 (long-term support)
              • To view project files, go to view and select solution explorer
            • Create & Integrate Git local repository with Remote Repository (Git or Azure):
              • Click Git and select Create Git Repository
              •  
              • Select visibility public.
              • create and push.  It will create a local repository and also it push the files into git hub
              • check in the git hub or go to view and click git repository in visual studio
            • Make changes in the source code file.
              • In solution explorer/pages/index.cshtml and make some changes and click save, now it shows red mark.
              • right click on index.cshtml and git/commit, enter message and click commit all.  Now commit is done in local repository.
              • push the commit to remote repository: Go to view/Git Repository/in local repository outgoing there is 1 message, click push.
              • Check the changes in github.
            • Build Application:
              • Go to Build and click Build WebApplication1.
            • Publish 
              • Go to Build and click public webapplication1.
              • To publish it required computing resources, select where it should publish.
          • Create branches with visual studio
            • Project has been created, check above 
            • Click view and git changes in visual studio.
            • drop down and click new branch
            • Enter name of new branch (branch1), select based on master branch and select checkout branch
            • Go to view/git repository and in local reposditory you can see two branches (master & branch1)
            • push local branch to remote repository:  In branch1 click push
            • branch1 will appear in remote repository.
          • Push Code to Remote Azure Repos using visual studio
            • Project has been created in visual studio, check above 
            • Create azure repos.
              • Login to azure devops(dev.azure.com/star2024) enter credentials.
              • Create a project (star_project_basic), a repos is also created with project name.
              • Go to project balde/Repos/drop down and click new git repository.
              • Enter name=webapplication2, if needed select add a readme and .gitignore.
              • webapplication2 repository is empty.  Add some code, copy the command to push code (https://star2024@dev.azure.com/star2024/star_project_basic/_git/webapplication2 )
              • Go to visual studio where project has been created.
              • Click view/Git repository and select exiting remote and paste the url.  enter credentials.
              • remote repository will be added
            • Check in azure repos, all files will be added.
        • Pipelines (CI/CD)
          • Build source code in visual studio
            • Build is the process to convert code into an executable format so that it can be deployed in clients computer. it is part of continuous integration (CI), when developers complete their code in software development then this code will be tested and convert to executable package so that it can be deployed/installed in clients computers/standalone computer.
            • Lab: create a project (build_project) in visual studio in developers computer and create code (use ASP.NET template to get basic code).
            • Enter project name: build_project
            • Location of file and bin folder: C:\Users\administrator\source\repos\build_project\build_project\bin\Debug\net8.0\ folder is empty  (when we initiate build process then source code converted and stored here)
            • solution name: build_project
            • select .Net 8.0
            • folder C:\Users\administrator\source\repos\build_project\build_project\bin\Debug\net8.0 is empty.
            • Build: convert the code into executable so that it can be intall on clients computer.  It required a build tool, in this case we are using Visual Studio 2022 in which a build tool is integrated. 
            • Go to Build/Build Solution then build process will start. If you check folder C:\Users\administrator\source\repos\build_project\build_project\bin\Debug\net8.0 there are some files has been created along with application file which can be run on any computer or for testing click on https button in visual studio.  Build process will begin.
            • build_project.exe is created in C:\Users\administrator\source\repos\build_project\build_project\bin\Debug\net8.0\build_process.exe 
            • It can be run in any computer or run in visual studio: click on build_process green button.
            •  
            • copy and run build_project.exe in any computer, copy url and paste it in browser:  http://localhost:5000
          • CI - Continuous Integration
            • Manual Build Process:
              • Developes write code, commit and push it to remote/central repository.
              • Build Administrator start build process using build tools.
              • Executable file will be generated which is deployed in client's computer.
              • If developers made any changes in the code than the above 3 steps will be performed manually.
              • Manual Trigger Azure Pipeline, Build & Deploy on Microsoft hosted agent/Self hosted agent using YAML file, Azure repository/GitHub Repository:
                •  
                  • Step1: Create a project in azure devops.
                    • project name=demoproject1, private, git, agile
                    • demoproject1 repository is also created by default.
                  • Step2: Developers Computer
                    • Create a windows VMWare VM/Cloud VM.
                    • Install visual studio 2022.
                    • Install Git
                    • Create new project in visual studio, name=demoproject1, ASP.NET template, .Net 8.0
                  • Step3: Integrate local repository with remote azure repos/Github (below is both examples) 
                    • In visual studio click git and create repository, it will create local and remote, copy path from azure repos (demoproject1) and paste it in existing (project is existing in azure devops).  (copy only part starting from https://......), click create and push.
                    • code files are pushed in azure repos.  it also created a local repository in C:\Users\Admin\source\repos\demoproject1 
                    • In visual studio click git and create repository, it will create local and remote, copy path from github, and paste it in push your code to an existing remote.
                    • code will be pushed in the github repository (Enter credentials of github account)
                    • select the github repository (pipelinedemo) and click approve & install.
                    • Go to github/pipelinedemo/settings/github apps: azure pipelines are installed.
                  • Step4: Create azure devops pipeline:
                    • In azure pipelines and click new pipeline, select where is code (Azure Repos or Git Hub, below is both examples)
                      • Azure Repos Git (YAML) (select and go to step 5)
                      • Bitbucket cloud(YAML)
                      • Git Hub (YAML) (select and perform required steps and go to step 5)
                        • create a public repository in github-pipelinedemo (https://github.com/AbdulAziz-uk/pipelinedemo)
                      • Git Hub Enterprise Server (YAML)
                      • Other Git (deprecated)
                      • Subversion: Centralized version controlled by Apache. (deprecated)
                      • use the classic editor to create a pipeline without YAML. (deprecated)
                    • Repository (demoproject1) will reflect here.  select project (demoproject1)
                  • Step 5: Configure your pipeline:
                    • ASP.NET
                    • ASP.NET Core (.Net framework), code is generated in visual studio
                    • .NET Desktop
                    • Universal Windows Platform
                    • Xamarin.Android
                    • Xamarin.iOS
                    • Starter Pipeline
                    • Existing Azure Pipelines YAML file.
                    • More
                    • The YAML file (azure-pipelines.yml ) will store in central repository.  With the help of this YAML file we define
                      • Jobs
                        • Steps
                          • Tasks 
                    • trigger:
                      - master: Whenever a devloper modify the code and push in the master repository then pipeline will trigger automatically.
                    • pool:
                        vmImage: 'windows-latest' : To execute build process it requires a compute resource, Azure creates a virtual machine with defined O/S, applications and tools and run build process on it.  it is also called as agents. Following agents are available:
                      • Microsoft-Hosted Agents:
                        • Microsoft will manage end to end configuration, user has no control on it, Microsoft will install O/s, application defined in task, tools defined in task, all updates/patches and anything related with VM is maintained by Microsoft.
                        • Microsoft uses pre-define hardware configuration to deploy VM.  If Microsoft defined confiugration is not fulfill your requirement then go for self-hosted agent.
                        • Each time you run a pipeline or pipeline get triggered, a new virtual machine will be created to build your code and it will be discarded after the job.
                        • Azure pipeline pool offers several virtual machine images to choose: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tab=yaml&tabs=yaml 
                        •  
                        • The default image for classic build pipeline is Windows 2019
                        • Microsoft hardware configuration for the above images.
                      • Self-Hosted Agents:
                        • Create a VM.
                        • Install windows, visual studio 2022 and git on VM.
                        • Install Azure pipeline Agent: Download agent from Azure devops, this will make connoection with azure pipeline
                          • To install agent VM, open browser and go to https://dev.azure.com/stardevops0410 and then Go to deveops\project\project settings\pipeline\agent pools, There are two piplelines, Azure pipeline created above with microsoft-hosted agent (click on agent and you will see hosted agent), select default pipeline for self-hosted agent.  click on agent and click new agent.  
                          • Download the agent, extract at C:\pipeline_agent
                          • Open powershell and go to the extracted folder c:\pipeline_agent.
                          • run this command PS:\pipeline_agent\.\config.cmd
                          • Enter server url:  go to devops portal and click organization and copy URL and paste it in powershell.
                          • Enter for PAT(personal access token): to get personal access token, go to project https://dev.azure.com/stardevops0410/pipeline_project and click on user settings/personal access token (on top right corner)
                          • create new token/ custom defined / show all scopes / agent pools (manage agent pools and agent)read and mange, copy personal access token and paste it in powershell.
                          • Register agent/ Enter Agent Pool (press enter for default): press enter as we are using default agent in pipeline
                          • it shows vm name: press enter or you can give vm name and enter.
                          • enter work folder: press ener it will take _work as work folder and Y and enter to run agent as service.
                          • Agent has been installed.  to confirm go to project settings/agent pools/default/agents
                        • Define self hosted agent to run job in yaml file of azure pipeline.
                          • click on agent and there are no jobs creatd and click on Capabilities to check which o/s, softwares are installed.
                          • To run a job, create or open pipeline, earlier we have created pipeline (pipeline_project).
                          • click edit and it opens YAML file, 
                          • in the pool you will see VMImage is 'windows-latest' is defined, changed it to self-hosted.
                          • Make sure format is correct even a single . is not missing, tasks defined in the YAML file will run on self-hosted agent (on-prem-win10)
                          • click save and run, once click this yaml file will be stored in git repos and pipeline will triggered.
                          • To confirm, go to pipeline (pipeline_project) and runs.  job success. click on job for more details.
                          • click on each steps of job to get more detai
                      • Variables define in YAML File
                        • variables:  varables decalred which can be referred in the code.  
                            solution: '**/*.sln'
                            buildPlatform: 'Any CPU'
                            buildConfiguration: 'Release'

                          steps:
                          - task: NuGetToolInstaller@1  (When we run code and for its successfull execution it has a dependency on some package/tool/application, to add these packages we take help of NuGetTool).  These packages are installed at this defined task. 

                          - task: NuGetCommand@2 (It restore the solution which is defined in the variable can be executed with the help of NuGetCommand).
                            inputs:
                              restoreSolution: '$(solution)'

                          - task: VSBuild@1 (Actual build is executed here). 
                            inputs:
                              solution: '$(solution)'
                              msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
                              platform: '$(buildPlatform)'
                              configuration: '$(buildConfiguration)'

                          - task: VSTest@2 (unit test is defined here)
                            inputs:
                              platform: '$(buildPlatform)'
                              configuration: '$(buildConfiguration)'
                        • After making necessary changes in YAML file, Save and run (commit directly to the master or create a new branch for this commit), it will commit in repository and then it trigger the build process.  
                        • It start creating pipeline.
                        • Error: Parallelism not purchased or granted:  Microsoft granted private and public parallelism to run build process but it is not free by default.
                        • Fill application to get grant: click on job or error and it will open a window and where it provide link for form: https://aka.ms/azpipelines-parallelism-request
                        • fill form apply to microsoft to get grant.
                        •  
                        • it will take 2 to 3 working days to get approval.
              • Manual Trigger Azure Pipeline, Build & Deploy on Microsoft hosted agent/Self hosted agent using Classic Editor:(Deprecated)
                • Create a pipleline without YAML file, it can be done using classic editor.  
                • Create a project in visual editor (classic_pipeline) using ASP.NET core webapp template, connect it with azure repos using git.
                • Create a project in azure devops (classic_pipeline), private and git-basic. copy URL of repos created by default: https://stardevops0410@dev.azure.com/stardevops0410/classic_pipeline/_git/classic_pipeline
                • Go to visual studio/git and click create repository and in remote click existing and paste URL.  create and push.
                • Create a pipeline, select use the classic editor, 
                • If this option is not visible then go to organization settings/Pipelines/Settings/ and Disable the option for Disable creation of classic build pipelines.
                • Select the source of code.
                • select a template to create a pipeline
                  • Empty Job:  It will be an empty template, there is no task in it.
                  • Configuration as code:  Through YAML file 
                  • Featured: with the help of GUI, select ASP.NET core (.NET Framework) apply
                • Pipeline: Details of Build Pipeline
                  • Name: Name of Pipeline
                  • Agent Pool: Microsoft-hosted
                  • Path to solution:
                  • Arifact name:
                • Get Source: It will show the git repository 
                • Agent Job 1: It shows list of tasks in the job to be performed.  You can define multiple jobs, click + .
                • You can add/remove tasks from the list.
                • select task and click remove on right hand side.
                • Variables: 
                • Triggers: Triggers can be define, manually or schedule (date and time), Build Complete (start after completion of another build)
                • Options:details of pipeline
                • History:
                • Save & Queue:
                • Discard:
                • Queue:
                • Save and Queue,  enter save comment (test_classic_pipeline)
              • Azure Pipeline Pricing
                • Pricing is depend upon project visibility (private or public).
            • Automatic Build Process:
              • The above manual process can be done automatically with the help of continuous integration where any changes will be triggered automatically.
              • When developers modify the code which then commit and push to central repository. 
              • once they commit an automatic build process will be triggered.  Build automated software will be used in place of manual build administrator.
              • Pipelines:
              • Using azure pipelines can achieve continuous integration.  azure pipeline overview:
              • Automatic Trigger Azure Pipeline Scenario: Remote repository in Azure Repos:
                • In the above manual trigger azure pipeline, pipeline has been created and it was triggered manually.
                • using the above project perform autmatic trigger of azure pipeline.
                • Go to visual studio/pipeline_project/solution explorer/index.cshtml and open this file make changes, save it. 
                • in solution explorer next to index.cshtml there will be a red mark, right click and go to git and select commit.
                • In git changes windows, enter comment "Version1" and click commit all.  It may ask you to enter user credentials to continue commit.  commit xxxxx created locally.
                • To push commit to repos, go to git repository window and push it in outgoing.  as soon as this changes commit in repos then it will trigger build process.
                • To confirm go to pipelines and click runs where you can see pipeline, click in pipeline and click on job for further details.
              • Azure Build Pipeline : Notification
                • When a developer modify code and commit changes locally and then in remote repository which trigger pipeline.
                • It can be configured on organization level or project level
                • In pipeline build process will start in agent (VM),  it is possible this build process will start or gives an error/fail.  
                • The outcome of build process can be send as notification to defined users. 
                • Go to azure devops/project/project settings/General/Notifications/Build completes/notifies.
                • It notifies to all memebers of pipeline_project team (default team created when you create project).
                • To check the members of this team (pipeline_project), go to team and pipeline_project, it shows members.
                • You can add members or another team.
                • You can send notification to others who are not a team member.
                  • Go to project/project settings/notifications/+New subscription:
                  • Category = Build, 
                  • Templates = Build Complete or Build Failed (select either)
                  • Description = add any description (build failed of pipeline_project)
                  • Deliver to:
                    • Members of pipeline_project Team by role
                    • Team preferences
                    • custom email address (aziz1.sap@gmail.com)
                    • members of pipeline_project team
                    • SOAP
                  • Any team project or specific team project (pipeline_project)
                  • Filter criteria,  Filed, operator , value (status = Failed)
                  • Modify code and commit and check a notification has been sent on given email address.
              • Azure Pipeline with remote repository in GitHub
                • Create a repository in git hub (pipeline_project_github), Public,  copy url
                • Go to visual editor and create a project (pipeline_project_github), ASP.NET template.
                • Go to git and click create repository and in remote repository click existing and paste the URL.
                • a local repository and remote git hub repository will be created.
                • Go to pipeline and create a new pipeline and select where is code (Git hub) YAML.
                • Enter credentials and select required repository.
                • Azure pipeline will install in Git hub (click approve and install azure pipelines) select repository and click approve and install.
                • Azure pipeline credential enter. 
                • To confirm go to git hub/settings/Integration/Git Hub Apps/Azure Pipelines.
                • yaml file will be created for configuration, make necessary changes and save and run.
              • Azure Board Integration with SlackChannel:
                •  
                  • Slack is an application which is used to collaborate and communicate within a team.  Channel created in Slack which team members can acccess when they are subscribed.
                  • You can integrate work items with Slack or you can create work items from slack.  When you create a work item then it will be notified to team members.
                  • Create a project in azure devos (slack_integration_board), basic and private.
                  • Go to Slack and create a free account: https://slack.com/intl/en-gb 
                    • click on try for free and enter email address.
                    • Enter code sent on email.
                    • Create a workspace: slack_project_board, Enter name so that team members can recognise you.
                    • Enter email addresses of team members who will join this channel.
                    • team working on : application development
                    • There are few channels are created along with application development.
                    • click on drop down arrow on slack_project_board/settings & administration/manage apps
                    • it open a slack app directory windows, in seach app directory: azure board and select.
                    • it will open Azure Boards window and click on add to slack.  Azue Boards is requesting permission to access the slack_project_board Slack workspace.
                    • Where should azure Boards posts?  select general channel and click allow.
                    • Azure Board is reflecting in General Channel.
                    • Login to Azure boards from slack,  copy url /azboards signin and paste it in Start here window in bottom and enter
                    • Azure Boards Sign in click it,  a window will open with a code, copy this code and go back to slack page and click on enter code below sign in and paste it.
                    • Successfully signed in to Azure Boards.
                    • Integrate channel with Azure Boards:  copy the command given /azboards link https://dev.azure.com/myorg/myproject (copy project from azure devops: https://dev.azure.com/stardevops0410/slack_integration_board)
                    • enter the above command in Message#general
                    • /azboards link https://dev.azure.com/stardevops0410/slack_integration_board and send it.
                    • Error:  You are not authorized to access one or more resources required to complete this action.  To fix this issue
                      • Go to azure devops organization settings/security/policies/enable Third party application via OAauth.
                    • run the command again in slack.
                    • azure boards has linked with channel general in slack.
                    • To receive notification, click Add subscription or run /azboards subscriptions in Messge #general.
                    • Area path: slack_integration_board
                    • Event: select from list
                      • work item commented on
                      • work item created
                      • work item deleted
                      • work item restored
                      • work item updated
                    • Work item type: only three is showing as project work item process is basic.
                      • Any
                      • Epic
                      • Issue 
                      • Task
                    • Save
                    • Test: how notification deliver when you create work item in project.
                    • Go to project and board and click new work item (epic): slack_test_workitem_epic
                    • check in slack a notification has come.
                    • Create work item from slack:
                    • /azboards create and enter.
                    • select type of work item type: Issue
                    • choose an area path: slack_integration_board and enter Title and submit.
                    • check in azure devops project: work item issue has been added.
              • Azure Pipeline Integration with Slack:
                • To integrate Azure pipeline with slack, Login to slack:Go to Slack and create a free account: https://slack.com/intl/en-gb 
                  • click on try for free and enter email address.
                  • Enter code sent on email.
                  • Create a workspace:
                    • slack_project_pipeine, Enter name so that team members can recognise you.
                  • Add Azure pipeline to channel:
                    • click on drop down arrow on slack_project_pipline/tools & settings/manage apps
                    • search azure pipeline and select and click add to slack.
                    • Azure pipeline is requesting permission to access the slack_project_pipeline slack workspace, select #general chanel and click allow.
                  • Subscribe Azure pipeline:
                  • Create a propject in azure devops(slack_integration_pipeline), private, git-agile.
                  • create a VM and install visual studio and create a project (slck_integration_pipeline) with ASP.NET template.  go to git and create git repository.(https://stardevops0410@dev.azure.com/stardevops0410/slack_integration_pipeline/_git/slack_integration_pipeline)
                  • go to azure devops/project/pipeline/create pipeline and select git repos and select configure pipeline with ASP.NET save and run.
                  • type command in slack and paste the link.
                  • click sign in button for azure pipeline and copy code and paste it.  successfully sign in to azure pipeline.
                  • after successfully sign in run the command again with url.  now subscription is added.
                  • Run pipeline again and you will see a notification in slack.
                  • pipeline is successfully execute, running message changed to succeeded.
              • Azure Repos Integration with Teams:
                • Code
          • CD - Continuous Deployment
            • Deployment: When a developer writes code and pushes/commits it to the remote repository, it automatically triggers the build process in the Azure Pipeline. The pipeline then compiles the code, runs automated tests, and validates it. If the tests pass successfully, the code is deployed to the target environment or infrastructure. This ensures a smooth and automated CI/CD (Continuous Integration/Continuous Deployment) workflow.
            • Infrastructure: There will be different types of infrastructure on which application will be deployed, like using VM, Azure App Service, etc.,To deploy the application on infrastructure manual or automatic process can be use.
            • Manual Process:  Deploying application on Azure App/VM/Container. 
              • Deploy/Publish Application from visual studio to Azure Web App Service:
                • Create a VM:
                  • Install visual studio.
                  • Create a project(starapp1) using ASP.NET, .Net 8.0.
                • Create App Service:
                  • Login to portal.azure.com and create Web App.
                  • RG = star-RG
                  • Instance name = starapp1 (starapp1.azurewebsites.net)
                  • Publish = Code / Container
                  • Runtime Stack= .NET 8(LTS)
                  • Operating System = Windows
                  • Region = UK South
                • App Pricing Plan (it is compute resource on which app deployed)
                  • create new or select suggested (starapp1price)
                  • Pricing plan = 
                  • SKU = Free F1
                  • Review and create.
                  • Once it is created, copy URL and paste it in browser, it shows web app is running and waiting for content.
                • Deployment to Azure app service from visual studio.
                  • From Azure App Service: Go to App Service/starapp1/Deployment Center/Settings/Source/select CI/CD or Manual Deployment (push)
                  • From Visual Studio:
                  • Publish to Azure from Visual Studio 
                  • Go to visual studio, right click on project and click publish.
                  • Target = Azure
                    • Azure
                    • Docker Container Registry
                    • Folder
                    • FTP/FTPS server
                    • Web Server (IIS)
                    • Import Profile
                  • Specific Target = Azure App Services (windows)
                    • Azure Container Apps (Linus)
                    • Azure App Service (Windows)
                    • Azure App Service (Linux)
                    • Azure App Service Container
                    • Azure Container Registry
                    • Azure Virtual Machine
                  • select RG/app service created and next.
                  • Microsoft Account login: enter credentials. (to connect from visual studio to Azure), click finish.
                  • Ready to publish visible, click publish.  
                    • Check in bottom, build service has been started.It will build and publish on Azure Web App
                  • Check in browser:  
                    • go to browser and paste azure app service url: https://starapp1.azurewebsites.net
              • Deploy/Publish Application from visual studio to VM:
                •  
                • Create a VM in VMWare workstation, install visual studio, create a project(starapp1) using ASP.NET template.  
                  • Login to azure portal and perform the following:
                    • RG=appdeployment-RG
                    • VM Name = starvm1
                    • Region=UK South
                    • No avialability zone
                    • security type = standard
                    • Image = Windows 2019 data center
                    • enter username and password
                    • Inbound ports: 80, 443
                    • Review and Create.
                    • Go to resource and click connect and download RDP and connect
                      • Install IIS in VM,  select IIS and in Roles services select management services and continue installation.
                      • Go to tools and click internet information services (IIS) Manager and click on starvm1 and open Management service (selected during IIS installation).
                      • select check box Enable remote connection and apply on right hand side in Actions.
                      • Port 8172 is defined.  
                    • Go to VM in azure portal and go to networking / NSG and enable inbound port 8172
                    • Go to VM-RDP and in management service, click start.
                      • Install Hosting Bundle in starvm1, open browser and search .net core installation/ select windows and click .NET 6.0 runtime and select windows and select download hosting bundle in Run Server Apps.
                      • Install web Deploy  3.6: search in google and download x64 installer and install complete.
                      • Mention DNS Name: Go to azure portal/star1vm/networking/public IP/configuration/DNS Name Label (enter unieque name starapp1), 
                        • DNS name will be starapp1.uksouth.cloudapp.azure.com
                  • Go to visual studio, build the code and publish it in azure VM.
                    • Go to project starapp1 and right click and select publish. (It was published earlier in azure webapp service, now click new profile and select azure VM).
                    • select APPDeployment-RG/starvm1 
                  • check the url: starapp1.uksouth.cloudapp.azure.com
              • Deploy/Publish Application from visual studio to Azure Container:
                • Create a VM in vmware workstation, make sure you enbale virtualize intel vt-x and memory atleast 16 GB RAM in order for docker engine to start.
                  • Disable firewall
                  • Install visual studio 2022:
                    • Create a project starcontainer. .NET 8 (LTS)
                  • Install Docker Desktop on windows: https://docs.docker.com/desktop/install/windows-install/
                    • Application cannot be deployed to container from VM directly, it required to install docker desktop.
                    • It must be in start status.
                    • open docker desktop:
                    •  Sign in with credentials
                    • docker engine is running
                • Container Registry: Go to azure portal and search container registries:
                  • Create 
                  • Resource Group Name: star_RG
                  • Registry Name: starcontainer (starcontainer.azurecr.io) name should be in lower character.
                  • Location: UK South
                  • Price plan = standard 
                  • Review and create.
                  • Go to resource starcontainer/Services/repositories.
                  • Repository is empty,  perform the code build and Image publish in visual studio.
                • Build: 
                  • Go to visual studio/starcontainer project created above.
                  • Build the source code:
                    • Right click on project and click add Docker Support, select o/s windows
                    • Container OS: Linux/Windows
                    • Container Build Type: Dockerfile / .NET SDK
                    • Container image SKU: Windows nano server/ Windows core server
                    • Docker Buid Context: Solution: C:\Users\username\source\repos\starapp1
                    • Messge: Your docker server host is configure for 'Linux' , however your project targets 'Windows',  Would you like to switch to Windows Container now: Yes 
                      • A docker file will be created in the project. Check in Solution Explorer
                •  Publish:
                  • Right click on project and publish.
                  • Select Azure and target select Azure container Registry.
                  • select container registry (starcontainer), ready to publish and click publish.
                  • It will start build process and then publish an image in docker registry.
                • Refresh repositories in azure container.
                • Deploy image in a container:
                  • Create a container using the above image.
                  • Go to azure portal and search container instances: create
                  • RG: container_RG
                  • Name: starcontainer1
                  • Image source: azure container registry (Messge: Admin user must first be enabled for this registry in order to access the image during the container creation)
                    • open a duplicate windows and go to container registry/starcontainer/access keys: enable admin user (username, password1, password2 ) copy.
                    • refresh the page and start creating again from beginning.
                    • enter the details again.
                    • Click networking tab: port 80 is enabled and networking type is public, create.
                    • Container instance is created, click go to resource
                    • check the container and copy public IP and paste it in browser, application will be displayed.
            • Automatic Process: Deploying application on Azure App/VM/Container.
              • Release Pipeline Overview
                • Continuous Integration (Build Pipeline):
                • Developers write code in their local computer and push it to local repository, to maintain version control system code is then push to central repository.
                • To convert the code into executive package build pipeline process begins in which a task is define to fetch code from central repository and run build process.
                • The build process executed in agents (compute resource or VM) which is define in YAML file.
                • Once the build process is completed then agent/VM get deleted in which build package is executed.
                • We need to save build package before agent/vm get deleted, two tasks has been define.
                • Task1 : Take build package in zip format and save it in build artifact staging directory.
                • Task2: perform build zip format package into build artifact.  
                • After the above two task continuous deployment or release pipeline process begins.
                • Continuous Deployment (Release Pipeline):
                • In Release piple task has been define to create an agent/VM to process build artifact 
                • App should be deployed in the target environment (App Service in Azure)
                • Lab: Release Pipeline
                • Developer Computer:
                • Create a VMWare Virtual Machine (win10), install visual studio 2022.
                • Create a project in visual studio (release_pipeline1) using ASP.NET template.  project created with default source code files and folders.
                • Azure Devops create a project:
                • Logon to azure devops and create a project (release_pipeline1), private using Git-basic.
                • A central repos is created with the project name (release_pipeline1), go to repos and click release_pipeline and copy url link.
                • Integrate local repository in visual studio with central repository in azure repos:
                • Go to visual studio/release_pipeline1/Git/create git repository/ click existing remote and paste url link, create and push. 
                • Go to azure repos and click refresh, now files and folders are pushed in repos.
                • Create Build Pipeline:
                • Go to devops portal and create pipeline (build_pipeline1).
                • Where is code (Azure Repos Git), select repository (release_pipeline1), Configure your pipeline: select (ASP.NET Core (.Net Framework))
                • YAML file (azure-pipelines.yml) will open,
                • Pool : VM Image: 'windows-latest' (a virtual machine is created in azure and following tasks performed on it)  we need to define two more tasks (Task1 andn Task2) discussed earlier)
                • Tasks: Multiple tasks has been defined.
                • Create two tasks (Task1 and Task2): https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-build-artifacts-v1?view=azure-pipelines
                • copy steps from the Example of YML file form the above link.
                • in the task it is define to copy build file into Build.ArtifactStagingDirectory.
                • In the task2 it is define to use path Build.ArtifactStagingDirectory publish artifact in MyBuildOutputs. 
                • Save and run: this yaml file will got into central repository and get commit.  it will trigger to start build pipeline and create a VM.
                • Job will be executed and click on job to view more details.
              • Create Release Pipeline:
                • Step 1: Developer computer
                  • Create a VM and install visual studio 2022 community edition.
                  • open visual studio 2022 and create a project (Project1)
                • Step 2: Create a project in Devops
                  • Create a public agile project (project1)
                  • copy repo path: go to project1/repo/copy path https://star2024@dev.azure.com/star2024/project1/_git/project1
                • Step 3: push code from visual studio to azure repos:
                  • Go to visual studio project1/Git/Create a git repository/click Existing remote in Other and paste the URL copied from azure repos
                  • Create and push, it will create local repository and remote repository in azure devops repos.
                • Step 4: Create a pipeline for Continuous Integration (Build the code).
                  • Go to project1/Pipelines/create a pipeline/
                  • select Azure Repos Git YAML 
                  • select project1 as code has been pushed in this repository in step 3
                  • select ASP.NET Core (.Net Framework)
                  • azure-pipelines.yml created, check the following tasks:
                    • # ASP.NET Core (.NET Framework)
                      # Build and test ASP.NET Core projects targeting the full .NET Framework.
                      # Add steps that publish symbols, save build artifacts, and more:
                      # https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

                      trigger:
                      - master

                      pool:
                        name: 'Default'
                        vmImage: 'windows-latest'

                      variables:
                        solution: '**/*.sln'
                        buildPlatform: 'Any CPU'
                        buildConfiguration: 'Release'

                      steps:
                      - task: NuGetToolInstaller@1

                      - task: NuGetCommand@2
                        inputs:
                          restoreSolution: '$(solution)'

                      - task: VSBuild@1
                        inputs:
                          solution: '$(solution)'
                          msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
                          platform: '$(buildPlatform)'
                          configuration: '$(buildConfiguration)'

                      - task: VSTest@2
                        inputs:
                          platform: '$(buildPlatform)'
                          configuration: '$(buildConfiguration)'

                      - task: CopyFiles@2
                        inputs:
                          contents: '_buildOutput/**'
                          targetFolder: $(Build.ArtifactStagingDirectory)
                      - task: PublishBuildArtifacts@1
                        inputs:
                          pathToPublish: $(Build.ArtifactStagingDirectory)
                          artifactName: MyBuildOutputs
                    • -task: NuGetToolInstaller@1 (nu get tools is installing)
                    • -task: VSBuild@1 (Build is triggering)
                    • -task: VSTest@2 (performing test).
                    • Copy Build to a folder (BuildArtifactStagingDirectory) and publish as Build Artifact.
                    • To add the above two task, go to microsoft

                    • - task: CopyFiles@2
                        inputs:
                          contents: '_buildOutput/**'
                          targetFolder: $(Build.ArtifactStagingDirectory) #copying from agent machine to this folder
                      - task: PublishBuildArtifacts@1
                        inputs:
                          pathToPublish: $(Build.ArtifactStagingDirectory) # publishing the artifact
                          artifactName: MyBuildOutputs
                    • paste this code in the yaml file. 
                    • save and run.
                    • click on jobs and it will show all tasks performing which is mentioned in yaml file. like bugettoolinstaller, vsbuild, vstest, copying files and publish build artifacts. post job
                    • Now Build has been published as an artifact.
                    • It will be added into master branch, check
                • Step 5: Create Azure Web App Service for deployment.
                  • Go to App Services/Create Web App
                  • RG = star-RG
                  • Name = starapp1 (starapp1.azurewebsites.net)
                  • Publish = code
                  • Runtime Stack = .Net 8(LTS)
                  • o/s = windows
                  • Region = uk South
                  • Piricing Plan = starapp1plan
                  • pricing plan = Premium V3 
                • Step 6: Create a release pipeline for Continuous Deployment/Delivery. If the Release pipeline is not showing then go to Organization settings/Pipelines/Settings/off Disable creation of release pipelines.
                  • Go to azure devops/project1/pipelines/release and click new pipeline.
                  • select empty job
                  • stage name = productionstage
                  • stage owner = you logged in and save it.
                  • Folder \  
                  • click ok
                  • Now click on +Add an Artifact.
                  • Add an artifact:
                  • Source type : Build / Azure Repos / GitHub / TFVC (select build as Build has been created )
                  • Project : project1
                  • Source (build pipeline): project1
                  • Default version : Latest
                  • Source alias: _project1 (short name)
                  • The artifacts published by each version will be available for deployment in release pipelines. The latest successful build of project1 published the following artifacts: MyBuildOutputs.  (this is the name we define in yaml file to publish build artifact)
                  • click add
                  • Add tasks to release pipeline: click on productionstage/task.
                  • click on Agent Job: it will show the detail configuration of agent/vm on which it is going to perform deployment.
                  • Change name to project1_deployment and add tasks.
                  • Agent selection:
                    • Azure Pipelines
                    • Hosted Windows 2019 with vs2019 
                    • Private: Default (Self hosted agent) select this if you have self hosted agent on prem
                  • Add task: click on + , change name of pipeline to releasepipeline1 and in search type: azure app service deploy, select it (As we want to deploy application on azure app service)
                  • application need to deploy on Azure App service.  some settings need attention, click it.
                  • Click subscription and authorize = Enter azure credentials
                  • App service type = Web App on Windows
                  • App service Name = starapp1 (created on step 5) save it.
                  • Deploy to Slot or App SErvice Environment
                  • Virtual application =
                  • Package or Folder = $(System.DefaultWorkingDirectory)/**/*.zip (this is the build package which was copied to DefaultWorkingDirectory folder, defined in yaml file)
                  • click save
                  • Release pipeline is created.
                  • To check artifact is created in the task: go to pipeline/runs/select task/click 1 published/MyBuildOutputs/WebApp.zip
                  •  
                • Step 7:  Release pipeline: Manual and Automatic
                  • Manual Release Pipeline: 
                  • Go to Releases/select releasepipeline1/Create release.  click on release-1 to check progress.
                  • it shows the progress.
                  • Succeeded.
                  • To check the deployment, go to app services.
                  • in overview copy url and paste it in browser.
                  • Release pipeline manually done.
                  • Automatic Release Pipeline:
                  • Go to pipelines/release/select pipeline created earlier/ edit / click on continuous deployment trigger.
                  •  
                  • click enable continuous deployment trigger (Creates a release every time a new build is avilable).
                  • To test and confirm automatic trigger of build pipeline and release pipeline, go to visual studio and make changes in code (pages/index.cshtml).
                  • Build Pipeline Triggers: Go to pipelines/ project1/jobs and check build pipelines triggered automatically and perform job, once complete check release pipeline.
                  • Release Pipeline Triggers: Go to release pipelines and check release-N has been started.
                  • Open the browser and paste url and check changes.
                  • both uild pipleline and release pipeline triggered automatically succeeded.
              • Deploy App to Azure App Deployment Slot using Release Pipeline:
                • Deploying on production slot/test slot/Release pipeline
                  • Step 1: Developer computer
                    • Create a VM and install visual studio 2022 community edition.
                    • open visual studio 2022 and create a project (Project1)
                  • Step 2: Create a project in Devops
                    • Create a public agile project (project1)
                    • copy repo path: go to project1/repo/copy path https://star2024@dev.azure.com/star2024/project1/_git/project1
                  • Step 3: push code from visual studio to azure repos:
                    • Go to visual studio project1/Git/Create a git repository/click Existing remote in Other and paste the URL copied from azure repos
                    • Create and push, it will create local repository and remote repository in azure devops repos.
                  • Step 4: Create a pipeline for Continuous Integration (Build the code).
                    • Go to project1/Pipelines/create a pipeline/
                    • select Azure Repos Git YAML 
                    • select project1 as code has been pushed in this repository in step 3
                    • select ASP.NET Core (.Net Framework)
                    • azure-pipelines.yml created, check the following tasks:
                      • -task: NuGetToolInstaller@1 (nu get tools is installing)
                      • -task: VSBuild@1 (Build is triggering)
                      • -task: VSTest@2 (performing test) keep it remove it.
                    • Copy Build to a folder (BuildArtifactStagingDirectory) and publish as Build Artifact.
                      • To add the above two task, go to microsoft

                      • - task: CopyFiles@2
                          inputs:
                            contents: '_buildOutput/**'
                            targetFolder: $(Build.ArtifactStagingDirectory) #copying from agent machine to this folder
                        - task: PublishBuildArtifacts@1
                          inputs:
                            pathToPublish: $(Build.ArtifactStagingDirectory) # publishing the artifact
                            artifactName: MyBuildOutputs
                      • paste this code in the yaml file. 
                      • save and run.
                      • click on jobs and it will show all tasks performing which is mentioned in yaml file. like bugettoolinstaller, vsbuild, vstest, copying files and publish build artifacts. post job
                      • Now Build has been published as an artifact.
                  • Step 5: Create Azure Web App Service for deployment.
                    • Go to App Services/Create Web App
                    • RG = star-RG
                    • Name = starapp1 (starapp1.azurewebsites.net)
                    • Publish = code
                    • Runtime Stack = .Net 8(LTS)
                    • o/s = windows
                    • Region = uk South
                    • Piricing Plan = starapp1plan
                    • pricing plan = Premium V3
                    • Create Deployment Slot:
                    • By default web app deployed in production slot.  
                    • Instead of deploying directly into production slot, create a test slot and after all examinations/testing then swap it to production.
                    • Deploying on Test Slot 
                      • Create test slot: Click add slot and name = test, clone from = production (it will copy settings from production to test but will not copy code files/application). click add
                      • Now production slot has settings and applications while test slot has only settings.
                      • In Release Pipeline define test deployment slot 
                      • Go to azure devops/release_pipeline1/pipelines/release_pipeline1 and edit
                      • In production1 click job, task
                      • Select Azure App Service Deploy and select check box: Deploy to slot or App Service Environment.
                      • select resource group
                      • slot = test
                      •  save.
                  • Step 6: Create a release pipeline for Continuous Deployment/Delivery. If the Release pipeline is not showing then go to Organization settings/Pipelines/Settings/off Disable creation of release pipelines.
                    • Go to azure devops/project1/pipelines/release and click new pipeline.
                    • select empty job
                    • stage name = productionstage
                    • stage owner = you logged in and save it.
                    • Folder \  
                    • click ok
                    • Now click on +Add an Artifact.
                    • Add an artifact:
                    • Source type : Build / Azure Repos / GitHub / TFVC (select build as Build has been created )
                    • Project : project1
                    • Source (build pipeline): project1
                    • Default version : Latest
                    • Source alias: _project1 (short name)
                    • The artifacts published by each version will be available for deployment in release pipelines. The latest successful build of project1 published the following artifacts: MyBuildOutputs.  (this is the name we define in yaml file to publish build artifact)
                    • click add
                    • Add tasks to release pipeline: click on productionstage/task.
                    • click on Agent Job: it will show the detail configuration of agent/vm on which it is going to perform deployment.
                    • Change name to project1_deployment and add tasks.
                    • Agent selection:
                      • Azure Pipelines
                      • Hosted Windows 2019 with vs2019 
                      • Private: Default (Self hosted agent) select this if you have self hosted agent on prem
                    • Add task: click on + , change name of pipeline to releasepipeline1 and in search type: azure app service deploy, select it (As we want to deploy application on azure app service)
                    • application need to deploy on Azure App service.  some settings need attention, click it.
                    • Click subscription and authorize = Enter azure credentials.
                    • Define test deployment slot 
                    • Go to azure devops/release_pipeline1/pipelines/release_pipeline1 and edit
                    • In ProductionStage click job, task
                    • Select Azure App Service Deploy
                    • select check box: Deploy to slot or App Service Environment.
                    • select resource group
                    • slot = test
                    • Save.
                  • Step 7:  Release pipeline: Manual and Automatic
                    • Manual Release Pipeline: 
                    • Go to Releases/select releasepipeline1/Create release.  click on release-1 to check progress.
                    • it shows the progress.
                    • Succeeded.
                    • To check the deployment, go to app services.
                    • in overview copy url and paste it in browser.
                    • Release pipeline manually done.
                    • Automatic Release Pipeline:
                    • Go to pipelines/release/select pipeline created earlier/ edit / click on continuous deployment trigger.
                    •  
                    • click enable continuous deployment trigger (Creates a release every time a new build is avilable).
                    • To test and confirm automatic trigger of build pipeline and release pipeline, go to visual studio and make changes in code (pages/index.cshtml).
                    • Build Pipeline Triggers: Go to pipelines/ project1/jobs and check build pipelines triggered automatically and perform job, once complete check release pipeline.
                    • Release Pipeline Triggers: Go to release pipelines and check release-N has been started.
                    • Open the browser and paste url and check changes.
                  • Step 8: Testing
                    • Go to slot test and copy URL. (starapp-test.azurewebsites.net)
                    • Make changes in code (index.cshtml) and commit and push.
                    • Build Pipeline will trigger and then release pipeline will trigger and deployed in test deployment slot.
                    • open browser and paste the url of test and check.
                    • Now paste the url of production and check. Production slot is one release behind.
                • Step 9: Swap
                  • Go to starapp1 and Click on swap so that new release move to production slot and existing release move to test slot.
                  • Latest release moved to production after swapping. old release is moved to test deployment slot.  it has been swapped, chck both links starapp1.azurewebsites.net and starapp1-test.azurewebsites.net
                • Step 10: Add Multiple Stages in Release Pipeline:
                  • Earlier we have created two stages (test and production) for deployment.
                  • Create one more slot stage: Go to azure portal / App service / relpipelinewebapp / deployment / deployment slot and add one more slot (stage)
                  • We got slots (test, stage, production).
                  • Add slots in release pipeline: 
                    • Go to release pipeline/edit and two more stages. (testing, staging and production)
                    • Click on each stages on job,task and add its configuration.
                    • After adding all three configuration, click on release and it begins.
                    • Once it is completed, check the url of each slot (testing, staging and production) in browser.
                • Step 11: Configure Pre and Post Deployment conditions using Gates:
                  • Define conditions using query at testing stage.  
                  • In the above scenario there was no work item created and build pipeline and release pipeline has been successfully done.
                  • Create few tasks in work item and keep it in To Do/Doing stage, we define pre and post condition that all taks has to be done to run and clear all stages.
                  • Go to project (release_pipeline1) and create 3 tasks, change first task status to Doing and the rest in To Do.
                  • Go to query and run query to find any tasks is not done.
                  • work item type = task and status isnotequal Done
                  • save query in shared folder (task_notdone).
                  • Go to release pipeline and edit and click on post-deployment conditions.
                  •  
                  • Enable Gates, The Delay before evaluation = 1 Minute (pipeline will wait for 1 minute before it evaluate the condition define in post-deployment).
                  • In deployment gates click add and select:
                  •  
                    • Check Azure Policy Compliance
                    • Invoke Azure Function
                    • Invoke REST API
                    • Query Azure Monitor alerts
                    • query work items
                      • Select query earlier saved, 
                      • upper threshod = 0 (Release pipeline evaluate the gate in which condition has been defined, run query task_notdone, any task whose upper result is not zero)  when all tasks are Done then its result will be zero)
                      • Once the condition of tasks are matched then it will deploy to staging area.
                      • click on evaluation option (here re-evaluation settings define)
                      •  
                        • The time between re-evaluation of gates (5 Minutes), if the condition does not match then it will evaluate again after 5 minutes.  Once the conidtion met then it will deploy to next stage.
                        • Minimum duration for steady results after a successfull gates evaluation  ( 0 minutes), it means once the condition is met then immediately it will deploy to next stage.
                        • The time out after which gates fail ( 1 day), re-evaluation carried every 5 minutes for 1 day (24 hours).  after 24 hours deployment will be rejected.
                      • save.
                  • Click create release (run pipeline manually to test, it will get failed as tasks are still not done).
                  • It will keep trying to evaluate every 5 minutes for 24 hours.
                  • Go to tasks and change status to done for all three tasks and run again release pipeline.
                  • Important:  We need to make sure the query we save for this project have read is allowed.
                  • Go back to release pipeline and check that re-evaluation is running every 5 minutes and now it will be successfull.
                • Step 12: Configure Azure Monitor Alert at Gate:
                  • To configure gate, edit release pipeline and click on post-deployment condition, drop down on gate and there is one deployment at gate query work items.  Delete this. 
                  • Click on + Add and select Query Azure Monitor Alerts.
                  • Scenario: Alert generation.
                  • Release pipeline deploying Build on Testing stage, In the background it deployed on slot testing in web app service.  we have define the testing slot in the configuration of Testing stage.
                  • Application will run on the computing resource of the environment where it is deployed (azure web services) it means agent/VM will be created for this task.
                  • We create an alert for the agent/vm that the application deployed uses resources more than defined threshold value then generate an alert. (CPU, memory utilization)
                  • Go to azure portal to create an alert.
                  • search and select monitor services/alert/create/alert rule and select the resource on which alert can be configured.
                  • select web app resource.
                  • click nextcondition, see all signals and select average memory working set in metrics on which we can generate alerts.
                  • scroll down and define threshold value is 1.
                  • if the average memory utilization is 1 byte then it generates alert.
                  • enter alert rule name and reveiw and create.
                  • Alert will be generated, if not then open browser with web app service url and click refresh.
                  • In release pipeline go to gate and define threshold values of alert.
                  • select subscription, RG, in advance: filter type = by alert rule, select rule (memory_utlization),
                  • save and click create release, click on release-8, deployment will get failed. due to a new alert was generated of memory utilization, it keep re-evaluating in every 5 minutes.
                  • Now go to alert and change user response to close.
                  • select closed: it means the problem has been sort out.
                  • Go to release pipeline and during re-evaluation the build process will be successfull.
                  • Configure Approval required at release pipeline stage:
                  • Approve required for release pipeline to deploy to next stage.
                  • Go to release pipeline/edit/at testing click post-deployment condition and enable Post Deployment Aprroval and enter approver.
                  • save and click create release.
                  • Make sure it-user is assign to release project (release_pipeline1)
                  • Login to azure devops with it-user1 and go to release pipeline where an approve request is visible.
                  • Release pipeline re-evaluate and finish.
                • Deployment Groups:
                  • In release pipeline deploying the Build artifact into multiple VM/Agents with the help of Deployment Group.
                  • VM/Agents could be on Azure or AWS or Google Cloud or on-prem
                  • VM/Agents need to register with Deployment group,.
                  • Integrate Deployment Group with Release pipeline.
                  • Lab:
                  • VM/Agents:
                    • Create two virtual machines (created on vmware workstation on-prem), O/s windows 2019
                    • Install IIS,  open port 80 or disable firewall,
                    • Install .NET 6.0 Runtime Framwork: Download .net windows hosting bundle. (https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-8.0.0-windows-hosting-bundle-installer) and install it. 
                    • open port 80 or turn of firewall.
                  • Go to azure devops/project and create Deployment group:
                    • Go to pipeline section/deployment group/ add a deployment group
                    • Name: DG1
                    • Script: a registration scrtip will be created. 
                      • select check box: use a personal access token in the script for the authentication.
                      • copy script to clubboard.
                      • Go to VMs and run this script in the powershell: open powershell and press enter all the times so that it takes default options.
                      • Registration script has been run on both VMs,
                  • Go to devops/project/deployment group/targets and check vms are visible.
                  • Now create a new release pipeline so that build artifact can be deployed on both VMs.
                    • Go to releases/new release pipeline, select an empty job, stage 1
                  • select build artifact:
                    • click on add an artifact, select source(release_pipeline1) and add
                  • Go to stage 1 and click job,task and select agent job and remove.
                  • Now click three dots stage 1 and select add a deployment group job.
                  •  
                  • click on add adeployment group job and fill required details.
                  • now click + sign and search IIS 
                  • add IIS Web app manage and IIS web app deploy
                  • click on IIS web app manage and enter website name = Default Web Site  and copy 
                  • Click on IIS web app deploy and paste in website name, 
                  • save and select / and save it.
                  • Manual release pipeline by clicking create release (setup automatically).
                  • Check on both VMs, open browser and enter local ip address as it is a VM, use public IP in Azure VM/AWS VM/google cloud VM.
                  • Application has been deployed on both VMs using deployment group.
                • Manual Intervention:
                  • In release pipeline process build artifact deployed in stag area, before deploying we want testers to test and confirm that there is no bug then it resume to deploy in stag area.  
                  • Manual intervention is different than approval.
                  • Go to release_pipeline1/edit /testing/click on job,task and click three dots and select add an  agentless job.
                  • job will not run on any agent.  click on + and select manual intervention and click on add.
                  • select the intervention job and add users to whom it should be notified (testers).
                  • On timeout:
                    • Reject:If user did not respond within define time then request will be rejected.  (default time is 60 days), there is no option to define time.
                    • Resume:If user did not respond withing define time then deployment will be executed.
                  • Drag and Drop: There is another job in the release pipeline, so keep intervention job in the first place.  
                  • Go back to release_pipeline1 and manually run the create release.
                  • Login to azure portal with the user define in intervention. (it-user1)
                  • Go to project/release_pipeline1/Release-10 and click on resume.  it will stop and approval, select approve as it has been configured earlier.
                  • Deployment is successfull.
              • Deploy App on Azure Web App Service & SQL Database 
                • Deploying application on web app service and it will fetch data from sql database and display. 
                • Deploy Database: Go to azure and search sql and select sql database
                • RG: webappsql_RG
                • Name: stardb, select sql server or create new.
                • Deploy SQL Server:
                • Name: starsql, select sql authentication, enter user credentials
                • SQL elastic pool: no
                • compute + storage : click configure database and select (Basic for less demanding workloads, 2 GB storage)
                • Backup storage redundancy: Geo redundanct or as per required.
                • Networking:
                • Connectivity method: public endpoint
                • Firewall rules: select both (Allow current client IP address: it will allow my laptop/computer public IP Address to firewall rules).
                • Review and create.
                • Go to resource stardb and click Query Editory:
                • create a table, use script
                • Run.
                • Deploy App Service Instance on Azure:
                  • Name : starwebapp
                  • Publish : Code
                  • Runtime: .NET 6
                  • O/S : Windows
                  • PricePlan: standard S1
                  • Review and create.
                  • Slot : Production
                • Create a project in Azure devops:
                  • project_sql1
                  • repos is created: project_sql1 (copy URL: https://stardevops0410@dev.azure.com/stardevops0410/project_sql1/_git/project_sql1)
                • Create a VM on VMWare Workstation:
                  • Install visual studio 2022
                  • Open downloaded files from techlearning (double click sqlapp.sln), it will open in visual studio2022
                  • all source file is visible in soution explorer, make the following changes in the code before push it to azure repos (project_sql1) as application should have information about sql database to fetch data.
                  • Expand services and double click C ProductServices and mention database name, user credentials so that application can connect to database and fetch data.
                  • copy server name url from database (stardb) from azure portal and paste it db_source along with user credentials and database name.
                  • save and push it in azure repo (project_sql1)
                  • click on create Git Repository and select existing and paste the url of Azure repos (https://stardevops0410@dev.azure.com/stardevops0410/project_sql1/_git/project_sql1) create and push.
                • Create Build Pipeline:
                  • create pipeline: enter name (buildpipeline1), select azure repos Git and select repos/project_sql1, select ASP.NET template and azure-pipelines.yml will be created.
                  • There are some tasks in the yaml file, add two more tasks which will build artifact and copy into folder.
                  • Create two tasks (Task1 and Task2): https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-build-artifacts-v1?view=azure-pipelines
                  • copy steps from the Example of YML file form the above link.
                  • save and run, now this trigger to create build pipeline. a job will be executed.  All tasks defined in yaml file one by one will be executed.
                  • Create Release Pipeline: 
                    • click on release and click create release pipeline: name:relpipeline1, select empty job, stage 1 and save it.
                    • click on add an artifact and select project and source build (build pipeline=project_sql1) created earlier and click Add.
                    • Click on job,task and Click Agent job + and search Azure App Service Deploy.
                    • Select App Service Deploy and define app service name (select App Service name: starwebapp) and save it.
                    • Click on Create release to start release pipeline manually.  click on Release-1 to check progress.
                    • After deployed successfully.
                    • Go to app service in Azure and copy URL and paste it in browser.
          • Infrastructure as a Code:
            • Deployment of App Service and App Service Plan using ARM Template
              Deployment of Azure SQL Server and Database using ARM Template
              Deployment of Azure Storage Account and Container using ARM Template
              Linked Template
              Nested Template
              ARM Template Integration with Release Pipeline
              Publish Linked Template as an Artifact
              Azure CLI Integration in Release Pipeline to Create Resources
              ARM Template Example1
              ARM Template Example2
              ARM Template Example3
              ARM Template Example4
              ARM Template Example5
              ARM Template Example6
              ARM Template Example7
              ARM Template Example8
              ARM Template Example9
              ARM Template Example10
              • 10
              • 11
          • Terraform configuration
        • Test Plans
          • The easy to use browser based test management solutions provides all the capabilities required for:
            • Planned manual testing
            • User acceptance testing
            • Exploratory testing
            • Gathering feedback from stakeholders.
          • click on test plan of any project, test plan dashboard will be displayed.
          •  
          • Enable Test Plan:
          • you should have basic + test plan to access (enable it from organization setting/billing/basic + test plan).
          • User who logged in should also have basic + test plan access level (assign it from organization settings/users/access level).
          • Scenario:  suppose company developing cab booking application where user can select cab service and make payment.
          • Test plan flow:
            • Test plans
              • Test Suite
                • Test case1
                • Test case2  
            • Create Agile Project: star cab booking app
            • Create work item: user story (Title = Enhance user interface experience), assigned to user (aziz.azure.....)
          • Test Plans:
            • New Test Plan: 
          • Test Suite: on star test plan 1 and click three dots and select requirement based suite.
            • run query and create suite.
          • Test Case.  Title = Test Case 1, and click on steps and add 1. select source and destination. 2. book the cab. save and close.  
            • create another new test case.  Title = Test Case 2, click on steps and add 1. select cab service 2. book the cab  3. make payment. save and close.
          • Assign test to the tester and submit test results: 
            • Add tester (tester1@stardistributors.co.uk) and give basic+test plan access level.
            • Go to test suite and click on three dots and select assign tester to run all tests.
            • Login with tester1 to test and submit test results.
            • select test case1 and click run for web application on top right corner.  a browser will open and pass/fail the test case.  first task is passed and second task is failed.  save and close.  perform the second test and pass both tasks.
            • Check the outcome of test results,  go back to test plans.
            • Double click test case1, open execution history for current test point.  It will open another browser and give details of failed result, either double click on it or click three dots next to Outcome (failed) and click view results.
            • It will open a summary of test result.
            • Click on bug to start a new bug or attach this result with another bug work item.  
            • Link: you can link this result with an existing work item.  
            • Attachment: you can attach a file with this result.
          • Progress Reports:
          • Parameters:
          • Configurations:
          • Runs:
          • code
          • code
        • Artifacts
          • code
          • code
          • code
        • Project Settings
          • General: When you create a project a default team is also created with the project name (star_project_xxx team)
            • Overview:
              • Name: Displays name of the project, edit name
              • Description:edit 
              • Process: Basic
              • Visibility: Public/Private
              • Project Administrators: Add new
              • Azure Devops Services:
                • Boards on/off
                • Repos on/off
                • Pipelines on/off
                • Test Plans on/off
                • Artifacts on/off
              • Project Usage Limites
              • Delete Project
            • Teams: A team with project name is created by default (star_project_xxx Team (default)) . Click on team and see a defualt member is added aziz.azure0410@azizazure0410gmail.onmicrosoft.com under settings can change default teams name, administrator or delete team. Default team cannot be deleted, make another as default and delete.
              • Create New team (star_project_basic_team1):
                • Member: add users into team.
                • Description: add description of team.
                • Administrator : add users to administrators.
                • Add admins to team as member: select check box so that administrators will also be added as team member. create team.  
                • newly creaed team will be a member of contributors group by default.
                • click on newly creaed team for configuration where it will redirect to permissions. 
                • There are two teams (star_project_basic Team and star_project_basic_team1)
            • Permissions:
              • Groups:
                • List of groups of the project
              • Users:
                • List of users of project
              • Group Configuration
                • Permissions:
                  • General:
                    • Delete this node: Not set, allow, deny
                    • Edit this node: Not set, allow, deny
                    • Manage project properties: Not set, allow, deny
                    • Rename Project Properties: Not set, allow, deny
                    • Rename team Project: Not set, allow, deny
                    • Suppress notifications for work item updates: Not set, allow, deny
                    • Update project visibility: Not set, allow, deny
                    • View permissions for this node: Not set, allow, deny
                  • Boards:
                    • Bypass rules on work item updates: Not set, allow, deny
                    • Change process of team project: Not set, allow, deny
                    • Create tag definition: Not set, allow, deny
                    • Delete and restore work items: Not set, allow, deny
                    • Move work items out of this project: Not set, allow, deny
                    • Permanently delete work items: Not set, allow, deny
                  •  Analytics:
                    • Delete shared analytics views: Not set, allow, deny
                    • Edit shared analytics views: Not set, allow, deny
                    • View analytics: Not set, allow, deny
                  • Test plans:
                    • Create test runs: Allow,
                    • Delete test runs: Allow
                    • Manage test configuration: Allow
                    • Manage test environments: Allow
                    • View test runs: Allow
                • Members: list of users/other groups belongs to this team.  add new users/groups to this team.
                • Member of: This team is member of Projet Valud Users by default, Add to new groups.
                • Settings: change image, group details, Delete Group.
            • Notifications:
            • Service hooks:
            • Dashboards
          • Boards
            • Project configuration
            • Team Configuration
            • Github connections
          • Pipelines
            • Agent pools:
              • Microsoft Hosted Agent
                • Microsoft will manage end to end configuration, user has no control on it, Microsoft will install O/s, application defined in task, tools defined in task, all updates/patches and anything related with VM is maintained by Microsoft.
                • Microsoft uses pre-define hardware configuration to deploy VM.  If Microsoft defined confiugration is not fulfill your requirement then go for self-hosted agent.
                • Each time you run a pipeline or pipeline get triggered, a new virtual machine will be created to build your code and it will be discarded after the job.
                • Azure pipeline pool offers several virtual machine images to choose: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tab=yaml&tabs=yaml 
                •  
                • The default image for classic build pipeline is Windows 2019
                • Microsoft hardware configuration for the above images.
              • Self Hosted Agent:
                • Create a VM.
                • Install windows, visual studio 2022 and git on VM.
                • Install Azure pipeline Agent: Download agent from Azure devops, this will make connoection with azure pipeline
                  • To install agent VM, open browser and go to https://dev.azure.com/stardevops0410 and then Go to deveops\project\project settings\pipeline\agent pools, There are two piplelines, Azure pipeline created above with microsoft-hosted agent (click on agent and you will see hosted agent), select default pipeline for self-hosted agent.  click on agent and click new agent.  
                  • Click sysem prerequisite to check the prerequisite:  Visual Studio Build Tool, download and install, we already installed visual studio 2022.
                  • Download the agent, extract at C:\pipeline_agent
                  • Open powershell and go to the extracted folder c:\pipeline_agent.
                  • run this command PS:\pipeline_agent\.\config.cmd
                  • Enter server url:  go to devops portal and click organization and copy URL and paste it in powershell.
                  • Enter for PAT(personal access token): to get personal access token, go to project https://dev.azure.com/stardevops0410/pipeline_project and click on user settings/personal access token (on top right corner)
                  • create new token/ custom defined / show all scopes / agent pools (manage agent pools and agent)read and mange, copy personal access token and paste it in powershell.
                  • Register agent/ Enter Agent Pool (press enter for default): press enter as we are using default agent in pipeline
                  • it shows vm name: press enter or you can give vm name and enter.
                  • enter work folder: press ener it will take _work as work folder and Y and enter to run agent as service.
                  • Agent has been installed.  to confirm go to project settings/agent pools/default/agents
                  • Offline:  If it shows offline, then in powershell run ./run.cmd and it will make connection, do not close window.
                  • To check the service: go to services and search Aue Pipelines Agent (project_name) and make sure service is running.
                • Define self hosted agent to run job in yaml file of azure pipeline.
                  • click on agent and there are no jobs creatd and click on Capabilities to check which o/s, softwares are installed.
                  • To run a job, create or open pipeline, earlier we have created pipeline (pipeline_project).
                  • click edit and it opens YAML file, 
                  • in the pool you will see VMImage is 'windows-latest' is defined, changed it to self-hosted.
                  • Make sure format is correct even a single . is not missing, tasks defined in the YAML file will run on self-hosted agent (on-prem-win10)
                  • click save and run, once click this yaml file will be stored in git repos and pipeline will triggered.
                  • To confirm, go to pipeline (pipeline_project) and runs.  job success. click on job for more details.
                  • click on each steps of job to get more detai
            • Parallel Jobs:
            • Settings:
            • Test Management:
            • Servie Connections:
              • You can create connection between Azure Devops and other third party services, like agent, GitHub, BigBucket, Jenkins, Docker etc..
              • Click Create Service Connection: Choose Github
              • Authentication Method : choose
                • Grant Authorization: select OAuth Configuration, Azure Pipelines (it will integrate Github with Azure Pipeline), click Authorize, it will open a window to enter credentials.
                • Personal Access Token: You will need to enter token 
              • Service Connection Name: Github.com_AbdulAziz-uk
              • Security: Grant access permission to all pipelines, check box
              • Save.
            • XAML build services:
          • Repos
            • Repositories:
          • Artifacts
            • Storage
          • Test
            • Retention
          • code
    • Integration of Azure Boards with  Git Hub / Slack / Teams
      • Create a Basic Project in Azure Devops
        • Go to All Services/Devops/DevOps tools/Azure DevOps Organizations/select organization/create project
        • Enter Project Name: boardandgitintegrate
        • Description: star project using basic work item process
        • select: Private / Public
        • Advance:
          • version control = Git
          • work item process = Basic/Agile/CMMI/Scrum/Custom.
          • Create project.
      • Integration of Azure Boards with GitHub
        • Download & Install Microsoft Visual Studio community 2022 in local system.  select ASP.NET , web development, Azure development workloads.
        • Create a new project in visual studio code
          • select asp.net core web app template
          • Project name = boardandgitintegrate
          • Location = C:\Users\Admin\source\repos
          • .NET 8.0 (long-term support)
          • To view project files, go to view and select solution explorer
        • Create & Integrate Git local repository with Remote Repository (GitHub):
          • Go to Git/create git repository
          • Repository name = boardandgitintegrate
          • visibility = Public
          • Create and push (enter github credentials), local & remote repository will be created.
        • Integrate Board with Github
          • Go to project settings/Boards/Githubconnections/connect your github account
          • Authorize Azure board, select github account and click authorize microsoft
          • Add github repository: select repository created earlier in visual studio.
          • Scroll down to Repository access, remove any other repositories selected, click approve & install.
          • Go to Git-hub/boardandgitintegrate repository/settings/Integrations/Github Apps
          • Installed GitHub Apps: Azure boards is installed.
      • Benefits of Board integration with GitHub while performing task
        • Create a work item/task in project: Go to boards/work items/+New Work Item/task
        • Title = change welcome message Description = Welcome to star project,  Assigned this task to user.  set priority, save it.
        • state = To Do,  once the user complete the task state will be changed to done.
        • Action performed by user: user will make changes in the visual studio project (change index.cshtml: welcome to star training & consulting) save all. 
        • Right click on index.cshtml and select git and click commit & stash, In message type fixed AB#1 where it refers to work item task 1) click commit all and refresh it.  Now push the change to remote repository, click git repository and in local repository click push. 
        • In Work item task state shows done automatically.  It is updated because boards are integrated with Git Hub.
        • work item task is completed, refresh work item.
      • Access Git with personal access token from Azure Devops
        • Git credentials requested when push from local repository to github repository
        • Step1: Create a local folder(git_credentials), create file(file1.txt)
          • git init
          • git add .
          • git commit -m "version 1"
        • Step 2: Create a project in azure devops and push files to repos.
          • project name = git_credentials, basic, git
          • Repos = copy url git remote add origin https://star2024@dev.azure.com/star2024/git_credentials/_git/git_credentials
          • run this command from git folder = git remote add origin https://star2024@dev.azure.com/star2024/git_credentials/_git/git_credentials
          • push code = git push -u origin --all 
          • System will prompt to enter azure credentials to push files (now all files are pushed to azure repos)
          • When you create another file and try to push then system will not ask to enter credentials as it is stored locally in the computer
        • Credentilas are stored in the windows.
          • Go to control panel/credential manager/windows credentials/
          • git:https://dev.azure.com/star2024 (stored credentials)
          • remove credentials.  now system will prompt to enter credentials when try to push files.
        • Personal Access Token.
          • Instead of Microsoft credentials, it can be access by generating personal access token.
          • Go to Azure devops organization/user setting / personal access token/new token
          • Enter name, expiry date, full access or selected access. 
          • create token (copy token)
        • Enter personal access token in Windows credentials manager.
          • Go to control panel/credential manager/windows credentials/ add a generic credentials
          • internet or network address = git:https://dev.azure.com/star2024
          • username = Personal Access Token
          • Password = paste token
        • Now when you push to remote repository system will use personal access token and will not prompt to enter credentials.
        • code
      • Import Repository form Github into Azure Repos
        • Repository in GitHub (star_visualstudio_project)
        • Azure Devops basic Project (star_visualstudio_project), repository name (star_visualstudio_project)
        • Go to devops basic project/repos/click dropdown/import repository
        • select repository type = Git, Enter GitHub Repository URL, repository name and click import.
        • Repository will be imported into the given name,  Check the repository that all files, commits etc has been imported.
        • code
      • Integrate Azure Board with Slack
        • Slack application is use to communicate between team members,
        • Channels are created in slack, members of this channel can read posted messages.
        • If any work item is created than it reflect in slack channel or work item can be created from slack channel.
        • Lab:
        • Create a project in azure devops
          • name =slack_integration, private, agile, git
        • Create a free trial slack:
          • Enter email address, copy and paste code and create account.
          • Create a workspace: star2024
          • Channel name: application_development
          • Enter other team members email address, start with free edition
          • channel star2024 created.
          • click dropdown star2024/tools & settings/manage apps
          • Search azure boards in search slack marketplace, select channel and allow.  If it does not appear than in org settings/extension/add boards+slack extension.
          • Sign in to your Azure Boards account with: /azboards signin and paste it in Message #application-development send now/enter
          • a sign in option will appear in Azure Boards, click Sign in (enter email address: a.mohammed@azizazure2024gmail.onmicrosoft.com) it will generate code, copy and paste it.
          • Successfully signed in to Azure Boards as a.mohammed@azizazure2024gmail.onmicrosoft.com.
            Welcome @abdulaziz. To get started, link this channel to an Azure Boards project with: /azboards link https://dev.azure.com/myorg/myproject
          • Integrate Slack channel (application_development) with Azure Boards:
          • Go to project(slack_integration) and copy URL: https://dev.azure.com/star2024/slack_integration
          • In slack channel, paste link in Message#application_development: /azboards link https://dev.azure.com/star2024/slack_integration and enter
          • Error: You are not Authorized to access one or more resources required to complete this action:
            • soution:  Go to org/settings/security/policies/Application connection polices/enable third-party application acces via OAuth
          • @abdulaziz has linked this channel to project slack_integration. Create work items using /azboards create or using message actions.
          • If you want to receive notifications, click below or run /azboards subscriptions at any time, paste this command and enter.
          • click add subscription
          • Area path = slack_integration (Azure devops project name)
          • Event = select event (work item commented on, work item created, work item deleted, work item restored, work item updated)
          • Work Item Type = Any (Epic, Bug, etc...)
          • Links are added or removed
          • Save
          • Testing: How Notification will come when we create a new item:
          • Go to project/Boards/New Work Item, enter details and save it.
          • Check in slack there will be one notification.
        • code
      • Integrate Azure Pipeline with Slack
        • Create a project in azure devops
          • name =slack_integration, private, agile, git
        • Create a free trial slack:
          • Enter email address, copy and paste code and create account.
          • Create a workspace: star2024
          • Channel name: application_development
          • Enter other team members email address, start with free edition
          • channel star2024 created.
          • click dropdown star2024/tools & settings/manage apps
          • Search azure pipeline in search slack marketplace and click Add to Slack and select channel and allow.  (If Azure pipeline does not appear in search than in org settings/extension/add pipeline+slack extension.)
          • Image
          • Subscribe to one or more pipelines or all pipelines in a project with: /azpipelines subscribe [pipeline url/ project url], copy URL of pipeline from slack_integration project(https://dev.azure.com/star2024/slack_integration/_build?definitionId=13)
          • /azpipelines subscribe https://dev.azure.com/star2024/slack_integration/_build?definitionId=13  (enter)
          • Click sign in and paste the code
          • Successfully signed in to Azure Pipelines as a.mohammed@azizazure2024gmail.onmicrosoft.com.
          • Subscribe:
          • image
          • Check in Azure Devops, and run pipeline and a notification will appear on Slack.
        • code
        • code
      • Integrate Azure Repos with Teams
        • Click for Azure Devops Lab: 
        • Create a project in Azure devops:
          • Organization name = startest123
          • Project name = teams_integration, public, Git, Agile
          • Repos: teams_integration
        • Create a team in Microsoft Teams:
          • Launch Microsoft Teams - you can either open the web app or download the app to your desktop from here
          • team name= star_team
          • Channel name = star_channel, add members
          • Private / public
        • Install Azure Repos application: 
          • Click on Apps/search for Azure repos, select and add
          • abdulmohammed@stardistributor123.onmicrosoft.com member of project administrator group or a team administrator.
          • To receive notifications, you must enable the Third-party application access via OAuth setting for the Azure DevOps organization.
        • Sign in to Repos:
          • Sign in to your Azure Repos: @azure repos signin and enter (abdulmohammed@stardistributor123.onmicrosoft.coma.mohammed@azizazure2024gmail.onmicrosoft.com)
          • Make sure azure devops organization and teams are in the same tenant.
        • Subscribe to Azure repos (teams_integration)
          • @azure repos subscribe https://dev.azure.com/startest123/team_integration/_git/team_integration and enter. 
          • @azure repos subscription https://dev.azure.com/startest123/team_integration/_git/team_integration and enter. 
          • A notification will appear on teams on pull requested created in azure devops.
          • For push notification:
          • @azure respos subscription https://dev.azure.com/startest123/team_integration/_git/team_integration and enter, select code pushed.
        • Test notification:
          • Go azure devops/repository/folder/pages/index.cshtml and make changes.  Commit.
          • Check in teams, pushed 1 commit
      • Code
        • Code
      • Code
        • Code
      • Code
        • Code
      • Code
        • Code
    • Clone Azure Repos
      • Clone a repo
        • When you clone a repository than a copy will be created in local computer.  
        • Create a project in azure devops and push files to repos.
          • project name = git_clone, basic, git
          • Repos = copy url git remote add origin https://star2024@dev.azure.com/star2024/git_credentials/_git/git_clone
          • run this command from git folder = git remote add origin https://star2024@dev.azure.com/star2024/git_credentials/_git/git_clone
          • push code = git push -u origin --all (files are pushed to repos)
        • Clone repository:
          • select repository and click clone
          • HTTPS : URL or SSH : URL
        • Clone Repository with Git 
          • Create a folder in local computer: mkdir clone_gitcredentials
          • C:\clone_gitcredentials\git clone https://star2024@dev.azure.com/star2024/git_credentials/_git/git_credentials
          • System will prompt to enter credentials(it can be generated from clone repository window)
          • Generate Git Credentials: click and copy username and Password.  These credentials can be used for git clone.
        • Clone Repository with Visual Studio 2022.
          • Access visual studio and click Clone a repository (Get a code from online repository like GitHub or Azure Repository)
          • Enter remote repository: https://star2024@dev.azure.com/star2024/git_credentials/_git/git_credentials
          • Path : define path whre clone can be created.
        • Clone Repository with Visual Studio 2022.
          • Access visual studio and click continue without code
          • paste the url: https://star2024@dev.azure.com/star2024/git_credentials/_git/git_credentials
          • enter path and click clone.
        • Clone Repository with Git Tortoise
        • Code
        • Code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
    • Integration & Deployment - CI/CD Pipeline
      • Azure Pipeline Structure - Continuous Integration
        • When we create azure pipeline which required a trigger to execute pipeline.
        • 4 types of trigger we can perform
          • Manual Trigger: 
          • Push to a Repository: when developer make changes in centralized repository which trigger pipeline
          • At a scheduled time: pipeline will trigger on defined time.
          • after another build finishes: 
        • Stages:
          • A pipeline is made up of one or more stages, each stage contain one or more jobs like build, test, deploy etc
          • When you define multiple jobs in a pipeline, by default they run one after ther other.
          • These stages can be defined in YAML file or using classic editor.
        • Jobs:
          • To run a job it required an agent (compute resources),
          • agent define in YAML with pool, agents could be Microsoft hosted or self hosted.
          • A stage contain one or more jobs.
          • Each job rune on one agent, a job can also be agentless, each agent runs a job that contains one or more steps.
        • Steps:
          • A step is the smallest building block of a pipeline.
          • A step can be a task or script.
        • Code
      • Azure Devops Extension
        • With the help of extensions we can install tools and use its capabilities in the project. (for example, maven, kubernetes, docker etc..)
        • During code deveopment or due to dependency, developer mention open source packages/tools in the code which required to add in the extension.
        • Go to org settings/General/extensions.  Click Browse market place.  there will be number of third party tools available,  select white source bolt tool (it is used to check any third party vulnerability and security).
        • select Mend Bolt (formerly known as white source) free version.
        • click install and click proceed to organization.
        • click on extension and see installed : mend bolt
        • scroll down in organization settings and in the bottom in Extension/Mend, click mend.
        • create a free account.  close window.
        • Open project xxx and create a new pipeline using azure/git repos.
        • Lab:  Adding extension to check the vulnerabilities.
        • Step 1: Create a VM
          • Create a VM on prem using vmware workstation and it will be used for self hosted agent to build source code in azure pipeline.
          • Install visual studio 2022, Git
        • Step 2: Create a project in visual studio
          • open visual studio/create a new project.
          • select ASP.Net Core Web App (Razor Pages)
          • Location of the project = C:\Users\Admin\source\repos
          • Name = extension_project
          • .NET 8.0
        • Step 3: Create a project in Azure devops
          • login to dev.azure.com/star2024
          • Create a project, name = extension_project, select Git, Work Item = Agile, public
          • Go to project/repos and copy path = https://star2024@dev.azure.com/star2024/extension_project/_git/extension_project
        • Step 4: Integrate local repository of visual studio with azure repos.
          • In the visual studio click /Git/create git repository
          • select existing remote, paste the path and click create and push.
          • code files are pushed to azure repos, refresh and check.
        • Step 5: Add self hosted agent (computing resource to perform build step) 
          • Go to project settings/Pipelines/Agent pools/Default/agents/new agent
          • name = onprem-agent1
          • Download the agent (windows) copy downloaded file in VM in step 1
          • Create a folder extension-agent and move into folder and extract files and open powershell in the folder where files are extracted.
          • PS:\extension-agent\.\config.cmd
          • Enter server URL >https://dev.azure.com/star2024
          • Enter authentication type (press enter for PAT) > enter
          • Enter personal access token > To generate the token, go to project/user settings (click right top corner) and click personal access token enter name, full access, duration and generate, paste it here and enter.
          • Enter agent pool (press enter for default) > enter
          • Enter agent name (press enter for AGENT) > onprem-agent Enter
          • Enter work folder (press enter for _work) > enter
          • Enter run agent as service? (Y/N) (press enter for N) > Y Enter
          • Enter enable SERVICE_SID_TYPE_UNRESTRICTED for agent service (Y/N) (press enter for N) > Enter
          • Enter User account to use for the service (press enter for NT AUTHORITY\NETWORK SERVICE) > Enter
          • This service required one of the following version of .NET Framwork, check for windows o/s (2016 server) install it.
          • agent - offline (at powershell command  .\run.cmd)
        • Step 6: Create a pipeline
          • create pipeline, select Azure Repose Git (YAML) as code has been pushed here.
          • select repository = extension_project
          • select ASP.NET Core (.Net Framework)
          • it will open azure-pipeline.yml 
          • Add self hosted agent in yaml file.
            • pool:
            • ..name:- 'Default'
            • ..vmImage:- 'extension-agent' 
          • mention extension in the yaml file: 
          • Click show assistant on right hand side of YAML file.
          • list of tasks shown, search mend bolt and select.  before selecting keep cursor in the bottom as wherever cursor is there it will add.
          • save and run.  job will start and check white source as a task has been started.
          • Go to pipeline and see next to summary Mend Bolt.  It it detects any vulnerability will show here.
        • Uninstall: To uninstall any extensions, go to organization settings/extension and select extension and click uninstall.
        • How to Manage Security of Organization's Extension:
          • Any user cannot install extensions, should have organization owner/project collection administrator group.
          • To check while installing extension, click security next to browse marketplace.
          • add user to project collection administrator group to grant access to install extensions.
          • If a user is not a member of project collection administrator group, then user keep continue installing extension and at the time to click install there will be a form which request with owner to grant permission to install extension.
          • Once it is approved user can install.
          • In organization settings/extensions/Requested : request will show here for approval.
        • code
      • Azure Devops Parallelism grant request
        • If you define Microsoft hosted agent in YAML file for Continuous integration in Azure pipeline then jobs will run in this microsoft hosted agent compute.
        • You need to fill and applicaiton form to get the grant so that job can be run on microsoft hosted agent.   https://aka.ms/azpipelines-parallelism-request
        • LAB: Run the pipeline using Microsoft Hosted agent 
          • Step 1: Create a VM for generating project code.
            • Create a VM on prem using vmware workstation.
            • Install visual studio 2022, Git
          • Step 2: Create a project in visual studio
            • open visual studio/create a new project.
            • select ASP.Net Core Web App (Razor Pages)
            • Location of the project = C:\Users\Admin\source\repos
            • Name = extension_project
            • .NET 8.0
          • Step 3: Create a project in Azure devops
            • login to dev.azure.com/star2024
            • Create a project, name = Microsoft-hosted-project, select Git, Work Item = Agile, private
            • Go to project/repos and copy path = https://star2024@dev.azure.com/star2024/Microsoft-hosted-project/_git/extension_project
          • Step 4: Integrate local repository of visual studio with azure repos.
            • In the visual studio click /Git/create git repository
            • select existing remote, paste the path and click create and push.
            • code files are pushed to azure repos, refresh and check.
          • Step 6: Create a pipeline
            • create pipeline, select Azure Repose Git (YAML) as code has been pushed here.
            • select repository =Microsoft-hosted-project
            • select ASP.NET Core (.Net Framework)
            • it will open azure-pipeline.yml 
            • Add self hosted agent in yaml file, by default it mention Microsoft hosted agent.
              • pool:
                  vmImage: 'windows-latest'
            • Save & Run the pipeline, it will run and build the code in microsoft hosted agent.
          • Error: ##[error]No hosted parallelism has been purchased or granted. To request a free parallelism grant, please fill out the following form https://aka.ms/azpipelines-parallelism-request.
          • Once get approval from Microsoft Run again pipeline, it takes 5 to 6 days.
        • To check the grant has been issued:
          • Go to Organization settings/Pipelines/Parallel jobs.
          • Check private jobs and public jobs.
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
    • Code
      • Code
        • Code
        • Code
        • Code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
    • TFVC
      • Create a project with central repository TFVC
        • It is a central version control system whereas Git is distributed version control system.  
        • Creae a project (TFVC_project), public and Agile work item process.
        •  Go to repos a default repository is created $/tfvc_project and it is an empty central repository.
        • Client Computer: To create files and codes, go to visual studio and create a asp.NET core web app template project.
            • Enter project name: tfvc_project
            • Go to Solution Explorer, there are few files and folders are created,  this files will upload into central repository in repos.
            • Go to Team Explorer and click Manage Connection. click on drop down and select connect to a project. 
            •  
            • connect to tfvc_project, 
            • click connect.
            • Map workspace with central repository:
              • click on map & get in configure workspace.  The workspace mapped successfully.
            • Go to solution explorer and right click on Solution 'tfvc_project' and select Add solution to source control.
            • A windows will open, check the details and click ok.
            • in solution explorer, right click and select check in, enter comment "Version1" and click check in.  total 77 items click ok (now items from local repository will store into central repository)
            • Successfully checked in.  To verify go to repos and refresh page.
            • Lets make some changes in index.cshtml in visual studio, go to solution explorer/pages/index.cshtml and right click and select checkout for edit.
            • now a copy of this file will be available on workspace where developers makes changes.  After changes we do check in then this file will reflect in central repository.
            • Developers perform checkout and a copy is copied in workspace where developers makes changes and then perform check in to reflect the modified file in central repository.  
            • in solution explorer a red mark appeared, a copy is available in workspace, developer will open this file and make changes.  save changes and right clik on file and click check in.  Enter comment "Versopn2" and click check in.
            • Check the changes in repos.
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
    • 8
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
    • Real-Time project Azure
      • Deploy Tetris Game with Azure CI/CD: Build & Push docker Image to Azure Kubernetes Cluster Services.  Windows Self hosted Agent.
        • Create a project in Azure Devops
          • Name= Tetris, Public (because self hosted agent is being use)
          • Service Connections = Azure Resource Group (To access resources on azure, ACR & AKS) & Github (To access code)
        • Self hosted agent:
          • Create a windows VM in local computer which will be use for build and deploy
          • Install docker desktop.
          • Configure agent connection.
            • Install visual studio 2022.
            • Install Git
            • Install Azure pipeline Agent: Download agent from Azure devops, this will make connoction with azure pipeline
              • To install agent VM, open browser and go to https://dev.azure.com/stardevops0410 and then Go to deveops\project\project settings\pipeline\agent pools, There are two piplelines, Azure pipeline created above with microsoft-hosted agent (click on agent and you will see hosted agent), select default pipeline for self-hosted agent.  click on agent and click new agent.  
              • Click sysem prerequisite to check the prerequisite:  Visual Studio Build Tool, download and install, we already installed visual studio 2022.
              • Download the agent, extract at C:\pipeline_agent
              • Open powershell and go to the extracted folder c:\pipeline_agent.
              • run this command PS:\pipeline_agent\.\config.cmd
              • Enter server url:  go to devops portal and click organization and copy URL and paste it in powershell.
              • Enter for PAT(personal access token): to get personal access token, go to project https://dev.azure.com/stardevops0410/pipeline_project and click on user settings/personal access token (on top right corner)
              • create new token/ custom defined / show all scopes / agent pools (manage agent pools and agent)read and mange, copy personal access token and paste it in powershell.
              • Register agent/ Enter Agent Pool (press enter for default): press enter as we are using default agent in pipeline
              • it shows vm name: press enter or you can give vm name and enter.
              • enter work folder: press ener it will take _work as work folder and Y and enter to run agent as service.
              • Agent has been installed.  to confirm go to project settings/agent pools/default/agents
              • Offline:  If it shows offline, then in powershell run ./run.cmd and it will make connection, do not close window.
              • To check the service: go to services and search Aue Pipelines Agent (project_name) and make sure service is running.
              • Docker build will execute on this self hosted agent.
        • Create ACR (Azure Container Registry): To store Docker Image 
          • Go to portal.azure.com (enter credentials)
          • Search Azure container Registry, create
          • name = staracr
          • Once deployed, go to settings/Access keys and enable admin user 
        • Create AKS (Azure Kubernetes Cluster Service): To deploy docker image
          • Go to portal.azure.com (enter credentials)
          • Search Azure kubernetes services, create kubernetes cluster
          • name = star-aks
          • Define container registry = staracr which is created earlier
        • Create a pipeline 
          • New pipeline, 
          • Choose Github (yaml) as source code is at Github, Enter Github credentials.  select Tetris-Game-App
          • Choose Deploy to Azure Kubernetes Service (Build & Push Image to Azure Container Registry, Deploy to Azure Kubernetes Service)
          • select azure subscription and continue
          • Select cluster: star-aks
          • Namespace = default
          • Container Registry = staracr
          • Image name = tetrisgame
          • Service Port = 80
          • click validate and configure.
          • It will generate yaml file.
            • # Deploy to Azure Kubernetes Service
              # Build and push image to Azure Container Registry; Deploy to Azure Kubernetes Service
              # https://docs.microsoft.com/azure/devops/pipelines/languages/docker

              trigger:
              - star4
              #Pipeline will trigger on star4 branch
              resources:
              - repo: self

              variables:

                # Container registry service connection established during pipeline creation
                dockerRegistryServiceConnection: 'bb433d90-1ba6-4813-9d55-a7949e84032f'
                imageRepository: 'tetrisgame'
                containerRegistry: 'staracr.azurecr.io'
                dockerfilePath: '**/Dockerfile'
                tag: '$(Build.BuildId)'
                imagePullSecret: 'staracr1937db54-auth'

                # Agent VM image name
              ##  vmImageName: 'ubuntu-latest'

              #the following step will create build using win10-agent
              stages:
              - stage: Build
                displayName: Build stage
                jobs:
                - job: Build
                  displayName: Build
                  pool:
                    name: 'Default'
                    vmImage: win10-agent
                  # The following step will push image to containr registry 
                  steps:
                  - task: Docker@2
                    displayName: Build and push an image to container registry
                    inputs:
                      command: buildAndPush
                      repository: $(imageRepository)
                      dockerfile: $(dockerfilePath)
                      containerRegistry: $(dockerRegistryServiceConnection)
                      tags: |
                        $(tag)

                  - upload: manifests
                    artifact: manifests
              # The following step will deploy image to kubernetes cluster
              - stage: Deploy
                displayName: Deploy stage
                dependsOn: Build

                jobs:
                - deployment: Deploy
                  displayName: Deploy
                  pool:
                    name: 'Default'
                    vmImage: win10-agent
                  environment: 'AbdulAzizukTetrisGameApp-3708.default'
                  strategy:
                    runOnce:
                      deploy:
                        steps:
                        - task: KubernetesManifest@0
                          displayName: Create imagePullSecret
                          inputs:
                            action: createSecret
                            secretName: $(imagePullSecret)
                            dockerRegistryEndpoint: $(dockerRegistryServiceConnection)

                        - task: KubernetesManifest@0
                          displayName: Deploy to Kubernetes cluster
                          inputs:
                            action: deploy
                            manifests: |
                              $(Pipeline.Workspace)/manifests/deployment.yml
                              $(Pipeline.Workspace)/manifests/service.yml
                            imagePullSecrets: |
                              $(imagePullSecret)
                            containers: |
                              $(containerRegistry)/$(imageRepository):$(tag)
          • save and run, pipeline will execute and check steps.
          • 3 Files will be added to repository (Github).  azure-pipelines.yaml, manifest/deployment.yaml, manifes/service.yaml
          • Agent pool Default permission needed: click permit
          • First it will complete Build Stage
            • Build has been done
            • image1.2
            • check agent (docker desktop), an image has been created(tetrisgame)
            • image1.3
          • After finishing Build Stage it will start deploy stage.
            • image 1.4
            • click on Deploy to kubernetes cluster, scroll to bottom and get public IP(service tetrisgame external IP is 131.145.40.43) to access Game,  paste it in browser.
            • Go to Kubernetes cluster/Kubernetes resources/services & Ingresses, copy public IP and paste it in browser to access game.
          • Error at Build Stage:  no matching manifest for windows(10.0.19045)/amd64 in the manifest list entries, C:\Program Files\Docker\Docker\resources\bin\docker.exe' failed with return code 1
            • Solution: Go to docker docktop
            • Right-click Docker icon in the System Tray to open its context menu
            • Click "Switch to Windows/Linux Containers..."
            • Click the Switch button in the dialog (it may take little time)
            • Make sure Docker is in Running state now 
        • Once it is build and deployed, check in the following:
        • ACR: Services / Repositories
        • AKS: workloads
        • Self hosted agent - docker desktop
        • To run app: get public IP from AKS/kubernetes resources/Services & Ingress/ copy public IP
        • Check CI/CD Pipeline Triggers Automatically for any change in code:
          • open tetris.js and make changes in colour of tetris game.
          • commit and check it triggers the pipeline.
      • Deploy Tetris Game with Jenkins CI/CD: Build with Jenkins, Push docker Image to ACR, Deploy on Azure App Service (Linux based).
        • CI Job: When devlops makes changes in code and commit in Github, Jenkins will pull the code and create Docker Image and push it to ACR.  
        • CD Job:  Upon completion of CD job it triggers the CD job where image will be pulled from ACR and deploy on Azure App Service using Azure Container App.
        • Step 1: Create a ubuntu VM, Install Java, Install jenkins, Install Docker, Install Azure CLI: 
          • Create a Ubunt VM in local computer which will be use for build using jenkins
            • Create a new VM.
            • $sudo apt-get update
            • Installing VMAgent:
              • $sudo apt-get install -y open-vm-tools-desktop
              • $sudo reboot
              • copy text and paste will work.
            • ifconfig: command 'ifconfig' not found, but can be installed with "sudo apt install net-tools", run this command.
            • SSH enabling: network error 'connection refused': SSH could be disabled/commented at port22. 
              • $ sudo apt install openssh-server
              • $sudo vi /etc/ssh/ssh_config and remove(#) port 22, passwordAuthentication yes, save and close. 
              • $sudo service sshd restart.
              • Access denied: after entering password it gives an error access denied.  check user is created and password is correct.
            • Drag and Drop or copy:
              • shutdown the ubuntu VM, go to edit settings --> option --> Guest Isolation and select both options. 
              •  on Terminal --> $sudo vi /etc/gdm3/custom_conf (remove # from WaylandEnable=false), save and exit, run $sudo systemctl restart gdms.  logout of user and login.
          • Install JDK.
            • Method 1: run the java command and it shows the following message
              • #java (command 'java' not found, but can be installed with: apt install openjdk-17-jre-headless (select required version))
              • Install JAVA: paste the link # sudo apt install openjdk-17-jre-headless
              • The JRE is the Java Runtime Environment. It is a package of everything necessary to run a compiled Java program, including the Java Virtual Machine (JVM), the Java Class Library, the java command, and other infrastructure. However, it cannot be used to create new programs.

                The JDK is the Java Development Kit, the full-featured SDK for Java. It has everything the JRE has, but also the compiler (javac) and tools (like javadoc and jdb). It is capable of creating and compiling programs.

                Usually, if you only care about running Java programs on computer you will only install the JRE. It's all you need. On the other hand, if you are planning to do some Java programming, you need to install the JDK instead.

                Sometimes, even if you are not planning to do any Java development on a computer, you still need the JDK installed. For example, if you are deploying a web application with JSP, you are technically just running Java programs inside the application server. Why would you need the JDK then? Because the application server will convert JSP into Java servlets and needs to use the JDK to compile the servlets. I am sure that there are more examples.

            • Method 2: get root access (sudo su)
              • #sudo apt-get update (update apt repository)
                1. #sudo apt-cache search jdk (search for any particular jdk version)
              • #apt-get install openjdk-8-jdk –y or
              • #apt install default-jdk (for latest version)
              • #java -version (use one hyphen in ubunutu)java -
            • Set JAVA Environment Variable:
              • Method 1: 
              • Method 2:
              • Method 2
              • #update-alternatives --config java : it gives java installation location, copy it usr/lib/jvm/java-21-openjdk-amd64/bin/java
              • open environment file # sudo vi /etc/environment and paste at the end, save it and exit
              • #source /etc/environment
              • #echo $JAVA_HOME
          • Install Jenkins
            • Method 1: Download: In google search jenkis download and click jenkins download and deployment(https://www.jenkins.io/download/), click Ubuntu/Debian and copy the url. (Jenkins Debian Packages) 
              • #wget -O /usr/share/keyrings/jenkins-keyring.asc \https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
              • #
                echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
                    https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
                    /etc/apt/sources.list.d/jenkins.list > /dev/null
              • $apt-get install jenkins
              • $sudo systemctl start jenkins
              • $ sudo systemctl enable jenkins
              • $sudo systemctl status jenkins
            • Method 2: In google search jenkis download and click jenkins download and deployment (https://www.jenkins.io/download/), right click on Generic Java Package(.war) and copy link address (https://get.jenkins.io/war-stable/2.426.3/jenkins.war). Generic means it will run on any platform windows, linux, mac etc..
              • $ wget https://get.jenkins.io/war-stable/2.426.3/jenkins.war
              • run the file $java -jar jenkins.war
              • Do not close the window after running the above command, if you close then need to run the command again $java -jar jenkins.war
            • By default, Jenkins runs at https://localhost:8080/. This can be changed by editing jenkins.xml , which is located in installation directory. This file is also the place to change other boot configuration parameters, such as JVM options, HTTPS setup, etc.
            • Default user Jenkins:
              • Generally when you install jenkins, a new user (jenkins) gets created. Whatever you do in jenkins will be run as jenkins user.  When you login with any user in jenkins and permform any action then it execute via jenkins user.
              • login to jenkins user: su jenkins (it ask for password which has not been set)
              • To check the user jenkins is created, su root--> vi /etc/passwd
              • In windows jenkins runs as installed user.
              • All commands of commandline (linux or windows) can be run from jenkins.  Plugins is not required if these can be achieved with commands.
              • To install any software it required administrative permissions(sudo), it cannot be run using jenkins user as it does not have administrative permissions.  
              • Jenkins user administrative rights: 
                • $sudo su
                • # vi /etc/ssh/sshd_config
                • password Authentication yes
                • #service sshd restart
                • #visudo
                • add this line jenkins ALL=(ALL:ALL) NOPASSWD:ALL 
                • save (:wq!)
                • #passwd jenkins (enter password)
                • #su jenkins
                • Install any software with jenkins user (sudo apt-get install git -y)
              • Set Environmental Variable: error: command not found, this heppend if path is not set.
            • JENKINS HOME:
              • All the information about jenkins is stored in .jenkins directory, In specific linux installations path can be different.
                • ~/.jenkins
                • AWS Ubuntu EC2 Instance=/var/lib/jenkins
              • JENKINS_HOME: Jenkins uses Environment Variable
          • Install docker.
            • $sudo apt-get install docker.io
            • $sudo usermod -aG docker $user
            • $sudo usermod -aG docker jenkins
            • $sudo init 6 (reboot)
          • Install Azure CLI:
            • on terminal run this command : sudo apt-get update sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
        • Step 2:  Create ACR (Azure Container Registry):
          • Go to portal.azure.com (enter credentials)
          • Search Azure container Registry, create
          • name = staracr
          • Once deployed, go to settings/Access keys and enable admin user, copy password.
        •  Step 3: Integrate ACR with Jenkins: 
          • Go to jenkins/manage jenkins/plugins/available plugins/search azure CLI and install it
          • Manage jenkins/security/credentials/Gloal/Add credentials
            • kind = username and password
            • scope= Global(jenkins,nodes, items,all child item etc)
            • username: staracr (name of acr)
            • password = paste it here which copied from ACR
        • Step 4: Create Service Principle in Azure: 
          • to integrate with jenkins so it can deploy on azure.
          • Go to azure Entra ID/App Registration/New registration.
          • Name = starapp and register.
          • Certificates and secrete/Client secrete/ new client secret/description = jenkins and create, copy Value. 
          • Give access to this secret at subscription:
          • Go to subscription/IAM/Role assignments/Add role assignment/provileged administrator roles/ select contributor
          • members/select member, assign access to : user, group or service principal,  and search jenkins and select jenkins, review and assign.
          • Now service principle has been created.
        • Step 5: Integrate service principle with jenkins:
          • Manage jekins/credentials/system / Global credentials/add credentials
          • kind = azure service principal
          • scope = global (jenkins, nodes, items, all child items, etc)
          • Subscription ID = copy from azure portal and paste it here
          • Client Id = go to app registration/cick jenkins/ overview/cop client ID
          • Client Secret = paste it here which was copied during service principal
          • Tenant ID = copy and paste
          • Azure environment = azure
          • ID = AzureServicePrincipal
          • verify and create.
        • Step 6: Create CI Job in Jenkins:
          • Go to jenkins/new item/starCI-Job/Free style project
            • Source Code Management:
              • select Git: Repository URL = https://github.com/AbdulAziz-uk/Tetris-Game-App.git
              • Branch specifier = star5 (deploying on branch star5)
            • Build Step: Automate your build process with ordered tasks like code compilation, testing, and deployment.
              • Add build step
                • select execute shell
                • rm -rf Tetris-Game-App (it will remove if there is any directory exist in the repository)
                • git clone https://github.com/AbdulAziz-uk/Tetris-Game-App.git (it will clone the repository to the workspace) 
                • docker build -t staracr.azurecr.io/tetris-game-app:latest .  (it will build the docker image, dont forget to add . at the end)
              • Add build step
                • Azure CLI
                • Service principal : select
                • command: az acr login -n staracr (log in to acr) 
                • add
                • command: docker push staracr.azurecr.io/tetris-game-app:latest (it will push image to acr)
                • apply and save
                • click on build now.
                • CI Job run successfuly
                • To verify, go to container registry and chck tags = latest
                • Azure container registry option = admin credentials
                • image = Tetris-Game-App
                • Tag = latest
                • Review & Create
        • Step 7: Create Web App:
          • Go to portal and search App Services, create web app
          • name = startetris
          • publish = container
          • operating system = linux
          • pricing plan = Basic B1
          • Container tab
          • select azure container registry = staracr
          • Azure container registry option = admin credentials
          • image = Tetris-Game-App
          • Tag = latest
          • Review & Create
        • Step 8: Create CD Job to Deploy on Azure Web App:
          • Go to Jenkins/ New Item / CD-Job / Freestyle Project
          • Go to Build steps section / add Build Step / azure-cli
          • select service principal = AzureServicePrincipal
          • command = az webapp config container set --name startetris --resource-group star-RG --docker-custom-image-name staracr.azurecr.io/tetris-game-app:latest
            • The above command will deploy the container app on azure web app service
            • --name startetris = name of azure web app
            • star-RG = Resource Group name
            • --docker-custom-image-name staracr.azurecr.io/tetris-game-app:latest = Repository name on acr and image name
          • Apply and save
          • Build Now
        • Step 9: Access Web App: 
          • Go to azure web app and copy default domain = https://startetris.azurewebsites.net/
          • accss on browser.
        • Step 10: Code Change:  
          • Make changes in Code to trigger CICD job automatically, Tetris game is running in blue colour, change it to red.
          • Set Trigger in CD-Job so that any changes made will trigger CI/CD job run automatically.
          • CI-Job / Configure / Triggers (Set up automated actions that start your build based on specific events, like code changes or scheduled times.)
            • Trigger builds remotely (e.g., from scripts)
            • Build after other projects are built
            • Build periodically:
            • GitHub hook trigger for GITScm polling
            • Poll SCM: * * * * * (every minute it monitor the repository and if there is any change it triggers the build)
            • Post-build Actions:
              • Build other projects: CD-Job (After build CI-Job completion it will trigger CD-Job)
            • Go to Azure Web App / Deployment / Deployment Center / Continuous Deployment = on
            • Restart web app
            • Make colour change in tetris.js
              • Either do it in github directly or through git bash from local computer.
              • Create a folder in laptop: tetris
              • git clone https://github.com/AbdulAziz-uk/Tetris-Game-App.git
              • git branch (it shows branch status)
              • git checkout star5 (it move pointer to branch star5)
              • nano tetris.js (change colour to red)
              • git add .
              • git commit -m "colour changed to red"
              • git push origin star5
              • Now check the tetris game and colour.
          • Changes will take effect.
        • code
      • Deploy Tetris Game with Azure CI/CD: Build & Push docker Image to Azure Container Registry.  Windows Self hosted Agent.
        • Step 1: Create a project in Azure Devops
          • Tetris3, private
        • Step 2:  Create ACR (Azure Container Registry):
          • Go to portal.azure.com (enter credentials)
          • Search Azure container Registry, create
          • name = staracr
          • Once deployed, go to settings/Access keys and enable admin user, copy password.
        • Step 3: Create Servie Connection:
          • Github:
            • Select Grant Authorization
            • OAuth Configuration = AzurePipelines and Authorize
            • Enter subscription, Service connection name, select Grant access permission to all pipelines.
          • Azure ACR: 
            • Select Docker Registry
            • Select Azure Container Registry
            • Authentication type = Service Principal
            • Enter subscription
            • Select Azure Container Registry = staracr
            • Service connection name, select Grant access permission to all pipelines.
        • Step 4: Create Build image with Build Pipeline
          • Create Pipeline
          • Github YAML
          • choose repository Tetris-Game-App (https://github.com/AbdulAziz-uk/Tetris-Game-App.git)
          • Configure: Docker (Build and Push image to azure Container Registry)
          • select subscription
          • select container registry, image name = tetrisgame, Dockerfile = $(BuildSourcesDirectory)/Dockerfile
          • Validate and Configure
          • It opens YAML file (azure-pipelines.yml)
            • Made changes for agent (self hosted or Microsoft hosted agent)
            • # Docker
              # Build and push an image to Azure Container Registry
              # https://docs.microsoft.com/azure/devops/pipelines/languages/docker

              trigger:
              - Tetris3

              resources:
              - repo: self

              variables:
                # Container registry service connection established during pipeline creation
                dockerRegistryServiceConnection: 'f5dafb97-cda7-4405-90a2-53e275babbb4'
                imageRepository: 'tetrisgame'
                containerRegistry: 'staracr.azurecr.io'
                dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile'
                tag: '$(Build.BuildId)'

                # Agent VM image name
              #  vmImageName: 'ubuntu-latest'

              stages:
              - stage: Build
                displayName: Build and push stage
                jobs:
                - job: Build
                  displayName: Build
                  pool:
                    name: 'Default'
                    vmImage: 'ubuntu-agent'
                  steps:
                  - task: Docker@2
                    displayName: Build and push an image to container registry
                    inputs:
                      command: buildAndPush
                      repository: $(imageRepository)
                      dockerfile: $(dockerfilePath)
                      containerRegistry: $(dockerRegistryServiceConnection)
                      tags: |
                        $(tag)
            • Microsoft hosted agent:
            • Windows Self hosted agent:
              • Create a windows10 
              • Install Docker desktop as build is creating docker image.  switch to Linux containers.
                • right click on docker image on windows tray, switch to linux containers. 
              • Install visual studio pre-requisite for agent
              • Install Git
            • Ubuntu Self hosted agent:
              • Create a ubuntu VM
              • Install jdk
              • Install Docker
              • Install Git
          • save and run
          • Build and push has been completed
          • Permission needed: Give permission
          • Go to Azure Container Registry/Services/Repositories and check image has been pushed.
          • tetrisgame: Image has been pushed, tag = 161
        • Step 5: Create Azure Linux Web App:
          • Go to portal and search App Services, create web app
          • name = startetris (startetris.azurewebsites.net)
          • publish = container
          • operating system = linux
          • pricing plan = Basic B1
          • Container tab
          • select azure container registry = staracr
          • Azure container registry option = admin credentials
          • image = Tetris-Game-App
          • Tag = 161
          • Review & Create
        • Step 6: Deploy image to azure web app with Release pipeline:
          • Create pipeline
          • select Azure App Service Depoyment (Deploy your application to Aure Servie.  Choose from WEb App on Windows,Linux Containers.)
            • Choose Subscription and click authorize, enter credentials
            • App type = Web App for Containers (Linux)
            • App Service Name: startetris
            • Registry or Namespace: staracr.azurecr.io
            • Repository: tetrisgame
          • Add an Artifact 
            • Source Type = Build
            • Default Version = Latest
            • Select artifact which was created in step 4
          •  For Continuous Deployed Trigger:
            • Click on Trigger round circle and Enable Continuous Deployment Trigger
          • Save and Create Release.
        • Step 7: Testing
          • Click on Release, click on Deploy Azure App Service, copy App Service Application URL,  Paste it in browser to access game.
        • Step 8: Make Changes in the code and pipeline should trigger automatically.
          • using git or go directly to github and in tetris.js 
          • change colour to green
          • commit
          • Build pipeline should triggered followed by release pipeline.
          • Check background colour of tetris game.
      • Deploy Tetris Game with Jenkins CI/CD: Build with Jenkins with Ansible Playbook, Push docker Image to Docker Hub, Deploy on Azure Kubernetes Cluster Service with Ansible.
        • image
        • CI Job: Jenkins pull the code from github and run Ansible Playbook to Build the Docker image and push it to Docker Hub
        • CD Job: Jenkins will run Ansible Playbook and it pull image from the Docker hub and deploy on Kubernetes Cluster.
        • Step 1: Install and Configure the Jenkins:
          • Create a Ubunt VM in local computer which will be use for build using Ansible Playbook
            • Create a new VM.
            • $sudo apt-get update
            • Installing VMAgent:
              • $sudo apt-get install -y open-vm-tools-desktop
              • $sudo reboot
              • copy text and paste will work.
            • ifconfig: command 'ifconfig' not found, but can be installed with "sudo apt install net-tools", run this command.
            • SSH enabling: network error 'connection refused': SSH could be disabled/commented at port22. 
              • $ sudo apt install openssh-server
              • $sudo vi /etc/ssh/ssh_config and remove(#) port 22, passwordAuthentication yes, save and close. 
              • $sudo service sshd restart.
              • Access denied: after entering password it gives an error access denied.  check user is created and password is correct.
            • Drag and Drop or copy:
              • shutdown the ubuntu VM, go to edit settings --> option --> Guest Isolation and select both options. 
              •  on Terminal --> $sudo vi /etc/gdm3/custom_conf (remove # from WaylandEnable=false), save and exit, run $sudo systemctl restart gdms.  logout of user and login.
          • Install JDK.
            • Method 1: run the java command and it shows the following message
              • #java (command 'java' not found, but can be installed with: apt install openjdk-17-jre-headless (select required version))
              • Install JAVA: paste the link # sudo apt install openjdk-17-jre-headless
              • The JRE is the Java Runtime Environment. It is a package of everything necessary to run a compiled Java program, including the Java Virtual Machine (JVM), the Java Class Library, the java command, and other infrastructure. However, it cannot be used to create new programs.

                The JDK is the Java Development Kit, the full-featured SDK for Java. It has everything the JRE has, but also the compiler (javac) and tools (like javadoc and jdb). It is capable of creating and compiling programs.

                Usually, if you only care about running Java programs on computer you will only install the JRE. It's all you need. On the other hand, if you are planning to do some Java programming, you need to install the JDK instead.

                Sometimes, even if you are not planning to do any Java development on a computer, you still need the JDK installed. For example, if you are deploying a web application with JSP, you are technically just running Java programs inside the application server. Why would you need the JDK then? Because the application server will convert JSP into Java servlets and needs to use the JDK to compile the servlets. I am sure that there are more examples.

            • Method 2: get root access (sudo su)
              • #sudo apt-get update (update apt repository)
                1. #sudo apt-cache search jdk (search for any particular jdk version)
              • #apt-get install openjdk-8-jdk –y or
              • #apt install default-jdk (for latest version)
              • #java -version (use one hyphen in ubunutu)java -
            • Set JAVA Environment Variable:
              • Method 1 
              •  or
              • Method 2
              • #update-alternatives --config java : it gives java installation location, copy it usr/lib/jvm/java-21-openjdk-amd64/bin/java
              • open environment file # sudo vi /etc/environment and paste at the end, save it and exit
              • #source /etc/environment
              • #echo $JAVA_HOME
          • Install Jenkins
            • Method 1: Download: In google search jenkis download and click jenkins download and deployment(https://www.jenkins.io/download/), click Ubuntu/Debian and copy the url. (Jenkins Debian Packages) 
              • #wget -O /usr/share/keyrings/jenkins-keyring.asc \https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
              • #
                echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
                    https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
                    /etc/apt/sources.list.d/jenkins.list > /dev/null
              • Install Jenkins:
              • $sudo apt-get update
              • $sudo apt install openjdk-17-jre-headless (install java if it is not installed)
              • $apt-get install jenkins
              • $sudo systemctl start jenkins
              • $ sudo systemctl enable jenkins
              • $sudo systemctl status jenkins
            • Method 2: In google search jenkis download and click jenkins download and deployment (https://www.jenkins.io/download/), right click on Generic Java Package(.war) and copy link address (https://get.jenkins.io/war-stable/2.426.3/jenkins.war). Generic means it will run on any platform windows, linux, mac etc..
              • $ wget https://get.jenkins.io/war-stable/2.426.3/jenkins.war
              • run the file $java -jar jenkins.war
              • Do not close the window after running the above command, if you close then need to run the command again $java -jar jenkins.war
            • By default, Jenkins runs at https://localhost:8080/. This can be changed by editing jenkins.xml , which is located in installation directory. This file is also the place to change other boot configuration parameters, such as JVM options, HTTPS setup, etc.
            • Default user Jenkins:
              • Generally when you install jenkins, a new user (jenkins) gets created. Whatever you do in jenkins will be run as jenkins user.  When you login with any user in jenkins and permform any action then it execute via jenkins user.
              • login to jenkins user: su jenkins (it ask for password which has not been set)
              • To check the user jenkins is created, su root--> vi /etc/passwd
              • In windows jenkins runs as installed user.
              • All commands of commandline (linux or windows) can be run from jenkins.  Plugins is not required if these can be achieved with commands.
              • To install any software it required administrative permissions(sudo), it cannot be run using jenkins user as it does not have administrative permissions.  
              • Jenkins user administrative rights: 
                • $sudo su
                • # vi /etc/ssh/sshd_config
                • password Authentication yes
                • #service sshd restart
                • #visudo
                • add this line jenkins ALL=(ALL:ALL) NOPASSWD:ALL 
                • save (:wq!)
                • #passwd jenkins (enter password)
                • #su jenkins
                • Install any software with jenkins user (sudo apt-get install git -y)
              • Set Environmental Variable: error: command not found, this heppend if path is not set.
            • JENKINS HOME:
              • All the information about jenkins is stored in .jenkins directory, In specific linux installations path can be different.
                • ~/.jenkins
                • AWS Ubuntu EC2 Instance=/var/lib/jenkins
              • JENKINS_HOME: Jenkins uses Environment Variable
          • Install Azure CLI:
            • on terminal run this command : sudo apt-get update sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
        • Step 2: Create VM and install Ansible & Docker:
          • Create a Ubuntu VM
          • $sudo apt-get update
          • Installing VMAgent:
            • $sudo apt-get install -y open-vm-tools-desktop
          • Create a user:
            • $sudo adduser ansibleadmin
          • Give sudo rights to user ansibleadmin
            • $sudo usermod -aG sudo ansibleadmin (adding user to sudo group)
            • Reboot $init 6
          • Login with ansibleadmin
          • SSH enabling: network error 'connection refused': SSH could be disabled/commented at port22. 
            • $ sudo apt install openssh-server
            • $sudo vi /etc/ssh/ssh_config and remove(#) port 22, passwordAuthentication yes, save and close. 
            • $sudo service sshd restart.
            • Access denied: after entering password it gives an error access denied.  check user is created and password is correct.
          • Generate key for ansibleadmin user for passwordless login authentication.
            • $ssh-keygen and enter for default locations
            • $cd /home/ansibleadmin
            • $cd .ssh
            • $ls
            • $cd ~
          • Install Ansible:
            • $sudo apt-add-repository ppa:ansible/ansible
            • $sudo apt update
            • $sudo apt install ansible-core
            • $ansible --version
          • Install Docker:
            • $cd /opt
            • $sudo mkdir docker
            • $ll (root is the owner of the docker directory), make ansibleadmin owner of thid directory
            • $sudo chown ansibleadmin:ansibleadmin docker
            • $ll
            • $cd docker
            • $sudo apt install docker.io
            • $systemctl status docker
            • $sudo usermod -aG docker ansibleadmin
            • $id ansibleadmin
            • $sudo init 6 (reboot)
        • Step 3: Integrate Ansible with Jenkins:
          • Add a plugin in jenkins: Manage jenkins/Plugins/search ssh and choose Publish Over SSH
          • Manage Jenkins/System Configuration / System  and scroll down to publish over ssh, 
          • SSH servers, click add Name= ansible, Hostname= IP address of Ansible, username = ansibleadmin 
          • Advanced: select use password authentication, or use a different key, enter password of ansibleadmin, apply and test configuration. save it.
        • Step 4: Create Ansible playbook to create docker image and push it to docker hub
          • $cd /etc/ansible
          • $sudo hosts
          • Delete all text and create the following
          • [ansible]
          • 192.168.171.101
          • save & exit
          • $ssh-copy-id 192.168.171.101, follow the screen instruction
          • $cd /opt/docker
          • $vi cafe-app.yml (create a ansible playbook)
            • ---
              - hosts: ansible

                 tasks:
                 - name: clone repository
                   git:
                    repo: https://github.com/AbdulAziz-uk/Cafe-App.git
                    dest: /opt/docker/cafe-app
                    clone: yes
                    update: yes
              - name: create docker image
                command: docker build -t cafe-app:latest /opt/docker/cafe-app
                args:
                 chdir: /opt/docker/

          • $ansible-playbook cafe-app.yml --check (successful)
          • $ansible-playbook cafe-app.yml 
          • $docker images
        • Step 5: Login to Docker Hub from Ansible:
          • $docker login (enter credentials)
          • Now open cafe-app.yml and add 2 tasks, create tag to push image onto docker hub and push docker image
            • ---
              - hosts: ansible

              tasks:
              - name: clone repository
              git:
              repo: https://github.com/AbdulAziz-uk/Cafe-App.git
              dest: /opt/docker/cafe-app
              clone: yes
              update: yes
              - name: create docker image
              command: docker build -t cafe-app:latest /opt/docker/cafe-app
              args:
              chdir: /opt/docker/
              - name: create tag to push image onto dockerhub
              command: docker tag cafe-app:latest aziz27uk/cafe-app:latest
              - name: push docker image
              command: docker push aziz27uk/cafe-app:latest

          • $ansible-playbook cafe-app.yml --check (successful)
          • $ansible-playbook cafe-app.yml
          • CI job has been done. image has been pushed to docker hub.
        • Step 6: Create CI Job in Jenkins:
          • New Item: CI-Job-CafeApp, free style project.
          • Source Code Mangament:
            •  Git:
            • Branch: star1
          • Post Build Action:
            • Send build artifacts over SSH
            • SSH Server = Ansible
            • Source Files
            • Exec Command = ansible-playbook /opt/docker/cafe-app.yml
            • Apply and Save
          • Build now: Success
          • check in ansible server and docker hub, image has been pushed on both.
        • Step 7: Create Azure Kubernetes Cluster Service - star-aks
          • Go to portal.azure.com (enter credentials)
          • Search Azure kubernetes services, create kubernetes cluster
          • name = star-aks
          • Azure container registry = None
        • Step 8: Create a VM in Azure for Kubernetes Server
        • Code:
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
    • Real-Time Projects AWS
      • Code
        • code
        • code
        • code
      • Code
        • code
        • code
        • code
      • Code
        • Image
        • Code
        • code
        • Code
        • Code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
      • code
        • code
        • code
        • code
    • Release Pipeline Flow:
         
      • Continuous Integration (Build Pipeline):
      • Developers write code in their local computer and push it to local repository, to maintain version control system code is then push to central repository.
      • To convert the code into executive package build pipeline process begins in which a task is define to fetch code from central repository and run build process.
      • The build process executed in agents (compute resource or VM) which is define in YAML file.
      • Once the build process is completed then agent/VM get deleted in which build package is executed.
      • We need to save build package before agent/vm get deleted, two tasks has been define.
      • Task1 : Take build package in zip format and save it in build artifact staging directory.
      • Task2: perform build zip format package into build artifact.  
      • After the above two task continuous deployment or release pipeline process begins.
      • Continuous Deployment (Release Pipeline):
      • In Release piple task has been define to create an agent/VM to process build artifact 
      • App should be deployed in the target environment (App Service in Azure)
      • Lab: Release Pipeline
      • Developer Computer:
      • Create a VMWare Virtual Machine (win10), install visual studio 2022.
      • Create a project in visual studio (release_pipeline1) using ASP.NET template.  project created with default source code files and folders.
      • Azure Devops create a project:
      • Logon to azure devops and create a project (release_pipeline1), private using Git-basic.
      • A central repos is created with the project name (release_pipeline1), go to repos and click release_pipeline and copy url link.
      • Integrate local repository in visual studio with central repository in azure repos:
      • Go to visual studio/release_pipeline1/Git/create git repository/ click existing remote and paste url link, create and push. 
      • Go to azure repos and click refresh, now files and folders are pushed in repos.
      • Create Build Pipeline:
      • Go to devops portal and create pipeline (build_pipeline1).
      • Where is code (Azure Repos Git), select repository (release_pipeline1), Configure your pipeline: select (ASP.NET Core (.Net Framework))
      • YAML file (azure-pipelines.yml) will open,
      • Pool : VM Image: 'windows-latest' (a virtual machine is created in azure and following tasks performed on it)  we need to define two more tasks (Task1 andn Task2) discussed earlier)
      • Tasks: Multiple tasks has been defined.
      • Create two tasks (Task1 and Task2): https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-build-artifacts-v1?view=azure-pipelines
      • copy steps from the Example of YML file form the above link.
      • in the task it is define to copy build file into Build.ArtifactStagingDirectory.
      • In the task2 it is define to use path Build.ArtifactStagingDirectory publish artifact in MyBuildOutputs. 
      • Save and run: this yaml file will got into central repository and get commit.  it will trigger to start build pipeline and create a VM.
      • Job will be executed and click on job to view more details.
      • Create Release Pipeline:
        • Go to azure devops/release_pipeline1/pipelines/release and click new pipeline.
        • select empty job and enter stage (production1) name, folder / and save it.
        • Now click on +Add an Artifact.
        • click on production1/task.
        • click on Agent Job: it will show the details configuration of agent/vm.  Change name to release_pipeline1 and add tasks.
        • click on + to add task and in search type: azure app service deploy, select it (As we want to deploy application on azure app service)
        • soem settings need attention, click it.
        • Click subscription and authorize, app service type = Web App on Windows, App service Name = relpipelinewebapp (created a web app instance) save it.
        • Release pipeline is created.
        • To check artifact is created in the task: go to pipeline/runs/select task/click 1 published/MyBuildOutputs
        •  
        • Release pipeline: Manual and Automatic
          • Manual Release Pipeline: Click on create release.  clikc on release-1 to check progress.
          • it shows the progress.
          • Succeeded.
          • To check the deployment, go to app services.
          • in overview copy url and paste it in browser.
          • Release pipeline manually done.
        • Automatic Release Pipeline:
          • Go to pipelines/release/select pipeline created earlier/ edit / click on continuous deployment trigger.
          •  
          • click enable continuous deployment trigger (Creates a release every time a new build is avilable).
          • To test and confirm automatic trigger of build pipeline and release pipeline, go to visual studio and make changes in code (pages/index.cshtml), Successfully test the automatic trigger of build and release pipeline.
          • Go to pipelines and check build pipelines triggered automatically when we push in visual studio.
          • Go to release pipelines and check release-2 has been started.
          • Open the browser and paste url and check changes.
          • both uild pipleline and release pipeline triggered automatically succeeded.
        Deploy App to App Deployment Slot using Release Pipeline:
      • Create Deployment Slot:
      • By default web app deployed in production slot.  
      • Instead of deploying directly into production slot, create a test slot and after all examinations/testing then swap it to production.
      • Click add slot and name = test, clone from = production (it will clone settings from production to test but will not clone code files). click add
      • test deployment slot and production deployment slot.
      • In Release Pipeline define test deployment slot 
      • Go to azure devops/release_pipeline1/pipelines/release_pipeline1 and edit
      • In production1 click job, task
      • Select Azure App Service Deploy and select check box: Deploy to slot or App Service Environment.
      • select resource group
      • slot = test
      •  save.
      • Go to slot test and copy URL. (relpipelinewebapp-test.azurewebsites.net)
      • Make changes in code (index.cshtml) and commit and push.
      • Build Pipeline will trigger and then release pipeline will trigger and deployed in test deployment slot.
      • open browser and paste the url of test and check.
      • Now paste the url of production and check. Production slot is one release behind.
      • Click on swap so that new release move to production slot and existing release move to test slot.
      • Latest release moved to production after swapping. old release is moved to test deployment slot.
      • Add Multiple Stages in Release Pipeline:
      • Earlier we have created two stages (test and production) for deployment.
      • Go to azure portal / App service / relpipelinewebapp / deployment / deployment slot and add one more slot (staging)
      • We add another stage namely (testing, staging, production).
        • Go to release pipeline/edit and two more stages. (testing, staging and production)
        • Click on each stages on job,task and add its configuration.
        • After adding all three configuration, click on release and it begins.
        • Once it is completed, check the url of each slot (testing, staging and production) in browser.
        • Configure Pre and Post Deployment conditions using Gates:
        • Define conditions using query at testing stage.  
        • In the above scenario there was no work item created and build pipeline and release pipeline has been successfully done.
        • Create few tasks in work item and keep it in To Do/Doing stage, we define pre and post condition that all taks has to be done to run and clear all stages.
        • Go to project (release_pipeline1) and create 3 tasks, change first task status to Doing and the rest in To Do.
        • Go to query and run query to find any tasks is not done.
        • work item type = task and status isnotequal Done
        • save query in shared folder (task_notdone).
        • Go to release pipeline and edit and click on post-deployment conditions.
        •  
        • Enable Gates, The Delay before evaluation = 1 Minute (pipeline will wait for 1 minute before it evaluate the condition define in post-deployment).
        • In deployment gates click add and select:
        •  
          • Check Azure Policy Compliance
          • Invoke Azure Function
          • Invoke REST API
          • Query Azure Monitor alerts
          • query work items
            • Select query earlier saved, 
            • upper threshod = 0 (Release pipeline evaluate the gate in which condition has been defined, run query task_notdone, any task whose upper result is not zero)  when all tasks are Done then its result will be zero)
            • Once the condition of tasks are matched then it will deploy to staging area.
            • click on evaluation option (here re-evaluation settings define)
            •  
              • The time between re-evaluation of gates (5 Minutes), if the condition does not match then it will evaluate again after 5 minutes.  Once the conidtion met then it will deploy to next stage.
              • Minimum duration for steady results after a successfull gates evaluation  ( 0 minutes), it means once the condition is met then immediately it will deploy to next stage.
              • The time out after which gates fail ( 1 day), re-evaluation carried every 5 minutes for 1 day (24 hours).  after 24 hours deployment will be rejected.
            • save.
        • Click create release (run pipeline manually to test, it will get failed as tasks are still not done).
        • It will keep trying to evaluate every 5 minutes for 24 hours.
        • Go to tasks and change status to done for all three tasks and run again release pipeline.
        • Important:  We need to make sure the query we save for this project have read is allowed.
        • Go back to release pipeline and check that re-evaluation is running every 5 minutes and now it will be successfull.
        • Configure Azure Monitor Alert at Gate:
        • To configure gate, edit release pipeline and click on post-deployment condition, drop down on gate and there is one deployment at gate query work items.  Delete this. 
        • Click on + Add and select Query Azure Monitor Alerts.
        • Scenario: Alert generation.
        • Release pipeline deploying Build on Testing stage, In the background it deployed on slot testing in web app service.  we have define the testing slot in the configuration of Testing stage.
        • Application will run on the computing resource of the environment where it is deployed (azure web services) it means agent/VM will be created for this task.
        • We create an alert for the agent/vm that the application deployed uses resources more than defined threshold value then generate an alert. (CPU, memory utilization)
        • Go to azure portal to create an alert.
        • search and select monitor services/alert/create/alert rule and select the resource on which alert can be configured.
        • select web app resource.
        • click nextcondition, see all signals and select average memory working set in metrics on which we can generate alerts.
        • scroll down and define threshold value is 1.
        • if the average memory utilization is 1 byte then it generates alert.
        • enter alert rule name and reveiw and create.
        • Alert will be generated, if not then open browser with web app service url and click refresh.
        • In release pipeline go to gate and define threshold values of alert.
        • select subscription, RG, in advance: filter type = by alert rule, select rule (memory_utlization),
        • save and click create release, click on release-8, deployment will get failed. due to a new alert was generated of memory utilization, it keep re-evaluating in every 5 minutes.
        • Now go to alert and change user response to close.
        • select closed: it means the problem has been sort out.
        • Go to release pipeline and during re-evaluation the build process will be successfull.
        • Configure Approval required at release pipeline stage:
        • Approve required for release pipeline to deploy to next stage.
        • Go to release pipeline/edit/at testing click post-deployment condition and enable Post Deployment Aprroval and enter approver.
        • save and click create release.
        • Make sure it-user is assign to release project (release_pipeline1)
        • Login to azure devops with it-user1 and go to release pipeline where an approve request is visible.
        • Release pipeline re-evaluate and finish.
      • Deployment Groups:
        • In release pipeline deploying the Build artifact into multiple VM/Agents with the help of Deployment Group.
        • VM/Agents could be on Azure or AWS or Google Cloud or on-prem
        • VM/Agents need to register with Deployment group,.
        • Integrate Deployment Group with Release pipeline.
      • Lab:
        • VM/Agents:
          • Create two virtual machines (created on vmware workstation on-prem), O/s windows 2019
          • Install IIS,  open port 80 or disable firewall,
          • Install .NET 6.0 Runtime Framwork: Download .net windows hosting bundle. (https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-8.0.0-windows-hosting-bundle-installer) and install it. 
          • open port 80 or turn of firewall.
        • Go to azure devops/project and create Deployment group:
          • Go to pipeline section/deployment group/ add a deployment group
          • Name: DG1
          • Script: a registration scrtip will be created. 
            • select check box: use a personal access token in the script for the authentication.
            • copy script to clubboard.
            • Go to VMs and run this script in the powershell: open powershell and press enter all the times so that it takes default options.
            • Registration script has been run on both VMs,
        • Go to devops/project/deployment group/targets and check vms are visible.
        • Now create a new release pipeline so that build artifact can be deployed on both VMs.
          • Go to releases/new release pipeline, select an empty job, stage 1
        • select build artifact:
          • click on add an artifact, select source(release_pipeline1) and add
        • Go to stage 1 and click job,task and select agent job and remove.
        • Now click three dots stage 1 and select add a deployment group job.
        •  
        • click on add adeployment group job and fill required details.
        • now click + sign and search IIS 
        • add IIS Web app manage and IIS web app deploy
        • click on IIS web app manage and enter website name = Default Web Site  and copy 
        • Click on IIS web app deploy and paste in website name, 
        • save and select / and save it.
        • Manual release pipeline by clicking create release (setup automatically).
        • Check on both VMs, open browser and enter local ip address as it is a VM, use public IP in Azure VM/AWS VM/google cloud VM.
        • Application has been deployed on both VMs using deployment group.
      • Manual Intervention:
        • In release pipeline process build artifact deployed in stag area, before deploying we want testers to test and confirm that there is no bug then it resume to deploy in stag area.  
        • Manual intervention is different than approval.
        • Go to release_pipeline1/edit /testing/click on job,task and click three dots and select add an  agentless job.
        • job will not run on any agent.  click on + and select manual intervention and click on add.
        • select the intervention job and add users to whom it should be notified (testers).
        • On timeout:
          • Reject:If user did not respond within define time then request will be rejected.  (default time is 60 days), there is no option to define time.
          • Resume:If user did not respond withing define time then deployment will be executed.
        • Drag and Drop: There is another job in the release pipeline, so keep intervention job in the first place.  
        • Go back to release_pipeline1 and manually run the create release.
        • Login to azure portal with the user define in intervention. (it-user1)
        • Go to project/release_pipeline1/Release-10 and click on resume.  it will stop and approval, select approve as it has been configured earlier.
        • Deployment is successfull.
      • Deploy App on Azure Web App Service & SQL Database:
        • Deploying application on web app service and it will fetch data from sql database and display. 
        • Deploy Database: Go to azure and search sql and select sql database
        • RG: webappsql_RG
        • Name: stardb, select sql server or create new.
        • Deploy SQL Server:
        • Name: starsql, select sql authentication, enter user credentials
        • SQL elastic pool: no
        • compute + storage : click configure database and select (Basic for less demanding workloads, 2 GB storage)
        • Backup storage redundancy: Geo redundanct or as per required.
        • Networking:
        • Connectivity method: public endpoint
        • Firewall rules: select both (Allow current client IP address: it will allow my laptop/computer public IP Address to firewall rules).
        • Review and create.
        • Go to resource stardb and click Query Editory:
        • create a table, use script
        • Run.
        • Deploy App Service Instance on Azure:
          • Name : starwebapp
          • Publish : Code
          • Runtime: .NET 6
          • O/S : Windows
          • PricePlan: standard S1
          • Review and create.
          • Slot : Production
        • Create a project in Azure devops:
          • project_sql1
          • repos is created: project_sql1 (copy URL: https://stardevops0410@dev.azure.com/stardevops0410/project_sql1/_git/project_sql1)
        • Create a VM on VMWare Workstation:
          • Install visual studio 2022
          • Open downloaded files from techlearning (double click sqlapp.sln), it will open in visual studio2022
          • all source file is visible in soution explorer, make the following changes in the code before push it to azure repos (project_sql1) as application should have information about sql database to fetch data.
          • Expand services and double click C ProductServices and mention database name, user credentials so that application can connect to database and fetch data.
          • copy server name url from database (stardb) from azure portal and paste it db_source along with user credentials and database name.
          • save and push it in azure repo (project_sql1)
          • click on create Git Repository and select existing and paste the url of Azure repos (https://stardevops0410@dev.azure.com/stardevops0410/project_sql1/_git/project_sql1) create and push.
        • Create Build Pipeline:
          • create pipeline: enter name (buildpipeline1), select azure repos Git and select repos/project_sql1, select ASP.NET template and azure-pipelines.yml will be created.
          • There are some tasks in the yaml file, add two more tasks which will build artifact and copy into folder.
          • Create two tasks (Task1 and Task2): https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/publish-build-artifacts-v1?view=azure-pipelines
          • copy steps from the Example of YML file form the above link.
          • save and run, now this trigger to create build pipeline. a job will be executed.  All tasks defined in yaml file one by one will be executed.
          • Create Release Pipeline: 
            • click on release and click create release pipeline: name:relpipeline1, select empty job, stage 1 and save it.
            • click on add an artifact and select project and source build (build pipeline=project_sql1) created earlier and click Add.
            • Click on job,task and Click Agent job + and search Azure App Service Deploy.
            • Select App Service Deploy and define app service name (select App Service name: starwebapp) and save it.
            • Click on Create release to start release pipeline manually.  click on Release-1 to check progress.
            • After deployed successfully.
            • Go to app service in Azure and copy URL and paste it in browser.
      Infrastructure as Code: (link for ARM Template Tutorial)
      Deployment of App Service and App Service Plan using ARM Template
      • "Microsoft.Web serverfarms" : Resource provider of Web App Service Plan (click to get format in bicep, ARM Template, Terraform)
      • "Microsoft.Web sites" : Resource provider of Web App  (click to get format in bicep, ARM Template, Terraform)
      • Example1: Manually Deploying Web App Service Plan and Web App using ARM Template.  copy code.
      • Format get change when API version changes.
      • Go to Azure Portal and search Deploy a Custom Template and paste the above code.
      • Click Build your own template in the editor and delete the existing code and paste the code.
      • There will be two resources is creating.  in multiple resources after first resource code ends then use comma and start second resource code, no comma used in last resource. Save.
      • Select subscription, Resource Group, location and Review and create.
      • Go to resoruce group, there will be two resources created, click web app and go to overview and copy url and paste it in browser.
      • Example2: 
      Deployment of Azure SQL Server and Database using ARM Template
      • "Microsoft.Sql/servers" : Resource provider of SQL Server (click to get format in bicep, ARM Template, Terraform)
      • "Microsoft.Sql/servers/databases" : Resource provider of Database  (click to get format in bicep, ARM Template, Terraform)
      • Example1: Manually Deploying SQL Server and Database using ARM Template.  copy code.
      • Format get change when API version changes. 
      • Parameters are used for username and password (in password used securestring= on screen it displays ****** not plain text), system will prompt to enter username and password when execute this template.
      • Save and create.
      • 9
      Deployment of Azure Storage Account and Container using ARM Template
      • "Microsoft.storage/storageaccounts" : Resource provider of Storage Account (click to get format in bicep, ARM Template, Terraform)
      • "Microsoft.Sql/servers/databases" : Resource provider of Container  (click to get format in bicep, ARM Template, Terraform)
      • Example1: Manually Deploying Storage Account and Container using ARM Template.  copy code.
      • 3 parameters defined  where user need to enter (storage account name, container name, location) , and 2 resources (storage and container) will be created.
      • Default Value in Parameter: In location parameter we have defined default value, if no location enter than default resource group location will be taken.
      • SKU defined: "Standard LRS"
      • Kind defined : "StorageV2"
      • Properties of Access Tier: "Hot"
      • Save and create.
      • user will be asked to enter: storage account name, container name, location
      • 9
      Linked Template
      • Earlier resouces created using ARM Templates and in each template two resources were created.  Now make link between two ARM Templates.
      • We have two ARM Templates (Main Template=WebApp Service plan + Web App) and (Linked Template =SQL Server + Database).
      • copy main template code and go to azure portal and selct Deploy a custom template and select Build your own template in the editor and paste the code.  Now need to define linked template in the main template. click for code.
      • Create a storage account (starstorage9) and container (starcontainer9).  Make sure storage account has Allow blob anonymous access enabled.  upload Linked Template = (SQL server+ database) so that this code is also available to deploy. Once upload a URL is also generated, copy the URL and paste it in main template.  click for code.
      • Create loginparameter file and Upload in container: Copy the code from top until resources from sql server + database code and define values of SQL username and password which is required webapp to connect to database.  Save the file (loginparameter) and upload it.  copy URL and paste it in main template code.
      • Review and create.
      • It will create webapp plan + web app + sql server + database
      • code for table creation.
      • 9
      Nested Template
      • 7
      • 8
      • 9
      ARM Template Integration with Release Pipeline
      • Deploying the resources SQL database and webapp service using ARM template
      • Step1: Create a storage (starstorage9) and a container (starcontainer9) and upload the following three json files. 
      • ARM Template for (SQL server + Database) and (web app service plan + web app service) and loginparameter json files upload into a starcontainer9.  This templates will be used to create SQL srever and database, webapp plan and web app service,  login parameter in which SQL server user name and password has been defined which is required during cretion of database.
      • Step 2: Once upload these files in container, go to sql server + database file and copy URL.  Now paste this url in web app service plan + web app service file, click edit and paste in SQL service link section.
      • Go to loginparameter file and copy URL and paste it in web app service plan + web app service file, click edit and paste the url in the SQL login link section.
      • Step 3: Create a project (star_project9) in Azure devops and copy repos URL.  (https://stardevops0410@dev.azure.com/stardevops0410/star_project9/_git/star_project9)
      • Step 4: Create a vm on local machine (Developer machine) and install visual studio 2022.  copy sql code folder and paste it at default project location c:\windows\users\source\repos\sqlproject.
      • Double click sqlapp.sln which will open in visual studio 2022, double click the productservice.cs under services and make necessary changes of sql login details and save it.
      • In visual studio 2022Clik Git and create git repository and paste repos url (https://stardevops0410@dev.azure.com/stardevops0410/star_project9/_git/star_project9) so that code will be pushed to star_project9.
      • Step 5: Create Build Pipeline (star_project9) and select Azure Repos git and select star_project9, select asp.net, a yaml file will open, add two tasks and save and run.
      • Step 6: Create Release Pipeline (release_pipeline9), select emtpy and save.  click on add an artifact and select star_project 9 and save. 
      • Agent job: click + sign and create the following 4 tasks.
      • ARM Template Deployment: Enter the required fields. Deployment scope = Resource Group, enter subscription, location and in template: template location select URL of file and paste url of main template (webapp + webappplan) in container. save
      • Azure SQL Database Deployment: Enter the required field, SQL server name (starsql01.database.windows.net), database name (stard01), username, password and select deployment type SQL inline script and paste script to create a table.  click firewall, select IP address range and enter 0.0.0.0 range on both places. save
      • Azure App Service Deploy:  It will deploy app in app service instance (starwebapp): Enter the required field, App Service Type = Web App on Windows, enter app service name (starwebapp). save
      • Azure App Service Settings: Enter the required field, App Service Name= starwebapp, Resource Group Name = TestRG. Connection string : enter code (manually do not need to enter database credentials).  
      • release pipeline, once it is deployed go to webapp and copy url and paste it in browser which will display a table.
      •  
      • 9
      Publish Linked Template as an Artifact
      • 2
      • 3
      • 4
      • 5
      Azure CLI Integration in Release Pipeline to Create Resources
      • 7
      • 8
      • 9
      ARM Template Example1
      • 7
      • 8
      • 9
      ARM Template Example2
      • 2
      • 3
      • 4
      • 5
      ARM Template Example3
      • 7
      • 8
      • 9
      ARM Template Example4
      • 7
      • 8
      • 9
      ARM Template Example5
      • 2
      • 3
      • 4
      • 5
      ARM Template Example6
      • 7
      • 8
      • 9
      ARM Template Example7
      • 7
      • 8
      • 9
      ARM Template Example8
      • 2
      • 3
      • 4
      • 5
      ARM Template Example9
      • 7
      • 8
      • 9
      ARM Template Example10
      • 7
      • 8
      • 9
      • 10
      • 11
      Terraform Configuration: click here for terraform tutorial in AWS.
      • 7
      • 8
      • 9
      Download and Install Terraform in Local Computer.
      • Go to www.terraform.io/download and select O/S> Windows/AMD 64 unzip the folder.
      • After extracting there will be one file terraform.exe, copy this file and create a folder in C:\star_terraform and paste the file.  copy the path and set environment.
      • Environment Variable: open control panel > system > advance system settings > Environment variable > Double click path and click new and paste path.
      • Install visual studio code:  With the help of visual studio code terraform configuration file can be created.  
      • open visual studio code and go to extensions and install two extensions, 1) search terraform and select HashiCorp terraform and install it.  2) Install Azure Terraform.
      • Go to file and open folder and select folder created (star_terraform) and select folder.  
      • In visual studio code it will appear with a file terraform.exe.  create a file for configurtion in this folder authentication.tf and enter the code.
      • Configuration:
      • Authentication with Azure portal:  visual studio code connection with Azure Portal, perform the following steps.
      • Login to Azure portal: go to Azure Intra ID and click app registration > new registration > star.terraform
      • There are some ID created with app registration.  
      • Azure Provider IDs: These IDs will be define in visual studio configuration file (authentication.tf).  paste the code in the file and enter required IDs of provider.
      • subscription ID = go to azure portal and copy subscription ID.
      • Tenant_id = Go to app registerd (star.terraform) and copy tenant Id.
      • Client id = Go to app registerd (star.terraform) and copy client Id.
      • client_secret = Go to app registerd (star.terraform) and click certificates and secrets and click new client secret. Enter desciption and expiry date and create.  copy value not secret id.  (if you close the window then create again).
      • Assign contributor role:  Go to subscription and click IAM  >click add role assignment > priviledged administrator role > Contributor > click on members > select member > in search type star.terraform and select.  Review and assign.
      • 9
      Create two resources (webapp plan + webapp) using terraform.
      • Resources (app service plan and app service instance) creating using terraform.
      • click for code.
      • enter the code and make necessary changes and click terminal and new terminal.  It shows the same path where we copied terraform.exe file.
      • terraform init: initialize the terraform: enter the command .\terraform.init (terraform successfully initialized) now run plan
      • terraform plan: it will check the terraform configuran file and see which resources need to deploy?  it will check with any existing resources and inform us if there is resource is already created or proceed to create.
      • .\terraform plan -out appservice_and_plan.tfplan and enter.
      • app service plan is successfull.
      • if you check the folder appservice_and_plan.tfplan file is also created.
      • run the command .\terraform apply "appservice_and_plan.tfplan"
      • two resources created.
      • go to Azure portal and confirm these resources are created.
      • Delete:  To delete the above created resources run .\terraform destroy
      • it will destroy both after confirmation.
      • 5
      Create two resources (SQL Server + database) using terraform.
      • Click for code.
      • open the code in visual studio code and enter values of IDs and save it in location where terraform.exe file is located and environment variable is set. For details check in (webapp plan + webapp) lab.
      • save file and open terminal and run the terraform commands. Make sure you are in folder where terraform.exe is located or define path instead of .\
      • .\terraform init
      • .\terraform plan -out sqlanddatabase.tfplan
      • .\terraform apply "sqlanddatabase.tfplan"
      • Two resources will be created.
      • Destroy/Delete: .\terraform destroy
      • 9
      Terraform Integration with Azure Pipeline.
      • Click for code.  link for this code taken from terraform site, click below on (terraform site for code).
      • Go to terraform site for code.  copy providers code from example.  code to create a resource group.
      • paste the code in visual studio code and save the file (integration_pipeline.tf)
      • In Azure Devops create a project (terraform_integ), go to repos (terraform_integ) and create a folder (terraform) and add configuration file (integration_pipeline.tf).  click on three dots next to folder (terraform) and upload file.
      • Create Build Pipeline: click on pipeline and create new pipeline and select classic editor (terraform_build) and select empty job template and continue.
      • select agent job 1 and define related configuration: Display name = terraform, Agent pool = Azure pipeline, agent specification = windows 2019 
      • terraform configuration file (integration_pipeline.tf ) would like to publish as artifact: click on + sign and search copy and select copy files and click add.
      • select copy files: Display name = copy files to, source folder = click on three dots and select terraform folder in repos created, target folder = click on circle and it gives example, copy path and paste it with /terraform.  $(build.artifactstagingdirectory)/terraform
      • Publish build artifact: click on + sign and search publish build artifact and add.
      • select publish build artifact and enter these details: default artifact name is drop, can change. click save.  Now build pipeline is created and now run.
      • Run Build pipeline: Go to pipelines and select pipeline and run.
      • Create release pipeline: create new and select empty job template and save it.
      • select artifact and save it.
      • Install terraform extension: click on + on agent job and search and in market place it shows terraform, click get it free.
      • It will open a window and click get it for free. 
      • select azure devops organisation and click install.  once it is install it will open azure devops organization then go to project and click + sign and type terraform, now it gives two opetions (terraform and terraform tool installer).  select terraform tool installer and add.  It will install on agent (windows 2019).
      • Click + sign and selet terraform and now we add terraform command one by one.
      • First command we run init so in display name change to init.  drop down in command and select init, configuration directory = click three dots and select terraform folder (expand and select), azure subscription = there is one subscription, but there is no service connection, click on manage to create a new service connection (click new service connection and select azure resource manager, next and select service principal (manual), Environment = Azure cloud, scope level = subscription, enter subscription Id, subscription name, service principal ID = To create go to Entra ID and app registration and click new registration (star.terraform) on overview copy application client id and paste it in service principal Id, in credential select service principal key and go to certificate and key and generate a new client key and copy and paste it, tenant id = copy and paste from app registration. click on verify.  (if it does not verify then go back to subscription and click IAM and select contributor role assignment and assign to user star.terraform).  in service connection name = enter name (terraform-testing), click verify and save.  it is saved in project settings/pipelines/ service connections.  go back to pipeline and cick refresh next to subscriptiona and select azure service connection, resrouce group = TestRG, storage account = create storage account (starstorage) and create multiple containers in it (demo, template, terraform) in demo container upload terraform.tfstate file.
      • click + sign and select terraform and define command validate: 
      • click + sign and select terraform and define command apply: 
      • save it. click release ipeline and it will create a resource group (example-resources).
      Desired state configuration (IIS)
      • In desired state configuration we make sure a particular service is alway run on a virtual machine,  suppose IIS service which is used to host a website which should run always on windows server.
      • Create a virtual machine (iis-vm1) on azure.
      • On azure portal search automation account and create one(star-autoacct) and go to resource.
      • Under Configuration Management click State Configuration (DSC):create a powershell configuration file which make sure it install IIS in iis-vm1.
      • Open visual studio code and create a file (autoconfiguration.ps1) and save it with code in a new folder (terraform).  This code will make sure that IIS feature is always installed, up and running.
      •  
      • Go to state configuration and click on add and browse and add autoconfiguration.ps1 file andn enter name which is same as defined in autoconfiguration.ps1 (NewConfig).
      • Compile this configuration file, click on file and click on compile, once compilation is completed  NewConfig.localhost  wil be created , check under Compiled configurations.
      • Go to state configuration and click on node and click add and select (iis-vm1) and clickk on connect.  select node configuration name=NewConfig.localhost, configuration mode = applyandautocorrect and click ok to connect.
      • check with vm public IP address.
      • 3
      • 4
      • 5
      ARM Template Example6
      • 7
      • 8
      • 9
      ARM Template Example7
      • 7
      • 8
      • 9
      ARM Template Example8
      • 2
      • 3
      • 4
      • 5
      ARM Template Example9
      • 7
      • 8
      • 9
      ARM Template Example10
      • 7
      • 8
      • 9
      Test Plans: 
    • Artifacts:
      Deployment Strategies:
      Blue & Green Deployment Slot.
      • There will be two identical deployments blue and green where customers access blue deployment.
      • If there is any update or change which will be performed in green deployment and users will be redirected to access to green deployment.
      • Step 1: Go to azure portal and create web app (starapp01), web app plan (starplan01), Resource Group (TestRG), o/s (windows), Framework (.net 8.0), Plan (S1),  
      • Step 2: Go to vmware virtual machine, open visual studion 2022 and create a project(star_project01), right click on project and publish.
      • select azure (host application on azure cloud), select azure webapp (starapp01) and publish.
      • Go to azure web app and copy url (production) and paste it in browser.
      • Step 3: Go to visual studio and make changes in code (pages / index.cshtml) and save it.
      • Step 4: Go to azure web app / deployment slot / click add (green), clone from starapp01 and save it.  copy url (starapp01-green.azurewebsites.net)
      • Step 5: right click on project and publish, select new profile (green), select azure cloud and expland resource group/web app/deployment/select green and deploy.
      • Step 6: Perform the testing using green deployment link url (starapp01-green.azurewebsites.net) and after all satisfactory result now perform swapping.  
      • Once swapping is done, it will swap codes of green with blue(production) deployment.  when customer access production url they will get version 2.
      • Step 7: Swapping: Go to web app/deployment slot: here traffice 100% going to starapp01-production, source = starapp01 and Target = starapp01-green, click on swap which will change source and target. Now traffic will move to green deployment slot Version 2 and customer will access to green deployment.
      • After swapping, copy url of production and paste it in browser (Version 2, star devops training page will be shown).  if you copy url of staging (green) Version 1 page will be shown.
      • 8
      • 9
      Blue & Green Deployment slot swap with using azure pipeline.
      • The difference with the above lab, creating a deployment slot (green) and swapping using azure pipeline not manually.  
      • There is only one deployment slot in starapp01 (starapp01.azurewebsites.net).
      • Step 1: create a project in azure devops (project_swap), go to repos and copy url.
      • Step 2: in visual studio 2022, create a project (star_project01), click git/ create git repository and paste repos url in existing remote. save and push.
      • Step 3: Create Build Pipeline: in pipeline create new pipeline (blue_green_pipeline), select azure repos git and select project_swap, select asp.net core, a yaml file will be generated.  copy and paste code build code in yaml file and save and run.
      • Step 4: Create Release Pipeline: In pipeline create new release pipeline (blue_green_release), select empty job and give name Deployment to green slot and save.  click artifact and select (project_swap) and save it.  
      • click on continuous deployment trigger in artifact and enable (it will trigger automatically whenever we make changes in code).  save.
      • Step 5: Add task1: Azure CLI: click on job,task and add agent job, click + sign and search azure cli (through this it will create a deployment slot in azure app service (starapp01).  
      • Enter the required fields: Script type = powershell, script location = inline script and paste the script.  click for code. (az webapp deployment slot create --name starapp01 --resource-group TestRG --slot green) save it.  slot will be created in web app (starapp01).
      • Step 6: Add task2: Azure App Service Deploy : click + sign and search azure app service deploy and enter the required fields: App service type = Web App on Windows, App service Name = starapp01, select check box deploy to slot or app service enviroment = enter slot name green (if you click drop down, there is no slot green to choose, this has been define in earlier task so manaully enter slot name which we mention in inline script). save.
      • Click on pipeline and click +Add to add another staging for approver:  after testing approver will approve and it deploy.  give name (swap to production slot) and save it.
      • Step 8: At stage Deployment_green_slot: click on post deployment condition and enable post deployment approvals and enter approver details.  save it
      • Step 7: click on job,task and define swapping: click on + sign and add a task: Azure App service manage: Action = Swap slot, app service name = starapp01, source slot = green and make sure check box is selected Swap with production.  save
      • Step 8: Release pipeline: click on pipeline and click release, first it will trigger stage1 = deployment to green slot, after completion it will show waiting for approval ( login in with it-user1 in azure devops and approve).  
      •  
      • after approval second task will trgger to create a slot (green) and swap it with production,  copy the link and paste it in browser.
      • open url:
      • Make changes in code: Go to visual studio and make changes in page (index.cshtml) and save it.  right click on index.cshtml and go to git and click commit, enter version 2 commit all.  Go to git and push.
      • Once click push Automatic pipeline will trigger.  Once the build pipeline completed it will await for approval.  Once click approved by it-user1 then it will trigger release pipeline.  Swapping will be completed.
      • check the production url.
      • 8
      • 9
      Blue & Green Deployment using azure Load Balancer.
      • Step 1: Create two VMs (VM1-Production & VM2-Staging), public IP address enable in Azure portal: install IIS in both.
      • Tools/IIS manager/ expand to default web site / right click on default web site and explore (windows\inetpub\wwwroot)/modify .png file and write Blue - Production) and save it. second VM write Green-Staging.
      • Disassociate public IP address as load balancer will have public IP address in front and connect with these vms using private IP address in back end pool.
      • Create Load Balancer: Star_LB, crete Star_Frontend_IP, create two backend pools (Blue_Backend_Pool and add VM1-Production & Green_Backend_Pool and add VM2-Staging), Review and create. Both VMs and LB must be in same region.
      • Create health probe: star_healthprobe (it make sure that front end is connected with backend vms through backend pool in defined time)
      • Create rule: In the rule we define when customer hit 172.165.149.240 using port 80 then load balancer should divert the traffic using health probe to VM1-Production.  click load balancing rule, enter name star_LBRule, ipv4, select front end IP and backend pool select  Blue_Backend_Pool, TCP, port 80, backend port 80, select health probe and click save.
      • copy load balancer public IP and paste it in browser and it will display Blue-Production page.
      • If need to divert traffic to Green-Staging then go to load balancer rule and select backend pool Green_Backend_Pool.
      • Change Backend Pool Using Azure Pipeline:
      • Curently backend pool is pointing to Green_Backend_Pool which displays Green-Staging web page.  
      • With the help of pipeline we swap backend pool to Blue_Backend_Pool and page Blue-Production should display.
      • Go to Azure devops / release pipeline/create new release pipeline/select emtpty template job, stage name = change backend pool, save it.
      • There is no artifact in this scenario.
      • Create task: select job,task and click + sign and search azure powershell and add.  Enter details: script type = inline script and enter script. click for script. Prefered azure powershell version = Lates installed version. save.
      • Go to pipeline and click release pipeline.  check backend pool in load balancer rule which has been changed to Blue-Production.
      Canary Deployment using Traffice Manger
      • In this method you can divert some customers to access staging server with version 2 in production environment while rest customers access production server with version 1.
      • Customers will access and work on updated/new featured version 2 in production environment and once all working fine you can redirect all traffic to this server.
      • In this scenario we use azure traffic manager to control and divert traffic.
      • Step 1: Create two web apps (starwebapp1 & starwebapp2) for production and staging environment in two different location.
      • Step 2: Create two projects in visual studio 2022 (starwebapp1 & starwebapp2) and change thier index.cshtml page with Version 1 & Version 2 and publish them in Azure Cloud using azure web app( starwebapp1 and starwebapp2)
      • Step 3: Create a traffic manager profile (startrafficmgr), routing method = weighted, RG = TestRG.
      • Go to settings / configuration: Endpoint monitor setting = select protocol = https and port = 443 (app service url is accessing with https).
      • Add endpoints: Type = Azure endpoint, name = production, select enable endpoint check box, Target resource type = App service, select starwebapp1 (uk South), weight = 100, custom header setting = host:starwebapp1.azurewebsites.net, click add. Add second endpoint with weight = 1
      • check monitor status = online.  click overview and copy dns name = http://startrafficmgr.trafficmanager.net paste it in browser and it will show Version 1 (we have mention weight= 100 for production in endpoint settings).
      • Step 4: To test change weight = 100 for endpoint starwebapp2.  check browser with http://startrafficmgr.trafficmanager.net it will show version 2
      • 9
      Canary Deployment create Traffic Manager endpoint & set endpoint weight using pipeline. 
      • In this example we deploy traffic manager using powershell script and define weight of endpoint using powershell with azure pipeline.
      • Powershell script to create endpoint, Powershell script to set endpoint weight.
      • Step 1: Create two web apps (starwebapp1 & starwebapp2) for production and staging environment in two different location.
      • Step 2: Create two projects in visual studio 2022 (starwebapp1 & starwebapp2) and change thier index.cshtml page with Version 1 & Version 2 and publish them in Azure Cloud using azure web app( starwebapp1 and starwebapp2)
      • Step 3: Create a traffic manager profile (startrafficmgr), routing method = weighted, RG = TestRG.
      • Go to settings / configuration: Endpoint monitor setting = select protocol = https and port = 443 (app service url is accessing with https).
      • Add endpoints: Type = Azure endpoint, name = production, select enable endpoint check box, Target resource type = App service, select starwebapp1 (uk South), weight = 100, custom header setting = host:starwebapp1.azurewebsites.net
      • check monitor status = online.  click overview and copy dns name = http://startrafficmgr.trafficmanager.net paste it in browser and it will show Version 1.
      • Step 4: Add second endpoint (staging) and its weight = 100 through powershell scrip in pipeline.  we also perform to set weight of prodution = 1 and staging = 100.
      • Azure devops and create a project (project_swap) and copy repos url.  Go to visual studio 2022 and create a project (project_swap) and commit to azure devops.
      • Create a build pipeline and add tasks to save artifact and yaml file.
      • Create a release pipeline (endpoint_release), add artifact, click on job,task and search azure app service deploy and enter details, app service type = web app on windows, App service name = starwebapp2, save.
      • Create a task to create endpoint in traffic manager profile for staging and link it to starwebapp2 using powershell, click on + and search for azure powershell, script type = inline script and paste script from create endpoint and select latest installed version. 
      • Enable continuous deployment trigger in artifact section.  (once build pipeline completed then it trigger release pipeline).
      • Create another stage to define weight, hoover mouse on endpoint stage and click + sign to add another stage, enter name set weight and click + to add agent job search for powershell and paste the script.In this script it makes production weight = 1 and staging weight = 100.
      • Define an approver at stage endpoint. (it-user1@stardistributors.co.uk)
      • Go to source code in visual basic and make changes and commit which will trigger build pipeline and followed by release pipeline.
      • 9
       Project Settings:
      Star Project Agile :

      New Project creation:

      • Go to organization and click new project:
        • Enter Project Name: star_project_agile
        • Description: star project using agile work item process
        • select private or public: Private
        • Advance: version control = Git and work item process = agile and create project.
      • Select the project (star_project_agile) and lick on + next to project to select services to start with:

      Agile Work Item Flow:

      • Epic: 
      • Feature:
      • User Story: 
      • Task:
      • Bug:
      • Issue:
      • Test Case:

      Agile Workflow states:

      Agile User Story work state flow:

      • New: When a product owner creates a new user story, its state will be New. 
      • Active: When the team works at sprint and change its status to Active.  Drag and drop to Active column or click on new and change state to active.
      • Resolved:  Once all the tasks performed and unit test passed than state changed to Resolved.
      • Closed:  Product owner will make sure that work has been done as per given criteria than state change to close.
      • Removed: When you change state to removed than work item will be removed from backlog.  If you check on work item, it shows removed.
        • If the work on any stage has not been passed or not done as per requirement than its state change to its previous state.  It also shows reason for setting to previous state.  check reason.

      Bug work Flow:

      • New: First state shows new.
      • Active:  Once start working on bug and move to active than reson shows approved.
      • Resolved: Bug has been tested and varified than its state will show fixed.
      • Closed:

       

      Home

      Star Project CMMI(Capabiity Mobility Model Index) :

       

  • AWS Devops Projects
    • Small projects
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
    • Jenkins Free Style Projects
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
    • Java
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
    • NodeJS
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
    • .Net
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
    • Python
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
    • Java
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
    • Java
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
    • Java
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
    • Java
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
      • Title
        • Image
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
        • code
          • code
          • code
          • code
    • Deployment of Disney Hotstar App on Kubernetes
      • Disney + Hostar App deploying on Kubernetes using Github+Jenkins+Sonarqube+npm+nodejs+trivy+docker+Terraform+Grafana+Pometheus+Domain+SSL
        •  
      • CICD Stages:
      • Tools & Services used:
        • Category Tools
          Version Control
          CI/CD Jenkins
          Code Quality SonarQube
          Containerization Docker
          Orchestration Kubernetes
          Monitoring Prometheus Grafana
          Security OWASP Trivy
          IAC Terraform
      • Code Repository GitHub:
        •  https://github.com/AbdulAziz-uk/Disney_Hotstar.git
      • Project Management Tool: Jira
        • link code repository from github
      • Create a Ubuntu VM on AWS
        • Name=hotstar
        • o/S : ubuntu server 24.04 LTS (HVM), SSD Volume Type
        • Instance type: t3 large
        • keypair: generate hotstar.pem
        • 15 GB
        • Security: Allow ports SSH, http, https, 8080(jenkins), 9000 (sonarqube), 587(gmail-smtp, 465 (gmail)
        • open MobXterm and connect to VM
        • Get VM details:
          • root@ip:/home/ubuntu#hostnamectl
      • Clone the repository using Git.
        • Git is installed by default in ubuntu, if not install it.
        • ubuntu@ip:/home/ubuntu#git -v
        • Install git: 
        • ubuntu@ip:/home/ubuntu#sudo apt update
        • ubuntu@ip:/home/ubuntu#sudo apt install git
        • Clone
        • ubuntu@ip:/home/ubuntu#git clone https://github.com/AbdulAziz-uk/Disney_Hotstar.git
        • ubuntu@ip:~Disney_Hotstar/Scripts#ls (list of scripts )
      • Install the following tools using script, check scripts in github.
        • Give executable permission to all scripts:
        • root@ip:~Disney_Hotstar/Scripts#sudo chmod +x *.sh
        • root@ip:~Disney_Hotstar/Scripts# ll (all scrits in green coloured, can be execute)
        • Install Jenkins: 
          • root@ip:~Disney_Hotstar/Scripts#sh jenkins.sh
          • Java is installed along with jenkins, check 
          • root@ip:~Disney_Hotstar/Scripts#java --version
          • #systemctl status jenkins
          • #systemctl enable jenkins (it will enable jenkins and start after vm restart)
          • Acces jenkins:
          • opne browser: http://ip:8080
          • Reveal password from the following path
          • #sudo cat /var/lib/jenkins/secrets/initialAdminPassword
          • Install suggested plugins
        • Install docker
          • root@ip:~Disney_Hotstar/Scripts#sh docker.sh
          • root@ip:~Disney_Hotstar/Scripts#docker -v
          • root@ip:~Disney_Hotstar/Scripts#systemctl status docker
          • check the script for all the commands defined like adding user to docker group, giving permission, setting port etc. 
        • Install SonarQube container & generate token:
          • Run SonarQube container in detached mode with port mapping 9000
          • #docker run -d --name sonar -p 9000:9000 sonarqube:lts-community
          • #docker container ls (list of containers, sonar container is running)
          • #docker images (list of images)
          • Access sonar:
          • open browser http://ip:9000
          • default username=admin, password=admin
          • Generate Sonar token for the user: which will be use while integration with jenkins.
            • Administrtion/security/users/token/Generate Token/ Name=sonar-token, expires in = 60 days and generate.  copy token.
          • Create Webhook:
            • Administration/Configuration/webhook/create, Name=jenkins, URK=http:jenkins_ip:8080/sonarqube-webhook/
        • Install kubectl container for kubernetes cluster.
          • root@ip:~Disney_Hotstar/Script#sh kubectl.sh
        • Install AWS cli: To communicate with AWS
          • root@ip:~Disney_Hotstar/Script#sh awscli.sh
        • Install Trivy:
          • root@ip:~Disney_Hotstar/Script#sh trivy.sh
          • #trivy -v
        • Install Terraform:
          • root@ip:~Disney_Hotstar/Script#sh terraform.sh
      • Install plugins in Jenkins:
        • Go to Manage Jenkins/Plugins/ search and install the following plugins
        • Eclipse Temurin installer (it will install jdk)
        • Sonaraube scanner for jenkins
        • Nodejs Plugin
        • OWASP Dependency-Check
        • stage view
        • Blue ocean
        • Docker
        • Docker commons
        • docker pipeline
        • docker api
        • docker-build-step
        • terraform
        • restart jenkins: http://ip/8080/restart
      • Integrate Jenkins with SonarQube
        • First add the server sonarqube in jenkins
          • Go to Manage Jenkins/System scroll down to Sonar Qube servers
          • Add SonarQube
          • Name = sonar
          • Server URL= http://192.168.171.200:9000
          • Server authentication token: click +add
            • Domain = Global credentials (unrestricted)
            • Kind = secret text
            • scope: Glonal (jenkins,nodes, items, all child items,etc)
            • Seccret=past the token which was generated in sonarqube insallation
            • ID=sonar-token
            • Description=sonar-token
            • Add
          • In Server Authentication token: click drop down and select sonar-token
          • apply & save
      • Configure Tools in jenkins (jdk, maven, sonarqube, trivy, terraform)
        • Go to Manage Jenkins/Tools:
        • JDK
          • Name=jdk17
          • Install automatically and click add installer and select install from adoptium.net
          • select version jdk-17.0.9+9
        • SonarQube Scanner Installations
          • click Add SonarQube Scanner
          • Name = sonar-scanner
          • Version = Install from Maven Central and select latest/required version
        • NodeJS installations:
          • Add NodeJs
          • Name=nodejs
          • select install automatically
          • Version= Install from nodejs.org and select version 17.9.0
        • Dependency Check installation
          • Add Dependency-Check
          • Name=DC
          • install automatically
          • Add installer - select install from github.com
          • version = dependency-check 12.1.0
          • apply & save
      • Create CICD Pipeline
        • New item, Name=hotstar and select pipeline and ok
        • Descripton= Disney Hotstar pipeline
        • Discard old Builds = max # of builds to keep = 3
        • pipeline: Definition=pipeline script (declarative script)
          • Click here for CICD declarative yaml code.
          • pipeline {
              agent any
               tools {
                jdk 'jdk17'
                nodejs 'nodejs'
              }
              environment {
                SONARQUBE_HOME=tool 'sonar-scanner'
              }
              stages {
                stage ('clean workspace'){
                  steps {
                    cleanWs()
                  }
                }
                stage ('Git Clone') {
                  steps {
                    git branch:'main', url:'https://github.com/AbdulAziz-uk/Disney_Hotstar.git'
                  }
                }
                stage ('Sonar Analysis'){
                  steps {
                    withSonarQubeEnv('SonarQube'){
                      sh ''' $SONARQUBE_HOME/bin/sonar-scanner -Dsonar.projectName=hotstar \
                        -Dsonar.projectKey=hotstar '''
                    }
                  }
                }
                stage ('quality gate'){
                  steps {
                    script {
                      waitForQualityGate abortPipeline:false, credentialsId:'sonar-token'
                    }
                  }
                }
                stage ('Install Dependencies'){
                  steps {
                    sh "npm install"
                  }
                }
                stage ('OWASP FS Scan'){
                  steps {
                    dependencyCheck additionalArguments:'--scan ./ --disableYarnAudit --disableNodeAudit --nvdapiKey 36883b57-9d9d-4677-b466-f7012f883687', odcInstallation:'DC'
                    dependencyCheckPublisher pattern:'**/dependency-check-report.xml'
                  }
                }
                stage ('Trivy FS Scan'){
                  steps {
                    sh "trivy fs . > trivyfs.txt"
                  }
                }
                stage ('Docker Build & Push'){
                  steps {
                    script {
                      withDockerRegistry(credentialsId:'docker', toolName:'docker'){
                        sh "docker build -t hotstar ."
                        sh "docker tag hotstar aziz27uk/hotstar:latest"
                        sh "docker push aziz27uk/hotstar:latest"
                      }
                    }
                  }
                }
                stage ('Trivy'){
                  steps {
                    sh "trivy image aziz27uk/hotstar:latest > trivyimage.txt"
                  }
                }
                stage ('Deploy to Container'){
                  steps {
                    sh 'docker run -d --name hotstar -p 3000:3000 aziz27uk/hotstar:latest'
                  }
                }
              }
            }
          • Build now: Jenkins will clone the files from github to workspaces, path in VM will be  (/var/jenkins/workspace/hotstar)
        • Access appliation:
          • http://ip:3000
      • Generate nvdapi key:
        • Go to https://nvd.nist.gov/developers/request-an-api-key  (Register with them and they will send key in email)
        • NVD API Key Activated

          Thank you for confirming your request for an NVD API key. Please securely save this key. Once you close or leave this page, the key will no longer be accessible from this link. If you lose or forget your API key you must request a new one. There is no process for recovering an API Key.

          API Key: 36883b57-9d9d-4677-b466-f7012f883687  

          To request a new API key, please resubmit an API Key Request. Please note that activating a new key will deactivate the key shown above.

      • Integrate Gmail with Jenkins:
        • Gmail Setup:
          • To receive emails for success/failure of CICD pipeline.
          • Go to Gmail account and click on account top right corner and select manage your account.
          • type app passwords (This option will only available after MFA is enabled, To enable go to security/2 step verification and enable it and add phone number)
          • app name=hotstar and create password.  copy app password.
        • Go to Manage Jenkins/System/E-mail Notification
          • SMTP Server = smtp.gmail.com
          • Default user email suffix=@gmail.com
          • Advanced
          • select Use SMTP Authentication:
          • user name = aziz.azure2024@gmail.com (enter email address for which app password has been created)
          • Password = svgi xqps yhyj zcaj (paste token)
          • select Use SSL
          • SMTP Port = 465 (open this port on firewall)
          • Reply-To-Address = aziz.azure2024@gmail.com
          • Charset = UTF-8
          • Select Test configurtion by sending test e-mail
          • Test e-mail recipient = aziz.azure2024@gmail.com
          • Test Configuration: Email received.
        • Go to Manage Jenkins/System/Extended E-mail Notification
          • SMTP server=smtp.gmail.com
          • SMTP Port =587 (open port)
          • Advanced:
          • Credentials: Add Jenkins
            • Domain: global credentials (unrestricted)
            • Kind = Username with Password
            • Scope = Global (Jenkins, nodes, items, all child items,etc)
            • username = aziz.azure2024@gmail.com
            • Password=svgi xqps yhyj zcaj (paste token)
            • ID = smtp-gmail
            • Description = smtp-gmail
          • In credentials selet smtp-gmail
          • select Use TLS
          • Default user e-mail suffix = @gmail.com
          • Apply & Save
        • Add code in Pipeline.
          • Make sure this code is inserted after completion of stages as this code is not starting with stage, steps.
            post {
                always {
                    script {
                        def buildStatus = currentBuild.currentResult
                        def buildUser = currentBuild.getBuildCauses('hudson.model.Cause$UserIdCause')[0]?.userId ?:'Github User'
                        emailext (
                            subject:"Pipeline ${buildStatus}:${env.JOB_NAME} #${env.BUILD_NUMBER}",
                            body:"""
                                <p>This is a Jenkins HOTSTAR CICD pipeline status.</p>
                                <p>Project:${env.JOB_NAME}</p>
                                <p>Build Number:${env.BUILD_NUMBER}</p>
                                <p>Build Status:${buildStatus}</p>
                                <p>Started by:${buildUser}</p>
                                <p>Build URL:<a href="${env.BUILD_URL}">${env.BUILD_URL}</a></p>
                            """,
                            to:'aziz.azure2024@gmail.com',
                            from:'aziz.azure2024@gmail.com',
                            replyTo:'aziz.azure2024@gmail.com',
                            mimeType:'text/html',
                            attachmentsPattern:'trivyfs.txt,trivyimage.txt'
                        )
                       }
                   }
        • Run Build
        • Build failed: check console output: 
          • + docker run -d --name hotstar -p 3000:3000 aziz27uk/hotstar:latest
            docker: Error response from daemon: Conflict. The container name "/hotstar" is already in use by container "74bbdf3a9b9326163c80b596d42b108595652e9aeaecc1f93919440143a5b0cd". You have to remove (or rename) that container to be able to reuse that name.
        • Remove the container as it has been created in our earlier Create CICD pipeline stage.
          • ubuntu@sonarqube:~$ docker container ls
          • ubuntu@sonarqube:~$ docker rm -f 74bbdf3a9b93
        • Run Build again.
        • Email received in Gmail:
          • open trivyfs.txt trivyimage.txt
          • open trivyimage.txt
      • Explanation of each stage of Pipeline:
        • Declarative Tool Install:
          • click on log: we have define two tools in this stage jdk17 and nodejs
        • clean workspace: Delete workspace when build is done.
          • we have define this in stage clean workspace, it will delete any existing workspace.
        • Git Clone:
          • We have define public git repository to clone.
        • Sonar Analysis:
          • Click logs to check Sonar Analysis report:
          • click on results at: http://192.168.171.91:9000/dashboard?id=hotstar
          • issues detected here like Bugs, Vulnerabilities, code smell Security hotspots etc will send to developers and once it is fixed than we run build again.
        • Quality Gate:
          • Quality Gate is ok
        • Install Dependencies:
          • npm install
        • OWASP File System Scan:
          • Dependency-Check report .xml file generated.
          • It is giving an error, check console output.
          • Unrecognized option: --nvdapiKey 
          • Solution: change a to capital = --nvdApiKey
        • Trivy File System Scan:
          • Go to workspace and check trivyfs.txt
        • Docker Build and Push to Repository:
          • Check on hub.docker.com, ziz27uk/hotstar repository has been pushed.
        • Trivy Image Scan:
          • Trivy will scan the image 
        • Deploy to Container:
        • Declarative Post Actions:
          • Email notification has been sent, it says fialure although application has been deployed successfully.
          • There is an issue in OWASP File System Scan stage,  correct in the code and run Build again.
            • Unrecognized option: --nvdapiKey 
            • Solution: change a to capital = --nvdApiKey
            • Run Build Again.
            • Successfully completed CICD.
      • Access application:
        • open browser: http://ip:3000
      • Deployment of application on EKS Cluster:
        • Create a AWS user with secret key and access key to access & configure EKS cluster.
          • Login to AWS and go to IAM/create a user
        • Code
      • Monitoring the Application with Grafana & Prometheus
        • code
        • code
      • Code
    • Deployment of Amazon Prime App on Kubernetes
      • Amazon Prime Video App deploying on Kubernetes using Github+Jenkins+Sonarqube+npm+nodejs+trivy+Docker+Docker Scout+Terraform+Grafana+Pometheus+Domain+Load Balancer+SSL
      • CICD Sages:
      • Tools & Services used:
        • Category Tools
          Version Control
          CI/CD Jenkins
          Code Quality SonarQube
          Containerization Docker
          Orchestration Kubernetes
          Monitoring Prometheus Grafana
          Security OWASP Trivy
          IAC Terraform
      • Walk through CICD stages:
      • Code Repository GitHub:
        •  https://github.com/AbdulAziz-uk/amazon-prime-video-kubernetes.git
      • Project Management Tool: Jira
        • link code repository from github
      • Create a Ubuntu VM on AWS:
        • Name=primevideo
        • o/S : ubuntu server 24.04 LTS (HVM), SSD Volume Type
        • Instance type: t2 large
        • keypair: generate primevideo.pem
        • 20 GB
        • Security: Allow ports SSH, http, https, 8080(jenkins), 9000 (sonarqube), 587(gmail-smtp, 465 (gmail)
        • open MobXterm and connect to VM
        • Get VM details:
          • ubuntu@ip~/amazon-prime:/home/ubuntu#sudo hostnamectl
        • update the package:
          • ubuntu@ip:/home/ubuntu#sudo apt update
      • Clone the repository using Git:
        • Git is installed by default in ubuntu, if not than install.
        • ubuntu@ip:~amazon-prime:/home/ubuntu#git -v
        • Install git: 
        • ubuntu@ip:/home/ubuntu#sudo apt update
        • ubuntu@ip:/home/ubuntu#sudo apt install git
        • Clone
        • ubuntu@ip:/home/ubuntu#git clone https://github.com/AbdulAziz-uk/amazon-prime-video-kubernetes.git
        • ubuntu@ip:~amazon-prime-video-kubernetes/Scripts#ls (list of scripts )
      • Install the following tools using script, check scripts in github:
        • Give executable permission to all scripts:
          • $sudo chmod +x *.sh or 
          • $sh permissionexecute.sh (in this file chmod +x *.sh has been defined)
          • $ ll (all scrits in green coloured, can be execute)
        • Install Jenkins: 
          • ubuntu@ip:~amazon-prime/Scripts#sh jenkins.sh
          • Java is installed along with jenkins, check 
          • ubuntu@ip:~amazon-prime/Scripts#java --version
          • #systemctl status jenkins
          • #systemctl enable jenkins (it will enable jenkins and start after vm restart)
          • Acces jenkins:
          • opne browser: http://ip:8080
          • Reveal password from the following path
          • #sudo cat /var/lib/jenkins/secrets/initialAdminPassword
          • Install suggested plugins
        • Install docker:
          • ubuntu@ip:~amazon-prime/Scripts#sh docker.sh
          • ubuntu@ip:~amazon-prime/Scripts#docker -v
          • ubuntu@ip:~amazon-prime/Scripts#systemctl status docker
          • ubuntu@ip:~amazon-prime/Scripts#systemctl enable docker
          • check the script for all the commands defined like adding user to docker group, giving permission, setting port etc. 
        • Install SonarQube container & generate token:
          • Run SonarQube container in detached mode with port mapping 9000
          • #docker run -d --name sonar -p 9000:9000 sonarqube:lts-community
          • #docker container ls (list of containers, sonar container is running)
          • #docker images (list of images)
          • Access sonar:
          • open browser http://ip:9000
          • default username=admin, password=admin
          • Generate Sonar token for the user: which will be use while integration with jenkins.
            • Administrtion/security/users/token/Generate Token/ Name=sonar-token, expires in = 60 days and generate.  copy token.
          • Create Webhook:
            • Administration/Configuration/webhook/create, Name=jenkins, URK=http:jenkins_ip:8080/sonarqube-webhook/
        • Install kubectl for configuring kubernetes cluster.
          • ubuntu@ip:~amazon-prime/Script#sh kubectl.sh
        • Install eksctl for AWS kubernetes service.
          • ubuntu@ip:~amazon-prime/Script#sh eksctll.sh
        • Install AWS cli: To communicate with AWS
          • ubuntu@ip:~amazon-prime/Script#sh awscli.sh
        • Install Trivy:
          • ubuntu@ip:~amazon-prime/Script#sh trivy.sh
          • #trivy -v
        • Install Terraform:  
          • will create a monitoring VM with the help of terraform (Grafana & Prometheus)
          • ubuntu@ip:~amazon-prime/Script#sh terraform.sh
      • Install plugins in Jenkins:
        • Go to Manage Jenkins/Plugins/ search and install the following plugins
        • Eclipse Temurin installer (it will install jdk)
        • Sonarqube scanner
        • Sonarqube Quality Gates
        • Pipeline: Stage View
        • Nodejs Plugin
        • OWASP Dependency-Check
        • Blue ocean
        • Docker
        • Docker commons
        • docker pipeline
        • docker api
        • docker-build-step
        • terraform
        • kubernetes
        • kubernetes Client API
        • kubernetes credentials
        • kubernetes CLI
        • kubernetes Credentials Provider
        • kubernetes:: Pipeline::Devops Steps
        • blue ocean: it can start pipeline at different stages.
        • restart jenkins: http://ip/8080/restart
      • Integrate Jenkins with SonarQube:
        • First add the server sonarqube in jenkins
          • Go to Manage Jenkins/System scroll down to Sonar Qube servers (you can configure servicers in System like sonarqube server)
          • Add SonarQube
          • Name = sonar
          • Server URL= http://192.168.171.200:9000
          • Server authentication token: click +add
            • Domain = Global credentials (unrestricted)
            • Kind = secret text
            • scope: Glonal (jenkins,nodes, items, all child items,etc)
            • Seccret=past the token which was generated in sonarqube insallation
            • ID=sonar-token
            • Description=sonar-token
            • Add
          • In Server Authentication token: click drop down and select sonar-token
          • apply & save
      • Configure Tools in jenkins (jdk, maven, sonarqube, trivy, terraform):
        • Go to Manage Jenkins/Tools:
        • JDK
          • Name=jdk17
          • Install automatically and click add installer and select install from adoptium.net
          • select version jdk-17.0.9+9
        • SonarQube Scanner Installations
          • click Add SonarQube Scanner
          • Name = sonar-scanner
          • Version = Install from Maven Central and select latest/required version
        • NodeJS installations:
          • Add NodeJs
          • Name=nodejs
          • select install automatically
          • Version= Install from nodejs.org and select version 17.9.0
        • Dependency Check installation
          • Add Dependency-Check
          • Name=DC
          • install automatically
          • Add installer - select install from github.com
          • version = dependency-check 12.1.0
          • apply & save 
      • Generate nvdapi key:
        • Go to https://nvd.nist.gov/developers/request-an-api-key  (Register with them and they will send key in email)
        • NVD API Key Activated

          Thank you for confirming your request for an NVD API key. Please securely save this key. Once you close or leave this page, the key will no longer be accessible from this link. If you lose or forget your API key you must request a new one. There is no process for recovering an API Key.

          API Key: 36883b57-9d9d-4677-b466-f7012f883687  

          To request a new API key, please resubmit an API Key Request. Please note that activating a new key will deactivate the key shown above.

      • Integrate Gmail with Jenkins:
        • Gmail Setup:
          • To receive emails for success/failure of CICD pipeline.
          • Go to Gmail account and click on account top right corner and select manage your account.
          • type app passwords (This option will only available after MFA is enabled, To enable go to security/2 step verification and enable it and add phone number)
          • app name=hotstar and create password.  copy app password.
        • Go to Manage Jenkins/System/E-mail Notification
          • SMTP Server = smtp.gmail.com
          • Default user email suffix=@gmail.com
          • Advanced
          • select Use SMTP Authentication:
          • user name = aziz.azure2024@gmail.com (enter email address for which app password has been created)
          • Password = svgi xqps yhyj zcaj (paste token)
          • select Use SSL
          • SMTP Port = 465 (open this port on firewall)
          • Reply-To-Address = aziz.azure2024@gmail.com
          • Charset = UTF-8
          • Select Test configurtion by sending test e-mail
          • Test e-mail recipient = aziz.azure2024@gmail.com
          • Test Configuration: Email received.
        • Go to Manage Jenkins/System/Extended E-mail Notification
          • SMTP server=smtp.gmail.com
          • SMTP Port =587 (open port)
          • Advanced:
          • Credentials: Add Jenkins
            • Domain: global credentials (unrestricted)
            • Kind = Username with Password
            • Scope = Global (Jenkins, nodes, items, all child items,etc)
            • username = aziz.azure2024@gmail.com
            • Password=svgi xqps yhyj zcaj (paste token)
            • ID = smtp-gmail
            • Description = smtp-gmail
          • In credentials selet smtp-gmail
          • select Use TLS
          • Default user e-mail suffix = @gmail.com
          • Apply & Save
        • Add code in Pipeline.
          • Make sure this code is inserted after completion of stages as this code is not starting with stage, steps.
            post {
                always {
                    script {
                        def buildStatus = currentBuild.currentResult
                        def buildUser = currentBuild.getBuildCauses('hudson.model.Cause$UserIdCause')[0]?.userId ?:'Github User'
                        emailext (
                            subject:"Pipeline ${buildStatus}:${env.JOB_NAME} #${env.BUILD_NUMBER}",
                            body:"""
                                <p>This is a Jenkins HOTSTAR CICD pipeline status.</p>
                                <p>Project:${env.JOB_NAME}</p>
                                <p>Build Number:${env.BUILD_NUMBER}</p>
                                <p>Build Status:${buildStatus}</p>
                                <p>Started by:${buildUser}</p>
                                <p>Build URL:<a href="${env.BUILD_URL}">${env.BUILD_URL}</a></p>
                            """,
                            to:'aziz.azure2024@gmail.com',
                            from:'aziz.azure2024@gmail.com',
                            replyTo:'aziz.azure2024@gmail.com',
                            mimeType:'text/html',
                            attachmentsPattern:'trivyfs.txt,trivyimage.txt'
                        )
                       }
                   }
        • Paste the code in Pipeline.
      • Execution of each stage of Pipeline:
        • Declarative Tool Install:
          • click on log: we have define two tools in this stage jdk17 and nodejs
        • clean workspace: Delete workspace when build is done.
          • we have define this in stage clean workspace, it will delete any existing workspace.
        • Git Clone:
          • We have define public git repository to clone.
        • Sonar Analysis:
          • Click logs to check Sonar Analysis report:
          • click on results at: http://192.168.171.91:9000/dashboard?id=hotstar
          • issues detected here like Bugs, Vulnerabilities, code smell Security hotspots etc will send to developers and once it is fixed than we run build again.
        • Quality Gate:
          • Quality Gate is ok
        • Install Dependencies:
          • npm install
        • OWASP File System Scan:
          • Dependency-Check report .xml file generated.
          • It is giving an error, check console output.
          • Unrecognized option: --nvdapiKey 
          • Solution: change a to capital = --nvdApiKey
        • Trivy File System Scan:
          • Go to workspace and check trivyfs.txt
        • Docker Build and Push to Repository:
          • Check on hub.docker.com, ziz27uk/hotstar repository has been pushed.
        • Trivy Image Scan:
          • Trivy will scan the image 
        • Deploy to Container:
        • Declarative Post Actions:
          • Email notification has been sent, it says fialure although application has been deployed successfully.
          • There is an issue in OWASP File System Scan stage,  correct in the code and run Build again.
            • Unrecognized option: --nvdapiKey 
            • Solution: change a to capital = --nvdApiKey
            • Run Build Again.
            • Successfully completed CICD.
      • Create CICD Pipeline:
        • New item, Name=prime and select pipeline and ok
        • Descripton= Amazon Prime Video pipeline
        • Discard old Builds = max # of builds to keep = 3
        • pipeline: Definition=pipeline script (declarative script):
          • Click here for CICD declarative yaml code 
          • pipeline {
              agent any
               tools {
                jdk 'jdk17'
                nodejs 'nodejs'
              }
              environment {
                SONARQUBE_HOME=tool 'sonar-scanner'
              }
              stages {
                stage ('Stage 1:clean workspace'){
                  steps {
                    cleanWs()
                  }
                }
                stage ('Stage 2:Git Clone') {
                  steps {
                    git branch:'main', url:'https://github.com/AbdulAziz-uk/amazon-prime-video-kubernetes.git'
                  }
                }
                stage ('Stage 3:Sonar Analysis'){
                  steps {
                    withSonarQubeEnv('sonarqube-server'){
                      sh ''' $SONARQUBE_HOME/bin/sonar-scanner -Dsonar.projectName=amazon-prime \
                        -Dsonar.projectKey=amazon-prime '''
                    }
                  }
                }
                stage ('Stage 4:quality gate'){
                  steps {
                    script {
                      waitForQualityGate abortPipeline:false, credentialsId:'sonar-token'
                    }
                  }
                }
                stage ('Stage 5:Install Dependencies'){
                  steps {
                    sh "npm install"
                  }
                }
                stage ('Stage 6:OWASP FS Scan'){
                  steps {
                    dependencyCheck additionalArguments:'--scan ./ --disableYarnAudit --disableNodeAudit --nvdApiKey 36883b57-9d9d-4677-b466-f7012f883687', odcInstallation:'DC'
                    dependencyCheckPublisher pattern:'**/dependency-check-report.xml'
                  }
                }
                stage ('Stage 7:Trivy FS Scan'){
                  steps {
                    sh "trivy fs . > trivyfs.txt"
                  }
                }
                stage ('Stage 8:Docker Build & Push'){
                  steps {
                    script {
                      withDockerRegistry(credentialsId:'docker', toolName:'docker'){
                        sh "docker build -t amazon-prime ."
                        sh "docker tag amazon-prime aziz27uk/amazon-prime:latest"
                        sh "docker push aziz27uk/amazon-prime:latest"
                      }
                    }
                  }
                }
                stage ('Stage 9:Trivy Image Scan'){
                  steps {
                    sh "trivy image aziz27uk/amazon-prime:latest > trivyimage.txt"
                  }
                }
                stage ('Stage 10:Deploy to Container'){
                  steps {
                    sh 'docker run -d --name amazon-prime -p 3000:3000 aziz27uk/amazon-prime:latest'
                  }
                }
              }
                post {
                always {
                    script {
                        def buildStatus = currentBuild.currentResult
                        def buildUser = currentBuild.getBuildCauses('hudson.model.Cause$UserIdCause')[0]?.userId ?:'Github User'
                        emailext (
                            subject:"Pipeline ${buildStatus}:${env.JOB_NAME} #${env.BUILD_NUMBER}",
                            body:"""
                                <p>This is a Jenkins amazon-prime CICD pipeline status.</p>
                                <p>Project:${env.JOB_NAME}</p>
                                <p>Build Number:${env.BUILD_NUMBER}</p>
                                <p>Build Status:${buildStatus}</p>
                                <p>Started by:${buildUser}</p>
                                <p>Build URL:<a href="${env.BUILD_URL}">${env.BUILD_URL}</a></p>
                            """,
                            to:'aziz.azure2024@gmail.com',
                            from:'aziz.azure2024@gmail.com',
                            replyTo:'aziz.azure2024@gmail.com',
                            mimeType:'text/html',
                            attachmentsPattern:'trivyfs.txt,trivyimage.txt'
                                 )
                         }
                      }
                    }
            }
          • Build now: Jenkins will clone the files from github to workspaces, path in VM will be  (/var/jenkins/workspace/hotstar)
      • Access Application:
        • http://ip:3000
      • Email received in Gmail:
        • open trivyfs.txt trivyimage.txt
        • open trivyimage.txt
      • Deployment of application on EKS Cluster:
        • Code
      • Monitoring the Application with Grafana & Prometheus:
        • Code
      • Code
    • 13
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
    • 14
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
    • 15
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
    • 16
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
    • 17
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
    • 18
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
    • 19
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
    • 20
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
    • 21
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
    • 22
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
    • 23
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
    • 24
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
    • 25
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code
      • code