0% found this document useful (0 votes)
2 views7 pages

Devops - Assignment

The document is an assignment discussing DevOps, its benefits, and its importance in software development, alongside comparisons of cloud services AWS, GCP, and Azure. It covers Version Control Systems, specifically Git and GitHub, and details Maven and Gradle tools, including their usage in DevOps workflows. Additionally, it explains Jenkins, its architecture, installation steps, job configuration, and commonly used plugins.

Uploaded by

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

Devops - Assignment

The document is an assignment discussing DevOps, its benefits, and its importance in software development, alongside comparisons of cloud services AWS, GCP, and Azure. It covers Version Control Systems, specifically Git and GitHub, and details Maven and Gradle tools, including their usage in DevOps workflows. Additionally, it explains Jenkins, its architecture, installation steps, job configuration, and commonly used plugins.

Uploaded by

clevercrap
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

22CS090

ASSIGNMENT – 1

1. Define DevOps. Explain its benefits and why it's essential in modern software development.

DevOps is a set of practices that combines software development (Dev) and IT operations (Ops)
to shorten the development lifecycle and deliver high-quality software continuously. It promotes
collaboration between teams, automation of processes, and continuous monitoring.
Benefits:

 Faster Delivery: Enables quicker release cycles.

 Improved Collaboration: Breaks down silos between development and operations teams.

 Higher Quality: Automated testing and monitoring improve product reliability.

 Scalability: Facilitates scaling of infrastructure and processes.

 Continuous Feedback: Improves customer satisfaction through rapid updates.

Importance: In modern software development, DevOps ensures faster innovation, quick bug
fixes, and the ability to adapt rapidly to market changes.

2. Give a brief comparison between AWS, GCP, and Azure – focus on key features, pricing,

and services.

Feature AWS GCP Azure


Key Features Most services & tools Best for data & AI Best for hybrid cloud

Key Services EC2, S3, Lambda, RDS Compute Engine, VMs, Azure SQL, Functions
BigQuery, AI tools
Pricing Flexible pay-per-use Low cost with long-use Pay-per-use + enterprise
savings deals
Global Reach Widest global coverage Growing worldwide Strong in enterprise markets
3. What is a Version Control System?

A Version Control System is a tool that helps track and manage changes to files over time. It
lets multiple people work on the same project, see who made changes, go back to earlier
versions, and work on different branches of code.

Examples: Git, SVN, Mercurial.

4. Explain the difference between Git and GitHub.

Feature Git GitHub

Definition A tool to track and manage code changes A website to store and share Git
projects

Main role Keeps history of edits, works locally or Adds cloud storage, teamwork tools,
with servers and easy UI

Usage Works offline or online Needs internet for sharing and


teamwork

Owner Open-source, community-driven Owned by Microsoft

5. Write the purpose of any five basic Git commands (e.g., git init, git add, git commit, git push,

git pull, git clone)

 git init – Creates a new Git repository in the current directory.


 git add – to permanently record the staged changes in your local Git repository.
 git commit – Used to record changes to the repository.
 git push – Used in Git to upload local repository content to a remote repository.
 git pull – Used to fetch and integrate changes from a remote repository into your current
local working branch.

6. What is Maven? Explain its use in DevOps workflows.

Maven is an open-source project management and build automation tool developed by the
Apache Software Foundation that primarily used for Java projects. It uses a Project Object
Model (POM) file to manage dependencies, build processes, and plugins.
Use in DevOps: Maven automates builds, integrates with CI/CD tools like Jenkins, manages
dependencies, and ensures consistency across environments.
7. Describe a POM file with a basic example and explain its key sections.

A POM file (Project Object Model) in Maven is an XML file named [Link] that defines a
Java project’s configuration. It manages project details, dependencies, build settings, and
plugins in a standardized way.

Basic Example:

<project xmlns="[Link]

xmlns:xsi="[Link]

xsi:schemaLocation="[Link]

[Link]

<modelVersion>4.0.0</modelVersion>

<groupId>[Link]</groupId>

<artifactId>my-app</artifactId>

<version>1.0</version>

</project>

Key Sections:

 </project> – The root element of the POM file with XML namespace info.

 <artifactId> – The unique name of the project or module.

 <version> – The current version of the project artifact

 <modelVersion> – Specifies POM model version, typically 4.0.0.

 <groupId> – Identifies the project’s group or organization, usually a domain-like structure.

8. List and explain the Maven build lifecycle and its phases.

