Unit 4: Core concepts of Continuous Delivery (CD), Deployment & Automation - Practice Quiz

INT331 — Fundamentals Of Devops 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is the main difference between Continuous Delivery and Continuous Deployment?

Introduction Continuous Delivery & Continuous Deployment Easy
A. Continuous Delivery does not use automated testing at all
B. Continuous Delivery requires manual approval to release to production, while Continuous Deployment releases automatically
C. Continuous Deployment only works with mobile applications
D. Continuous Delivery is faster than Continuous Deployment in all cases

2 Which of the following is a key goal of Continuous Delivery?

Introduction Continuous Delivery & Continuous Deployment Easy
A. Deploying code only once per year
B. Removing all automated tests from the pipeline
C. Keeping software in a releasable state at all times
D. Eliminating the need for version control

3 Which Jenkins plugin is commonly used to define pipelines as code?

Jenkins Plugins for CD Easy
A. Spreadsheet plugin
B. Pipeline (Jenkinsfile) plugin
C. Calendar plugin
D. Notepad plugin

4 What is the primary purpose of Jenkins plugins?

Jenkins Plugins for CD Easy
A. To slow down the build process intentionally
B. To replace the operating system
C. To extend Jenkins with additional features and integrations
D. To store user passwords in plain text

5 In a Blue-Green deployment, what do the two environments represent?

Deployment Strategies: Rolling, Blue-Green, Canary Easy
A. Two separate cloud providers only
B. Two different programming languages
C. Development and documentation teams
D. The current live version and the new version to switch to

6 What best describes a Canary deployment?

Deployment Strategies: Rolling, Blue-Green, Canary Easy
A. Releasing the new version to a small subset of users before a full rollout
B. Deploying only during nighttime hours
C. Deploying to all users at the exact same instant
D. Removing the old version before testing the new one

7 How does a Rolling deployment update an application?

Deployment Strategies: Rolling, Blue-Green, Canary Easy
A. By deleting all user data first
B. By gradually replacing instances of the old version with the new one
C. By copying the database to a new server
D. By shutting down all servers at once

8 Which deployment strategy allows near-instant rollback by simply switching traffic back to the old environment?

Deployment Strategies: Rolling, Blue-Green, Canary Easy
A. Big-bang deployment
B. Blue-Green deployment
C. Manual deployment
D. Offline deployment

9 Which tool is primarily used as an Infrastructure as Code (IaC) provisioning tool?

Configuration Management Basics: Terraform / Puppet / Ansible Easy
A. Photoshop
B. Terraform
C. Microsoft Word
D. VLC Player

10 Which configuration management tool is known for being agentless and using SSH?

Configuration Management Basics: Terraform / Puppet / Ansible Easy
A. Puppet
B. Ansible
C. Chef
D. SaltStack

11 What file format does Ansible primarily use to write playbooks?

Configuration Management Basics: Terraform / Puppet / Ansible Easy
A. PNG
B. EXE
C. MP3
D. YAML

12 What language does Terraform use to define infrastructure configurations?

Infrastructure Automation with Ansible and Terraform Easy
A. CSS
B. HCL (HashiCorp Configuration Language)
C. HTML
D. SQL

13 Which command is used to preview the changes Terraform will make before applying them?

Infrastructure Automation with Ansible and Terraform Easy
A. terraform compile
B. terraform plan
C. terraform delete
D. terraform build

14 In Ansible, what is a group of hosts defined in an inventory file called?

Infrastructure Automation with Ansible and Terraform Easy
A. A firewall
B. A host group
C. A container
D. A snapshot

15 What is the main benefit of containerization?

Containerization Introduction Easy
A. Packaging applications with their dependencies for consistent execution across environments
B. Increasing the size of the operating system
C. Making applications run only on one specific machine
D. Removing the need for any code

16 How do containers differ from traditional virtual machines?

Containerization Introduction Easy
A. Containers require more memory than VMs
B. Containers share the host OS kernel, while VMs include a full guest OS
C. Containers cannot run applications
D. VMs are always smaller than containers

17 Which component is the background service that manages Docker objects like images and containers?

Docker Architecture & Workflow Easy
A. Docker calculator
B. Docker text editor
C. Docker Hub browser
D. Docker daemon (dockerd)

18 What is Docker Hub primarily used for?

Docker Architecture & Workflow Easy
A. Editing source code files
B. Managing DNS records
C. Compiling C++ programs
D. Storing and sharing Docker images

