0% found this document useful (0 votes)
36 views90 pages

Software Engineering Project Management Experiment

Uploaded by

Kashik Sredharan
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)
36 views90 pages

Software Engineering Project Management Experiment

Uploaded by

Kashik Sredharan
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/ 90

Kashik Sredharan

T23 114 Experiment 1

Aim : To understand DevOps: Principles ,


Practices and DevOps Engineer role &
Responsibilities.

Theory :

1. What are the principles of DevOps

DevOps is a set of practices that aims to improve collaboration and


communication between development (Dev) and operations (Ops) teams
in order to deliver high-quality software
more efficiently. The principles of DevOps include:

Collaboration: Encourage collaboration and communication between


development and operations teams. Break down silos and promote a
culture of shared responsibility.
Automation: Automate repetitive tasks to streamline processes and reduce
the likelihood of human error. Automation helps in achieving consistent
and reliable results in software development, testing, and deployment.

Continuous Integration (CI): Integrate code changes frequently into a


shared repository. CI ensures that code changes are tested and
validated automatically, allowing teams to catch and fix issues early in
the development process.

Continuous Delivery (CD): Aim to make the software delivery


process as efficient as possible. Continuous Delivery extends CI by
automatically deploying code changes to production or staging
environments after successful testing.

Infrastructure as Code (IaC): Manage and provision infrastructure using


code, allowing for version control, repeatability, and consistency. IaC
enables the automation of infrastructure deployment and configuration.

Monitoring and Logging: Implement robust monitoring and logging


practices to gain insights into the performance and health of
applications and infrastructure. This helps in identifying and resolving
issues quickly, promoting a proactive approach to system
management.
Feedback Loops: Establish feedback loops at various stages of the
development and operations process. Solicit and act upon feedback from
users, testing, and monitoring to continuously improve the software
development lifecycle.
Microservices Architecture: Design applications as a collection of small,
independent services that can be developed, deployed, and scaled
independently. Microservices promote flexibility, scalability, and ease of
maintenance.

Security as Code: Integrate security practices into the development


process from the beginning. Treat security as an integral part of the
software development lifecycle rather than a separate phase.

Continuous Improvement: Foster a culture of continuous


improvement by regularly assessing processes, identifying areas for
enhancement, and implementing changes. Encourage a mindset of
learning from failures and adapting to evolving technologies and
methodologies.
By adhering to these principles, organizations can create a DevOps culture
that enhances collaboration, accelerates delivery, and improves the overall
quality of software systems.

2. What are the practices of DevOps


DevOps encompasses a variety of practices that aim to improve
collaboration and efficiency throughout the software development
lifecycle. Here are some key practices of DevOps:

Continuous Integration (CI): Developers integrate their code changes


into a shared repository multiple times a day. Each integration triggers
automated builds and tests to ensure that the codebase remains
functional and stable.

Continuous Delivery (CD): Extending CI, continuous delivery involves


automating the deployment process so that any validated code
changes can be released to production or staging environments at
any time. This reduces the time and effort required to push new
features or fixes.
Continuous Deployment: This practice takes continuous delivery a step
further by automatically deploying validated code changes directly to
production without manual intervention. It requires a high level of
confidence in the automated testing and deployment
processes.
Infrastructure as Code (IaC): IaC involves managing and provisioning
infrastructure (such as servers, networks, and databases) through
code. This allows for version control, reproducibility, and automation
of infrastructure changes, promoting consistency and
scalability.
Automated Testing: Implement automated testing at various levels,
including unit tests, integration tests, and end-to-end tests. Automated
testing helps catch defects early in the development process, ensuring the
reliability and quality of the code.
Configuration Management: Use tools to automate the configuration of
infrastructure and environments. This ensures that development,
testing, and production environments are consistent and reduces the
chances of configuration-related issues.

Collaborative Culture: Encourage a culture of collaboration and


shared responsibility between development and operations teams.
Foster effective communication and break down organizational silos to
ensure that everyone is aligned towards common goals.

