Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

DevOps Quiz

Total questions: 60

Worksheet time: 30mins

Name
Class
Date
1.

Which type of credentials should be configured in Jenkins to access a GitHub repository?

a)

Personal Access Token

b)

API Key

c)

Password in plain text

d)

OAuth Token with read-write permissions

2.

What does the following line of code mean in a Dockerfile? "FROM nginx:alpine"

a)

Creating an Alpine Linux image and installs NGINX on it.

b)

Starting a container running NGINX on an Alpine Linux base.

c)

Asking Docker to pull the nginx image with the alpine tag from the Docker Hub.

d)

Specifying the version of NGINX to be installed on the host system.

3.

What does the “-p 8080:80” option do in a docker run command?

a)

It specifies the image version to use.

b)

It maps port 8080 on the host to port 80 on the container.

c)

It runs the container on port 80.

d)

It sets the container's internal port to 8080.

4.

What is Docker Hub?

a)

A local registry for Docker images

b)

A cloud-based repository for Docker images

c)

A Docker network management tool

d)

A command-line tool for managing containers

5.

What is Docker Compose used for?

a)

Managing Docker images

b)

Debugging containers

c)

Defining and running multi-container Docker applications

d)

Monitoring container performance

6.

What type of repositories can be created in AWS CodeCommit?

a)

Public and private repositories

b)

Only public repositories

c)

Only private repositories

d)

Encrypted and unencrypted repositories

7.

What is a Jenkins job?

a)

A task allowing containers to run applications

b)

A user role in the Jenkins system

c)

A Jenkins plugin for deployment

d)

A task or process defined in Jenkins to automate actions

8.

Which type of job in Jenkins is commonly used for building and deploying software?

a)

Freestyle Project

b)

Multi-branch Pipeline

c)

Pipeline

d)

Folder

9.

What is AWS CodePipeline used for?

a)

Automating the build, test, and deployment phases of an application's release process.

b)

Managing database migrations.

c)

Monitoring application performance in production.

d)

Hosting virtual machines for deployment.

10.

Which file format does Docker Compose use for configuration?

a)

XML

b)

JSON

c)

INI

d)

YAML

11.

What command is used to start a Docker Compose application?

a)

docker-compose start

b)

docker-compose up

c)

docker-compose run

d)

docker-compose build

12.

What is Jenkins primarily used for?

a)

Version control

b)

Continuous Integration/Continuous Delivery (CI/CD)

c)

Containerization of applications

d)

Cloud storage

13.

What is the default port for accessing the Jenkins web interface?

a)

22

b)

443

c)

8080

d)

80

14.

What is the main purpose of a build trigger in Jenkins?

a)

Defining environment variables

b)

Specifying conditions for starting a build

c)

To monitor system resources

d)

To install required plugins

15.

Which AWS service is commonly used to store application artifacts for deployment?

a)

Amazon EC2

b)

Amazon S3

c)

AWS Lambda

d)

Amazon CloudFront

16.

Which condition must be met in order to remove a Docker container?

a)

The container must be paused.

b)

The container must be stopped.

c)

The container must be part of a network.

d)

The container must have no attached volumes.

17.

What does the “docker exec” command do?

a)

Starts a new Docker container.

b)

Lists all running containers.

c)

Runs a command inside a running Docker container.

d)

Stops a running Docker container.

18.

What is the default location of the Ansible configuration file?

a)

/etc/ansible.cfg

b)

/var/ansible.cfg

c)

usr/local/ansible.cfg

d)

/etc/ansible/ansible.cfg

19.

What is the purpose of a tag in a Docker image?

a)

Assign a version or identifier to a specific image variant.

b)

Configure the network settings of the container.

c)

Define environment variables in the image.

d)

Store the image on a remote server.

20.

Which tag is typically used to specify the latest version of a Docker image?

a)

latest

b)

last

c)

stable

d)

default

21.

Can Docker tags include both letters and numbers?

a)

No, tags can only contain letters.

b)

Yes, tags can contain letters, numbers, and special characters.

c)

No, tags can only contain numbers.

d)

Yes, but only lowercase letters are allowed.