19 Which Dockerfile instruction specifies the base image to build upon?

Writing Dockerfiles Easy
A. EXPOSE
B. RUN
C. COPY
D. FROM

20 Which command is used to build a Docker image from a Dockerfile?

Building Images Easy
A. docker build
B. docker start
C. docker pull
D. docker login

21 A team has an automated pipeline that builds, tests, and stages every commit, but a human must click Approve before code reaches production. Which practice does this describe?

Introduction Continuous Delivery & Continuous Deployment Medium
A. Continuous Monitoring
B. Continuous Delivery
C. Continuous Integration
D. Continuous Deployment

22 Which statement best distinguishes Continuous Deployment from Continuous Delivery?

Introduction Continuous Delivery & Continuous Deployment Medium
A. Continuous Deployment applies only to configuration files, not application code
B. Continuous Deployment releases every passing change to production automatically with no manual gate
C. Continuous Deployment only builds and tests code but never releases it
D. Continuous Deployment requires manual approval before each production release

23 In Jenkins, which plugin lets you define an entire delivery workflow as code using a Jenkinsfile?

Jenkins Plugins for CD Medium
A. Timestamper Plugin
B. Mailer Plugin
C. Pipeline Plugin
D. Green Balls Plugin

24 A DevOps engineer wants Jenkins to visualize the flow of a change through build, test, and deploy stages as connected boxes. Which plugin is most appropriate?

Jenkins Plugins for CD Medium
A. Blue Ocean Plugin
B. JUnit Plugin
C. Credentials Binding Plugin
D. SSH Agent Plugin

25 A company keeps two identical production environments and switches all traffic from the old one to the new one at once after validation. Which strategy is this?

Deployment Strategies: Rolling, Blue-Green, Canary Medium
A. Recreate deployment
B. Rolling deployment
C. Blue-Green deployment
D. Canary deployment

26 A team releases a new version to only 5% of users first, monitors error rates, then gradually increases the percentage. Which strategy is used?

Deployment Strategies: Rolling, Blue-Green, Canary Medium
A. Blue-Green deployment
B. Big-bang deployment
C. Rolling deployment
D. Canary deployment

27 In a rolling deployment across 10 instances, what is the main advantage compared to a big-bang release?

Deployment Strategies: Rolling, Blue-Green, Canary Medium
A. Traffic is routed based on user geography only
B. All instances are replaced simultaneously to save time
C. Two full environments are duplicated for instant switching
D. Instances are updated incrementally so the service stays available

28 Which deployment strategy provides the fastest rollback because the previous version remains fully running in a separate environment?

Deployment Strategies: Rolling, Blue-Green, Canary Medium
A. Shadow deployment
B. Rolling deployment
C. Canary deployment
D. Blue-Green deployment

29 Which characteristic best describes Ansible's default operating model?

Configuration Management Basics: Terraform / Puppet / Ansible Medium
A. Agent-based, requiring a daemon on every managed node
B. Compiled, requiring binaries deployed to each node
C. Agentless, using SSH to push configurations to nodes
D. Pull-based, where nodes fetch a catalog from a master

30 Puppet typically follows which architecture for applying configuration?

Configuration Management Basics: Terraform / Puppet / Ansible Medium
A. Agentless push model over SSH from a control node
B. Stateless model with no central server at all
C. Agent-based pull model where nodes retrieve a catalog from a master
D. Event-driven model triggered only by webhooks

31 Which tool is primarily designed for provisioning infrastructure declaratively and maintains a state file to track resources?

Configuration Management Basics: Terraform / Puppet / Ansible Medium
A. Ansible
B. Chef
C. Terraform
D. Puppet

32 In Terraform, which command shows the actions Terraform will take without actually applying them?

Infrastructure Automation with Ansible and Terraform Medium
A. terraform destroy
B. terraform apply
C. terraform init
D. terraform plan

33 An Ansible file that lists the target hosts and groups the automation will run against is called the:

Infrastructure Automation with Ansible and Terraform Medium
A. Inventory
B. Module
C. Playbook
D. Handler

34 Why is Ansible said to be idempotent when running a playbook multiple times?

Infrastructure Automation with Ansible and Terraform Medium
A. It deletes all resources before reapplying them
B. It randomly selects tasks to run each time
C. It reruns every task from scratch on each execution
D. It only makes changes when the system is not already in the desired state

