Deployment and DevOps Flashcards
What is a CI/CD pipeline, and why is it important in modern software development?
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.
Explain the difference between Continuous Integration and Continuous Deployment.
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.
What are the key components of a CI/CD pipeline?
A typical CI/CD pipeline consists of source code repositories, build automation, testing, deployment automation, and monitoring.
How does a version control system like Git play a role in CI/CD?
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.
What is Jenkins, and how does it relate to CI/CD?
Jenkins is an open-source automation server that helps automate various stages of the CI/CD pipeline, including building, testing, and deployment.
How would you handle flaky tests in your CI/CD pipeline?
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.
Can you describe the steps involved in a typical CI/CD pipeline?
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.
What is the purpose of a post-deployment validation step in a CI/CD pipeline?
Post-deployment validation ensures that the newly deployed code functions as expected in the production environment by running additional tests and checks.
How can you optimize a CI/CD pipeline for faster feedback to developers?
Pipeline optimization can involve parallelizing tasks, using caching, optimizing build scripts, and using tools that provide rapid feedback on test results.
Explain Blue-Green Deployment and how it reduces downtime during releases.
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.
What is Docker, and how does it help in the context of deployment and DevOps?
Docker is a platform that allows you to package applications and their dependencies into containers, ensuring consistent environments across development, testing, and production
How is a Docker container different from a virtual machine?
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.
Explain the Docker image and Docker container relationship.
A Docker image is a snapshot of a file system and runtime environment, while a Docker container is a running instance of an image.
What is a Dockerfile, and how is it used?
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 do you handle sensitive information like passwords in Docker containers?
Sensitive information should be stored as environment variables or in Docker secrets to prevent exposure within the container or image.