Monitoring and Logging: Implement robust monitoring and logging


practices to gain insights into the performance, availability, and
security of applications and infrastructure. Monitoring helps detect
issues early, while logging provides valuable data for
troubleshooting and analysis.
Release Orchestration: Coordinate and manage the release of software
changes across different environments. Release orchestration ensures that
updates are deployed smoothly and minimizes the impact on users.

Security Practices: Integrate security into every stage of the software


development lifecycle. Perform regular security assessments, use
secure coding practices, and automate security checks to identify and
address vulnerabilities early.

Version Control: Utilize version control systems to manage and track


changes to the source code. This enables collaboration, rollback to
previous versions, and traceability of code changes.

Cross-Functional Teams: Encourage the formation of cross-functional


teams that include members from development, operations, and other
relevant areas. This promotes a holistic approach to software delivery,
where teams take ownership of end-to-end processes.

By adopting these DevOps practices, organizations can create a more


efficient and collaborative environment that leads to faster, more
reliable, and higher-quality software delivery.

3. What are the responsibilities of a DevOps Engineer


The role of a DevOps engineer is multifaceted, involving a combination of
development, operations, and collaboration skills. The specific
responsibilities can vary depending on the organization and its specific
needs, but generally, DevOps engineers are responsible for:

Collaboration and Communication:Facilitating communication and


collaboration between development and operations teams. Promoting a
culture of shared responsibility and cross- functional teamwork.

Automation: Designing, implementing, and maintaining automated


processes for building, testing, and deploying software. Automating
repetitive tasks to increase efficiency and reduce manual errors.
Continuous Integration (CI): Implementing and managing CI pipelines
to ensure that code changes are integrated and tested frequently.
Configuring and maintaining CI tools for automated builds and tests.

Continuous Delivery and Deployment (CD): Implementing and


managing CD pipelines for the automated delivery and deployment of
applications. Ensuring the reliability and consistency of deployment
processes.
Infrastructure as Code (IaC): Developing and maintaining infrastructure code using
tools like
Terraform, Ansible, or Chef. Automating the provisioning and
configuration of infrastructure to achieve consistency and scalability.
Monitoring and Logging: Setting up and managing monitoring tools to track
the performance and health of applications and infrastructure. Configuring
logging systems to capture and analyze relevant data for troubleshooting
and analysis.

Security Practices: Integrating security into the DevOps process, including


automated security checks. Collaborating with security teams to identify
and address vulnerabilities.
Configuration Management: Automating configuration processes to
maintain consistency across different environments. Managing
configuration changes and ensuring they are tracked and
documented.

Release Management:Coordinating and managing the release of software


changes across different environments. Ensuring that releases are
executed smoothly and with minimal impact on users.

Version Control: Managing and maintaining version control systems to


track and control changes to the source code. Collaborating with
development teams to address versioning and branching strategies.

Cross-Functional Collaboration: Collaborating with development,


operations, and other teams to address the overall software delivery
process. Participating in cross-functional teams to facilitate a holistic
approach to software development.

Capacity Planning and Scalability: Analyzing system performance and


making recommendations for scaling infrastructure. Collaborating with
infrastructure teams to plan for capacity based on current and future
needs
.
DevOps engineers play a crucial role in bridging the gap between
development and operations, automating processes, and fostering a
culture of continuous improvement. Their responsibilities contribute to the
efficient and reliable delivery of high-quality software.

4. What is the role of a DevOps Engineer


The role of a DevOps engineer is to bridge the gap between
development (Dev) and operations (Ops) by advocating for and
implementing practices that improve collaboration, efficiency, and the
overall software delivery process. DevOps engineers typically have a
broad skill set that includes aspects of development, operations, and
automation. Their primary responsibilities may include:

Collaboration and Communication:

Facilitating communication and collaboration between development and


operations teams. Promoting a culture of shared responsibility and
cross-functional teamwork.
Automation:

Designing, implementing, and maintaining automated processes for