22.

How do you push a Docker image to Docker Hub?

a)

docker push <image_name>

b)

docker push <username>/<image_name>:<tag>

c)

docker upload <image_name>

d)

docker deploy <image_name>:<tag>

23.

What is the maximum number of public repositories allowed in a free Docker Hub account?

a)

5

b)

10

c)

1

d)

Unlimited

24.

Which of the following would NOT be a valid entry in a .dockerignore file?

a)

A file name like secrets.txt.

b)

A folder path like node_modules/.

c)

A wildcard pattern like *.log.

d)

A command like RUN apt-get update.

25.

What is the role of the services section in a Docker Compose file?

a)

It defines all the cloud services settings that Docker will use.

b)

It specifies the containers that should run in the application

c)

It configures the volume mounts for the containers.

d)

It defines environment variables for the containers.

26.

In a Docker Compose file, how do you specify the image for a service?

a)

Under the container field

b)

Under the img field

c)

Under the image field

d)

Under the services field

27.

Where can you find the initial admin password for Jenkins after installing it?

a)

In a file called secrets/initialAdminPassword inside the Jenkins home directory.

b)

In the config.xml file of Jenkins.

c)

In a log file located at /var/log/jenkins/jenkins.log.

d)

In the Jenkins UI under the "Admin Settings" section.

28.

What is the purpose of the "Build Triggers" section in Jenkins?

a)

Configuring the post-build actions

b)

Triggering a notification after a build completes

c)

Defining when a build should be triggered automatically

d)

Managing the versioning of builds

29.

Which option would you select in Jenkins to trigger the current project after another project completes a successful build?

a)

"Build periodically"

b)

"GitHub hook trigger for GITScm polling"

c)

"Trigger for upstream projects"

d)

"Build after other projects are built"

30.

What is a "stage" in a Jenkins pipeline?

a)

A group of steps within the pipeline that perform a specific function, such as build or test

b)

A notification action for completed builds

c)

A command to trigger the Jenkins build

d)

A container for all Jenkins jobs

31.

What is the purpose of a .dockerignore file in a Docker context?

a)

To list all the Dockerfiles in a project.

b)

To configure runtime settings for Docker containers.

c)

To exclude files and directories from the Docker build context, improving build efficiency.

d)

To specify the images that should not be pushed to Docker Hub.

32.

Where should the .dockerignore file be placed in a project?

a)

In the same directory as the Dockerfile.

b)

In the user's home directory.

c)

In the /etc/docker folder.

d)

Inside the container's root directory.

33.

How would you pull a specific version of an image from Docker Hub, such as nginx:1.19?

a)

docker pull nginx:v1.19

b)

docker pull nginx

c)

docker pull nginx:1.19

d)

docker pull nginx:latest

34.

What happens if you do not specify a tag when pulling a Docker image?

a)

Docker will pull the first available image.

b)

Docker will pull the image without any version.

c)

Docker will pull the image with the latest tag by default.

d)

Docker will throw an error.

35.

Which of the following defines how to link services together in Docker Compose?

a)

links

b)

volumes

c)

network

d)

depends_on

36.

What happens when you run “docker pull ubuntu”?

a)

Pulls the latest Ubuntu image from Docker Hub

b)

Installs Ubuntu on the host system

c)

Clones the Ubuntu GitHub repository

d)

Creates a new Ubuntu container

37.

What is required to push an image to Docker Hub?

a)

An active Docker subscription

b)

A specific license for the image

c)

Admin privileges on the host

d)

A Docker Hub account

38.

What is AWS Cloud9 instance?

a)

A virtual machine service for hosting web applications.

b)

A cloud-based integrated development environment (IDE) that allows you to write, run, and debug code.

c)

A cloud-based database management system.

d)

A service for deploying containerized applications.

39.

What are the main components of an AWS CodePipeline pipeline?

a)

Code, Compile, Run

b)

Input, Process, Output

c)

Clone, Test, Release

d)

Build, Test, Deploy

40.

How do you expose a port from a container to the host in a Docker Compose file?

a)

By specifying the port field under the service

b)

By using the expose field

c)

