Skip to main content

DevOps Essentials Quiz

No.Training UnitLectureTraining contentQuestionLevelMarkAnswerAnswer Option AAnswer Option BAnswer Option CAnswer Option D
1Unit 01: Containerization with DockerLec1Containers vs VMsWhat is the primary difference between containers and virtual machines?Easy1Containers share the host OS kernel, while VMs run a full guest OS.Containers run a complete operating system.Containers share the host OS kernel, while VMs run a full guest OS.VMs are faster to start than containers.There is no significant difference.
2Unit 01: Containerization with DockerLec1Core Docker ConceptsWhat is a Docker "layer"?Easy1Each instruction in a Dockerfile creates a cached, reusable layer.A running instance of a Docker image.A text file with build instructions.Each instruction in a Dockerfile creates a cached, reusable layer.A repository for storing images.
3Unit 01: Containerization with DockerLec1Docker CommandsWhich command is used to view the logs of a running container in real-time?Easy1docker logs -f myappdocker inspect myappdocker stats myappdocker top myappdocker logs -f myapp
4Unit 01: Containerization with DockerLec2Layer OptimizationWhy should multiple RUN commands be combined into a single RUN instruction?Medium1To minimize the number of layers and reduce image size.To make the Dockerfile more readable.To minimize the number of layers and reduce image size.To avoid Docker caching.To speed up the application runtime.
5Unit 01: Containerization with DockerLec2Dependency CachingWhy should pyproject.toml be copied before the application code in a Dockerfile?Medium1To leverage Docker layer caching so dependencies are not reinstalled on every code change.To ensure the application code is not overwritten.To make the Dockerfile shorter.To leverage Docker layer caching so dependencies are not reinstalled on every code change.To comply with Python packaging standards.
6Unit 01: Containerization with DockerLec3Multi-stage BuildsWhat is the primary benefit of using multi-stage Docker builds?Medium1Smaller final images by separating build tools from runtime dependencies.Faster application startup time.Smaller final images by separating build tools from runtime dependencies.Ability to run multiple applications in one container.Automatic security scanning.
7Unit 01: Containerization with DockerLec3Docker SecurityWhy should containers run as a non-root user?Easy1If an attacker exploits a vulnerability, they gain root access to the host.Non-root users make containers run faster.It is required by Docker to build images.If an attacker exploits a vulnerability, they gain root access to the host.Non-root users reduce image size.
8Unit 02: CI/CD Automation PipelinesLec4CI/CD FundamentalsWhat is the key difference between Continuous Delivery and Continuous Deployment?Medium1Continuous Delivery requires manual approval before production; Continuous Deployment does not.Continuous Deployment is slower than Continuous Delivery.Continuous Delivery does not include automated testing.There is no difference between the two.Continuous Delivery requires manual approval before production; Continuous Deployment does not.
9Unit 02: CI/CD Automation PipelinesLec4GitHub ActionsIn GitHub Actions, what is a "workflow"?Easy1An automated process defined in a YAML file in .github/workflows/.A single command that runs in a container.An automated process defined in a YAML file in .github/workflows/.A Git branch strategy for deployments.A Docker Compose configuration.
10Unit 02: CI/CD Automation PipelinesLec5GitLab CIWhat is the purpose of the services keyword in a GitLab CI job?Hard1To spin up additional Docker containers (e.g., PostgreSQL, Redis) that the job can connect to.To define the stages of the pipeline.To specify which runners can execute the job.To spin up additional Docker containers (e.g., PostgreSQL, Redis) that the job can connect to.To cache dependencies between jobs.
11Unit 02: CI/CD Automation PipelinesLec5Automated TestingAccording to the Test Pyramid, which type of tests should make up the largest portion of the test suite?Easy1Unit TestsE2E TestsIntegration TestsUnit TestsPerformance Tests
12Unit 02: CI/CD Automation PipelinesLec6Blue-Green DeploymentWhat is the main advantage of Blue-Green deployment?Medium1Zero-downtime deployment with instant rollback capability.It requires fewer servers than other strategies.Zero-downtime deployment with instant rollback capability.It automatically tests the new version.It eliminates the need for a load balancer.
13Unit 02: CI/CD Automation PipelinesLec6GitOpsIn a GitOps workflow, what serves as the single source of truth for infrastructure state?Hard1A Git repositoryThe CI/CD pipeline logsA Git repositoryThe Kubernetes dashboardThe cloud provider console
14Unit 03: SonarQubeLec7SonarQube ArchitectureWhat is the role of the SonarQube Scanner?Easy1A CLI tool that analyzes code and sends results to the SonarQube server.A web-based dashboard for viewing metrics.A database for storing analysis results.A CLI tool that analyzes code and sends results to the SonarQube server.An IDE plugin for real-time feedback.
15Unit 03: SonarQubeLec7Quality GatesWhich of the following is NOT one of SonarQube's four core quality metric categories?Medium1PerformanceBugsVulnerabilitiesCode SmellsPerformance
16Unit 03: SonarQubeLec8Clean as You CodeWhat is the core principle of the "Clean as You Code" methodology?Hard1Enforce quality standards on new code without blocking existing legacy issues.Rewrite all legacy code before adding new features.Enforce quality standards on new code without blocking existing legacy issues.Only analyze code that has been recently modified.Automatically fix all code issues using AI.