0% found this document useful (0 votes)
32 views5 pages

Devops Notes

The document provides an overview of key concepts in DevOps, focusing on Docker, CI/CD pipelines, and Jenkins. It explains Docker's role in creating and managing containers, the importance of CI/CD in software development, and the functionalities of Jenkins as a continuous integration server. Additionally, it includes details on Docker commands, the build stage, version control, and how to manage Jenkins jobs and credentials.

Uploaded by

Ashok Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views5 pages

Devops Notes

The document provides an overview of key concepts in DevOps, focusing on Docker, CI/CD pipelines, and Jenkins. It explains Docker's role in creating and managing containers, the importance of CI/CD in software development, and the functionalities of Jenkins as a continuous integration server. Additionally, it includes details on Docker commands, the build stage, version control, and how to manage Jenkins jobs and credentials.

Uploaded by

Ashok Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

DEVOPS FAQ NOTES

1. What is Docker, its working and docker command?


• Docker is an open-source software platform used to create, deploy and manage
virtualized application containers on a common operating system.
• Working: Containers are lightweight, portable environments that package
everything needed to run software, including code, libraries, and dependencies.
• Docker uses containerization to ensure consistency across different computing
environments, making it easier to build, deploy, and manage applications.
• Using Docker commands, we can create, run, stop, remove, and manage
Docker containers easily.

2. What is a CI/CD Pipeline and what are some popular CI/CD tools?
• CI and CD stand for continuous integration and continuous
delivery/continuous deployment.
• A CI/CD pipeline is a series of automated steps that help software teams
build, test, and deploy code, and is a key part of the DevOps methodology.
• Jenkins, Bamboo, CirlceCI, GitLab, TravisCI, Buddy, TeamCity, etc.

3. What is Docker Image and why do we have to build docker image.


• A Docker image is a file used to execute code in a Docker container. Docker
images act as a set of instructions to build a Docker container, such as a
template. Docker images also act as the starting point when using Docker.
• Whenever you are creating an image, you are using Docker Build. Build is a
key part of your software development life cycle allowing you to package and
bundle your code and ship it anywhere.

4. How dockers convert into an image.


There are two ways to convert something into a Docker image:
From a Dockerfile, create a Docker image from a Dockerfile by following these
steps:
• Create a working directory
• Choose a base image
• Create a Dockerfile
• Add build instructions to the Dockerfile
• Build the image using the docker build command
• Verify the image
• Run the image
• Access the application
From a container, create a Docker image from a container by following these
steps:
• Create a running container
• Save the container as an image using the docker commit command
• Tag the image

5. What is container in docker.


A Docker container is a lightweight, portable, executable package of software that
contains everything needed to run an application. When creating a container, the
Docker daemon creates a writeable container layer over the specified image and
prepares it for running the specified command.
USES: Portable, Lightweight, Secure, Reusable, Isolated, Trackable, etc.

6. What is the Build Stage?


The build stage is a critical step in the continuous integration and continuous
delivery (CI/CD) pipeline that transforms source code into a deployable artifact.
This stage is important because it: Compiles and assembles code, Checks code,
manages dependencies, integrates with testing, Enhances code quality.

7. What Does Containerization Mean?


Containerization is a software deployment process that bundles an application's
code with all the files and libraries it needs to run on any infrastructure.

8. What is Version Control?


• Version control is a software practice that tracks and manages changes to
files and code over time. It's also known as source control.
• It helps our team by: Tracking changes, Enabling collaboration, Improving
code quality, Accelerating development.

9. What is a Git Repository?

A Git repository is a virtual storage space for your project's files and code, and
it's a core part of the Git version control system. It's where you can:

o Save versions of your code


o Track changes
o Collaborate.
o Share code
o Roll back to the previous version.

10. What is Jenkins?


Jenkins is a popular DevOps tool that can be used as a continuous integration (CI)
server.
It is a self-contained, open-source automation server that helps automate tasks
related to software development:
o Building: Jenkins can help with building software.
o Testing: Jenkins can help with automated testing.
o Deploying: Jenkins can help with deploying software.
o Documentation: Jenkins can help with documentation.
o Packaging: Jenkins can help with packaging.
o Static code analysis: Jenkins can help with static code analysis.

11. Jenkins Pipeline


• A Jenkins pipeline includes all the tools you need to testing, merging,
packaging, shipping, and code deployment. A pipeline is typically divided into
multiple stages and steps, with each step representing a single task and each
stage grouping together similar steps.
• It is a combination of plugins that support the integration and
implementation of continuous delivery pipelines using Jenkins.

12. Docker Commands and What They Do


Some Docker commands are:
• docker images: Docker images will list all the images which are pulled or
build in that docker host.
• docker pull: Docker pull will the docker images from the dockerhub.
• docker run: Docker run will run the docker image as a container.
• docker build : It will build Docker images by using the Dockerfile.
• docker pull : Docker pull command will pull the Docker image whcih is
avalible in the dockerhub.
• docker rmi : It will remove the docker image.
• docker exec : To execute the commands in the running containers.

13. How Will You Remove a Docker Image? What is the Command?
To delete a Docker image, use the docker rmi command and pass the ID of the
image you want to remove.

14. How to Schedule Jenkins Build Periodically (Hourly, Daily, Weekly)?


To set periodically scheduled Jenkins jobs you should use Configure - Build Triggers -
Build periodically - Schedule.

Jenkins build periodically - examples

• Build every hour:


H * * * *
• Build every 20 minutes:
H/20 * * * *
• Build every 20 minutes 5am to 11pm:
H/20 5-23 * * *
• Build every 20 minutes, work time/days (8am-6pm, MON-FRI) only:
H/20 8-18 * * 1-5

15. Credential flow in jenkins.

To use credentials in Jenkins, you can configure credentials and call them in the
Pipeline. Here's how to add credentials to Jenkins:

• Log in to Jenkins as a user with the Credentials > Create permission


• Click Manage Jenkins > Manage Credentials
• Click Jenkins under Stores scoped to Jenkins
• Click Global credentials (unrestricted) under System
• Click Add Credentials
• Select the credential type from the Kind field
• Add the credentials in the appropriate fields
• Specify a credential ID
• Add a description for the credentials
• Click OK to save the credentials.
OTHER IMP QUESTIONS:
1. Docker integration
2. How Long Should a Build Take?
3. Where are docker images stored?
4. How to do deploy application
5. Docker expose
6. How to create a docker file and everytime we create docker file for up the server
7. Merge Docker files in linux and write the command(linux)
8. What kind of issue did you face while deploying Jenkins?
9. How to Connect git in jenkins
10. Any other way to deploy your project in jenkins other than script pipeline?

You might also like