Maven follows a set of three main build lifecycles, each made up of phases that run in a
specific order. Running a certain phase will also run all phases before it.
Default Lifecycle – Builds and deploys the project

 validate – Make sure the project’s structure and info are correct.
 compile – Turn the source code into bytecode (e.g., .class files).
 test – Run automated unit tests on the compiled code.
 package – Bundle the code into a deliverable format (like JAR or WAR).
 verify – Check that the package meets quality and requirements.
 install – Put the package into the local Maven repo for use in other local projects.
 deploy – Upload the final package to a remote repo for sharing.

Clean Lifecycle – Removes old build files

 clean – Deletes generated files (usually from the target folder) to prepare for a fresh
build.

Site Lifecycle – Generates project documentation

 pre-site – Run tasks before documentation is created.


 site – Generate the project’s documentation and site content.
 post-site – Finalize the generated site.
 site-deploy – Publish the site to a web server or repository.
 deploy – Upload the final package to a remote repo for sharing.

9. Describe Maven repositories – differentiate between local, central, and remote.

Maven Repositories

 A Maven repository is a storage location where Maven keeps project libraries, plugins,
and build artifacts.

Types:

 Local Repository – Located on your computer; stores downloaded dependencies for


reuse in future builds.
 Central Repository – Public repository maintained by Apache; contains most
commonly used open-source libraries.
 Remote Repository – Private or custom repository, usually hosted by organizations, for
internal or non-public dependencies.
10. What are Maven plugins? Name and describe at least 2.

Plugins extend Maven functionality.

 maven-assembly-plugin: Creates custom archives (ZIP, TAR).

 maven-failsafe-plugin: Runs integration tests often after the main unit phase.

11. Define Gradle. How is it different from Maven?

Open-source build tool using Groovy/Kotlin scripts; fast, flexible, supports many languages.
Gradle vs Maven:

Language: Gradle uses Groovy/Kotlin, Maven uses XML Speed:

Gradle faster (incremental builds, caching) Flexibility: Gradle

more customizable

Support: Gradle supports many languages, Maven mainly Java

12. Mention steps to install Gradle and describe one sample Gradle build.

Steps to Install Gradle:

 Download the latest Gradle ZIP from the official Gradle website.
 Extract the ZIP file to a directory of your choice (e.g., C:\Gradle).
 Set the GRADLE_HOME environment variable to the extracted folder path.
 Add %GRADLE_HOME%\bin to your system PATH variable.
 Open a terminal or command prompt and verify installation by running: gradle -v

Sample [Link]:

plugins

{ id

'java'

repositories {

mavenCentral()

dependencies {
testImplementation 'junit:junit:4.13.2'

13. What is Jenkins? What role does it play in Continuous Integration (CI)?

 An open-source automation server for building, testing, and deploying software.


 Role in CI: Automatically integrates code changes, runs builds/tests, and gives quick
feedback.

14. Describe the Jenkins Architecture using a labeled diagram.

Components:

 Master: Controls pipelines, schedules jobs, and manages plugins.

 Agents/Slaves: Execute build jobs on different platforms.

 Web Interface: For job configuration and monitoring.

15. How do you install Jenkins? Mention key steps.

 Install Java JDK (required for Jenkins to run).


 Download Jenkins WAR file or installer package from the official site.
 Start Jenkins (java -jar [Link]).
 Open [Link] in a browser.
 Unlock Jenkins using the admin password from the log file.
 Install recommended plugins.
 Create an admin user and start using Jenkins.
16. Describe how to create and configure a basic Jenkins job.

 Open the Jenkins dashboard and click New Item.


 Enter a name for the job and select Freestyle project, then click OK.
 In Source Code Management, select your version control system (e.g., Git) and enter the
repository URL along with credentials if needed.
 Scroll down to the Build section, click Add build step, and add the command or tool to
run the build (e.g., mvn clean install for Maven).
 Click Save, then click Build Now to trigger the build manually.

17. What are Jenkins plugins?

Jenkins plugins are small software extensions that add extra features, tools, or integrations to
Jenkins. They enhance Jenkins by enabling it to connect with other tools, automate tasks, and
customize functionality to fit specific needs.

18. List and explain any three commonly used Jenkins plugins such as:

● Git Plugin

● Parameter Plugin

● HTML Publisher

● Copy Artifact

● Extended Choice Parameters

Answer:

 Copy Artifact: Copies build artifacts from another job.


 Extended Choice Parameters: Adds advanced parameter types like checkboxes and
multi-select.
 HTML Publisher: Publishes HTML reports.

You might also like