Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
You're offline
Unit 4 MCQsCore concepts of Continuous Delivery (CD), Deployment & Automation
What is the main difference between Continuous Delivery and Continuous Deployment?
Not quite. Try another option.
Answer: Continuous Delivery requires manual approval to release to production, while Continuous Deployment releases automatically
In Continuous Delivery, code is always ready to deploy but a human triggers the final release. In Continuous Deployment, every change that passes automated tests is released automatically.
In a Blue-Green deployment, what do the two environments represent?
Not quite. Try another option.
Answer: The current live version and the new version to switch to
Blue-Green uses two identical environments: one (Blue) runs the live version while the other (Green) hosts the new version. Traffic is switched once the new version is verified.
Which tool is primarily used as an Infrastructure as Code (IaC) provisioning tool?
Not quite. Try another option.
Answer: Terraform
Terraform is an Infrastructure as Code tool used to provision and manage infrastructure across various cloud providers using declarative configuration files.
Docker Hub is a cloud-based registry where users can store, share, and pull Docker images.
Question 19 of 60 · Writing Dockerfiles · Easy
Which Dockerfile instruction specifies the base image to build upon?
Not quite. Try another option.
Answer: FROM
The FROM instruction sets the base image and must be the first instruction in a Dockerfile.
Question 20 of 60 · Building Images · Easy
Which command is used to build a Docker image from a Dockerfile?
Not quite. Try another option.
Answer: docker build
The docker build command reads a Dockerfile and creates a Docker image from its instructions.
Question 21 of 60 · Introduction Continuous Delivery & Continuous Deployment · Medium
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?
Not quite. Try another option.
Answer: Continuous Delivery
Continuous Delivery keeps every change deployable and automated up to production, but the final release to production requires a manual approval. Continuous Deployment removes that manual gate.
Question 22 of 60 · Introduction Continuous Delivery & Continuous Deployment · Medium
Which statement best distinguishes Continuous Deployment from Continuous Delivery?
Not quite. Try another option.
Answer: Continuous Deployment releases every passing change to production automatically with no manual gate
In Continuous Deployment, any change that passes the automated pipeline is pushed to production without human intervention, unlike Continuous Delivery which stops at a manual release gate.
Question 23 of 60 · Jenkins Plugins for CD · Medium
In Jenkins, which plugin lets you define an entire delivery workflow as code using a Jenkinsfile?
Not quite. Try another option.
Answer: Pipeline Plugin
The Pipeline plugin allows the whole build-test-deploy process to be described as code in a Jenkinsfile, enabling version-controlled, repeatable delivery pipelines.
Question 24 of 60 · Jenkins Plugins for CD · Medium
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?
Not quite. Try another option.
Answer: Blue Ocean Plugin
Blue Ocean provides a modern visual interface that displays pipeline stages graphically, making it easy to see the progress of a change through each stage.
Question 25 of 60 · Deployment Strategies: Rolling, Blue-Green, Canary · Medium
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?
Not quite. Try another option.
Answer: Blue-Green deployment
Blue-Green uses two full environments; traffic is switched from blue (old) to green (new) instantly, enabling fast rollback by switching back.
Question 26 of 60 · Deployment Strategies: Rolling, Blue-Green, Canary · Medium
A team releases a new version to only 5% of users first, monitors error rates, then gradually increases the percentage. Which strategy is used?
Not quite. Try another option.
Answer: Canary deployment
Canary deployment exposes the new version to a small subset of users first, letting the team detect problems before a full rollout.
Question 27 of 60 · Deployment Strategies: Rolling, Blue-Green, Canary · Medium
In a rolling deployment across 10 instances, what is the main advantage compared to a big-bang release?
Not quite. Try another option.
Answer: Instances are updated incrementally so the service stays available
Rolling deployment updates instances a few at a time, keeping the remaining instances serving traffic, which avoids full downtime.
Question 28 of 60 · Deployment Strategies: Rolling, Blue-Green, Canary · Medium
Which deployment strategy provides the fastest rollback because the previous version remains fully running in a separate environment?
Not quite. Try another option.
Answer: Blue-Green deployment
Because the old (blue) environment stays intact while green serves traffic, rollback is as simple as switching routing back to blue.
Question 29 of 60 · Configuration Management Basics: Terraform / Puppet / Ansible · Medium
Which characteristic best describes Ansible's default operating model?
Not quite. Try another option.
Answer: Agentless, using SSH to push configurations to nodes
Ansible is agentless and connects to managed nodes over SSH (or WinRM) to push tasks, so no persistent agent is required on the targets.
Question 30 of 60 · Configuration Management Basics: Terraform / Puppet / Ansible · Medium
Puppet typically follows which architecture for applying configuration?
Not quite. Try another option.
Answer: Agent-based pull model where nodes retrieve a catalog from a master
Puppet commonly uses a master-agent architecture where each node's agent periodically pulls a compiled catalog from the Puppet master and applies it.
Question 31 of 60 · Configuration Management Basics: Terraform / Puppet / Ansible · Medium
Which tool is primarily designed for provisioning infrastructure declaratively and maintains a state file to track resources?
Not quite. Try another option.
Answer: Terraform
Terraform is an infrastructure provisioning tool that uses declarative configuration and a state file to map real resources to your configuration for planning changes.
Question 32 of 60 · Infrastructure Automation with Ansible and Terraform · Medium
In Terraform, which command shows the actions Terraform will take without actually applying them?
Not quite. Try another option.
Answer: terraform plan
terraform plan produces an execution plan describing what will be created, changed, or destroyed, allowing review before running terraform apply.
Question 33 of 60 · Infrastructure Automation with Ansible and Terraform · Medium
An Ansible file that lists the target hosts and groups the automation will run against is called the:
Not quite. Try another option.
Answer: Inventory
The inventory defines the managed hosts and their groupings. Playbooks describe the tasks, while modules perform the actual work on the hosts.
Question 34 of 60 · Infrastructure Automation with Ansible and Terraform · Medium
Why is Ansible said to be idempotent when running a playbook multiple times?
Not quite. Try another option.
Answer: It only makes changes when the system is not already in the desired state
Idempotency means re-running a playbook produces the same result; Ansible modules check the current state and only act when a change is required.
Question 35 of 60 · Containerization Introduction · Medium
Which statement correctly contrasts containers with virtual machines?
Not quite. Try another option.
Answer: Containers share the host OS kernel, while VMs each run a full guest OS
Containers virtualize at the OS level and share the host kernel, making them lighter and faster to start than VMs, which each include a full guest operating system.
Question 36 of 60 · Docker Architecture & Workflow · Medium
In Docker's architecture, which component is the persistent background service that builds, runs, and manages containers?
Not quite. Try another option.
Answer: Docker daemon (dockerd)
The Docker daemon dockerd is the background service that manages images, containers, networks, and volumes; the client sends commands to it via the API.
Question 37 of 60 · Docker Architecture & Workflow · Medium
When you run docker pull nginx, where does Docker fetch the image from by default?
Not quite. Try another option.
Answer: Docker Hub registry
By default Docker pulls images from Docker Hub, the public registry, unless another registry is explicitly specified in the image name.
Question 38 of 60 · Writing Dockerfiles · Medium
In a Dockerfile, what is the key difference between the CMD and ENTRYPOINT instructions?
Not quite. Try another option.
Answer: ENTRYPOINT sets the fixed executable, while CMD provides default arguments that can be overridden
ENTRYPOINT defines the main command that always runs, and CMD supplies default arguments that can be overridden by arguments passed to docker run.
Question 39 of 60 · Writing Dockerfiles · Medium
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?
Not quite. Try another option.
Answer: Before copying the rest of the application source code
Copying dependency manifests and installing them before copying the full source lets Docker reuse the cached dependency layer when only application code changes.
Question 40 of 60 · Building Images · Medium
What does the -t flag do in the command docker build -t myapp:1.0 .?
Not quite. Try another option.
Answer: Assigns a name and tag to the resulting image
The -t flag tags the built image with a name and version (here myapp:1.0), and the trailing . sets the build context to the current directory.
Question 41 of 60 · Introduction Continuous Delivery & Continuous Deployment · Hard
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?
Not quite. Try another option.
Answer: In Continuous Delivery the deployable artifact is always production-ready, but a human triggers the final release
Continuous Delivery keeps every build releasable but relies on a manual decision to push to production. Continuous Deployment removes that gate and deploys automatically once tests pass.
Question 42 of 60 · Introduction Continuous Delivery & Continuous Deployment · Hard
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?
Not quite. Try another option.
Answer: Keeping environments as identical as possible via environment parity
Configuration drift arises when staging and production diverge. Environment parity (build once, deploy the same artifact and config everywhere) is the CD principle that eliminates drift-induced failures.
Question 43 of 60 · Jenkins Plugins for CD · Hard
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?
Not quite. Try another option.
Answer: input step wrapped in a timeout block
The input step pauses for human approval, and wrapping it in timeout aborts the stage if no approval arrives within the set duration. when and post do not perform interactive pausing.
Question 44 of 60 · Jenkins Plugins for CD · Hard
A team wants Jenkins pipeline definitions versioned alongside application source and automatically discovered per branch. Which plugin combination best supports this?
Not quite. Try another option.
Answer: Multibranch Pipeline with the Jenkinsfile from SCM
Multibranch Pipeline scans a repository, creates jobs per branch, and reads the Jenkinsfile from SCM, giving pipeline-as-code that is versioned with the application source.
Question 45 of 60 · Deployment Strategies: Rolling, Blue-Green, Canary · Hard
A service must maintain full capacity during deployment, requires instant rollback, but the team can afford double the infrastructure temporarily. Which strategy fits best?
Not quite. Try another option.
Answer: Blue-Green deployment
Blue-Green runs two full environments; traffic switches instantly and rollback is immediate by pointing back to the old environment. It requires roughly double the infrastructure, which the team can afford.
Question 46 of 60 · Deployment Strategies: Rolling, Blue-Green, Canary · Hard
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?
Not quite. Try another option.
Answer: Halt the rollout and roll back the canary due to elevated error rate
The canary shows an higher error rate than stable, breaching typical health thresholds. The safe automated action is to halt and roll back, limiting blast radius.
Question 47 of 60 · Deployment Strategies: Rolling, Blue-Green, Canary · Hard
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?
Not quite. Try another option.
Answer: 5 pods
maxSurge=1 allows one extra pod above the desired 4, so at most pods run at once. maxUnavailable=0 ensures no capacity is lost during the update.
Question 48 of 60 · Configuration Management Basics: Terraform / Puppet / Ansible · Hard
Which statement correctly contrasts Terraform's and Ansible's operational models?
Not quite. Try another option.
Answer: Terraform is declarative and state-tracking; Ansible is primarily procedural and stateless per run
Terraform maintains a state file to reconcile declared infrastructure. Ansible executes tasks procedurally over SSH each run without a persistent state file, making them complementary.
Question 49 of 60 · Configuration Management Basics: Terraform / Puppet / Ansible · Hard
Puppet is described as enforcing 'idempotent' and 'eventual consistency' behavior. Which scenario best illustrates this?
Not quite. Try another option.
Answer: The Puppet agent periodically re-applies the catalog, correcting any drift back to declared state
Puppet agents pull and re-apply the catalog on a schedule (default 30 min), continuously reconciling nodes toward the declared state, which is idempotent enforcement with eventual consistency.
Question 50 of 60 · Infrastructure Automation with Ansible and Terraform · Hard
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?
Not quite. Try another option.
Answer: Use terraform import to bring the existing resource under state management
terraform import maps an existing real-world resource into the state file so Terraform manages it instead of trying to recreate it. refresh only updates state for already-tracked resources.
Question 51 of 60 · Infrastructure Automation with Ansible and Terraform · Hard
In an Ansible playbook, a task must run only once on a single host even when targeting many hosts. Which directive achieves this?
Not quite. Try another option.
Answer: run_once: true
run_once: true executes the task a single time (on the first host in the batch) rather than per host. serial and throttle control batching/concurrency, not single execution.
Question 52 of 60 · Infrastructure Automation with Ansible and Terraform · Hard
Two engineers run terraform apply concurrently against the same remote backend without locking configured. What is the primary risk?
Not quite. Try another option.
Answer: Corrupted or inconsistent state file from simultaneous writes
Without state locking, concurrent applies can write to the state file simultaneously, corrupting it or causing lost updates. Backends like S3+DynamoDB provide locking to prevent this.
Question 53 of 60 · Containerization Introduction · Hard
Which statement most accurately explains why containers are more lightweight than traditional virtual machines?
Not quite. Try another option.
Answer: Containers share the host kernel and isolate only user space via namespaces and cgroups
Containers share the host OS kernel and use namespaces (isolation) and cgroups (resource limits) instead of bundling a full guest OS, making them far lighter than VMs that virtualize hardware.
Question 54 of 60 · Containerization Introduction · Hard
A stateless microservice scaled to 50 containers loses all in-memory session data when any container restarts. What architectural principle explains the correct handling?
Not quite. Try another option.
Answer: Ephemeral containers must externalize state to a shared store or database
Containers are ephemeral; their writable layer is lost on restart. Stateless design requires externalizing session state to a shared datastore (e.g., Redis) so any container can serve any request.
Question 55 of 60 · Docker Architecture & Workflow · Hard
When you run docker run nginx, which component is ultimately responsible for creating and running the container process?
Not quite. Try another option.
Answer: The Docker daemon (dockerd) via containerd and a runtime like runc
The CLI sends the request to dockerd, which delegates to containerd, which invokes a low-level runtime (runc) to create the container using kernel features. The CLI itself does not run containers.
Question 56 of 60 · Docker Architecture & Workflow · Hard
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?
Not quite. Try another option.
Answer: Source code is copied before dependencies are installed in the Dockerfile
Docker caches layers in order; any change to a layer invalidates all following layers. Copying frequently-changing source before dependency installation forces reinstalling dependencies every build. Copy dependency manifests first.
Question 57 of 60 · Writing Dockerfiles · Hard
Consider a Dockerfile ending with ENTRYPOINT ["python"] and CMD ["app.py"]. What happens when you run docker run myimg script.py?
Not quite. Try another option.
Answer: It runs python script.py because CMD is overridden by the argument
In exec form, the runtime argument replaces CMD, and the result is appended to ENTRYPOINT. So python (ENTRYPOINT) plus script.py (overriding app.py) executes python script.py.
Question 58 of 60 · Writing Dockerfiles · Hard
Which Dockerfile technique most effectively reduces final image size for a compiled Go application?
Not quite. Try another option.
Answer: Multi-stage build compiling in one stage and copying only the binary to a minimal base
Multi-stage builds let you compile with a full toolchain, then copy just the resulting binary into a tiny base (e.g., scratch or alpine), discarding build dependencies and drastically shrinking the final image.
Question 59 of 60 · Building Images · Hard
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?
Not quite. Try another option.
Answer: Use BuildKit --secret mounts so the value never lands in a layer
BuildKit secret mounts (RUN --mount=type=secret) expose the value only during that command and never write it to a layer. ARG, ENV, and copy-then-delete all leave the secret recoverable in image history.
Question 60 of 60 · Building Images · Hard
Two images built from identical Dockerfiles on different machines produce different image digests despite no source changes. What is the most likely cause?
Not quite. Try another option.
Answer: Non-deterministic layer contents such as timestamps or unpinned base image tags
Digests are content-addressable hashes. Differences arise from non-reproducible content: file timestamps, package versions, or a mutable base tag (latest) resolving to different images. Pinning by digest improves reproducibility.
That's unit 4
Answer a few questions and your score shows up here.
Nearly through. Did unit 4 of INT331 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 4 of INT331 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.