SlideShare a Scribd company logo
1 of 167
Download to read offline
Intro to DevOps
4 Undergraduates
Liran Levy
September, 2016
Objective
2
Help students get familiar with the basic concepts
of DevOps processes and technologies and the
challenges facing companies who are looking to
embrace scalable software deployment.
Syllabus
3
 Intro to DevOps
 Intro Cloud Computing
 Intro to Linux Basics
 Intro to Version Control System (VCS)
o GIT
o GitHub
 Intro to Web Development
o HTML
o JavaScript
o NodeJs
 Demo App
 Intro to Continuous Integration
o Jenkins
o CircelCI
 Intro to Continuous Deployment
o Docker
o DockerHub
o AWS EC2
 Continuous Delivery Demo
Method
4
About Me
5
 Product manager for ALM Octane
 Previously Sr.DevOps Manager for ADM Lifecycle Management portfolio-
 ALM/QC
 AGM
 ALM Octane
 7+ Years in HPHPEMF
 liran.levy@microfocus.com
 Linkedin
Bootstrap
6
Slack
https://slack.com/
https://taucsdevops.slack.com/
https://cygwin.com/install.html
Cygwin
Adding Packages - GIT
https://nodejs.org/en/download/
NodeJs
Intro to DevOps
11
The purpose of DevOps
12
Create Value !
… is the purpose of your organization !
Creating Value
Dev Product Customer
$$$
Hey,
Show me the value !
We have lots
Of great ideas !
Get them to the
Customer fast !
QA Ops
How can
we help ?
Not the purpose of DevOps
Dev QA Ops Eng. Customer
Don’t know
if want…
Really Not the purpose of DevOps
Dev QA
Ops Eng.Product
Unrealistic project deadlines ! Sloppy coding practices !
Shetty developers ! I told ya’ !
Unhappy
Slow
Ineffective at delivery
Can’t learn from failures
Hard to make changes
Operational problems stack up
Impediments to release velocity
47%
46%
45%
40%
35%
31%
40%
47%
47%
50%
53%
53%
11%
6%
5%
6%
11%
14%
1%
1%
3%
4%
1%
1%
Provisioning of adequate development/test environments is problematic
Applications are monolithic/tightly coupled
Test processes are manual and effort laden
Business sponsors can't make themselves available more frequently
Deployment to production is manual/labor intensive
We lack application or technical expertise and fear unintended impact of change
"How do the following factors affect your ability to deliver working code to production faster?"
Large impact Small Impact No Impact Don't Know
Base: 255 North American and European IT decision-makers involved in application development and delivery at 12+ month intervals
Source: A commissioned study conducted by Forrester Consulting on behalf of HP, October 2013
The purpose of DevOps
IdeaFeature,
Bug Fix,
Enhancement
Deploy fast a/w quality
Get feedback
Customer
(production)
DevOps changes Org DNA
Dev+QA
(Engineering)
Dev+Ops
(DevOps)
Dev QA
Ops Eng. Ops Eng.
What is DevOps ?
19
A methodology, involving a spectrum of cultural
approaches, processes and technologies,
designed to help the business reduce it’s TTM
while also maintaining high quality releases
DevOps Landscape
Culture
Technology
Processes
Processes
“A software engineering approach that help 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. The approach
helps reduce the cost, time, and risk of delivering changes by allowing for
more incremental updates to applications in production”
Continuous Delivery
Continuous Delivery
Processes
Continuous Delivery Landscape
23
Contributor
(E.g. Developer)
VCS CI CD CustomerARM
Feedback
Evolution of DevOps
What is a DevOps engineer, anyway?
DevOps engineers are a pretty elite group, “Special Forces” in an organization, sharing the
following attributes:
 Ability to use a wide variety of open source technologies and tools
 Ability to code and script
 Experience with systems (OS) and IT operations
 Strong grasp of automation tools
 A strong focus on business outcomes
 Comfort with collaboration, open communication and reaching across functional
borders
Is DevOps Eng. wanted ?
https://puppet.com/resources/white-paper/2015-devops-salary-report/thank-you
Technology https://xebialabs.com/periodic-table-of-devops-tools/
Intro to Cloud Computing
29
Starting Point – Physical Machine
– Physical Hardware
– Processors, memory, chipset, I/O devices, etc.
– Resources often grossly underutilized
– Software
– Tightly coupled to physical hardware
– Single active OS instance
– OS controls hardware
Virtual Machine
– Software Abstraction
– Behaves like hardware
– Encapsulates all OS and application state
– Virtualization Layer
– Extra level of indirection
– Decouples hardware, OS
– Enforces isolation
– Multiplexes physical hardware across VMs
What is Cloud Computing ?
An analogy: Think of electricity service…
What is Cloud Computing ?
 Cloud Commuting is also a utility service – giving you access to technology resources
managed by experts and available on-demand.
 You simply access theses services over the internet, with no up-front costs and you pay only
for the resource you use.
Cloud Computing Stack
 SaaS applications are designed for end-
users, delivered over the web.
 PaaS is the set of tools and services
designed to make coding and deploying
those applications quick and efficient.
 IaaS is the hardware and software that
powers it all – servers, storage, networks,
operating systems.
Cloud Computing Stack
Cloud Computing is Everywhere
Cloud Computing & DevOps
A Marriage Made in Heaven
Intro to Linux Basics
38
What is Linux ?
 A free, open-source operating system.
 Has been under active development since 1991.
 It has evolved to be versatile and is used all over the world, from web servers to
cellphones.
Linux Is Everywhere
Linux Distributions
Linux isn’t a complete OS — it’s just a kernel. Linux distributions take the Linux kernel and
combine it with other free software to create complete packages.
The Terminal Shell
 The shell allows you to execute commands.
 All administrative tasks can be accomplished through the terminal. This includes file
manipulation, package installation, and user management.
 The terminal is interactive. You specify commands to run. The terminal outputs the results
of those commands. Executing any command is done by typing it and pressing Enter.
Basic Commands
 pwd
 ls
 cd <folder>
 cd ..
 mkdir <folder>
 rm <filefolder>
 cat <file>
 touch <file>
 mv <file1> <file2>
 cp <file1> <file2>
 man <cmd>
Intro to VCS
44
The Problem
Lots of code (millions of lines)
and lots of developers spread
over the globe
Dealing With Change
 Copying (Coursework_working.java, Coursework_tmp.java)
 Copy & Paste code snippets
 Copy entire directories
 Emailing code to people
 Using DropBox, Etc.
What is Version Control System ?
 Category of software tools that help a software team manage changes to source code over
time.
 Keeps track of every modification to the code in a special kind of database.
 Essential part of the every-day of the modern software team‘s professional practices.
Benefits of Version Control Systems
 History. A complete long-term change history of every file. This means every change made
by many individuals over the years.
 Branching and merging. Having team members work concurrently is a no-brainer, but even
individuals working on their own can benefit from the ability to work on independent streams
of changes.
 Traceability. Being able to trace each change made to the software and connect it to project
management and bug tracking software.
Intro to VCS
49
GIT
50
An open source, (distributed) version control system designed for speed and efficiency.
What is GIT
51
How GIT works
52
3 Local States
try.github.com
Stop at 1.13
Intro to VCS
54
GitHub
55
What is GitHub
A PaaS based code hosting platform for version control and collaboration. It lets you and others
work together on projects from anywhere.
https://github.com/
First GitHub Repository
 Sign up for GitHub
 Create New Repository
First GIT Repository
Open the command line -
> git config --global user.name “liranlevy3”
> git config --global user.email “liran.levy@hpe.com”
> git clone https://github.com/liranlevy3/liran.git
> cd liran
> touch test
> git add test
> git commit –m “my first commit”
> git push origin master
First GitHub Repository (Cont.)
First GIT Branch
Open the command line -
> git branch
> git checkout –b new_feature
> git branch
> echo "this is a test" > test
> git add test
> git commit –m “add new feature branch”
> git push origin new_feature
Using GutHub to host your website for FREE (!)
Open the command line -
> git branch
> git checkout –b gh-pages
From windows:
 Go to C:cygwin64homelevyli
 Create New file index.html
 Add the string “<h1>Welcome to Liran’s website</h1>“
> git add index.html
> git commit –m “add index.html”
> git push origin gh-pages
https://liranlevy3.github.io/liran/
http://username.github.io/repository/
Intro to Web Development
61
What is Web Development ?
The creation of dynamic web applications such as Facebook or e-commerce sites like Amazon.
 Many argue it’s the best form of coding for beginners to learn. It’s easy to set up, you get
