Deployment and DevOps Flashcards

1
Q

What is a CI/CD pipeline, and why is it important in modern software development?

A

A CI/CD (Continuous Integration/Continuous Deployment) pipeline automates the process of building, testing, and deploying software. It helps maintain code quality, accelerates development cycles, and ensures faster and more reliable releases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain the difference between Continuous Integration and Continuous Deployment.

A

Continuous Integration (CI) involves frequently merging code changes into a shared repository, followed by automated testing to catch integration issues. Continuous Deployment (CD) takes CI a step further by automatically deploying code to production environments after passing automated tests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the key components of a CI/CD pipeline?

A

A typical CI/CD pipeline consists of source code repositories, build automation, testing, deployment automation, and monitoring.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does a version control system like Git play a role in CI/CD?

A

Git helps manage source code versions and facilitates collaborative development. It allows developers to work on different branches, merge changes, and trigger CI/CD processes upon code commits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Jenkins, and how does it relate to CI/CD?

A

Jenkins is an open-source automation server that helps automate various stages of the CI/CD pipeline, including building, testing, and deployment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How would you handle flaky tests in your CI/CD pipeline?

A

Flaky tests are unreliable tests that sometimes pass and sometimes fail without changes to the code. They should be investigated and fixed or excluded to ensure the pipeline’s accuracy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Can you describe the steps involved in a typical CI/CD pipeline?

A

A standard CI/CD pipeline includes stages such as code checkout, build, automated testing, artifact generation, deployment to staging, further testing, and deployment to production.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the purpose of a post-deployment validation step in a CI/CD pipeline?

A

Post-deployment validation ensures that the newly deployed code functions as expected in the production environment by running additional tests and checks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How can you optimize a CI/CD pipeline for faster feedback to developers?

A

Pipeline optimization can involve parallelizing tasks, using caching, optimizing build scripts, and using tools that provide rapid feedback on test results.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain Blue-Green Deployment and how it reduces downtime during releases.

A

Blue-Green Deployment involves maintaining two identical environments: one for the currently live version (Blue) and the other for the new release (Green). Switching the router’s traffic from Blue to Green minimizes downtime.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Docker, and how does it help in the context of deployment and DevOps?

A

Docker is a platform that allows you to package applications and their dependencies into containers, ensuring consistent environments across development, testing, and production

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How is a Docker container different from a virtual machine?

A

Docker containers share the host operating system’s kernel, making them lightweight and resource-efficient compared to virtual machines, which require a full OS for each instance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Explain the Docker image and Docker container relationship.

A

A Docker image is a snapshot of a file system and runtime environment, while a Docker container is a running instance of an image.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a Dockerfile, and how is it used?

A

A Dockerfile is a text file that contains instructions for building a Docker image. It specifies the base image, application code, dependencies, and configuration.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you handle sensitive information like passwords in Docker containers?

A

Sensitive information should be stored as environment variables or in Docker secrets to prevent exposure within the container or image.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are Docker volumes, and why are they important?

A

Docker volumes provide a way to persist and share data between containers and the host machine, ensuring data durability and separation from container lifecycles.

16
Q

Explain how orchestration tools like Kubernetes complement Docker containers.

A

Kubernetes manages the deployment, scaling, and management of containerized applications, making it easier to handle large, distributed systems of Docker containers.

17
Q

What is Docker Compose, and when would you use it?

A

Docker Compose is a tool for defining and running multi-container Docker applications. It’s helpful for local development and testing environments.

18
Q

Describe the process of containerizing a .NET application using Docker.

A

Containerizing a .NET application involves creating a Dockerfile, specifying the base image (e.g., .NET runtime), copying application files, setting environment variables, and building the Docker image.

19
Q

What is the “Docker Hub,” and how does it relate to Docker?

A

Docker Hub is a cloud-based repository for Docker images. Developers can upload, share, and pull Docker images from Docker Hub.

20
Q

How does feature toggling (feature flags) contribute to a more controlled deployment process?

A

Feature toggles allow you to enable or disable specific features in production, enabling gradual rollouts, A/B testing, and quick feature rollback if needed.

21
Q

What is a rolling deployment, and how does it work?

A

A rolling deployment gradually replaces instances of the old application with new ones, ensuring a smooth transition and minimal disruption.

22
Q

Describe the process of implementing a zero-downtime deployment strategy.

A

Zero-downtime deployment involves deploying new versions of an application without causing any service disruption. Strategies like Blue-Green or Canary deployments are commonly used.

23
Q

When might you choose a monolithic deployment strategy over a microservices-based strategy?

A

Monolithic deployment might be preferred for smaller applications with limited complexity and when the development team size is small.

24
Q

What is an immutable infrastructure, and how does it relate to deployment strategies?

A

An immutable infrastructure treats servers and resources as disposable entities. Instead of modifying existing servers, new ones are created with each change, enhancing consistency and reliability.

25
Q

How can you ensure database schema changes are deployed smoothly alongside application changes?

A

Using database migration scripts, versioning, and testing can help ensure smooth database schema changes during deployments.

26
Q

Explain the concept of continuous monitoring and how it relates to deployment strategies.

A

Continuous monitoring involves tracking application performance, health, and key metrics after deployment to promptly detect issues and ensure the success of deployment strategies.

27
Q

What are the primary benefits of embracing DevOps practices in software development?

A

DevOps practices lead to faster development cycles, higher code quality, increased collaboration between teams, and improved software delivery.

28
Q

How do you ensure security is maintained in a CI/CD pipeline?

A

Security practices include code analysis tools, vulnerability scans, encryption of sensitive data, and adhering to security best practices in every stage of the pipeline

29
Q

Describe a situation where an automated deployment failed, and how did you troubleshoot and resolve the issue

A

Share a real or hypothetical scenario where a deployment failure occurred, explaining the steps you took to identify the issue and bring the system back to a functional state.

30
Q

What are “Infrastructure as Code” (IaC) principles, and why are they important in modern DevOps practices?

A

Infrastructure as Code involves managing and provisioning infrastructure using code, which brings consistency, versioning, and reproducibility to infrastructure deployment.

31
Q

How would you approach the deployment of a highly available application that spans multiple regions?

A

This involves setting up redundancy, load balancing, data replication, and monitoring across multiple regions to ensure high availability and fault tolerance.

32
Q

What is the purpose of a post-mortem or retrospective after a deployment, and how does it contribute to the improvement of future deployments?

A

A post-mortem identifies what went wrong, what went well, and actionable insights for continuous improvement, helping prevent similar issues in the future.

33
Q

Can you explain the concept of “Shift-Left” in the context of DevOps and testing?

A

“Shift-Left” refers to moving testing and quality assurance activities earlier in the software development lifecycle to catch issues before they become more costly to fix.

34
Q

How would you handle a situation where a production deployment caused a critical performance issue in the application?

A

Approach the problem by identifying the root cause, rolling back if necessary, and conducting a thorough investigation to ensure the issue is resolved before proceeding.

35
Q

What are some strategies for handling database schema changes in a microservices architecture with multiple, independently deployable services?

A

Implementing versioned API contracts, database migration scripts per service, and coordination between services can help manage database schema changes.

36
Q

How do you balance the need for frequent releases with the stability and reliability of a production environment?

A

Use deployment strategies like feature flags, canary releases, and thorough automated testing to ensure that frequent releases don’t compromise production stability.