building, testing, and deploying software.
Automating repetitive tasks to increase efficiency and reduce manual errors.
Continuous Integration (CI):
Implementing and managing CI pipelines to ensure that code changes are
integrated and tested frequently.
Configuring and maintaining CI tools for automated builds and tests.
Continuous Delivery and Deployment (CD):
Implementing and managing CD pipelines for the automated delivery and
deployment of applications.
Ensuring the reliability and consistency of deployment processes.
Infrastructure as Code (IaC):
Developing and maintaining infrastructure code using tools like
Terraform, Ansible, or Chef. Automating the provisioning and
configuration of infrastructure to achieve consistency and scalability.
Monitoring and Logging:
Setting up and managing monitoring tools to track the
performance and health of applications and infrastructure.
Configuring logging systems to capture and analyze relevant data for troubleshooting
and
analysis.
Security Practices:

Integrating security into the DevOps process, including automated


security checks. Collaborating with security teams to identify and
address vulnerabilities.
Configuration Management:

Automating configuration processes to maintain consistency across


different environments. Managing configuration changes and ensuring
they are tracked and documented.
Release Management:

Coordinating and managing the release of software changes across


different environments. Ensuring that releases are executed smoothly
and with minimal impact on users.
Version Control:

Managing and maintaining version control systems to track and


control changes to the source code.
Collaborating with development teams to address versioning and branching strategies.
Cross-Functional Collaboration:
Collaborating with development, operations, and other teams to address
the overall software delivery process.
Participating in cross-functional teams to facilitate a holistic approach to software
development.
Capacity Planning and Scalability:

Analyzing system performance and making recommendations for


scaling infrastructure. Collaborating with infrastructure teams to plan
for capacity based on current and future needs.
DevOps engineers play a crucial role in the software development lifecycle, ensuring
that
development and operations work together seamlessly to deliver
high-quality software efficiently and reliably. They contribute to the
implementation of DevOps principles and practices within an
organization.
EXP-2

Aim:- To study and implement version control, Install git

Theory:-
Version control is a system that records changes to a file or set of files over
time so
that you can recall specific versions later. For the examples in this book, you
software
will use source code as the files being version controlled, though
in reality
o this you can
with nearly any type of file on a
dcomputer.
The various types of the version control
systems are:
1. Localversion control system
2. Centralized version control system
3. Distributed version control system

1. Local version control system: Local version control system


maintains track of Files within the local system. This
approach is very common and simple. This
Type is also error prone which means the chances of
To accidentally
the wrong filewriting
is
higher.
2]. Centralized version control system: In this approach, all
the changes in the Files tracked unded the centralized server.
The centralized server includes all
the information of versioned files, and list of clients that
check out files from that central place.
This is where Distributed Version Control Systems (DVCSs) step in. In a DVCS (such as Git,
Mercurial or Darcs), clients don’t just check out the latest snapshot of the files; rather,
they fully
mirror the repository, including its full history. Thus, if any server dies, and these
systems were
collaborating via that server, any of the client repositories can be copied back up to the
server to
restore it. Every clone is really a full backup of
all the data.

Installing git:-
Before you start using Git, you have to make it available on
your computer. Even if it’s already installed, it’s probably a
good idea to update to the latest version. You can either
install it as a package or via another installer, or download
the source code and compile it yourself.

Installing on Windows
There are also a few ways to install Git on Windows. The most
official build is available for download on the Git website. Just go
to https://git- scm.com/download/win and the download will
start automatically. Note that this is a project called Git for
Windows, which is separate from Git itself; for more information
on it, go to https://gitforwindows.org.

Installing on macOS
There are several ways to install Git on macOS. The easiest is
probably to install the Xcode Command Line Tools. On
Mavericks (10.9) or above you can do this simply by trying to
run git from the Terminal the very first time.
$ git --version
If you don’t have it installed already, it will prompt you to install it.
If you want a more up to date version, you can also install it via
a binary installer. A macOS Git installer is maintained and
available for download at the Git website, at https://git-
scm.com/download/mac.