35 Which statement correctly contrasts containers with virtual machines?

Containerization Introduction Medium
A. Containers require a hypervisor, while VMs do not
B. Containers each run a full guest OS, while VMs share the host kernel
C. Containers cannot be isolated from one another, unlike VMs
D. Containers share the host OS kernel, while VMs each run a full guest OS

36 In Docker's architecture, which component is the persistent background service that builds, runs, and manages containers?

Docker Architecture & Workflow Medium
A. Docker client (docker)
B. Docker Compose
C. Docker daemon (dockerd)
D. Docker registry

37 When you run docker pull nginx, where does Docker fetch the image from by default?

Docker Architecture & Workflow Medium
A. A running container
B. Docker Hub registry
C. The local build cache only
D. The Dockerfile in the current directory

38 In a Dockerfile, what is the key difference between the CMD and ENTRYPOINT instructions?

Writing Dockerfiles Medium
A. Both are identical and interchangeable in all cases
B. ENTRYPOINT sets the fixed executable, while CMD provides default arguments that can be overridden
C. CMD sets the fixed executable, while ENTRYPOINT only sets environment variables
D. ENTRYPOINT runs at build time while CMD runs at container start

39 To reduce cache invalidation and speed up rebuilds when only source code changes, where should COPY package.json and dependency installation be placed in a Dockerfile?

Writing Dockerfiles Medium
A. In the final instruction of the Dockerfile
B. Inside the CMD instruction
C. After copying the entire application source code
D. Before copying the rest of the application source code

40 What does the -t flag do in the command docker build -t myapp:1.0 .?

Building Images Medium
A. Enables verbose build tracing
B. Assigns a name and tag to the resulting image
C. Specifies the target container to run
D. Removes intermediate build containers

41 A team practices Continuous Delivery but insists on a manual approval gate before the production release. Which statement correctly distinguishes their practice from Continuous Deployment?

Introduction Continuous Delivery & Continuous Deployment Hard
A. Continuous Deployment requires a manual gate whereas Continuous Delivery removes it
B. In Continuous Delivery the deployable artifact is always production-ready, but a human triggers the final release
C. In Continuous Delivery every change that passes automated tests is released to production automatically
D. Both practices are identical because both require passing automated tests

42 An organization has a mature CI pipeline but frequent production incidents traced to configuration drift between staging and production. Which CD principle most directly addresses this?

Introduction Continuous Delivery & Continuous Deployment Hard
A. Increasing the number of manual approval gates
B. Running more unit tests in the build stage
C. Deploying more frequently to reduce batch size
D. Keeping environments as identical as possible via environment parity

43 In a Jenkins declarative pipeline, you need to pause execution for a manual production approval that times out and aborts after one hour. Which construct achieves this?

Jenkins Plugins for CD Hard
A. stash step combined with retry
B. input step wrapped in a timeout block
C. when directive with a beforeAgent condition
D. post block with an always condition

44 A team wants Jenkins pipeline definitions versioned alongside application source and automatically discovered per branch. Which plugin combination best supports this?

Jenkins Plugins for CD Hard
A. Pipeline (Job DSL) plugin with the Build Pipeline view plugin
B. Multibranch Pipeline with the Jenkinsfile from SCM
C. Copy Artifact plugin with the Promoted Builds plugin
D. Credentials Binding plugin with Parameterized Trigger plugin

45 A service must maintain full capacity during deployment, requires instant rollback, but the team can afford double the infrastructure temporarily. Which strategy fits best?

Deployment Strategies: Rolling, Blue-Green, Canary Hard
A. Recreate deployment
B. Rolling deployment
C. Canary deployment
D. Blue-Green deployment

46 During a canary release, 5% of traffic goes to the new version. Error rate on the canary is versus on the stable version. What is the correct automated response?

Deployment Strategies: Rolling, Blue-Green, Canary Hard
A. Increase canary traffic to 50% to gather more data
B. Ignore the difference as statistically insignificant
C. Immediately promote the canary to 100% since only 5% is affected
D. Halt the rollout and roll back the canary due to elevated error rate

47 A rolling update with maxSurge=1 and maxUnavailable=0 is applied to a 4-replica deployment. What is the maximum number of pods that can exist simultaneously during the update?

Deployment Strategies: Rolling, Blue-Green, Canary Hard
A. 4 pods
B. 3 pods
C. 8 pods
D. 5 pods

48 Which statement correctly contrasts Terraform's and Ansible's operational models?