By setting the network field

d)

By mapping ports using the ports field

41.

What happens if a .dockerignore file is not included in a project?

a)

Docker will generate a default .dockerignore file automatically.

b)

The build will skip the ignored files by default.

c)

Docker will fail to build the image.

d)

All files in the build context will be included, potentially increasing the build time and image size.

42.

Which file format is commonly used to define the configuration of a pipeline in AWS CodePipeline?

a)

XML

b)

TXT

c)

JSON

d)

CSV

43.

What does the HTTPS (GRC) connectivity option in CodeCommit allow you to do?

a)

Connect to CodeCommit repositories using SSH keys.

b)

Automatically clone repositories to AWS Lambda.

c)

Encrypt repository data at rest.

d)

Connect to CodeCommit repositories over HTTPS with a credential helper.

44.

How does Ansible connect to remote hosts by default?

a)

HTTP

b)

FTP

c)

SSH

d)

Telnet

45.

How does the .dockerignore file improve Docker builds?

a)

By excluding unnecessary files from the build, reducing transfer time and improving performance.

b)

By prioritizing specific files for the Docker build process.

c)

By caching frequently used files for faster builds.

46.

How do you run an interactive shell session inside a running container using docker exec?

a)

docker exec -d -t bash

b)

docker exec bash -i

c)

docker exec -t shell

d)

docker exec -i -t bash

47.

What happens if you run “docker exec ” on a non-existing container?

a)

The command will execute on the host system.

b)

Docker will create a new container.

c)

An error will occur, stating the container does not exist.

d)

The container will automatically start in the background.

48.

What is the purpose of IaC in DevOps?

a)

Automating software development processes

b)

Managing and provisioning computing infrastructure through machine-readable definition files

c)

Optimizing application performance

d)

Automating deployment pipelines in CI/CD using code

49.

Which of these commands is used to stop all services in a Docker Compose application?

a)

docker-compose halt

b)

docker-compose stop

c)

docker-compose down

d)

docker-compose exit

50.

Which AWS service provides managed CI/CD pipelines?

a)

AWS CloudFormation

b)

AWS CodeBuild

c)

AWS CodePipeline

d)

AWS CodeDeploy

51.

Which of the following is not a cloud service for Git?

a)

Jenkins

b)

CodeCommit

c)

GitHub

d)

GitLab

52.

In order to configure your credentials to use for connecting a local repository to that of your GitHub account, which commands you must use? (Select TWO)

a)

git config --global username <user-name>

b)

git config --global user.email <user-email>

c)

git config --global user.pw <user-password>

d)

git config --global user.name <user-name>

53.

What is the inventory file in Ansible used for?

a)

Storing playbooks and tasks that will be executed

b)

Listing the managed hosts and organize them into groups

c)

Configuring Ansible plugins

d)

Tracking changes to playbooks and storing playbook logs

54.

What is the default name of a remote repository on a server?

a)

default

b)

remote

c)

repo

d)

origin

55.

What does the command "git config --list" do?

a)

Lists all available Git repositories.

b)

Lists all branches in the current Git repository.

c)

Lists all Git global variables and settings.

d)

Lists all untracked files in the working directory.

56.

How do you link your local Git repository to a remote GitHub repository?

a)

Use the “git push” command.

b)

Use the “git remote add” command.

c)

Use the “git clone” command.

d)

Use the “git pull” command.

57.

Which command is used to run an Ansible playbook?

a)

ansible-playbook

b)

ansible-run

c)

ansible-execute

d)

ansible-deploy

58.

What is the purpose of a pipeline in CI/CD?

a)

Managing infrastructure resources

b)

Automating code reviews

c)

Visualizing the progress of development tasks

d)

Automating the steps required to deploy software changes.

59.

Which from the following are NOT CI/CD tools? (Select TWO)

a)

GitLab CI/CD

b)

CodeCommit

c)

Jenkins

d)

CloudFormation

e)

GitHub Actions

60.

What are common use cases for Docker containers? (Select TWO)

a)

Application deployment and scaling

b)

Creating isolated development environments

c)

Managing project budgets

d)

Performing automated integration