instant results and there’s plenty of online training available.
 Learning web development It’s one of the smartest decisions you will ever make (!)
Web Development Overview
Front-End Back-End
Full-Stack
Web Development Overview
 Front-End Development (a.k.a client-side development) – What a user sees when they
load a web application – things that runs in the browser.
 HTML
 CSS
 JavaScript
 Back-End Development (a.k.a server-side development) – What goes on behind the
scenes of a web application – things that runs in the server.
 PHP
 Ruby
 Python
 Java
 NodeJs (JavaScript)
 ASP.Net
 Perl
How Front-End and Back-End interacts ?
Server-Rendered Apps
The browser sends a HTTP request and the server replies with a HTML page.
Between receiving the request and responding, the server usually queries the database and
feeds it into a template.
The browser then loads the HTML and defines what things are, CSS how they look and JS any
special interactions.
AJAX (Asynchronous JavaScript and XML)
AJAX is about updating parts of a web page, without reloading the whole page.
The browser sends a HTTP request from within the page and get’s back a JSON response.
This means that your server needs to have an endpoint which replies JSON to requests.
Two architectures for this are REST and SOAP.
Intro to Web Development
66
Front-End - HTML
What is HTML?
 HTML is a markup language for describing web documents (web pages).
 HTML documents are described by HTML tags.
 Each HTML tag describes different document content.
HTML Tags
 HTML tags are keywords (tag names) surrounded by angle brackets:
 <tagname>
 </tagname>
 HTML tags normally come in pairs like <p> and </p>.
http://www.w3schools.com/tags/
HTML Structure
HTML Elements
 An HTML element usually consists of a start tag and end tag, with the content inserted in between
<tagname>content goes here...</tagname>
 HTML elements can be nested (elements can contain elements).
 All HTML elements can have attributes.
 Attributes provide additional information about an element.
 Attributes are always specified in the start tag.
 Attributes usually come in name/value pairs like: name="value“.
HTML Attributes
Some Common Elements
 HTML headings are defined with the <h1> to <h6> tags.
<h1>This is heading 1</h1>
 HTML paragraphs are defined with the <p> tag.
<p>This is a paragraph</p>
 HTML links are defined with the <a> tag.
<a href="http://www.hpe.com">This is a link</a>
 HTML images are defined with the <img> tag.
<img src=“hpe.jpg" width="104" height="142">
Web Browsers
 The purpose of a web browser is to read HTML documents and display them.
 The browser does not display the HTML tags, but uses them to determine how to display the document.
First HTML Page
From windows:
 Go to C:cygwin64homelevyli
 Copy the file pic_bulboff.gif
 Create new file first_html_page.html
<!DOCTYPE html>
<html>
<body>
<h1>My First HTML page</h1>
<p>Here is a lightbulb ! </p>
<img id="myImage" src="pic_bulboff.gif" style="width:100px">
</body>
</html>
http://www.w3schools.com/html/default.asp
Intro to Web Development
75
Front-End - JavaScript
What is JavaScript ?
 JavaScript is the programming language of HTML and the Web.
 JavaScript is easy to learn.
 JavaScript Can Change HTML document.
Why JavaScript ?
JavaScript and HTML
 JavaScript can be placed in the <body> and the <head> sections of an HTML page.
 JavaScript code must be inserted between <script> and </script> tags.
http://www.w3schools.com/js/tryit.asp?filename=tryjs_whereto_head
Syntax
 Statements are separated by ;
 Strings are text, written within double (“) or single quotes (‘)
 JavaScript uses the var keyword to declare variables
 Code after double slashes // or between /* and */ is treated as a comment
 All JavaScript identifiers are case sensitive
var x=1; // x is an identifier
var y=2; // y is an identifier
document.getElementById("demo").innerHTML = x + y ;
Keywords (Examples)
Keyword Description
break Terminates a switch or a loop
continue Jumps out of a loop and starts at the top
do ... while Executes a block of statements, and repeats the block, while a condition is true
for Marks a block of statements to be executed, as long as a condition is true
function Declares a function
if ... else Marks a block of statements to be executed, depending on a condition
return Exits a function
switch Marks a block of statements to be executed, depending on different cases
try ... catch Implements error handling to a block of statements
var Declares a variable
Data Types
Undefined, Number, Boolean, Array, Object
 JavaScript has only one type of numbers.
 Object properties are written as name:value pairs, separated by commas.
 In JavaScript, the data type of null is an object.