Conclusion:-
Thus, we have successfully studied version control and installed git.
Experiment No. 3
AIM:-
To perform various GIT operaons on local and remote repositories using GIT cheat-sheet.

Theory:-
Git add:
Moves changes from the working directory to the staging area. This gives you the
opportunity to prepare a snapshot before comming it to the official history.
Git branch:
This command is your general-purpose branch administraon tool. It lets
you create isolated development environments within a single repository.
Git clone:
Creates a copy of an exisng Git repository. Cloning is the most common way
for developers to obtain a working copy of a central repository.
Git commit:
Takes the staged snapshot and commits it to the project history. Combined with
git add, this defines the basic workflow for all Git users.
git config:
A convenient way to set configuraon opons for your Git installaon. You’ll
typically only need to use this immediately aer installing Git on a new
development machine.
git init:
Inializes a new Git repository. If you want to place a project under revision
control, this is the first command you need to learn.
git pull:
Pulling is the automated version of git fetch. It downloads a branch from a remote
repository, then immediately merges it into the current branch. This is the Git
equivalent of svn update.
git push:
Pushing is the opposite of fetching (with a few caveats). It lets you move a
local branch to another repository, which serves as a convenient way to
publish contribuons. This is like svn commit, but it sends a series of commits
instead of a single changeset.
git status:
Displays the state of the working directory and the staged snapshot. You’ll want
to run this in conjuncon with git add and git commit to see exactly what’s being
included in the next snapshot.
Commands
Conclusion :
We have successfully implemented Git Commands.
Experiment-4

AIM: To understand continuous integration, install and


configure jenkins with maven/and/gradle to setup a build
job.

Theory:

Jenkins is an open source automation tool written in Java with


plugins built for Continuous Integration purpose. Jenkins is used
to build and test your software projects continuously making it
easier for developers to integrate changes to the project, and
making it easier for users to obtain a fresh build. It also allows
you to continuously deliver your software by integrating with a
large number of testing and deployment technologies.

1) Step 1: install jenkins from website


3) Step 3:select the files where jdk 21 is installed
5)Step 5: install the file
6)Step 6: installation is finished

7)Step 7: Go on localHost:8080
T-23 114

8)Step 8: select the options and wait for a few minutes


Kashik
Sredhar
an T-23
9)Step 9: fill the appropriate credentials
Kashik
Sredhar
an T-23
10) Step 10:
Kashik
Sredhar
an T-23
11) Step11:Congratulations!
Youhavecreatedyourjenkins account
Kashik
Sredhar
an T-23
Experiment No-5

Aim: Experiment5:ToBuildthepipelineofjobsusingMaven/Gradle/AntinJenkins,createa
pipeline script to Test and deploy an application over the tomcat server

Programming in Jenkins:
Continuous Integration is a software development practice where members of a
team integrate their work frequently, usually each person integrates at least
daily leading to multiple integrations per day. Each integration is verified by an
automated build (including test) to detect integration errors as quickly as
possible.” In simple way, Continuous integration (CI) is the practice of frequently
building and testing each change done to your code automatically.
Jenkins is a self-contained, open-source automation server which can be used to
automate all sorts of tasks related to building, testing, and delivering or
deploying software.
Our first job will execute the shell commands. The freestyle project provides enough options and
features to build the complex jobs that you will need in your
projects. Example 1

Example 1.1: Deploying a freestyle app in


Jenkins Creating a job:

Naming the job and setting it as freestyle:


Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Selecting build type as “Execute shell”:

Entering a simple command for the shell execution:

Applying and saving the project configuration:

Building the project:


Kashik
Sredhar
an T-23
Console output (after building):

Example 1.2: Taking parameters through


files Contents of script example1.cmd:

Executing script example1.cmd on the terminal:

Modifying the Jenkins project to execute the script while supplying required parameters:
Kashik
Sredhar
an T-23

Console output after building the modified project:


Kashik
Sredhar
an T-23
Example 2
Example 2.1: Running a Java program under
Jenkins Creating a simple Java program:

Compiling and running the program on the terminal:


Kashik
Sredhar
an T-23
Creating a new freestyle project:

Configure new project:

Console output after building:


Kashik
Sredhar
an T-23
Example 3
Example 3.1:
Parameterise build
Creating a new freestyle
project:
Kashik
Sredhar
an T-23
Enabling parameterisation and adding a String parameter:

Configuring the string parameter as Fname:


Kashik
Sredhar
an T-23
Adding a choice parameter and configuring it as City with the following choices:

Creating a script which takes 2 arguments for name and city:

Configuring build steps:

Entering parameters for build:


Kashik
Sredhar
an T-23

Console output after building:

Example 3.2: Running a Java program with


parameters Creating a Java program with an

input argument:
Kashik
Sredhar
an T-23
Testing the program on the terminal:

Creating a new freestyle project:


Kashik
Sredhar
an T-23
Parameterise the project by adding a string parameter as follows:

Configure the build steps:

Entering the parameter for the build:


Kashik
Sredhar
an T-23
Console output after building:
Kashik
Sredhar
an T-23
Example 5
Example 5.1: Running a Python
program Creating a simple Python

script:

Running the Python script on the terminal:


Kashik
Sredhar
an T-23
Creating a new freestyle project:

Parameterising the project with a string parameter as follows:


Kashik
Sredhar
an T-23
Configuring the build steps:

Setting the parameter for the build:

Console output after building:

Conclusion: Thus, we have successfully studied Continuous Integration and


installed, configured, and understood programming with Jenkins.
Kashik
Sredhar
an T-23
Experiment No-5

Aim: Experiment5:ToBuildthepipelineofjobsusingMaven/Gradle/AntinJenkins,createa
pipeline script to Test and deploy an application over the tomcat server

Programming in Jenkins:
Continuous Integration is a software development practice where members of a
team integrate their work frequently, usually each person integrates at least
daily leading to multiple integrations per day. Each integration is verified by an
automated build (including test) to detect integration errors as quickly as
possible.” In simple way, Continuous integration (CI) is the practice of frequently
building and testing each change done to your code automatically.
Jenkins is a self-contained, open-source automation server which can be used to
automate all sorts of tasks related to building, testing, and delivering or
deploying software.
Our first job will execute the shell commands. The freestyle project provides enough options and
features to build the complex jobs that you will need in your
projects. Example 1

Example 1.1: Deploying a freestyle app in


Jenkins Creating a job:

Naming the job and setting it as freestyle:


Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Selecting build type as “Execute shell”:

Entering a simple command for the shell execution:

Applying and saving the project configuration:

Building the project:


Kashik
Sredhar
an T-23
Console output (after building):

Example 1.2: Taking parameters through


files Contents of script example1.cmd:

Executing script example1.cmd on the terminal:

Modifying the Jenkins project to execute the script while supplying required parameters:
Kashik
Sredhar
an T-23

Console output after building the modified project:


Kashik
Sredhar
an T-23
Example 2
Example 2.1: Running a Java program under
Jenkins Creating a simple Java program:

Compiling and running the program on the terminal:


Kashik
Sredhar
an T-23
Creating a new freestyle project:

Configure new project:

Console output after building:


Kashik
Sredhar
an T-23
Example 3
Example 3.1:
Parameterise build
Creating a new freestyle
project:
Kashik
Sredhar
an T-23
Enabling parameterisation and adding a String parameter:

Configuring the string parameter as Fname:


Kashik
Sredhar
an T-23
Adding a choice parameter and configuring it as City with the following choices:

Creating a script which takes 2 arguments for name and city:

Configuring build steps:

Entering parameters for build:


Kashik
Sredhar
an T-23

Console output after building:

Example 3.2: Running a Java program with


parameters Creating a Java program with an

input argument:
Kashik
Sredhar
an T-23
Testing the program on the terminal:

Creating a new freestyle project:


Kashik
Sredhar
an T-23
Parameterise the project by adding a string parameter as follows:

Configure the build steps:

Entering the parameter for the build:


Kashik
Sredhar
an T-23
Console output after building:
Kashik
Sredhar
an T-23
Example 5
Example 5.1: Running a Python
program Creating a simple Python

script:

Running the Python script on the terminal:


Kashik
Sredhar
an T-23
Creating a new freestyle project:

Parameterising the project with a string parameter as follows:


Kashik
Sredhar
an T-23
Configuring the build steps:

Setting the parameter for the build:

Console output after building:

Conclusion: Thus, we have successfully studied Continuous Integration and


installed, configured, and understood programming with Jenkins.
Kashik
Sredhar
an T-23
Experiment 7

AIM: To Create Scrum Board for Scrum Master using JIRA Tool.

Theory:

To create a Scrum Board for a Scrum Master using the JIRA tool,
you need to follow these steps:
Create a Scrum Project in JIRA:
Log in to your JIRA account and select a template from the library,
choosing the Scrum template.
Once the project is created, you will land on the empty backlog,
also known as the product backlog, containing a list of potential
work items for the project

Create User Stories or Tasks in the Backlog:


In JIRA, work items like user stories, tasks, and bugs are referred to as
"issues." Create user stories using the quick create option on the
backlog.
User stories describe work items in a non-technical language from a
user's perspective, following the format: "As a {type of user}, I want
{goal} so that I {receive benefit}"

Prioritize User Stories in the Backlog:


After creating user stories, prioritize them by ranking or dragging and
dropping them in the order they should be worked on.
The product owner usually prioritizes user stories, and the development
team estimates the effort required to complete each story

Create a Scrum Board in JIRA:


Click on Search > View all boards and then Create board.
Select the board type as Scrum and choose whether to start with a new
project template or add the board to existing projects.
Configure columns and quick filters to reflect your team's process and
focus on specific issues quickly

Navigate Between Boards:


Use the board switcher located in the left-hand menu under the project
name to move between different boards in JIRA

By following these steps, a Scrum Master can effectively create a Scrum


Board in JIRA, enabling efficient management of tasks, user stories, and
sprints within the agile project management framework.
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
Experiment No.8

AIM: To Study Project Scheduling Using Gantt chart in Click Up.

Theory:

Project Scheduling:

A project schedule is a timeline that outlines the tasks, milestones, deadlines,


and resources required for completing a project. It helps project managers
organise and plan the sequence of activities, allocate resources efficiently, set
realistic timelines, and monitor progress. Having a clear project schedule is
crucial for a project manager as it ensures tasks are completed on time, helps
in managing resources effectively, allows for better coordination among team
members, and assists in identifying potential issues or delays, enabling timely
adjustments to keep the project on track.

Gantt chart:
A Gantt chart, commonly used in project management, is one of the most
popular and useful ways of showing activities (tasks or events) displayed
against time. On the left of the chart is a list of the activities and along the top
is a suitable time scale. Each activity is represented by a bar; the position and
length of the bar reflects the start date, duration and end date of the activity.

About the topic:

It is a Logistic regression Model designed on Agricultural decision making


based on soil characteristics and various other environmental factors. Our
dataset Encompasses of essential parameters such as soil composition
(Nitrogen, potassium and phosphorus contents of the soil as well as the pH
level of the soil) and location specific variables such as temperature, humidity
and rainfall. Our model leverages these inputs and aims to predicts the most
suitable crop for a given soil and environmental conditions
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23

Conclusion: Hence, we have successfully implemented Gantt chart in clickup.


Kashik
Sredhar
an T-23
Experiment 9
Aim
:
To understand Docker Architecture and Container Life Cycle, install
Docker and execute docker commands to manage images and
interact with containers.

Theory:

Docker is a popular platform that enables developers to build, package,


and deploy applications as lightweight, portable, and self-sufficient
containers. These containers encapsulate all the necessary dependencies
and libraries required for an application to run, ensuring consistency
across different environments. Here is a theoretical overview of