Configuration Management Basics: Terraform / Puppet / Ansible Hard
A. Both are push-based tools that require a master server
B. Terraform is declarative and state-tracking; Ansible is primarily procedural and stateless per run
C. Both are agent-based and enforce state on a schedule
D. Terraform is procedural; Ansible is declarative with a central state file

49 Puppet is described as enforcing 'idempotent' and 'eventual consistency' behavior. Which scenario best illustrates this?

Configuration Management Basics: Terraform / Puppet / Ansible Hard
A. A manifest runs once and never re-checks the node afterward
B. Each run creates new resources regardless of current state
C. The master pushes changes only when manually triggered by an operator
D. The Puppet agent periodically re-applies the catalog, correcting any drift back to declared state

50 A Terraform configuration hardcodes a resource that was later created manually in the cloud console. Running terraform apply tries to create a duplicate. What is the correct remediation?

Infrastructure Automation with Ansible and Terraform Hard
A. Use terraform import to bring the existing resource under state management
B. Add lifecycle { ignore_changes = all } to skip it
C. Run terraform refresh to auto-detect the resource
D. Delete the manual resource and re-run apply

51 In an Ansible playbook, a task must run only once on a single host even when targeting many hosts. Which directive achieves this?

Infrastructure Automation with Ansible and Terraform Hard
A. run_once: true
B. throttle: 1
C. delegate_to: localhost
D. serial: 1

52 Two engineers run terraform apply concurrently against the same remote backend without locking configured. What is the primary risk?

Infrastructure Automation with Ansible and Terraform Hard
A. Terraform silently blocks the second run
B. Corrupted or inconsistent state file from simultaneous writes
C. Slower apply times due to network contention
D. Automatic merge of both plans into one

53 Which statement most accurately explains why containers are more lightweight than traditional virtual machines?

Containerization Introduction Hard
A. Containers use a hypervisor to emulate hardware efficiently
B. Containers run directly on hardware without any host OS
C. Containers share the host kernel and isolate only user space via namespaces and cgroups
D. Containers include a full guest OS optimized for size

54 A stateless microservice scaled to 50 containers loses all in-memory session data when any container restarts. What architectural principle explains the correct handling?

Containerization Introduction Hard
A. Containers should persist session data on their writable layer
B. Session data should be baked into the image at build time
C. Ephemeral containers must externalize state to a shared store or database
D. Each container should mount the same host directory for sessions

55 When you run docker run nginx, which component is ultimately responsible for creating and running the container process?

Docker Architecture & Workflow Hard
A. The host kernel scheduler alone
B. The Docker CLI directly
C. The Docker daemon (dockerd) via containerd and a runtime like runc
D. The image registry

56 A developer notices that changing one line in application code invalidates the Docker build cache for all subsequent layers, causing slow rebuilds. What is the root cause?

Docker Architecture & Workflow Hard
A. Source code is copied before dependencies are installed in the Dockerfile
B. The Docker daemon has caching disabled
C. Layers are compressed inefficiently
D. The base image is too large

57 Consider a Dockerfile ending with ENTRYPOINT ["python"] and CMD ["app.py"]. What happens when you run docker run myimg script.py?

Writing Dockerfiles Hard
A. It fails because ENTRYPOINT and CMD conflict
B. It runs python script.py because CMD is overridden by the argument
C. It runs script.py app.py as the command
D. It runs python app.py ignoring the argument

58 Which Dockerfile technique most effectively reduces final image size for a compiled Go application?

Writing Dockerfiles Hard
A. Multi-stage build compiling in one stage and copying only the binary to a minimal base
B. Using RUN apt-get clean after each install
C. Adding .dockerignore to exclude source files
D. Setting WORKDIR to a smaller directory

59 During docker build, you want to inject a secret token needed only at build time without it persisting in any image layer. What is the recommended approach?

Building Images Hard
A. Store it in an ENV variable early in the Dockerfile
B. Pass it via ARG and reference it in a RUN command
C. Use BuildKit --secret mounts so the value never lands in a layer
D. Copy the secret file with COPY then delete it in a later layer

60 Two images built from identical Dockerfiles on different machines produce different image digests despite no source changes. What is the most likely cause?

Building Images Hard
A. One build used more CPU cores than the other
B. Docker digests are always random per build
C. The Dockerfile syntax version differs
D. Non-deterministic layer contents such as timestamps or unpinned base image tags