var x; // Undefined
var size= 3; // Number
var x = true; // Boolean
var name = "Johnson"; // String
var cars = [“Honda", “Mazda", “Kia"]; // Array
var x = {firstName:“Liran", lastName:“Levy"}; // Object
var x = null; // Empty object
Objects
 In JavaScript, all values, except primitive values, are objects.
 Primitive are: strings, numbers, true, false, null and undefined.
 Objects are variables that can contain many values.
 The values are written as name:value pairs.
Objects Declreation
 var person = {firstName:"John", lastName:"Doe", age:50, eyeColor:“green"};
 var person = new Object();
person.firstName = "John";
person.lastName = "Doe";
person.age = 50;
person.eyeColor = “green";
 function person(first, last, age, eye) {
this.firstName = first;
this.lastName = last;
this.age = age;
this.eyeColor = eye;
}
var myFather = new person("John", "Doe", 50, “green");
Objects Properties
 Properties are the values associated with an object.
 The syntax for accessing the property of an object is:
 objectName.property // person.firstName
 objectName["property"] // person["firstName"]
 objectName[expression] // x = "firstName"; person[x]
Functions
 A JavaScript function is a block of code designed to perform a particular task.
function myFunction(a, b) {
return a * b;
}
var myFunction = new Function("a", "b", "return a * b");
 var x = myFunction(4, 3);
var x = function (a, b) {return a * b};
 var y = x(4, 3);
HTML Events
 An HTML event can be something the browser does, or something a user does.
 JavaScript lets you execute code when events are detected.
 HTML allows event handler attributes, with JavaScript code, to be added to HTML elements.
http://www.w3schools.com/js/tryit.asp?filename=tryjs_event_onclick1
HTML Events (Examples)
Event Description
onclick The user clicks an HTML element
onmouseover The user moves the mouse over an HTML element
onmouseout The user moves the mouse away from an HTML element
onkeydown The user pushes a keyboard key
JavaScript HTML DOM (Document Object Model)
When a web page is loaded, the browser creates a Document Object Model of the page.
JavaScript HTML DOM (Examples)
First JavaScript Code
<!DOCTYPE html>
<html>
<body>
<h1>My First JS code</h1>
<p>Here is a lightbulb ! </p>
<button ???>Turn on the light</button>
<img id="myImage" src="pic_bulboff.gif" style="width:100px">
<button ???>Turn off the light</button>
</body>
</html>
From windows:
 Go to C:cygwin64homelevyli
 Copy the file pic_bulbon.gif
 Create new file first_js_code.html
http://www.w3schools.com/js/default.asp
Intro to Web Development
92
Back-End - NodeJs
What is NodeJS?
 A very powerful JavaScript-based framework built on Google Chrome's JavaScript V8 Engine.
 Used to develop web applications like video streaming sites, single-page applications, and
other web applications.
 Open source, completely free, and used by thousands of developers around the world.
 Provides rich library of various JavaScript modules which simplifies the development of web
applications using Node.js to a great extent.
NodeJs is Asynchronous
Blocking Code Non-Blocking Code
var fs = require("fs");
var data = fs.readFileSync('input.txt');
console.log(data.toString());
console.log("Program Ended");
var fs = require("fs");
fs.readFile('input.txt', function (err, data) {
if (err) return console.error(err);
console.log(data.toString());
});
console.log("Program Ended");
 A callback function is called at the completion of a given task.
 Node makes heavy use of callbacks. All the APIs of Node are written in such a way that
they support callbacks.
NodeJs First Application
From windows:
 Go to C:cygwin64homelevyli
 Copy the file main.js
> node main.js
http://127.0.0.1:8080/
Node Package Manager
 NPM makes it easy for JavaScript developers to share and reuse JS modules (packages).
 A typical application, such as a website, will depend on dozens or hundreds of packages.
 Developers can find packages to help build applications by browsing the NPM website.
 All NPM packages are open source and can be downloaded for free.
https://www.npmjs.com/
Package.json
 The best way to manage locally installed npm packages.
 It serves as documentation for what packages your project depends on.
 It allows you to specify the versions of a package that your project can use.
 Makes your build reproducible which means that its way easier to share with other
developers.
 Should be located on the project root folder.
Package.json (Cont.)
> npm install
https://www.tutorialspoint.com/nodejs/index.htm
https://docs.npmjs.com/getting-started/
http://www.w3schools.com/json/
Demo App
100
MEAN Stack
Mongo DB
https://www.tutorialspoint.com/mongodb
Express
https://www.tutorialspoint.com/nodejs/
nodejs_express_framework.htm
AngularJS
http://www.w3schools.com/angular
NodeJS
Mean Stack Demo App
https://github.com/liranlevy3/todoapp
http://52.209.77.250:8080/
Mean Stack Demo App – NPM
Intro to Continuous Integration
104
Why Continuous Integration ?
105
Pain
Time
Observation #1
As longer as developers going
between merging their code
base, the more painful that
merge is going to be (known as
“Integration Hell”).
 Integrate Faster
Why Continuous Integration ?
106
Quality
Time
Observation #2
𝑰𝒏𝒕𝒆𝒈𝒓𝒂𝒕𝒊𝒐𝒏 ≠ 𝑴𝒆𝒓𝒈𝒆
𝑰𝒏𝒕𝒆𝒈𝒓𝒂𝒕𝒊𝒐𝒏 = 𝑴𝒆𝒓𝒈𝒆 + 𝑸𝒖𝒂𝒍𝒊𝒕𝒚
 Integrate Faster aw with Quality
What is it ?
107
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 and tests, allowing teams to detect problems
early. By integrating regularly, you can detect errors quickly,
and locate them more easily.
Continuous Delivery Landscape
108
Contributor
(E.g. Developer)
SCM CI CD CustomerARM
Feedback
Continuous Integration Landscape
109
Contributor
Push Changes
SCM
Push Trigger
Feedback
ARM
Publish
DB
CI Server Build
Servers
Test
Servers
AUT
Servers
Basic Process
110
Report
Package &
Publish
Stop
App
Integration
Tests
API Tests
Start
App
System
Tests
Static
Analysis
Unit TestsCompile
Code
Validations
DB
CI Server Build
Servers
Test
Servers
AUT
Servers
Essential Practices
111
 Maintain a Single Source Repository
 Automate the build
 Make Your Build Self-Testing
 Everyone Commits To the Mainline (Master)
Every Day
 Every Commit Should Build the
Mainline (Master) on an Integration Machine
 Fix Broken Builds Immediately
 Keep the Build Fast
 Test in a Clone of the Production Environment
Intro to Continuous Integration
112
Creating Value - Examples
Full CI (≤120m)
Quick CI (≤30m)
Sanity CI (≤20m)
Change Feedback Time (CFT)
94m
133m
180m
59m
180m
84m
72m
MTTR=114m
Above ~ 90% uptime **
* MTTR = The mean time elapse from alerting on CI break till fixed by RnD
** uptime – CI is green or yellow
Mean Time to Recover (MTTR)
75.86%
SUCCESS
24.14%
Failure
14.07% DEV
10.07% ENV
CFR≈25%
Out of which 14% Bad Dev Commits *
intercepted
* Bad Dev Commits = Compilation andor tests failures
Change Failure Rate (CFR)
UI UT, 1831,
25%
Server UT,
4871, 68%
Rest, 473, 7%
System, 22, 0%
UI UT Server UT Rest System
CR≈36.8%
85% target
Coverage Rate (CR)
Intro to Continuous Integration
117
Jenkins
118
What is Jenkins?
 Jenkins is an application and a framework that manages and monitor the execution of
repeated tasks.
 Open source and under development since 2005
 It’s primarily used as a Continuous Integration tool for building software
 Supported by over hundreds plugins
http://jenkins-ci.org/
119
Everyone uses Jenkins
120
Jenkins CI in real life
121
Behind each Job – Groovy Code
import groovy.json.JsonSlurper
def repo = "TA-demo/simple-demo-app"
URL branchUrl = "https://api.github.com/repos/$repo/branches".toURL()
List branches = new JsonSlurper().parse(branchUrl.newReader())
branches.each { branch ->
String safeBranchName = branch.name.replaceAll('/', '-')
job("dsl-simple-maven-$safeBranchName") {
scm {
github repo, branch.name
}
steps {
maven {
goals('clean')
goals('test')
mavenInstallation('Local')
}
}
publishers {
archiveJunit '**/surefire-reports/*.xml'
}
}
}
Intro to Continuous Integration
122
CircleCI
123
What is CircelCI ?
 A PaaS based Continuous Integration and Delivery platform.
 Out of the box support for NodeJs, Java, Python, PHP, Scala, Go and more.
 Out of the box integration with many testing's and deployment tools.
 Fermium
https://circleci.com/
124
CircelCI Flow
 Infrastructure: Allocates the VM that will run the flow
 Checkout: checking out and cloning your GIT repo
 Machine: adjusting the VM to your preferences and requirements
 Dependencies: setting up your project’s language-specific dependencies
 Database: preparing the databases for your tests
 Test: running your tests
 Deployment: deploying your code to your web servers
 TearDown: Collect metadata, disable VM
125
Circle.yml
Webhooks
Webhooks allow external services to be notified when certain events happen within your
repository. When the specified events happen, GitHub sends a POST (HTTP) request to the
URLs provided.
CircleCI Demo
Contributor VCS CI
https://circleci.com/docs/getting-started/
Intro to Continuous Deployment
129
What is it ?
130
Continuous deployment can be thought of as an extension of
Continuous Integration, aiming at minimizing lead time, the
time elapsed between development writing one new line of
code and this new code being used by live users, in
production.
Continuous Delivery Landscape
131
Contributor
(E.g. Developer)
SCM CI CD CustomerARM
Feedback
Continuous Deployment Landscape
132
DB
Orchestor
Server
LB App
Servers
Customer
UI
Servers
ARM
Basic Process
133
Report
Smoke
Test
Start AppUpgradeConfigureExtractFetchStop App
DB
Orchestrate
Server
LB App
Servers
UI
Servers
Essential Practices
134
 Compile only once (CI phase)
 Deploy the same way to every environment
 Smoke-Test your deployment
 Deploy into a copy of production (Staging) first
Intro to Continuous Deployment
135
Creating Value - Examples
CLT≈145m-325m
Deployment Frequency = 0m^-180m
^ - On demand self-service
Sanity
CI
• 20m
Full CI • 120m
CD • 5m
Idle time ≤ 180m
Idle time ≤ 0m
* CLT = The time from committing a change to deployment
Change Lead Time (CLT)
Intro to Continuous Deployment
137
Docker
What are Linux Containers ?
 Contain applications in a way that keep them isolated from the host system that they run on, by taking
advantage of Linux Kernel namespace and cgroup features.
 Allow a developer to package up an application with all of the parts it needs, such as libraries and other
dependencies, and ship it all out as one package.
 Designed to make it easier to provide a consistent experience as developers move code from
development environments into production in a fast and replicable way.
What is Docker ?
 Docker is a command-line tool for programmatically defining the contents of a Linux container in code,
which can then be versioned, reproduced, shared, and modified easily just as if it were the source code
to a program.
 Docker container can run anywhere (almost?), they’re lightweight and therefore can be shipped and
run, unchanged, on laptops, data center VMs and any cloud servers.
 Docker is an open-source.
Virtual Machine Vs. Linux Containers
Virtual Machine contains not only the application and all needed bins and
libs, it also contains the entire guest operating system.
Docker container comprises just the application and its dependencies.
It runs as an isolated process on the host operating system, sharing the
kernel with other containers.
Thus, it enjoys the resource isolation and allocation benefits of VMs but is
much more portable and efficient.
141
Real world analogy to Linux Containers
142
Real world analogy to Linux Containers
143
Back-End Front-EndSearch Queue DB
Development
VM
QA server Public Cloud Contributor’s
laptop
Production
Cluster
Customer Data
Center
…that can be manipulated
using standard operations and
run consistently on virtually any
hardware platform
An engine that enables any
payload to be encapsulated
as a lightweight, portable,
Self sufficient container…
And in our case
144
Docker Flow
145
Docker Basic Commands
 docker images
 docker rmi –f <image id>
 docker ps
 docker rm –f <container id>
 docker build –t <image name> <path>
 docker run <image name>
146
Dockerfile
 Docker can build images automatically by reading the instructions from a Dockerfile.
 Dockerfile is a text document that contains all the commands a user could call on the command line to
assemble an image.
 Dockerfile format -
 Docker runs instructions in a Dockerfile in order.
 The first instruction must be `FROM` in order to
specify the Base Image from which you are building.
 The Docker build command takes a Dockerfile as input and output
A Docker image.
147
Base Image and Layers
148
Dockerfile Instructions (Examples)
 FROM - Sets the base image for subsequent instructions. A valid Dockerfile must start with From.
 RUN - Execute any commands in a new layer on top of the current image and commit the results. The
resulting committed image will be used for the next step in the dockerfile.
 CMD – Provide default for executing container. There can only be one CMD instruction in a Docker file.
 EXPOSE - Informs Docker that the container listens on the specified network ports at runtime.
 ENV - Sets the environment variable the container has on runtime.
 ADD/COPY - Copies new files, directories or remote file URLs from <src> to container file system.
 WORKDIR- Sets the working directory for any instructions that follow it in the Dockerfile.
VM
149
Dockerizing our Demo App
 sudo docker build -t liranlevy3/todoapp .
 sudo docker run --name mongo -d mongo
 sudo docker run -it -p 8080:8080 --name todoapp --link mongo -d liranlevy3/todoapp
TodoApp
NodeJs
MongoDB
https://docs.docker.com/engine/getstarted/
Intro to Continuous Deployment
151
DockerHub
152
What is DockerHub ?
 A PaaS based Artifact Repository Manager (ARM) for Docker Images platform.
 Similar to GitHub, but stores Docker binaries rather than source code.
 Fermium
https://hub.docker.com/
153
Docker Flow (Recap)
154
Circle.yml (Cont.)
https://docs.docker.com/v1.8/userguide/dockerrepos/
Intro to Continuous Deployment
156
Amazon Web Services
What is Amazon Web Services (AWS) ?
157
 Amazon Web Services (AWS) is a secure cloud services platform, offering compute power,
database storage, content delivery and other functionality to help businesses scale and grow.
 AWS are both IaaS and PaaS provider.
Everyone uses AWS
158
AWS are spread WW
159
AWS Cloud Services Platform
160
AWS Elastic Compute Cloud (EC2)
161
 AWS EC2 == Virtual Machine
 AWS EC2 is on demand commuting power
 Obtain and boot new virtual machines (servers) in seconds
 Quickly scale capacity up and down
 Servers from 0.02$ (2 cents) per hour
 Support for Linux and Windows
AWS Elastic Compute Cloud (EC2) Demo
162
https://662068354453.signin.aws.amazon.com/console
https://aws.amazon.com/start-
now/?sc_ichannel=ha&sc_icampaign=start-
now&sc_icontent=2235
Continuous Delivery Demo
164
Continuous Delivery Demo
165
Contributor VCS CI CD CustomerARM
http://52.209.77.250:8080/
166
Updating our Demo App
 sudo docker ps
 sudo docker ps rm –f
 sudo docker images
 sudo docker ps rmi –f
 sudo docker pull liranlevy3/todoapp
 sudo docker run -it -p 8080:8080 --name todoapp --link mongo -d liranlevy3/todoapp
Thank you & Good Luck !
167

More Related Content

What's hot

The Journey to DevOps #MFSummit2017
The Journey to DevOps #MFSummit2017The Journey to DevOps #MFSummit2017
The Journey to DevOps #MFSummit2017Micro Focus
 
Continuous Testing in DevOps
Continuous Testing in DevOpsContinuous Testing in DevOps
Continuous Testing in DevOpsTechWell
 
Introduction to devops - update 2017
Introduction to devops - update 2017Introduction to devops - update 2017
Introduction to devops - update 2017gjdevos
 
DevOps - Understanding Core Concepts
DevOps - Understanding Core ConceptsDevOps - Understanding Core Concepts
DevOps - Understanding Core ConceptsNitin Bhide
 
Who Is A DevOps Engineer? | DevOps Skills You Must Master | DevOps Engineer M...
Who Is A DevOps Engineer? | DevOps Skills You Must Master | DevOps Engineer M...Who Is A DevOps Engineer? | DevOps Skills You Must Master | DevOps Engineer M...
Who Is A DevOps Engineer? | DevOps Skills You Must Master | DevOps Engineer M...Edureka!
 
The business case for devops
The business case for devopsThe business case for devops
The business case for devopsMatthew Skelton
 
Understanding DevOps in simpler way with Continuous Delivery
Understanding DevOps in simpler way with Continuous DeliveryUnderstanding DevOps in simpler way with Continuous Delivery
Understanding DevOps in simpler way with Continuous DeliverySwapnil Jain
 
DevOps, from inception to conclusion
DevOps, from inception to conclusionDevOps, from inception to conclusion
DevOps, from inception to conclusionAbhishek Gaurav
 
DevOps(1) : What's DevOps - (MOSG)
DevOps(1) : What's DevOps - (MOSG)DevOps(1) : What's DevOps - (MOSG)
DevOps(1) : What's DevOps - (MOSG)Soshi Nemoto
 
Devops at SlideShare: Talk at Devopsdays Bangalore 2011
Devops at SlideShare: Talk at Devopsdays Bangalore 2011Devops at SlideShare: Talk at Devopsdays Bangalore 2011
Devops at SlideShare: Talk at Devopsdays Bangalore 2011Kapil Mohan
 
DevOps-Redefining your IT Strategy-28thJan15
DevOps-Redefining your IT Strategy-28thJan15DevOps-Redefining your IT Strategy-28thJan15
DevOps-Redefining your IT Strategy-28thJan15Edureka!
 
DevOps - A Gentle Introduction
DevOps - A Gentle IntroductionDevOps - A Gentle Introduction
DevOps - A Gentle IntroductionGanesh Samarthyam
 
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...Puppet
 
DevOps Pragmatic Overview
DevOps Pragmatic OverviewDevOps Pragmatic Overview
DevOps Pragmatic OverviewMykola Marzhan
 
5 Best Practices DevOps Culture
5 Best Practices DevOps Culture5 Best Practices DevOps Culture
5 Best Practices DevOps CultureEdureka!
 
DOES14 - Joshua Corman - Sonatype
DOES14 - Joshua Corman - SonatypeDOES14 - Joshua Corman - Sonatype
DOES14 - Joshua Corman - SonatypeGene Kim
 

What's hot (20)

The Journey to DevOps #MFSummit2017
The Journey to DevOps #MFSummit2017The Journey to DevOps #MFSummit2017
The Journey to DevOps #MFSummit2017
 
Continuous Testing in DevOps
Continuous Testing in DevOpsContinuous Testing in DevOps
Continuous Testing in DevOps
 
Introduction to devops - update 2017
Introduction to devops - update 2017Introduction to devops - update 2017
Introduction to devops - update 2017
 
DevOps - Understanding Core Concepts
DevOps - Understanding Core ConceptsDevOps - Understanding Core Concepts
DevOps - Understanding Core Concepts
 
Devops course content
Devops course contentDevops course content
Devops course content
 
Who Is A DevOps Engineer? | DevOps Skills You Must Master | DevOps Engineer M...
Who Is A DevOps Engineer? | DevOps Skills You Must Master | DevOps Engineer M...Who Is A DevOps Engineer? | DevOps Skills You Must Master | DevOps Engineer M...
Who Is A DevOps Engineer? | DevOps Skills You Must Master | DevOps Engineer M...
 
The business case for devops
The business case for devopsThe business case for devops
The business case for devops
 
Understanding DevOps in simpler way with Continuous Delivery
Understanding DevOps in simpler way with Continuous DeliveryUnderstanding DevOps in simpler way with Continuous Delivery
Understanding DevOps in simpler way with Continuous Delivery
 
Intro to DevOps
Intro to DevOpsIntro to DevOps
Intro to DevOps
 
DevOps, from inception to conclusion
DevOps, from inception to conclusionDevOps, from inception to conclusion
DevOps, from inception to conclusion
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
Continuous Delivery e-book
Continuous Delivery e-bookContinuous Delivery e-book
Continuous Delivery e-book
 
DevOps(1) : What's DevOps - (MOSG)
DevOps(1) : What's DevOps - (MOSG)DevOps(1) : What's DevOps - (MOSG)
DevOps(1) : What's DevOps - (MOSG)
 
Devops at SlideShare: Talk at Devopsdays Bangalore 2011
Devops at SlideShare: Talk at Devopsdays Bangalore 2011Devops at SlideShare: Talk at Devopsdays Bangalore 2011
Devops at SlideShare: Talk at Devopsdays Bangalore 2011
 
DevOps-Redefining your IT Strategy-28thJan15
DevOps-Redefining your IT Strategy-28thJan15DevOps-Redefining your IT Strategy-28thJan15
DevOps-Redefining your IT Strategy-28thJan15
 
DevOps - A Gentle Introduction
DevOps - A Gentle IntroductionDevOps - A Gentle Introduction
DevOps - A Gentle Introduction
 
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
PuppetConf 2016: Continuous Delivery and DevOps with Jenkins and Puppet Enter...
 
DevOps Pragmatic Overview
DevOps Pragmatic OverviewDevOps Pragmatic Overview
DevOps Pragmatic Overview
 
5 Best Practices DevOps Culture
5 Best Practices DevOps Culture5 Best Practices DevOps Culture
5 Best Practices DevOps Culture
 
DOES14 - Joshua Corman - Sonatype
DOES14 - Joshua Corman - SonatypeDOES14 - Joshua Corman - Sonatype
DOES14 - Joshua Corman - Sonatype
 

Similar to Intro to DevOps 4 undergraduates

What_is_DevOps_how_it's_very_useful_in_daily_Life.
What_is_DevOps_how_it's_very_useful_in_daily_Life.What_is_DevOps_how_it's_very_useful_in_daily_Life.
What_is_DevOps_how_it's_very_useful_in_daily_Life.anilpmuvvala
 
What is DevOps And How It Is Useful In Real life.
What is DevOps And How It Is Useful In Real life.What is DevOps And How It Is Useful In Real life.
What is DevOps And How It Is Useful In Real life.anilpmuvvala
 
What is DevOps Services_ Tools and Benefits.pdf
What is DevOps Services_ Tools and Benefits.pdfWhat is DevOps Services_ Tools and Benefits.pdf
What is DevOps Services_ Tools and Benefits.pdfkomalmanu87
 
What is DevOps Services_ Tools and Benefits.pdf
What is DevOps Services_ Tools and Benefits.pdfWhat is DevOps Services_ Tools and Benefits.pdf
What is DevOps Services_ Tools and Benefits.pdfkomalmanu87
 
DevOps to DevSecOps Journey..
DevOps to DevSecOps Journey..DevOps to DevSecOps Journey..
DevOps to DevSecOps Journey..Siddharth Joshi
 
SDLC & DevOps Transformation with Agile
SDLC & DevOps Transformation with AgileSDLC & DevOps Transformation with Agile
SDLC & DevOps Transformation with AgileAbdel Moneim Emad
 
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitThe DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitMarco Ferrigno
 
The DevOps Paradigm
The DevOps ParadigmThe DevOps Paradigm
The DevOps ParadigmNaLUG
 
DevOps culture, concepte , philosophie and practices
DevOps culture, concepte , philosophie and practicesDevOps culture, concepte , philosophie and practices
DevOps culture, concepte , philosophie and practicesayoubbahaddouayoub
 
Devops interview-questions-PDF
Devops interview-questions-PDFDevops interview-questions-PDF
Devops interview-questions-PDFMayank Kumar
 
The Evolution from Agile to DevOps
The Evolution from Agile to DevOpsThe Evolution from Agile to DevOps
The Evolution from Agile to DevOpsXMPlify Tech
 
DevOps Automation: Boosting Efficiency and Productivity
DevOps Automation: Boosting Efficiency and ProductivityDevOps Automation: Boosting Efficiency and Productivity
DevOps Automation: Boosting Efficiency and ProductivityFredReynolds2
 
Introduction to dev ops
Introduction to dev opsIntroduction to dev ops
Introduction to dev opsAbdul Rahim
 
Devops Explained & Best Practices
Devops Explained & Best PracticesDevops Explained & Best Practices
Devops Explained & Best PracticesShikhaKonda
 
How Azure DevOps can boost your organization's productivity
How Azure DevOps can boost your organization's productivityHow Azure DevOps can boost your organization's productivity
How Azure DevOps can boost your organization's productivityIvan Porta
 
Part 2 improving your software development v1.0
Part 2   improving your software development v1.0Part 2   improving your software development v1.0
Part 2 improving your software development v1.0Jasmine Conseil
 
Back To Basics
Back To BasicsBack To Basics
Back To Basicskamalikamj
 

Similar to Intro to DevOps 4 undergraduates (20)

What_is_DevOps_how_it's_very_useful_in_daily_Life.
What_is_DevOps_how_it's_very_useful_in_daily_Life.What_is_DevOps_how_it's_very_useful_in_daily_Life.
What_is_DevOps_how_it's_very_useful_in_daily_Life.
 
What is DevOps And How It Is Useful In Real life.
What is DevOps And How It Is Useful In Real life.What is DevOps And How It Is Useful In Real life.
What is DevOps And How It Is Useful In Real life.
 
What_is_DevOps.pptx
What_is_DevOps.pptxWhat_is_DevOps.pptx
What_is_DevOps.pptx
 
What is DevOps Services_ Tools and Benefits.pdf
What is DevOps Services_ Tools and Benefits.pdfWhat is DevOps Services_ Tools and Benefits.pdf
What is DevOps Services_ Tools and Benefits.pdf
 
What is DevOps Services_ Tools and Benefits.pdf
What is DevOps Services_ Tools and Benefits.pdfWhat is DevOps Services_ Tools and Benefits.pdf
What is DevOps Services_ Tools and Benefits.pdf
 
DevOps to DevSecOps Journey..
DevOps to DevSecOps Journey..DevOps to DevSecOps Journey..
DevOps to DevSecOps Journey..
 
SDLC & DevOps Transformation with Agile
SDLC & DevOps Transformation with AgileSDLC & DevOps Transformation with Agile
SDLC & DevOps Transformation with Agile
 
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitThe DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
 
The DevOps Paradigm
The DevOps ParadigmThe DevOps Paradigm
The DevOps Paradigm
 
DevOps culture, concepte , philosophie and practices
DevOps culture, concepte , philosophie and practicesDevOps culture, concepte , philosophie and practices
DevOps culture, concepte , philosophie and practices
 
Devops interview-questions-PDF
Devops interview-questions-PDFDevops interview-questions-PDF
Devops interview-questions-PDF
 
The Evolution from Agile to DevOps
The Evolution from Agile to DevOpsThe Evolution from Agile to DevOps
The Evolution from Agile to DevOps
 
DevOps Automation: Boosting Efficiency and Productivity
DevOps Automation: Boosting Efficiency and ProductivityDevOps Automation: Boosting Efficiency and Productivity
DevOps Automation: Boosting Efficiency and Productivity
 
Introduction to dev ops
Introduction to dev opsIntroduction to dev ops
Introduction to dev ops
 
intro to DevOps
intro to DevOpsintro to DevOps
intro to DevOps
 
Devops Explained & Best Practices
Devops Explained & Best PracticesDevops Explained & Best Practices
Devops Explained & Best Practices
 
How Azure DevOps can boost your organization's productivity
How Azure DevOps can boost your organization's productivityHow Azure DevOps can boost your organization's productivity
How Azure DevOps can boost your organization's productivity
 
Part 2 improving your software development v1.0
Part 2   improving your software development v1.0Part 2   improving your software development v1.0
Part 2 improving your software development v1.0
 
Back To Basics
Back To BasicsBack To Basics
Back To Basics
 
DevOps & DevEx
DevOps & DevExDevOps & DevEx
DevOps & DevEx
 

Recently uploaded

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 

Recently uploaded (20)

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 

Intro to DevOps 4 undergraduates

  • 1. Intro to DevOps 4 Undergraduates Liran Levy September, 2016
  • 2. Objective 2 Help students get familiar with the basic concepts of DevOps processes and technologies and the challenges facing companies who are looking to embrace scalable software deployment.
  • 3. Syllabus 3  Intro to DevOps  Intro Cloud Computing  Intro to Linux Basics  Intro to Version Control System (VCS) o GIT o GitHub  Intro to Web Development o HTML o JavaScript o NodeJs  Demo App  Intro to Continuous Integration o Jenkins o CircelCI  Intro to Continuous Deployment o Docker o DockerHub o AWS EC2  Continuous Delivery Demo
  • 5. About Me 5  Product manager for ALM Octane  Previously Sr.DevOps Manager for ADM Lifecycle Management portfolio-  ALM/QC  AGM  ALM Octane  7+ Years in HPHPEMF  liran.levy@microfocus.com  Linkedin
  • 12. The purpose of DevOps 12 Create Value ! … is the purpose of your organization !
  • 13. Creating Value Dev Product Customer $$$ Hey, Show me the value ! We have lots Of great ideas ! Get them to the Customer fast ! QA Ops How can we help ?
  • 14. Not the purpose of DevOps Dev QA Ops Eng. Customer Don’t know if want…
  • 15. Really Not the purpose of DevOps Dev QA Ops Eng.Product Unrealistic project deadlines ! Sloppy coding practices ! Shetty developers ! I told ya’ ! Unhappy Slow Ineffective at delivery Can’t learn from failures Hard to make changes Operational problems stack up
  • 16. Impediments to release velocity 47% 46% 45% 40% 35% 31% 40% 47% 47% 50% 53% 53% 11% 6% 5% 6% 11% 14% 1% 1% 3% 4% 1% 1% Provisioning of adequate development/test environments is problematic Applications are monolithic/tightly coupled Test processes are manual and effort laden Business sponsors can't make themselves available more frequently Deployment to production is manual/labor intensive We lack application or technical expertise and fear unintended impact of change "How do the following factors affect your ability to deliver working code to production faster?" Large impact Small Impact No Impact Don't Know Base: 255 North American and European IT decision-makers involved in application development and delivery at 12+ month intervals Source: A commissioned study conducted by Forrester Consulting on behalf of HP, October 2013
  • 17. The purpose of DevOps IdeaFeature, Bug Fix, Enhancement Deploy fast a/w quality Get feedback Customer (production)
  • 18. DevOps changes Org DNA Dev+QA (Engineering) Dev+Ops (DevOps) Dev QA Ops Eng. Ops Eng.
  • 19. What is DevOps ? 19 A methodology, involving a spectrum of cultural approaches, processes and technologies, designed to help the business reduce it’s TTM while also maintaining high quality releases
  • 21. Processes “A software engineering approach that help 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. The approach helps reduce the cost, time, and risk of delivering changes by allowing for more incremental updates to applications in production” Continuous Delivery
  • 23. Continuous Delivery Landscape 23 Contributor (E.g. Developer) VCS CI CD CustomerARM Feedback
  • 25. What is a DevOps engineer, anyway? DevOps engineers are a pretty elite group, “Special Forces” in an organization, sharing the following attributes:  Ability to use a wide variety of open source technologies and tools  Ability to code and script  Experience with systems (OS) and IT operations  Strong grasp of automation tools  A strong focus on business outcomes  Comfort with collaboration, open communication and reaching across functional borders
  • 26. Is DevOps Eng. wanted ? https://puppet.com/resources/white-paper/2015-devops-salary-report/thank-you
  • 28.
  • 29. Intro to Cloud Computing 29
  • 30. Starting Point – Physical Machine – Physical Hardware – Processors, memory, chipset, I/O devices, etc. – Resources often grossly underutilized – Software – Tightly coupled to physical hardware – Single active OS instance – OS controls hardware
  • 31. Virtual Machine – Software Abstraction – Behaves like hardware – Encapsulates all OS and application state – Virtualization Layer – Extra level of indirection – Decouples hardware, OS – Enforces isolation – Multiplexes physical hardware across VMs
  • 32. What is Cloud Computing ? An analogy: Think of electricity service…
  • 33. What is Cloud Computing ?  Cloud Commuting is also a utility service – giving you access to technology resources managed by experts and available on-demand.  You simply access theses services over the internet, with no up-front costs and you pay only for the resource you use.
  • 34. Cloud Computing Stack  SaaS applications are designed for end- users, delivered over the web.  PaaS is the set of tools and services designed to make coding and deploying those applications quick and efficient.  IaaS is the hardware and software that powers it all – servers, storage, networks, operating systems.
  • 36. Cloud Computing is Everywhere
  • 37. Cloud Computing & DevOps A Marriage Made in Heaven
  • 38. Intro to Linux Basics 38
  • 39. What is Linux ?  A free, open-source operating system.  Has been under active development since 1991.  It has evolved to be versatile and is used all over the world, from web servers to cellphones.
  • 41. Linux Distributions Linux isn’t a complete OS — it’s just a kernel. Linux distributions take the Linux kernel and combine it with other free software to create complete packages.
  • 42. The Terminal Shell  The shell allows you to execute commands.  All administrative tasks can be accomplished through the terminal. This includes file manipulation, package installation, and user management.  The terminal is interactive. You specify commands to run. The terminal outputs the results of those commands. Executing any command is done by typing it and pressing Enter.
  • 43. Basic Commands  pwd  ls  cd <folder>  cd ..  mkdir <folder>  rm <filefolder>  cat <file>  touch <file>  mv <file1> <file2>  cp <file1> <file2>  man <cmd>
  • 45. The Problem Lots of code (millions of lines) and lots of developers spread over the globe
  • 46. Dealing With Change  Copying (Coursework_working.java, Coursework_tmp.java)  Copy & Paste code snippets  Copy entire directories  Emailing code to people  Using DropBox, Etc.
  • 47. What is Version Control System ?  Category of software tools that help a software team manage changes to source code over time.  Keeps track of every modification to the code in a special kind of database.  Essential part of the every-day of the modern software team‘s professional practices.
  • 48. Benefits of Version Control Systems  History. A complete long-term change history of every file. This means every change made by many individuals over the years.  Branching and merging. Having team members work concurrently is a no-brainer, but even individuals working on their own can benefit from the ability to work on independent streams of changes.  Traceability. Being able to trace each change made to the software and connect it to project management and bug tracking software.
  • 50. 50 An open source, (distributed) version control system designed for speed and efficiency. What is GIT
  • 55. 55 What is GitHub A PaaS based code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere. https://github.com/
  • 56. First GitHub Repository  Sign up for GitHub  Create New Repository
  • 57. First GIT Repository Open the command line - > git config --global user.name “liranlevy3” > git config --global user.email “liran.levy@hpe.com” > git clone https://github.com/liranlevy3/liran.git > cd liran > touch test > git add test > git commit –m “my first commit” > git push origin master
  • 59. First GIT Branch Open the command line - > git branch > git checkout –b new_feature > git branch > echo "this is a test" > test > git add test > git commit –m “add new feature branch” > git push origin new_feature
  • 60. Using GutHub to host your website for FREE (!) Open the command line - > git branch > git checkout –b gh-pages From windows:  Go to C:cygwin64homelevyli  Create New file index.html  Add the string “<h1>Welcome to Liran’s website</h1>“ > git add index.html > git commit –m “add index.html” > git push origin gh-pages https://liranlevy3.github.io/liran/ http://username.github.io/repository/
  • 61. Intro to Web Development 61
  • 62. What is Web Development ? The creation of dynamic web applications such as Facebook or e-commerce sites like Amazon.  Many argue it’s the best form of coding for beginners to learn. It’s easy to set up, you get instant results and there’s plenty of online training available.  Learning web development It’s one of the smartest decisions you will ever make (!)
  • 63. Web Development Overview Front-End Back-End Full-Stack
  • 64. Web Development Overview  Front-End Development (a.k.a client-side development) – What a user sees when they load a web application – things that runs in the browser.  HTML  CSS  JavaScript  Back-End Development (a.k.a server-side development) – What goes on behind the scenes of a web application – things that runs in the server.  PHP  Ruby  Python  Java  NodeJs (JavaScript)  ASP.Net  Perl
  • 65. How Front-End and Back-End interacts ? Server-Rendered Apps The browser sends a HTTP request and the server replies with a HTML page. Between receiving the request and responding, the server usually queries the database and feeds it into a template. The browser then loads the HTML and defines what things are, CSS how they look and JS any special interactions. AJAX (Asynchronous JavaScript and XML) AJAX is about updating parts of a web page, without reloading the whole page. The browser sends a HTTP request from within the page and get’s back a JSON response. This means that your server needs to have an endpoint which replies JSON to requests. Two architectures for this are REST and SOAP.
  • 66. Intro to Web Development 66 Front-End - HTML
  • 67. What is HTML?  HTML is a markup language for describing web documents (web pages).  HTML documents are described by HTML tags.  Each HTML tag describes different document content.
  • 68. HTML Tags  HTML tags are keywords (tag names) surrounded by angle brackets:  <tagname>  </tagname>  HTML tags normally come in pairs like <p> and </p>. http://www.w3schools.com/tags/
  • 70. HTML Elements  An HTML element usually consists of a start tag and end tag, with the content inserted in between <tagname>content goes here...</tagname>  HTML elements can be nested (elements can contain elements).  All HTML elements can have attributes.  Attributes provide additional information about an element.  Attributes are always specified in the start tag.  Attributes usually come in name/value pairs like: name="value“. HTML Attributes
  • 71. Some Common Elements  HTML headings are defined with the <h1> to <h6> tags. <h1>This is heading 1</h1>  HTML paragraphs are defined with the <p> tag. <p>This is a paragraph</p>  HTML links are defined with the <a> tag. <a href="http://www.hpe.com">This is a link</a>  HTML images are defined with the <img> tag. <img src=“hpe.jpg" width="104" height="142">
  • 72. Web Browsers  The purpose of a web browser is to read HTML documents and display them.  The browser does not display the HTML tags, but uses them to determine how to display the document.
  • 73. First HTML Page From windows:  Go to C:cygwin64homelevyli  Copy the file pic_bulboff.gif  Create new file first_html_page.html <!DOCTYPE html> <html> <body> <h1>My First HTML page</h1> <p>Here is a lightbulb ! </p> <img id="myImage" src="pic_bulboff.gif" style="width:100px"> </body> </html>
  • 75. Intro to Web Development 75 Front-End - JavaScript
  • 76. What is JavaScript ?  JavaScript is the programming language of HTML and the Web.  JavaScript is easy to learn.  JavaScript Can Change HTML document.
  • 78. JavaScript and HTML  JavaScript can be placed in the <body> and the <head> sections of an HTML page.  JavaScript code must be inserted between <script> and </script> tags. http://www.w3schools.com/js/tryit.asp?filename=tryjs_whereto_head
  • 79. Syntax  Statements are separated by ;  Strings are text, written within double (“) or single quotes (‘)  JavaScript uses the var keyword to declare variables  Code after double slashes // or between /* and */ is treated as a comment  All JavaScript identifiers are case sensitive var x=1; // x is an identifier var y=2; // y is an identifier document.getElementById("demo").innerHTML = x + y ;
  • 80. Keywords (Examples) Keyword Description break Terminates a switch or a loop continue Jumps out of a loop and starts at the top do ... while Executes a block of statements, and repeats the block, while a condition is true for Marks a block of statements to be executed, as long as a condition is true function Declares a function if ... else Marks a block of statements to be executed, depending on a condition return Exits a function switch Marks a block of statements to be executed, depending on different cases try ... catch Implements error handling to a block of statements var Declares a variable
  • 81. Data Types Undefined, Number, Boolean, Array, Object  JavaScript has only one type of numbers.  Object properties are written as name:value pairs, separated by commas.  In JavaScript, the data type of null is an object. var x; // Undefined var size= 3; // Number var x = true; // Boolean var name = "Johnson"; // String var cars = [“Honda", “Mazda", “Kia"]; // Array var x = {firstName:“Liran", lastName:“Levy"}; // Object var x = null; // Empty object
  • 82. Objects  In JavaScript, all values, except primitive values, are objects.  Primitive are: strings, numbers, true, false, null and undefined.  Objects are variables that can contain many values.  The values are written as name:value pairs.
  • 83. Objects Declreation  var person = {firstName:"John", lastName:"Doe", age:50, eyeColor:“green"};  var person = new Object(); person.firstName = "John"; person.lastName = "Doe"; person.age = 50; person.eyeColor = “green";  function person(first, last, age, eye) { this.firstName = first; this.lastName = last; this.age = age; this.eyeColor = eye; } var myFather = new person("John", "Doe", 50, “green");
  • 84. Objects Properties  Properties are the values associated with an object.  The syntax for accessing the property of an object is:  objectName.property // person.firstName  objectName["property"] // person["firstName"]  objectName[expression] // x = "firstName"; person[x]
  • 85. Functions  A JavaScript function is a block of code designed to perform a particular task. function myFunction(a, b) { return a * b; } var myFunction = new Function("a", "b", "return a * b");  var x = myFunction(4, 3); var x = function (a, b) {return a * b};  var y = x(4, 3);
  • 86. HTML Events  An HTML event can be something the browser does, or something a user does.  JavaScript lets you execute code when events are detected.  HTML allows event handler attributes, with JavaScript code, to be added to HTML elements. http://www.w3schools.com/js/tryit.asp?filename=tryjs_event_onclick1
  • 87. HTML Events (Examples) Event Description onclick The user clicks an HTML element onmouseover The user moves the mouse over an HTML element onmouseout The user moves the mouse away from an HTML element onkeydown The user pushes a keyboard key
  • 88. JavaScript HTML DOM (Document Object Model) When a web page is loaded, the browser creates a Document Object Model of the page.
  • 89. JavaScript HTML DOM (Examples)
  • 90. First JavaScript Code <!DOCTYPE html> <html> <body> <h1>My First JS code</h1> <p>Here is a lightbulb ! </p> <button ???>Turn on the light</button> <img id="myImage" src="pic_bulboff.gif" style="width:100px"> <button ???>Turn off the light</button> </body> </html> From windows:  Go to C:cygwin64homelevyli  Copy the file pic_bulbon.gif  Create new file first_js_code.html
  • 92. Intro to Web Development 92 Back-End - NodeJs
  • 93. What is NodeJS?  A very powerful JavaScript-based framework built on Google Chrome's JavaScript V8 Engine.  Used to develop web applications like video streaming sites, single-page applications, and other web applications.  Open source, completely free, and used by thousands of developers around the world.  Provides rich library of various JavaScript modules which simplifies the development of web applications using Node.js to a great extent.
  • 94. NodeJs is Asynchronous Blocking Code Non-Blocking Code var fs = require("fs"); var data = fs.readFileSync('input.txt'); console.log(data.toString()); console.log("Program Ended"); var fs = require("fs"); fs.readFile('input.txt', function (err, data) { if (err) return console.error(err); console.log(data.toString()); }); console.log("Program Ended");  A callback function is called at the completion of a given task.  Node makes heavy use of callbacks. All the APIs of Node are written in such a way that they support callbacks.
  • 95. NodeJs First Application From windows:  Go to C:cygwin64homelevyli  Copy the file main.js > node main.js http://127.0.0.1:8080/
  • 96. Node Package Manager  NPM makes it easy for JavaScript developers to share and reuse JS modules (packages).  A typical application, such as a website, will depend on dozens or hundreds of packages.  Developers can find packages to help build applications by browsing the NPM website.  All NPM packages are open source and can be downloaded for free. https://www.npmjs.com/
  • 97. Package.json  The best way to manage locally installed npm packages.  It serves as documentation for what packages your project depends on.  It allows you to specify the versions of a package that your project can use.  Makes your build reproducible which means that its way easier to share with other developers.  Should be located on the project root folder.
  • 102. Mean Stack Demo App https://github.com/liranlevy3/todoapp http://52.209.77.250:8080/
  • 103. Mean Stack Demo App – NPM
  • 104. Intro to Continuous Integration 104
  • 105. Why Continuous Integration ? 105 Pain Time Observation #1 As longer as developers going between merging their code base, the more painful that merge is going to be (known as “Integration Hell”).  Integrate Faster
  • 106. Why Continuous Integration ? 106 Quality Time Observation #2 𝑰𝒏𝒕𝒆𝒈𝒓𝒂𝒕𝒊𝒐𝒏 ≠ 𝑴𝒆𝒓𝒈𝒆 𝑰𝒏𝒕𝒆𝒈𝒓𝒂𝒕𝒊𝒐𝒏 = 𝑴𝒆𝒓𝒈𝒆 + 𝑸𝒖𝒂𝒍𝒊𝒕𝒚  Integrate Faster aw with Quality
  • 107. What is it ? 107 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 and tests, allowing teams to detect problems early. By integrating regularly, you can detect errors quickly, and locate them more easily.
  • 108. Continuous Delivery Landscape 108 Contributor (E.g. Developer) SCM CI CD CustomerARM Feedback
  • 109. Continuous Integration Landscape 109 Contributor Push Changes SCM Push Trigger Feedback ARM Publish DB CI Server Build Servers Test Servers AUT Servers
  • 110. Basic Process 110 Report Package & Publish Stop App Integration Tests API Tests Start App System Tests Static Analysis Unit TestsCompile Code Validations DB CI Server Build Servers Test Servers AUT Servers
  • 111. Essential Practices 111  Maintain a Single Source Repository  Automate the build  Make Your Build Self-Testing  Everyone Commits To the Mainline (Master) Every Day  Every Commit Should Build the Mainline (Master) on an Integration Machine  Fix Broken Builds Immediately  Keep the Build Fast  Test in a Clone of the Production Environment
  • 112. Intro to Continuous Integration 112 Creating Value - Examples
  • 113. Full CI (≤120m) Quick CI (≤30m) Sanity CI (≤20m) Change Feedback Time (CFT)
  • 114. 94m 133m 180m 59m 180m 84m 72m MTTR=114m Above ~ 90% uptime ** * MTTR = The mean time elapse from alerting on CI break till fixed by RnD ** uptime – CI is green or yellow Mean Time to Recover (MTTR)
  • 115. 75.86% SUCCESS 24.14% Failure 14.07% DEV 10.07% ENV CFR≈25% Out of which 14% Bad Dev Commits * intercepted * Bad Dev Commits = Compilation andor tests failures Change Failure Rate (CFR)
  • 116. UI UT, 1831, 25% Server UT, 4871, 68% Rest, 473, 7% System, 22, 0% UI UT Server UT Rest System CR≈36.8% 85% target Coverage Rate (CR)
  • 117. Intro to Continuous Integration 117 Jenkins
  • 118. 118 What is Jenkins?  Jenkins is an application and a framework that manages and monitor the execution of repeated tasks.  Open source and under development since 2005  It’s primarily used as a Continuous Integration tool for building software  Supported by over hundreds plugins http://jenkins-ci.org/
  • 120. 120 Jenkins CI in real life
  • 121. 121 Behind each Job – Groovy Code import groovy.json.JsonSlurper def repo = "TA-demo/simple-demo-app" URL branchUrl = "https://api.github.com/repos/$repo/branches".toURL() List branches = new JsonSlurper().parse(branchUrl.newReader()) branches.each { branch -> String safeBranchName = branch.name.replaceAll('/', '-') job("dsl-simple-maven-$safeBranchName") { scm { github repo, branch.name } steps { maven { goals('clean') goals('test') mavenInstallation('Local') } } publishers { archiveJunit '**/surefire-reports/*.xml' } } }
  • 122. Intro to Continuous Integration 122 CircleCI
  • 123. 123 What is CircelCI ?  A PaaS based Continuous Integration and Delivery platform.  Out of the box support for NodeJs, Java, Python, PHP, Scala, Go and more.  Out of the box integration with many testing's and deployment tools.  Fermium https://circleci.com/
  • 124. 124 CircelCI Flow  Infrastructure: Allocates the VM that will run the flow  Checkout: checking out and cloning your GIT repo  Machine: adjusting the VM to your preferences and requirements  Dependencies: setting up your project’s language-specific dependencies  Database: preparing the databases for your tests  Test: running your tests  Deployment: deploying your code to your web servers  TearDown: Collect metadata, disable VM
  • 126. Webhooks Webhooks allow external services to be notified when certain events happen within your repository. When the specified events happen, GitHub sends a POST (HTTP) request to the URLs provided.
  • 129. Intro to Continuous Deployment 129
  • 130. What is it ? 130 Continuous deployment can be thought of as an extension of Continuous Integration, aiming at minimizing lead time, the time elapsed between development writing one new line of code and this new code being used by live users, in production.
  • 131. Continuous Delivery Landscape 131 Contributor (E.g. Developer) SCM CI CD CustomerARM Feedback
  • 132. Continuous Deployment Landscape 132 DB Orchestor Server LB App Servers Customer UI Servers ARM
  • 133. Basic Process 133 Report Smoke Test Start AppUpgradeConfigureExtractFetchStop App DB Orchestrate Server LB App Servers UI Servers
  • 134. Essential Practices 134  Compile only once (CI phase)  Deploy the same way to every environment  Smoke-Test your deployment  Deploy into a copy of production (Staging) first
  • 135. Intro to Continuous Deployment 135 Creating Value - Examples
  • 136. CLT≈145m-325m Deployment Frequency = 0m^-180m ^ - On demand self-service Sanity CI • 20m Full CI • 120m CD • 5m Idle time ≤ 180m Idle time ≤ 0m * CLT = The time from committing a change to deployment Change Lead Time (CLT)
  • 137. Intro to Continuous Deployment 137 Docker
  • 138. What are Linux Containers ?  Contain applications in a way that keep them isolated from the host system that they run on, by taking advantage of Linux Kernel namespace and cgroup features.  Allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.  Designed to make it easier to provide a consistent experience as developers move code from development environments into production in a fast and replicable way.
  • 139. What is Docker ?  Docker is a command-line tool for programmatically defining the contents of a Linux container in code, which can then be versioned, reproduced, shared, and modified easily just as if it were the source code to a program.  Docker container can run anywhere (almost?), they’re lightweight and therefore can be shipped and run, unchanged, on laptops, data center VMs and any cloud servers.  Docker is an open-source.
  • 140. Virtual Machine Vs. Linux Containers Virtual Machine contains not only the application and all needed bins and libs, it also contains the entire guest operating system. Docker container comprises just the application and its dependencies. It runs as an isolated process on the host operating system, sharing the kernel with other containers. Thus, it enjoys the resource isolation and allocation benefits of VMs but is much more portable and efficient.
  • 141. 141 Real world analogy to Linux Containers
  • 142. 142 Real world analogy to Linux Containers
  • 143. 143 Back-End Front-EndSearch Queue DB Development VM QA server Public Cloud Contributor’s laptop Production Cluster Customer Data Center …that can be manipulated using standard operations and run consistently on virtually any hardware platform An engine that enables any payload to be encapsulated as a lightweight, portable, Self sufficient container… And in our case
  • 145. 145 Docker Basic Commands  docker images  docker rmi –f <image id>  docker ps  docker rm –f <container id>  docker build –t <image name> <path>  docker run <image name>
  • 146. 146 Dockerfile  Docker can build images automatically by reading the instructions from a Dockerfile.  Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.  Dockerfile format -  Docker runs instructions in a Dockerfile in order.  The first instruction must be `FROM` in order to specify the Base Image from which you are building.  The Docker build command takes a Dockerfile as input and output A Docker image.
  • 148. 148 Dockerfile Instructions (Examples)  FROM - Sets the base image for subsequent instructions. A valid Dockerfile must start with From.  RUN - Execute any commands in a new layer on top of the current image and commit the results. The resulting committed image will be used for the next step in the dockerfile.  CMD – Provide default for executing container. There can only be one CMD instruction in a Docker file.  EXPOSE - Informs Docker that the container listens on the specified network ports at runtime.  ENV - Sets the environment variable the container has on runtime.  ADD/COPY - Copies new files, directories or remote file URLs from <src> to container file system.  WORKDIR- Sets the working directory for any instructions that follow it in the Dockerfile.
  • 149. VM 149 Dockerizing our Demo App  sudo docker build -t liranlevy3/todoapp .  sudo docker run --name mongo -d mongo  sudo docker run -it -p 8080:8080 --name todoapp --link mongo -d liranlevy3/todoapp TodoApp NodeJs MongoDB
  • 151. Intro to Continuous Deployment 151 DockerHub
  • 152. 152 What is DockerHub ?  A PaaS based Artifact Repository Manager (ARM) for Docker Images platform.  Similar to GitHub, but stores Docker binaries rather than source code.  Fermium https://hub.docker.com/
  • 156. Intro to Continuous Deployment 156 Amazon Web Services
  • 157. What is Amazon Web Services (AWS) ? 157  Amazon Web Services (AWS) is a secure cloud services platform, offering compute power, database storage, content delivery and other functionality to help businesses scale and grow.  AWS are both IaaS and PaaS provider.
  • 159. AWS are spread WW 159
  • 160. AWS Cloud Services Platform 160
  • 161. AWS Elastic Compute Cloud (EC2) 161  AWS EC2 == Virtual Machine  AWS EC2 is on demand commuting power  Obtain and boot new virtual machines (servers) in seconds  Quickly scale capacity up and down  Servers from 0.02$ (2 cents) per hour  Support for Linux and Windows
  • 162. AWS Elastic Compute Cloud (EC2) Demo 162 https://662068354453.signin.aws.amazon.com/console
  • 165. Continuous Delivery Demo 165 Contributor VCS CI CD CustomerARM http://52.209.77.250:8080/
  • 166. 166 Updating our Demo App  sudo docker ps  sudo docker ps rm –f  sudo docker images  sudo docker ps rmi –f  sudo docker pull liranlevy3/todoapp  sudo docker run -it -p 8080:8080 --name todoapp --link mongo -d liranlevy3/todoapp
  • 167. Thank you & Good Luck ! 167