Search This Blog

Saturday, August 31, 2024

Q1-Q5

Q1: What is Azure DevOps?
Q2: What are the stages of SDLC?
Q3: What is the difference between Release and Deploy stages in SDLC?
Q4: What are the key components of Azure DevOps?
Q5: Explain the structure of Dockerfile? Give dotnet 8 dockerfile example.

--------------------------------------------------------------------------------------------------------------------------------------
Q1: What is Azure DevOps?

Answer:
Azure DevOps is a comprehensive set of development tools and services provided by Microsoft to support the entire software development lifecycle. It integrates various aspects of DevOps, enabling teams to plan, develop, test, deliver, and monitor applications efficiently.
--------------------------------------------------------------------------------------------------------------------------------------
Q2: What are the stages of SDLC?

Answer:
SDLC - Software Development Life Cycle composed of following stages in DevOps

1. Planning: This stage involves defining the project scope, requirements, and objectives. Tools like Azure Boards help in tracking work items, managing backlogs, and planning sprints.

2. Development. During this phase, developers write code and implement features. Azure Repos provides version control to manage code changes and collaboration.

3. Build. The build stage involves compiling the code and creating build artifacts. Azure Build Pipelines automates the build process, ensuring that the code is compiled and tested continuously.

4. Testing Automated and manual testing are conducted to ensure the quality of the software. Azure Test Plans offers tools for managing test cases, executing tests, and tracking defects.

5. Release This stage involves deploying the software to various environments. Azure Release Pipelines supports continuous delivery, automating the deployment process to different stages like development, staging, and production.

6. Deploy The software is deployed to the production environment. Azure Pipelines can handle the deployment, ensuring that the software is released smoothly and efficiently.

7. Operate After deployment, the software is monitored for performance and issues. Azure Monitor and Azure Application Insights provide tools for monitoring and logging to ensure the application runs smoothly.

8. Feedback Gathering feedback from users and stakeholders is crucial for continuous improvement. Azure Boards can be used to track feedback and incorporate it into future development cycles

--------------------------------------------------------------------------------------------------------------------------------------
Q3: What is the difference between Release and Deploy stages in SDLC?

Answer:
Release and Deployment are often confused as synonyms to each other but they are different states in SDLC. 

Release Stage:
Ensuring Software is ready for deployment. This stage includes UAT (User Acceptance testing), final documentation, packaging, necessary approvals etc

Deploy Stage:
Moving the software from Staging to Live Production environment. This stage includes setting up of infrastructure, servers' configuration, setting up of database etc


Differences
    Timings:
        Release happens before deployment. Software is release to users for UAT and then deployed to production.
    
    Activities:
        Release is about preparing for final deployment. deployment is the actual movement of software to production. 
--------------------------------------------------------------------------------------------------------------------------------------
Q4: What are the key components of Azure DevOps?

Answer:

1. Azure Boards: Agile tool for Kanban and Scrum boards. 

2. Azure Repo: Offers GIT repository. Code Source Control. 
       DevOps engineers usually store their ARM templates and Pipelines YAML files in Azure Repos. 

3. Azure Pipelines: CI (Continuous Integration and CD Continuous delivery to build, test, and deploy applications. 

4. Azure Test Plans: Tool for manual and automated testing. Continuous testing. This tool can be used to have a dashboard of test results that were executed as a part of pipeline. 
    -- It is a like a test management tool or a dashboard. 
    -- This is where you create and organize test cases, group them into test suites and plans, and track test execution status. It’s more about planning, traceability, and reporting than actually running the tests.

5. Azure Artifacts: This is a place for shared libraries and packages. In pipeline if a particular project is looking for package, it is advise to look here unless its a public nuget package to avoid any package conflict issues. 
--------------------------------------------------------------------------------------------------------------------------------------
Q5: Explain the structure of Dockerfile? Give dotnet 8 dockerfile example.

Answer:
Sometimes the Azure DevOps engineer has to create a Dockerfile for microservices if that is not already present in the base folder of the microservice.
Based on the technology of microservice dockerfile will be created. The steps will remain same for all technology, we just change the framework and build, deploy scripts. 

Base structure of Dockerfile typically include:
  1. Base Image: The starting point of your Docker image, usually an official image from Docker Hub. It will be different for different technologies
  2. Application Code: Your project’s source code.
  3. Dependencies: Libraries and packages required by your application.
  4. Configuration: Environment variables, configuration files, etc.
  5. Build the Project.
  6. Entrypoint: The command that runs when a container starts.

# Use the official .NET 8 SDK image as the base. The image includes SDK which is necessary for building the dotnet applications. 
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build

# Set the working directory (container term can be used). All future commands will run here. This is required to give isolation to our project. 
WORKDIR /source
 
# Copy Project Files and restore dependencies. Copy the csproj file to the above working directory/Container donated by .
COPY *.csproj .
 
 
# Copy all the project files to above Container donated by .
COPY . .

# Restore dependencies. restore command will restore the dependencies defined in project file
RUN dotnet restore

# Build the application. This builds the project in Release Configuration and outputs the results in "/app" directory.  
RUN dotnet publish -c Release -o /app

# Use the official .NET runtime image. This base image requires for runtime of application (earlier it was for build)
FROM mcr.microsoft.com/dotnet/aspnet:8.0

# Set the working directory same as output directory of project build
WORKDIR /app

# Copy the build output from /app folder to . current runtime folder
COPY --from=build /app .

# Expose the port
EXPOSE 80

# Run the application. Specifies the command to run the application.
ENTRYPOINT ["dotnet", "MyApp.dll"]


No comments:

Post a Comment

Q31-Q35