Docker:
Containerization:
Docker utilizes containerization technology to create isolated environments
for applications. Containers are lightweight, standalone, and executable
packages that include everything needed to run an application, such as
code, runtime, system tools, libraries, and settings.
This isolation ensures that applications run consistently across different
environments, from development to production.

Docker Engine:
At the core of Docker is the Docker Engine, which is responsible for
building, running, and managing containers. It consists of the Docker
daemon, which manages containers, images, networks, and volumes, and
the Docker client, which allows users to interact with the daemon through
the Docker API.

Docker Images:
Docker images are read-only templates used to create containers.
They contain the application code, runtime, libraries, dependencies,
and other files needed to run the application. Images are built using
Dockerfiles, which are text files that define the steps needed to create
the image.

Docker Containers:
Containers are instances of Docker images that are running as isolated
processes on a host machine. They are lightweight, portable, and can be
easily started, stopped, moved, and deleted. Containers provide a
consistent environment for applications to run, regardless of the
underlying infrastructure.

Benefits of Docker:

Portabilit
y: Docker containers can run on any platform that supports Docker, making it
easy
to deploy applications across different environments.
Kashik
Sredhar
E foT-23
Can f ni ct iaei n ceyr s: share the host OS kernel, reducing
overhead and improving resource utilization.
Kashik
Sredhar
an T-23
Isolation: Containers provide a level of isolation that helps prevent
conflicts between applications and dependencies.
Scalability: Docker enables easy scaling of applications by quickly
spinning up additional containers.
Consistency: Docker ensures that applications run the same way in
development, testing, and production environments.

Outputs:

Docker Run command (run an image, install if missing):

Docker Pull command (Pull a repository):

Docker PS command:

Docker Stop command (stop container):

Docker Start command (start container):

Docker RM command (remove container):

Docker Images command (list images):


Kashik
Sredhar
an T-23

Docker RMI command (remove image):

Docker exec command (Run commands within Docker):

Docker Ports (Port mapping):


Kashik
Sredhar
an T-23

Exp 10
Aim : To learn Dockerfile instructions, build an image for a sample web
application using DOCKERFILE.

Theory:
Kashik
Sredhar
an T-23
The RUN instruction executes commands within the container during the
image-building process. In the context of the Node.js web application, this
instruction is used to install application dependencies with the npm
package manager. The result is a containerized environment with all the
required dependencies for the application to run.
EXPOSE Instruction:
While the EXPOSE instruction does not publish ports, it documents the ports on
which the application inside the container will listen. In the example, port 8080 is
specified, offering clarity to users on the expected port for accessing the web
application.
CMD Instruction:
The CMD instruction defines the default command to execute when the container
starts. In this instance, it is configured to run the npm start command, assuming
the presence of a corresponding script in the package.json file. This ensures the
seamless initiation of the web application within the container.
Kashik
Sredhar
an T-23
Kashik
Sredhar
an T-23
114

Conclusion:
This theoretical exploration elucidates the core Dockerfile instructions essential
for crafting Docker images tailored for web applications. By understanding the
purpose and functionality of each instruction, users gain insights into optimizing
Dockerfiles to meet the specific requirements of their applications, fostering
efficient containerization practices.
G Learning
Great

CERTIFICATE OF COMPLETION
Presented to

Keval Gosrani
For successfully completing a free online course
Project Management

Pro,idedby
Great Learning Academy
(O.i'<ri2024)

GGreat
Leairning

CERTIFICATE OF COMPLETION
Presented to

Keval Gosrani
For successfully completing a free online course
Agiile for Beginners

Provid9d t>y

Great Learning Academy


(OnAll<i202-t)
GLearning
Great

CERTIFICATE OF COMPLETION
Presented to

Keval Gosrani
For successfully completing a free online course
Waterfall Model

Provided t>y
Gr,eat Learning, Academy
(On Aa<l 202◄)

You might also like