DevOps is a term used to refer to a set of practices that emphasize the collaboration and communication of both software developers and information (IT) professionals while automating the process of software delivery and infrastructure changes.
DevOps in itself is not a tool, but the combination of cultural philosophies, practices, and tools that increase an organization’s ability to deliver applications and services faster against traditional software development and infrastructure management processes.
Learn more about:
What is DevOps?
» How to adopt a DevOps Model?
» DevOps Practices.
» Benefits of DevOps.
» DevOps Tools deep dive.
» Continuous Integration/Deployment, Monitoring, Logging, and Testing.
» AWS DevOps.
» Putting it all together.
Testing tools and AI - ideas what to try with some tool examples
A Brief About DevOps and its Practices
1. A Brief About DevOps and its Practices
We manage learning.
“Building an Innovative Learning Organization. A Framework to Build a Smarter
Workforce, Adapt to Change, and Drive Growth”. Download now!
5. DevOps:Terms
DevOps (development and operations) is an enterprise software development phrase used to mean a type of agile
relationship between Development and IT Operations.
The goal of DevOps is to change and improve the relationship by advocating better communication and collaboration
between the two business units.
Continuous delivery (CD) is a software engineering approach in which teams produce software in short cycles, ensuring
that the software can be reliably released at any time. It aims at building, testing, and releasing software faster and more
frequently.
Continuous software development is an umbrella term that describes several aspects of iterative software application
development, including continuous integration, continuous delivery, continuous testing and continuous deployment.
Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared
repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems
early.
Software Delivery is the process of getting a software product to market. Your particular “market” and “product” could
be: An alpha product to an early adopter. The next release of an internal operations product. A first release of a main
product for a major company
Continuous Delivery (CD) is the application development discipline that takes Agile to its logical conclusion, creating
software that is always ready to release. It does this by building upon and extending Agile, CI and DevOps practices and
tools to transform the way software is delivered. Automate everything.
13. Goal
A goal represents a specific task which contributes to the building and managing of a
project. It may be bound to zero or more build phases.
A goal not bound to any build phase could be executed outside of the build lifecycle
by direct
invocation.
30. case jenkins and github
Setup: set up a Jenkins job which builds a project of a GitHub repository.
Additionally, the build process is automatically started when a contributor
pushes to the respective GitHub repository.
35. Workflow Multibranch
• Automatic Workflow (job) creation in Jenkins per
new branch in the repository (assuming webhooks
are registered from SCM to Jenkins)
• Build specific to that child-branch and its unique
scm change and build history
• Automatic job pruning/deletion for branches
deleted from the repository, according to the
settings
• Flexibility to individually configure branch
properties, by overriding the parent properties, if
required
• * Source: Jenkins.io
36. Organization folder
• Works on project space level within
organization SCM.
• Provides ability to create and manage
workflow jobs for all repositories
• Automatically removes jobs for merged
back branches
• Simplified configuration that requires only
project name and credentials
• Provides pull request testing functionality.
Jenkins will create a new CD pipeline when
a pull-request is submitted and build/test
the pull-request.
40. Pipeline definition
• Pipelines are “Jenkins job definitions” enabled
by the Pipeline plugin
• Based on Groovy programming language
• Pipelines leverage the power of multiple steps
to execute both simple and complex tasks
according to parameters that you establish
• Pipelines can build code and orchestrate the
work required to drive applications from
commit to delivery
• * Source: Jenkins.io
41. Pipeline attributes
• Durable: Pipelines can survive both planned and
unplanned restarts of your Jenkins master.
• Pausable: Pipelines can optionally stop and wait
for human input or approval before completing
the jobs for which they were built.
• Versatile: Pipelines support complex real-world
requirements, including the ability to fork or join,
loop, and work in parallel with each other.
• Extensible: The Pipeline plugin supports custom
extensions to its DSL (domain scripting language)
and multiple options for integration with other
plugins.
• * Source: Jenkins.io
42. Pipeline pros
• Supports complex, real-world, CD Pipeline requirements:
pipelines can fork/join, loop, parallel, to name a few
• Resilient - pipeline executions can survive master restarts
• Pausable - pipelines can pause and wait for human
input/approval
• Efficient - pipelines can restart from saved checkpoints
• Visualized - Pipeline StageView provides status at-a-glance
dashboards including trending
• Artifact traceability with fingerprinting - support tracking
versions of artifacts using file fingerprinting
43. Pipeline vocabulary
• Step is a single task that is part of build sequence
• Node typically enlists help from available executors on agents
to:
•Schedules the steps contained within it to run by adding them
to the Jenkins build queue
•Creates a workspace where resource-intensive processing
can occur without negatively impacting your pipeline
performance
• Stage is a logically distinct part of the execution of any task,
with parameters for locking, ordering, and labeling its part of a
process relative to other parts of the same process
• * Source: Jenkins.io
47. The Jenkinsfile
• Jenkinsfile is a container for pipeline (or
other) script, which details what specific
steps are needed to perform a job for
which you want to use Jenkins.
• Jenkinsfile can be created with text/Groovy
editor, or through the configuration page
on of Jenkins instance.
• Provides DSL steps with most common
build tasks
(https://jenkins.io/doc/pipeline/steps/)
• Can be extended by external shell scripts
and import user Groovy scripts
48. DSL examples
• sh, bat - script execution for Unix and
Windows system
• scm, checkout - checkout source code
from VCS
• readFile, writeFile, fileExists - file
handling
• stash, unstash - share workspace
results between stages
• withEnv, evn.Foo, $BUILD_NUMBER -
getting and setting variables
• parallel - set up concurrent tasks
49. node('nodeJs') {
currentBuild.result = "SUCCESS"
try {
stage('Checkout')
checkout scm
stage('Test')
env.NODE_ENV = "test"
print "Environment will be : ${env.NODE_ENV}"
sh 'node -v && npm prune && npm install && npm test'
stage('Build Docker')
sh './dockerBuild.sh'
stage('Deploy')
echo 'Push to Repo ssh to web server and tell it to pull new image'
sh './dockerPushToRepo.sh'
stage('Cleanup')
echo 'prune and cleanup'
sh 'npm prune && rm node_modules -rf'
mail body: 'project build successful', from: 'xxxx@yyyyy.com', replyTo: 'xxxx@yyyy.com', subject: 'project build successful',
to: 'yyy@yy.com'
} catch (err) {
currentBuild.result = "FAILURE"
def specificCause = currentBuild.rawBuild.getCause(hudson.model.Cause$UserIdCause)
mail body: "project build error is here: ${env.BUILD_URL}" , from: 'xxxx@yyyy.com', replyTo: 'yyyy@yyyy.com', subject:
'project build failed', to: 'zz@yy.com'
throw err }}
50. Master-agent architecture
• Master node has a list of all configured agents
• Master node starts required Agents and passes
build steps from Jenkinsfile
• All “hard work” is done by Agents
Http: 8080
Slave:
50000
Mast
er
Agent
nodejs
Agent
java
Agent
golang
Slave:
50000
Slave:
50000
Slave:
50000
52. Jenkins usage across teams
Nan
a
Bet
a
Pi ...
Jenkins agent
images
Source code
+
Pipeline
libraries
53. What makes "Pipeline as a code" valuable
for build/deployments in Newsweaver?
• Organization folders - enable Jenkins to automatically detect and include any new
repositories within them as resources.
• Jenkinsfile as part of source code - A Jenkinsfile is a container for your pipeline (or
other) script, which details what specific steps are needed to perform a job for which
you want to use Jenkins.
• Groovy is good - Jenkinsfiles are written as Groovy scripts which makes them easy to
write and add complex logic
• Ability to record test results and artifacts
• Call agent for help - build tasks can be distributed and assigned to remote nodes.
• DRY - Pipeline can reuse build steps stored in SCM which can allow us to avoid code
duplication in all branches
• Inputs - pipelines can be programed with pauses/human interaction
• Concurrent build actions - with a help of Parallel Test Executor we can split steps in
parallel parts
• Active community - there are plenty code examples, best practices, tutorials on the
web
54. New & noteworthy features
• Blue Ocean - new UI tailored pipelines as a
central theme to the Jenkins user experience
• Visual Pipeline Editor - helps to make things
clearer for a range of users, to help with
Workflow adoption
57. Watch the Live Demonstration
Watch the recorded webinar here!
58. Recommended Courses
NetCom Learning offers a comprehensive portfolio for DevOps training
options. Please see below the list of recommended courses:
DevOps Engineering on AWS
Check out more DevOps training options with NetCom Learning – CLICK HERE
59. Our live webinars will help you to touch base a wide variety of IT, soft skills and business
productivity topics; and keep you up to date on the latest IT industry trends. Register now
for our upcoming webinars:
A Brief on MS-Access 2016 and its Integration – April 25
How About Cloud Computing in the Current Era? – April 27
Agile Project Management – May 02
5 Practices of Exemplary Leadership – May 04
Networking Fundamentals (Part. 1) – May 09
60. Special Promotion
Whether you're learning new IT or Business skills, or you are developing a learning plan for
your team, now you can register for our Guaranteed to Run classes with confidence.
From Microsoft, to CompTIA, to CISSP; all classes delivered by top-notch instructors in in-
person Instructor-led Classroom or Live Online.
Learn more»
61. To get latest technology updates, please follow our social media pages!
62.
63. THANK YOU !!!
We manage learning.
“Building an Innovative Learning Organization. A Framework to Build a
Smarter Workforce, Adapt to Change, and Drive Growth”. Download now!