DevOps Assignment 01
Q1. Briefly explain DevOps Ecosystem.
Ans :- The DevOps Ecosystem is a set of tools, practices, and cultural philosophies that enable seamless
collaboration between development and operations teams to deliver software faster and more reliably.
It aims to automate processes, improve efficiency, and ensure continuous integration and continuous
delivery (CI/CD).
Key components include:
Version Control Systems (e.g., Git): Track code changes and facilitate collaboration.
CI/CD Pipelines (e.g., Jenkins, GitLab CI): Automate testing and deployment.
Configuration Management (e.g., Ansible, Puppet): Automate infrastructure setup.
Containerization (e.g., Docker): Ensure consistency across environments.
Monitoring Tools (e.g., Prometheus, Grafana): Track system performance and health.
Q2. What does it mean to shift left in DevOps?
Ans:- shifting left refers to the practice of moving tasks, such as testing, security checks, and
quality assurance, earlier in the software development lifecycle. Traditionally, these tasks occur
later, closer to deployment, but shifting them to earlier stages (i.e., to the "left" on a timeline)
helps detect and address issues sooner.
Key benefits of shifting left:
Faster feedback: Issues are identified and resolved early, reducing delays.
Improved quality: Early testing and checks lead to higher-quality code.
Cost efficiency: Fixing problems earlier is less costly than after deployment.
Collaboration: Development and operations teams work more closely from the start.
Q3. List out and discuss- (2)
a. Any 5 DevOps Tools.
b. Any two popular Java development frameworks for creating microservices.
Ans:-
Five DevOps Tools:
1. Jenkins :- Automates building, testing, and deploying code with seamless integration
of plugins for CI/CD workflows.
2. Docker: Packages applications into containers, ensuring consistency across
environments for scalable, portable deployments
3. Kubernetes: Orchestrates containerized applications, managing deployment, scaling,
and fault tolerance across clusters.
4. Ansible: Automates provisioning, configuration management, and deployments using
simple, human-readable YAML scripts.
5. Prometheus: Monitors systems and services, collecting metrics and sending real-time
alerts for proactive issue detection.
B) Two Popular Java Development Frameworks for Creating Microservices:
Spring Boot: Simplifies Java microservices development with autoconfiguration, embedded
servers, and seamless Spring ecosystem integration.
Micronaut: Optimized for fast, lightweight microservices, reducing memory usage and
startup time with ahead-of-time (AOT) compilation.
Q4 Explain the following- (4)
a. What is Jenkins and CI/CD
b. What are the software prerequisites that must be met before Jenkins is installed?
c. Name three security mechanisms Jenkins uses to authenticate users.
Ans :-
a. jenkins: An open-source automation server that supports Continuous Integration (CI) and
Continuous Delivery/Deployment (CD) by automating the build, test, and deployment process,
enhancing software development speed and quality.
CI/CD: Continuous Integration automates code integration and testing, while Continuous
Delivery ensures the code is always ready for deployment. Continuous Deployment goes a step
further by automatically pushing changes to production after passing all tests.
b. Software Prerequisites for Jenkins Installation:
1. Java Development Kit (JDK): Jenkins requires a Java runtime environment to function.
A version of JDK 8 or newer is required.
2. Operating System: Jenkins runs on platforms such as Windows, macOS, or Linux.
3. Web Browser: Since Jenkins has a web interface, it requires modern web browsers like
Chrome, Firefox, or Edge to access and manage it.
c. Three Security Mechanisms Jenkins Uses to Authenticate Users:
1. LDAP Integration: Jenkins can authenticate users against an LDAP (Lightweight
Directory Access Protocol) server, allowing organizations to use existing centralized user
directories.
2. OAuth or Single Sign-On (SSO): Jenkins supports authentication through OAuth
providers like Google, GitHub, or corporate SSO mechanisms, making user management
easier and more secure.
3. Jenkins Own User Database: Jenkins also has a built-in user database where you can
create and manage users directly within Jenkins, along with role-based access control for
security
Q5.) Design the following:- (5
a. DevOps workflow
b. Git workflow
c. Jenkins workflow, architecture
Architecture of jenkins
d. LVCS, CVCS, DVCS
Lvcs
Cvcs
Dvcs
e. Git 3- stage architecture
Write the commands to perform following functions- (5)
a. To check the remote server (upstream and downstream):
Command: git remote -v
b. To display default remote branch/branches:
List remote branches: git branch -r
Show default (tracking) branch: git remote show origin
c. To create Git tags:
Create a lightweight tag: git tag <tag_name>
Create an annotated tag: git tag -a <tag_name> -m "Tag message"
d. To switch from one location to another (scenario-based):
Switch to another branch: git checkout <branch_name>
Switch to another commit: git checkout <commit_hash>
e. Git Commands Categories:
i. Undoing Changes:
Unstage a file: git reset <file>
Undo last commit (keep changes in working directory): git reset --soft HEAD^
Discard local changes in a file: git checkout -- <file>
ii. Inspecting Changes:
Check changes not staged for commit: git diff
Check changes staged for commit: git diff --staged
Show commit history: git log
iii. Collaborating Changes:
Fetch latest changes from the remote repository: git fetch
Push changes to the remote repository: git push
Pull and merge changes from the remote repository: git pull