SlideShare una empresa de Scribd logo
1 de 77
Descargar para leer sin conexión
MODERN WEB APPLICATIONS 
! 
INFRASTRUCTURE 
PRACTICES, FLOWS AND TOOLS $CUGFQP4'#.UVQTKGU
! 
! 
IGOR ALPERT 
# IGOR_ALPERT@EPAM.COM 
 
HTTP://UA.LINKEDIN.COM/IN/IALPERT 
EPAM Systems 2
Application ! 
! 
GXGNQRGT 
EPAM Systems 3
Application 
CSS 
JS 
HTML 
! 
! 
+%CP(62 
EPAM Systems 4
5 
Application 
EPAM Systems 
$ 
Feature 
#1 
Feature 
#2 
Bug 
fixing 
! 
6JG[CEVCUCVGCO
Logs 
6 
Application 
EPAM Systems 
$ % 
! 
5QWTEGEQFG 
)KICD[VGUQHFGDWI
7 
Application 
EPAM Systems 
Logs 
Doc 
! 
$ % 
%QOOGPVU 
CPFGZCORNGU
8 
Application 
$ 
Logs 
Docs 
Config 
! 
% 
KHHDGVYGGPFGXCPFRTQFWEVKQP 
EPAM Systems
Packages 
9 
Application 
$ 
Config 
! 
% 
L3WGT[CPFHTKGPFU 
EPAM Systems 
Logs 
Docs
10 
Application 
$ 
Logs 
Docs 
Config 
Tests 
! 
% 
Packages 
*CRR[RCVJ 
EPAM Systems
11 
Application 
$  
! 
% 
/CIKEDWKNFU[UVGO 
EPAM Systems
12 
Application 
0.5 
$ 0.8 
1.0 
! 
%  
#NRJC$GVC4% 
EPAM Systems
13 
Application 
0.5 
$ 0.8 
1.0 
! 
Dev 
Test 
Prod 
%  
GXU3#5WRRQTV%NKGPV 
EPAM Systems
14 
Application 
0.5 
$ 0.8 
1.0 
! 
Dev 
Test 
Prod 
APP 
DB 
SV 
%  ' 
#RR5GTXGT 
EPAM Systems
' ' 
' ' 
DB 
DB 
DB 
DB 
15 
Application 
$ 
! 
%   
6QPUQHUGTXGTU 
CPFCVC$CUGU 
EPAM Systems 
.QCFDCNCPEGT
16 
Application 
$ 
! 
%   7 
Errors 
Metrics 
Logs 
7UGHWNKPHQTOCVKQPNKXGUJGTG 
EPAM Systems
17 
Agenda ! 
$ 
DEVELOPMENT 
WORKFLOW 
% 
SOURCE 
MANAGEMENT 
 
BUILD 
PIPELINE 
 
DEPLOY 
PLATFORMS 
7 
MONITORING 
METRICS 
# 
CONTINUOUS 
INTEGRATION 
EPAM Systems
$ 
DEVELOPMENT 
WORKFLOW
DEVELOPMENT WORKFLOW $ 
#TEJKVGEV6GEJ.GCFGXGNQRGTU 
DEV ( $ 
Managers 
5WRRQTVGX1RU2TQDNGOOCPCIGOGPV 
) 
QA 
% 
Support 
3#.GCF/CPWCN#WVQOCVKQP 
#EEQWPV/CPCIGT#PCN[VKE 
EPAM Systems 19
DEVELOPMENT WORKFLOW $ 
6JG[YCPVVQEQFG 
0GYHGCVWTGU6JG[YCPVVQIQNFGPRNCVGVJGKTEQFG 
6JG[YCPVVQTGFWEGVGEJPKECNFGRV 
( $ 
DEV 
#NYC[UJCXGUQOGňVKP[ʼnEJCPIG 
Managers 
) 
QA 
% 
Support 
6JG[YCPVUKORNKEKV[ 
0QOQTGUWFFGPRNCVHQTO 
EJCPIGU 
6JG[YCPVUVCDKNKV[ 
VQTGSWKTGOGPVUCPFUVQTKGU 
#UC7UGT+YCPVŎ 
-PQYPDWIU6QQOWEJVKOGVQFQHWNNTGITGUUKQP 
DGVVGTVQWUGRTGXKQWUňUVCDNGʼnXGTUKQP 
EPAM Systems 20
DEVELOPMENT WORKFLOW $ 
$ 
DEV QA 
( 
Managers 
) 
% 
Support 
#EVYKVJ+PVGITKV[UJCTGFIQCNU 
EPAM Systems 21
DEVELOPMENT WORKFLOW $ 
( 
DESIGN 
) 
TESTING 
 
$ 
DEVELOP BUILD, DEPLOY 
LAUNCH 
a 
BUG FIX 
' 
2-4 WEEKS ITERATION 
EPAM Systems 22
DEVELOPMENT WORKFLOW 
#WVQOCVGFVGUVU 
%QNNCDQTCVKXGFGXGNQROGPV 
%QFGHGCVWTGUYKVJVGUVKPOKPF 
#WVQOCVGFDWKNF 
9TKVGCUOWEJHCKNKPIVGUVUCURQUUKDNGVQ 
EQXGTTGSWKTGOGPVU 
2NCPCPFGUKIP 
$ 
'CEJUQWTEGEJCPIGVTKIIGTUYJQNG 
DWKNFRKRGNKPGVQTWP 
6JKPMJQY[QWTHGCVWTGYKNNDG 
KORNGOGPVGFCPFKPVGITCVGFYKVJ 
QVJGTHGCVWTGU 
 
( 
* 
% 
$ 
+PVGITCVKQP 
4GCNVKOGOQPKVQTKPICPFHGGFDCEM 
UP TO 1 DAY ITERATION 
EPAM Systems 23
24 
DEVELOPMENT WORKFLOW 
SERVERS 
1. NGINX 
2. APACHE HTTPd 
3. TOMCAT 
4. IIS 
5. NODEJS 
6. EXPRESS 
7. … 
EPAM Systems 
STYLES 
1. TWITTER BOOTSTRAP 
2. ZURB FOUNDATION 
3. COMPASS 
4. SASS 
5. LESS 
6. STYLUS 
7. CUSTOM SOLUTION 
FRAMEWORKS 
1. ANGULARJS 
2. BACKBONE 
3. EXTJS 
4. SENCHA TOUCH 
5. EMBERJS 
6. METEOR 
7. DERBY 
8. CUSTOM SOLUTION 
TESTING 
1. JASMINE 
2. MOCHA 
3. BUSTER 
4. QUNIT 
5. KARMA 
6. PROTRACTOR 
7. NIGHTWATCH 
8. INTERN 
9. WEBDRIVER.IO 
10.CUSTOM SOLUTION 
OS 
1. WINDOWS 
2. OSX 
3. UBUNTU 
4. CENTOS 
5. FREEBSD 
6. COREOS 
TOOLS 
1. GRUNT 
2. GULP 
3. NPM 
4. BOWER 
5. YEOMAN 
6. CUSTOM SOLUTION 
DATABASES 
1. MONGODB 
2. COUCHDB 
3. RIAK 
4. REDIS 
5. CASSANDRA 
SERVICES 
1. AMAZON 
2. NODEJITSU 
3. HEROKU 
4. MONGOLAB 
5. FIREBASE 
6. JOYENT 
7. PUSHER 
8. DOCKER 
$ 
6QPUQHTGCF[VQWUG 
1RVKQPUHQT[QWT 
RTQLGEV 
SERVER SIDE 
1. PHP 
2. RUBY 
3. PYTHON 
4. … 
!
DEVELOPMENT WORKFLOW $ 
Ability to compile native modules — easier to “make from source” then in 
Windows 
;QWTHTKGPFU 
VIRTUAL MACHINE 
NODEJS, RUBY, PYTHON 
Your toolset will ask for them as a dependency 
Works better and faster on Unix based systems 
WINDOWS 
Building a Module in Windows 
node-gyp, Python, shell, VS, … 
55*0Q)7+ 
%JGH2WRRGV8 
EPAM Systems 25
DEPENDENCY MANAGEMENT $ 
Homebrew 
Packager for OSX, uses formulas to install 
software 
Mac OSX 
brew install [package] 
Advanced Packaging Tool 
Package manager for Debian GNU/Linux 
distribution and its variants 
Ubuntu 
apt-get install [package] 
Yum 
The Yellowdog Updater, Modified (yum) is an 
open-source command-line package 
management utility for Linux operating 
CentOS 
yum install [package] 
Chocolatey 
Chocolatey NuGet is a Machine Package 
Manager, somewhat like apt-get, but built with 
Windows in mind 
42/ 
Windows 
choco install [package] 
'$ 
EPAM Systems 26
DEPENDENCY MANAGEMENT $ 
OPENSSL 
PRCE 
NGINX 
PKG-CONFIG 
MAKEDEPEND 
GIT 
GIT-FLOW 
brew install git-flow brew install nginx 
EPAM Systems 27
DEPENDENCY MANAGEMENT $ 
NVM 
APP1 
Node 0.11x 
NVM 
APP2 
Node 0.10.31 
5VKNNVJGUCOGRTQLGEV 
EPAM Systems 28
DEPENDENCY MANAGEMENT $ 
NodeJS 
Node Version Manager - Simple bash script 
to manage multiple active node.js versions 
NVM 
https://github.com/creationix/nvm 
Ruby 
RVM is the Ruby enVironment Manager. It 
manages Ruby application environments and 
enables switching between them 
RVM 
https://github.com/wayneeseguin/rvm 
Python 
It creates an environment that has its own 
installation directories, that doesn’t share 
libraries with other virtualenv environments 
virtualenv 
https://github.com/pypa/virtualenv 
NodeJS 
A Node version manager for the windows folks 
out there. Inspired by n and nodenv 
Nodist 
https://github.com/marcelklehr/nodist 
9KPFQYU 
EPAM Systems 29
DEPENDENCY MANAGEMENT $ 
+PVGTHCEGKUVJGUCOG 
NPM BOWER 
manager install 
dependencies: { 
name: version, 
name: folder, 
name: package 
}, 
devDependencies: { 
test-framework-name: version 
} 
dependencies: { 
name: version, 
name: folder, 
name: package 
}, 
devDependencies: { 
test-framework-name: version 
} 
manager install 
manager install 
EPAM Systems 30
DEPENDENCY MANAGEMENT $ 
NPM 
LODASH 
GRUNT 
PACKAGE.JSON 
ASYNC 
DEV-DEPS 
KARMA 
Packages: 
Downloads: 
Corporate mirrors 
npm init 
npm install 
npm install —save 
QPņVHQTIGVVQ 
WRFCVG[QWTRCEMCIGU 
https://docs.npmjs.com/ 
EPAM Systems 31
DEPENDENCY MANAGEMENT $ 
BOWER 
BACKBONE 
LODASH 
BOWER 
JQUERY 
UNDERSCORE 
BOOTSTRAP 
Packages: 
npm install -g 
bower init 
bower install 
http://bower.io/ 
(QTHTQPVGPF 
EPAM Systems 32
BUILD 
PIPELINE
BUILD PIPELINE  
Source 
Concatenate 
Uglify 
SourceMaps 
Test 
Karma 
Protractor 
Mocha 
Coverage 
Preprocess 
LESS 
SASS 
Compass 
Watch 
LiveReload 
Rebuild 
Serve 
Assets 
Templates 
CSS 
HTML processing 
Images optimization 
Custom 
ChangeLog 
Notifications 
console.debug 
6CUMUVQCWVQOCVG 
KP[QWTDWKNFRKRGNKPG 
EPAM Systems 34
BUILD PIPELINE ! 
GRUNT 
Packages: 
grunt 
grunt coffee:app 
FILE BASED 
Good for file operations like copy/move/save. Configuration over 
code. Better for small projects with small amount of files. 
TONS OF PLUGINS 
Most popular JS task runner. Almost any possible task is available 
as plugin. You can perform build-in or custom operations. Sync/ 
Async 
1 
2 
Gruntfile.js 
Gruntfile.coffee 
jshint: { 
// define the files to lint 
files: ['gruntfile.js', 'src/**/*.js', 'test/**/*.js'], 
// configure JSHint 
options: { 
// more options here 
globals: { 
jQuery: true, 
console: true, 
module: true 
} 
} 
} 
http://gruntjs.com/ 
http://gruntjs.com/plugins 
ITWPVEQPVTKDLUJKPV 
EPAM Systems 35
BUILD PIPELINE ! 
GULP 
1 
2 
gulpfile.js 
EASY API 
Only 4 API methods: task, watch, src, dest. Easy to write complex 
flows. 
STREAM BASED 
No temporary files. Code over Configuration. Much more faster 
then Grunt for file-content processing operations. 
ZHCUVGT 
var gulp = require('gulp'); 
! 
gulp.task('default', function() { 
// place code for your default task here 
}); 
Packages: 
npm install --save-dev gulp 
gulp 
grunt coffee 
http://gulpjs.com 
http://gulpjs.com/plugins/ 
EPAM Systems 36
BUILD PIPELINE ! 
YEOMAN 
KARMA TESTS 
Pre-packed with test suites 
SCAFFOLDING 
Easy scaffolding system to generate 
application components 
SERVER 
Comes with build-in live-reload 
and grunt task 
1 
2 
3 
$ yo angular:controller myController 
$ yo angular:directive myDirective 
$ yo angular:filter myFilter 
$ yo angular:service myService 
http://gulpjs.com 
http://gulpjs.com/plugins/ 
Generators: ~1100 
npm install -g yo 
npm install -g generator-angular 
yo angular 
ITWPVUGTXG 
EPAM Systems 37
BUILD PIPELINE 
SLUSH 
https://www.npmjs.org/package/slush 
BROCCOLI 
https://www.npmjs.org/package/broccoli 
JAM AUTOMATION 
https://github.com/caolan/jam 
http://indigounited.com/automaton/ 
BRUNCH 
ANGUS 
http://brunch.io/ https://github.com/nickjanssen/angus 
! 
EPAM Systems 38
! 
SOURCE 
MANAGEMENT
SOURCE  
GIT 
EASY BRANCHING AND MERGING 
Cheap branching — just a reference to commit. Lots of possible 
merging strategies and conflict resolving. History rewrite 
DISTRIBUTED 
You can work alone or with a team. You can work with or without 
central server. Even without network connection. 
FAST 
You can clone whole repo/branch or just a few commits. 
All meta-data is stored in one place ~/.git 
1 
2 
3 
 
git init 
! 
git add 
git commit 
! 
git push —force 
! 
git rebase -i 
git merge 
! 
git tag -a 
%QPHNKEVTGUQNXGF 
EPAM Systems 40
SOURCE  
GITLAB 
PRIVATELY HOSTED 
You can integrate it with your own infrastructure, users base, private 
services etc 
TRUSTED BY ENTERPRISE 
Fully manageable and configurable 
Same capabilities — collaboration, forking, wiki and JIRA 
OPEN-SOURCE 
Hosted on GitHub. 
You can contribute and write your own features 
1 
2 
3 
-
 
*CRR[%NKGPVU 
EPAM Systems 41
SOURCE  
GITHUB 
WEB INTERFACE 
You are able to create branches, tags, pull-requests, edit and commit 
files directly from browser 
CODE REVIEW AND COLLABORATION 
Do code-review with your team, leave comments, track issues and 
maintain WIKI pages 
FORK, PULL REQUEST 
You can fork and contribute to any public repository. 
Home for open-source projects 
1 
2 
3 
Mirror mirror on the wall, 
who forks best of them all? 
EPAM Systems 42
SOURCE  
BITBUCKET 
FREE PRIVATE REPOS 
Unlike GitHub this service will allow you to create 
*unlimited* amount of private repositories. 
ENTERPRISE ORIENTED 
Natively integrates with Atlasssian software stack. 
Trusted by Enterprise. 
SPOONING vs. FORKING 
Spooning - with Bitbucket is a pair programming process as an 
opposite to forking 
1 
2 
3 
ň$KVDWEMGVURQQPKPI 
ŃLWUV)QQINGKV 
EPAM Systems 43
SOURCE  
BRANCHING 
MODELS 
Centralized 
Gitflow 
Github 
Feature branch 
FEATURE BRANCH 
Commit 
Commit 
Commit 
Commit 
REBASE 
SQUASH 
… 
REBASE 
UPSTREAM BRANCH 
FEATURE 
FEATURE 
FEATURE 
FEATURE 
EPAM Systems 44
SOURCE  
HOOKS 
Use Cases 
SPELLING ERRORS 
ENFORCE RULES 
EMAIL / SMS NOTIFICATIONS 
DEPLOY TRIGGER 
http://githooks.com/ 
9GDJQQMUVQQ 
All Git hooks are ordinary scripts that Git executes when certain 
events occur in the repository. This makes them very easy to 
install and configure 
Client Server 
PRE-COMMIT 
PREPARE-COMMIT-MSG 
COMMIT-MSG 
POST-COMMIT 
POST-CHECKOUT 
PRE-REBASE 
PRE-RECEIVE 
UPDATE 
POST-RECEIVE 
EPAM Systems 45
SOURCE  
COMMIT 
MESSAGES 
[FIX] Closes: #1234 
[BREAKING] Interface of method has been changed… 
[COMPLETE] Feature (F16:Raptor) is ready for integration 
[ENV] Some minor refactoring 
MAKE YOUR CONVENTION 
ISSUE MANAGEMENT 
1 
2 
3 RELEASE NOTES AND CHANGE LOGS 
4 ANNOTATIONS: squash! fixup! 
ň+ņXGHKZGFVJCVʼn 
EPAM Systems 46
# 
CONTINUOUS 
INTEGRATION
CONTINUOUS INTEGRATION # 
TECHNICAL 
DEPT 
TESTS WILL BE IN THE NEXT 
RELEASE 
$WITKXGPGXGNQROGPV 
CODE ENTROPY: “IF I TOUCH THAT 
CODE EVERYTHING WILL BREAK” 
TODO/FIXME STATEMENTS 
DOCS? MY CODE IS STATE OF ART 
LET’S JUST COPY/PASTE FOR NOW 
1 
2 
3 
4 
Fix this code, the only one who can. 
Is in another company already. 
http://en.wikipedia.org/wiki/Technical_debt 
5 
EPAM Systems 48
CONTINUOUS INTEGRATION # 
CODE 
QUALITY 
TECH BACKLOG 
CODE-STYLE: 
TABS/SPACES, INDENTATION 
.KUVQHVCUMU
RTKQTKV[ 
STATIC ANALYZE AND COMPLEXITY: 
BUGS, DUPLICATION, STANDARDS 
1 
2 
3 
4 UNIT-TESTS AND COVERAGE 
DOCS AND COMMENTS 
AUTOMATE 
5 
EPAM Systems 49
CONTINUOUS INTEGRATION # 
CODE 
STYLE 
Other validations JSCS Presets 
- COFFEELINT 
- CSS 
- HTML 
Tools 
- JSHINT + STYLISH 
- PLATO 
- CODE PAINTER 
- EDITORCONFIG 
- JSCS 
- ESLINT 
- AIRBNB 
- CROCKFORD 
- GOOGLE 
- JQUERY 
- MDCS (THREE.JS) 
- WIKIMEDIA 
- YANDEX 
1 
2 
3 
4 
5 
READABILITY 
GOOD NAMES 
CLEAR LOGIC 
POTENTIAL ISSUES 
GUIDELINES 

 
EPAM Systems 50
CONTINUOUS INTEGRATION 
TESTS 
# 
4GF)TGGP4GHCEVQT 
LONG (hours) 
FEEDBACK TIME 
MEDIUM (minutes) 
FAST (seconds) 
SMOKE TESTS 
UNIT-TESTS 
UI 
API 
TDD (BDD) 
BETTER 
CODE UNDERSTANDING 
1 
2 
3 
MOTIVATION 
4 RELEASE FASTER 
RELIABILITY 
5 
FILE SYSTEM 
DATABASE 
HEADLESS 
END-TO-END 
SERVICES 
5VWDU/QEMU 
.QECNQPN[ 
%CPDGTGOQVG 
5CHGTTGHCEVQTKPI 
(KTUVHCKNGF 

2GTHQTOCPEGOGVTKEU 
EPAM Systems 51
CONTINUOUS INTEGRATION 
FIXTURES 
# 
Permission.coffee Role.coffee 
module.exports.Permission = 
login: 
name: 'login' 
title: 'Login Page' 
! 
home: 
name: 'home' 
title: 'Home Page' 
! 
student: 
name: 'student' 
title: 'Student Section' 
! 
moderator: 
name: 'moderator' 
title: 'Admin Section' 
module.exports.Role = 
guest: 
name: 'Guest' 
permissions: [ 
Permissions.login 
Permissions.home 
] 
! 
user: 
name: 'User' 
permissions: [ 
Permissions.home 
Permissions.student 
] 
! 
admin: 
name: 'Admin' 
permissions: [ 
Permissions.home 
Permissions.student 
Permissions.moderator 
] 
db.Role 
Clean 
Role.coffee 
6GUVKPI$TGNCVGFNQIKE 
EPAM Systems 52
CONTINUOUS INTEGRATION 
CODE 
COVERAGE 
# 
COVERALS.IO 
CODECLIMATE 
97% 
NOT TESTED AREA OF APP 
DEAD CODE DETECTION 
1 
2 
3 TESTING QUALITY 
4 ACCEPTANCE THRESHOLD 
70-90% 
5 REPORTS 
Istanbul 
JSCoverage 
Blanket 
*KUVQT[CPFUVCVUUGTXKEG 
 #9'51/' 
EPAM Systems 53
CONTINUOUS INTEGRATION 
DOCUMENTATION 
GENERATION 
# 
KEEP THEM UP-TO-DATE 
METHODS AND CLASSES 
1 
2 
3 PUBLIC API 
4 USAGE EXAMPLES 
5 (RE) USE YOUR TESTS 
@example 
@depricated 
@package 
@private 
@api 
Output 
HTML 
MARKDOWN 
JSDoc 
@param 
@name 
@class 
@method 
@option 
Tools 
JSDOC* 
CROJSDOC 
APIDOCJS 
DOX 
MOX 
DOCCO 
CODO 
;17$7+.6+6 
;17470+6Ŏ *WOCPTGCFCDNGCPF 
)KV*WDHTKGPFN[ 
EPAM Systems 54
CONTINUOUS INTEGRATION 
.dot files 
# 
Project System 
.gitignore 
.gitattributes 
.jshintrc 
.jshintignore 
.editorconfig 
.jscs.json 
.travis.yml 
ESSENTIAL PART OF YOUR ENVIRONMENT 
SHAREABLE CONFIGURATION 
EASY TO MANAGE 
1 
2 
3 
4 IDE INTEGRATION 
5 NOT A TRASH 
.bashrc 
.zshrc 
.gitconfig 
.aliases 
.functions 
.osx 
http://dotfiles.github.io/ 
Invest time learning to configure your machine 
and automate processes 
1P7PKZCNKMGU[UVGOU 
EPAM Systems 55
CONTINUOUS INTEGRATION 
IDE 
# 
Code Completion and Inspection 
Refactoring, Metrics 
1 
2 
3 Test framework integration 
4 Debugger, Frameworks support 
5 Source Version control 
Issue trackers integration 
Online IDE 
CODIO 
CLOUD9 
CODEBOX 
CODENVY 
9GD5VQTO 
EPAM Systems 56
CONTINUOUS INTEGRATION # 
CI 
SERVERS 
BUILDS HISTORY AND VISIBILITY 
LAST GREEN/RED STATUS 
1 
2 
3 PARALLEL BUILDS 
4 MULTIPLE ENVIRONMENTS 
5 ROLLBACK 
TOOLS 
JENKINS 
TEAMCITY 
GRUNT 
CONCRETE 
STRIDER CI 
1+6;1745'.( 
And badges: http://shields.io/ 
EPAM Systems 57
CONTINUOUS INTEGRATION # 
HOSTED 
SERVICES 
CI AS A SERVICE 
INTEGRATED WITH GITHUB AND 
BITBUCKET 
1 
2 
3 BUILD ON SCHEDULE 
4 DEPLOY GREEN 
5 REPORTS AND STATUS DASHBOARD 
Options 
circle.yml 
.travis.yml 
Services 
TRAVIS CI 
CODESHIP 
CIRCLE CI 
BAMBOO 
MAGNUM CI 
SEMAPHORE 
GONDOR 
RULTOR
[ON 
EPAM Systems 58
DEPLOY 
PLATFORMS
DEPLOY PLATFORMS 
SERVER 
# 
CUSTOMIZABLE STACK 
AND ENVIRONMENT 
DATA: COMPANY POLICY 
OWN SERVICES TO USE 
NEED FOR (DEV) OPS 
g / NGINX APACHE TOMCAT 
d e 
f g 
ÑSSH BASH 7SYSLOG 
# FILES TMP CACHE 
$SQL NOSQL KEY:VAL 
(SERVICES DAEMONS CRON 
mSENDMAIL W IPTABLES 
w 
.QQMUIQQF 
CHVGTC[GCTQTVYQ 
1 
2 
3 
4 
5 INFRASTRUCTURE 
K 
+CC5#/#10+)+6#.1%'#0 
QT4#%-52#%' 
EPAM Systems 60
EPAM Systems 
% 
61 
DEPLOY PLATFORMS 
PaaS 
# 
CLI DEPLOYS 
CONFIGURATION DASHBOARD 
1 
2 
3 BUILDING BLOCKS 
(DISK SPACE, DB, MONITORING, ADDONS) 
4 MONITORING 
5 SLA AND NODES MANAGEMENT 
Services 
NODEJITSU 
HEROKU 
CLOUD FOUNDRY 
JOYENT 
ENGINE YARD 

 
#NN[QWPGGFVQTWP[QWTCRR 

7RFCVGU5GEWTKV[Ŏ
DEPLOY PLATFORMS 
Docker 
# 
YOUR OWN PAAS 
OPEN SOURCE 
1 
2 
3 EASY SCALE 
4 MANY READY TO USE STACKS 
5 EASY TO MIGRATE 
TOOLS 
DEIS 
FLYNN 
TSURU 
OCTOHOST 
! 
1RGP5QWTEG2CC5 
YKVJ$NCEMLCEM 
#RRNKECVKQP
2NCVHQTO%QPVCKPGT 
EPAM Systems 62
7 
MONITORING EVENTS 
METRICS
MONITORING EVENTS 
Logs 
management 
# 
FORMAT IS IMPORTANT 
AGGREGATION AND ROTATION 
1 
2 
3 SEARCH 
4 ALERTS AND NOTIFICATIONS 
5 WATCHERS 
ITGRCEMUQTVQTŎ 
ŎWUGNQIUVCUJ 
EPAM Systems 64
MONITORING EVENTS 
Example 
# 
2014/10/02 13:58:32 [error] 925#0: *14 connect() failed (111: Connection refused) while… 
CVG 
.GXGN 
'XGPV 
SIZE 
DATE 
LOGS 
10Mb 
Sept 
10Mb 
Oct 
07 
EPAM Systems 65
MONITORING EVENTS 
Logging 
services 
# 
Services 
PAPERTAIL 
LOGENTRIES 
SUMOLOGIC 
BOUNDARY 
SENTRY 
GRAYLOG2 
QKV[QWTUGNH 
APP 
%ELASTIC SEARCH 
DB SRV 
SYS 
n 
8 
! 
5QNWVKQPU 
CVCUQWTEGU 
EPAM Systems 66
MONITORING 
Errors 
# 
CONTEXT IS IMPORTANT 
GROUPING 
REPRODUCE 
FAIL GRACEFULLY 
HISTORY 
Services 
… 
RAYGUN 
TRACKJS 
AIRBRAKE 
QBAKA 
MUSCULA 
JSERRLOG 
TRACEKIT 
1 
2 
3 
4 
5 
5VCEMVTCEGQT)6(1 
GHGEVKPRTQFWEVKQP! 
9QTMUQPO[OCEJKPG 
QKV[QWTUGNH 
EPAM Systems 67
MONITORING METRICS 
Health 
Page 
# 
SERVICE #1 (UP) Ã 
SERVICE #1 (10k ops / s) Ã 
SERVICE #3 (10k users / s) Ã 
FREE SPACE (~2Gb) Â 
;QWDGVVGTFQUQOGVJKPIYKVJKV 
HARDWARE 
SERVICES AND API 
1 
2 
3 TRANSPORTS 
4 PERFORMANCE 
5 UPTIME 
EPAM Systems 68
SUMMARY
70 
SUMMARY 
EPAM Systems 
 
DEVELOPMENT 
WORKFLOW 
SOURCE 
MANAGEMENT 
DEPLOY 
PLATFORMS 
MONITORING 
METRICS 
Automate 
Tests 
Small features 
BUILD 
PIPELINE 
CONTINUOUS 
INTEGRATION 
'  ! #  7 
+VņUGCU[KVUVCTV
71 
SUMMARY 
EPAM Systems 
 
DEVELOPMENT 
WORKFLOW 
SOURCE 
MANAGEMENT 
DEPLOY 
PLATFORMS 
MONITORING 
METRICS 
Automate 
Tests 
Small features 
Code style 
Commits convention 
12 factor app 
BUILD 
PIPELINE 
CONTINUOUS 
INTEGRATION 
'  ! #  7 
+VņUHTGGHQT[QWTVGCO
72 
SUMMARY 
EPAM Systems 
 
DEVELOPMENT 
WORKFLOW 
SOURCE 
MANAGEMENT 
DEPLOY 
PLATFORMS 
MONITORING 
METRICS 
Automate 
Tests 
Small features 
Code style 
Commits convention 
12 factor app 
BUILD 
PIPELINE 
Build Blocks 
Keep it fast 
Run cycles 
CONTINUOUS 
INTEGRATION 
'  ! #  7 
QYPNQCFCPFKPVGITCVG
73 
SUMMARY 
EPAM Systems 
 
DEVELOPMENT 
WORKFLOW 
SOURCE 
MANAGEMENT 
DEPLOY 
PLATFORMS 
MONITORING 
METRICS 
Automate 
Tests 
Small features 
Code style 
Commits convention 
12 factor app 
Build Blocks 
Keep it fast 
Run cycles 
Fail early 
Fast feedback 
Step by Step 
BUILD 
PIPELINE 
CONTINUOUS 
INTEGRATION 
'  ! #  7 
1PGUOCNNUVGRHQT[QW 
IKCPVNGCRHQT[QWT2TQLGEV
74 
SUMMARY 
'  ! #  7 
EPAM Systems 
 
DEVELOPMENT 
WORKFLOW 
SOURCE 
MANAGEMENT 
DEPLOY 
PLATFORMS 
MONITORING 
METRICS 
Automate 
Tests 
Small features 
Code style 
Commits convention 
12 factor app 
Build Blocks 
Keep it fast 
Run cycles 
Fail early 
Fast feedback 
Step by Step 
BUILD 
PIPELINE 
CONTINUOUS 
INTEGRATION 
DevOps 
Production alike 
…as a Service 
+PVTQFWEGKV[QWTUGNH
Logs rotation 
75 
SUMMARY 
'  ! #  7 
EPAM Systems 
 
DEVELOPMENT 
WORKFLOW 
SOURCE 
MANAGEMENT 
DEPLOY 
PLATFORMS 
MONITORING 
METRICS 
Automate 
Tests 
Small features 
Code style 
Commits convention 
12 factor app 
Build Blocks 
Keep it fast 
Run cycles 
Fail early 
Fast feedback 
Step by Step 
BUILD 
PIPELINE 
CONTINUOUS 
INTEGRATION 
DevOps 
Production alike 
…as a Service 
Metrics 
Checklist 
5GG#EV2TGXGPV
Logs rotation 
76 
SUMMARY 
'  ! #  7 
EPAM Systems 
 
DEVELOPMENT 
WORKFLOW 
SOURCE 
MANAGEMENT 
DEPLOY 
PLATFORMS 
MONITORING 
METRICS 
Automate 
Tests 
Small features 
Code style 
Commits convention 
12 factor app 
Build Blocks 
Keep it fast 
Run cycles 
Fail early 
Fast feedback 
Step by Step 
BUILD 
PIPELINE 
CONTINUOUS 
INTEGRATION 
DevOps 
Production alike 
…as a Service 
Metrics 
Checklist 
6T[KVVQFC[

Más contenido relacionado

La actualidad más candente

Bugzilla Installation Process
Bugzilla Installation ProcessBugzilla Installation Process
Bugzilla Installation Process
Vino Harikrishnan
 
Hello click click boom
Hello click click boomHello click click boom
Hello click click boom
symbian_mgl
 
Buildout - Alles im Griff
Buildout - Alles im GriffBuildout - Alles im Griff
Buildout - Alles im Griff
frisi
 
NLIT 2011: Chef & Capistrano
NLIT 2011: Chef & CapistranoNLIT 2011: Chef & Capistrano
NLIT 2011: Chef & Capistrano
nickblah
 
Django deployment best practices
Django deployment best practicesDjango deployment best practices
Django deployment best practices
Erik LaBianca
 

La actualidad más candente (20)

Bugzilla Installation Process
Bugzilla Installation ProcessBugzilla Installation Process
Bugzilla Installation Process
 
Hello click click boom
Hello click click boomHello click click boom
Hello click click boom
 
“warpdrive”, making Python web application deployment magically easy.
“warpdrive”, making Python web application deployment magically easy.“warpdrive”, making Python web application deployment magically easy.
“warpdrive”, making Python web application deployment magically easy.
 
Openstack bug list
Openstack bug listOpenstack bug list
Openstack bug list
 
Buildout - Alles im Griff
Buildout - Alles im GriffBuildout - Alles im Griff
Buildout - Alles im Griff
 
NetApp ontap simulator
NetApp ontap simulatorNetApp ontap simulator
NetApp ontap simulator
 
NLIT 2011: Chef & Capistrano
NLIT 2011: Chef & CapistranoNLIT 2011: Chef & Capistrano
NLIT 2011: Chef & Capistrano
 
Web deploy
Web deployWeb deploy
Web deploy
 
Web deploy command line
Web deploy command lineWeb deploy command line
Web deploy command line
 
Build system
Build systemBuild system
Build system
 
Django deployment best practices
Django deployment best practicesDjango deployment best practices
Django deployment best practices
 
FullStack London - Cloud Native Node.js
FullStack London - Cloud Native Node.jsFullStack London - Cloud Native Node.js
FullStack London - Cloud Native Node.js
 
Native Hadoop with prebuilt spark
Native Hadoop with prebuilt sparkNative Hadoop with prebuilt spark
Native Hadoop with prebuilt spark
 
How to add non root user account to netapp for commvault
How to add non root user account to netapp for commvaultHow to add non root user account to netapp for commvault
How to add non root user account to netapp for commvault
 
How to Install Configure and Use sysstat utils on RHEL 7
How to Install Configure and Use sysstat utils on RHEL 7How to Install Configure and Use sysstat utils on RHEL 7
How to Install Configure and Use sysstat utils on RHEL 7
 
How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7
 
Easy install
Easy installEasy install
Easy install
 
Submitting and Reviewing changes lab guide
Submitting and Reviewing changes lab guideSubmitting and Reviewing changes lab guide
Submitting and Reviewing changes lab guide
 
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
Install and Configure WordPress in AWS on RHEL 7 or CentOS 7
 
How To Install and Configure Salt Master on Ubuntu
How To Install and Configure Salt Master on UbuntuHow To Install and Configure Salt Master on Ubuntu
How To Install and Configure Salt Master on Ubuntu
 

Destacado

Power from big data - Are Europe's utilities ready for the age of data?
Power from big data - Are Europe's utilities ready for the age of data?Power from big data - Are Europe's utilities ready for the age of data?
Power from big data - Are Europe's utilities ready for the age of data?
Steve Bray
 
Lengua cultura francesa
Lengua cultura francesaLengua cultura francesa
Lengua cultura francesa
finaanton
 
3 d pie chart circular puzzle with hole in center process 8 stages style 2 po...
3 d pie chart circular puzzle with hole in center process 8 stages style 2 po...3 d pie chart circular puzzle with hole in center process 8 stages style 2 po...
3 d pie chart circular puzzle with hole in center process 8 stages style 2 po...
SlideTeam.net
 
Nsu catering guide
Nsu catering guideNsu catering guide
Nsu catering guide
Diana Sirghi
 
Supply Chain Metrics That Matter - A Focus on Pharmaceutical Companies - 27 A...
Supply Chain Metrics That Matter - A Focus on Pharmaceutical Companies - 27 A...Supply Chain Metrics That Matter - A Focus on Pharmaceutical Companies - 27 A...
Supply Chain Metrics That Matter - A Focus on Pharmaceutical Companies - 27 A...
Lora Cecere
 

Destacado (20)

Power from big data - Are Europe's utilities ready for the age of data?
Power from big data - Are Europe's utilities ready for the age of data?Power from big data - Are Europe's utilities ready for the age of data?
Power from big data - Are Europe's utilities ready for the age of data?
 
Lengua cultura francesa
Lengua cultura francesaLengua cultura francesa
Lengua cultura francesa
 
El escudo personal del retcambio
El escudo personal del retcambioEl escudo personal del retcambio
El escudo personal del retcambio
 
Innovation participative poleemploiveutfaireemergerlesidees
Innovation participative poleemploiveutfaireemergerlesideesInnovation participative poleemploiveutfaireemergerlesidees
Innovation participative poleemploiveutfaireemergerlesidees
 
MedicalResearch.com: Medical Research Exclusive Interviews May 26 2015
MedicalResearch.com:  Medical Research Exclusive Interviews May 26 2015MedicalResearch.com:  Medical Research Exclusive Interviews May 26 2015
MedicalResearch.com: Medical Research Exclusive Interviews May 26 2015
 
3 d pie chart circular puzzle with hole in center process 8 stages style 2 po...
3 d pie chart circular puzzle with hole in center process 8 stages style 2 po...3 d pie chart circular puzzle with hole in center process 8 stages style 2 po...
3 d pie chart circular puzzle with hole in center process 8 stages style 2 po...
 
Open Belgium 2015 Partner Proposal
Open Belgium 2015 Partner ProposalOpen Belgium 2015 Partner Proposal
Open Belgium 2015 Partner Proposal
 
Nsu catering guide
Nsu catering guideNsu catering guide
Nsu catering guide
 
Gross Domestic Product (GDP) - Canada - July 2016
Gross Domestic Product (GDP) - Canada - July 2016Gross Domestic Product (GDP) - Canada - July 2016
Gross Domestic Product (GDP) - Canada - July 2016
 
Miten sosiokratia voisi auttaa yhteisön päätöksentekoa?
Miten sosiokratia voisi auttaa yhteisön päätöksentekoa?Miten sosiokratia voisi auttaa yhteisön päätöksentekoa?
Miten sosiokratia voisi auttaa yhteisön päätöksentekoa?
 
TRANSIT Overview
TRANSIT Overview TRANSIT Overview
TRANSIT Overview
 
Tipos de tequilas
Tipos de tequilasTipos de tequilas
Tipos de tequilas
 
Destination France - Le passeport pour l’attractivité culturelle
Destination France - Le passeport pour l’attractivité culturelleDestination France - Le passeport pour l’attractivité culturelle
Destination France - Le passeport pour l’attractivité culturelle
 
First competence / Third evidence / My last vacations
First competence / Third evidence / My last vacationsFirst competence / Third evidence / My last vacations
First competence / Third evidence / My last vacations
 
Doma2 with Kotlin
Doma2 with KotlinDoma2 with Kotlin
Doma2 with Kotlin
 
Lessons from Norway: Policy Responses to Evidence From PIACC
Lessons from Norway: Policy Responses to Evidence From PIACCLessons from Norway: Policy Responses to Evidence From PIACC
Lessons from Norway: Policy Responses to Evidence From PIACC
 
uas gangsal 2016/2016
uas gangsal 2016/2016uas gangsal 2016/2016
uas gangsal 2016/2016
 
Lk eksponen
Lk eksponenLk eksponen
Lk eksponen
 
A broken body isn't a broken person - TEDx Talk by Janine Shepherd
A broken body isn't a broken person - TEDx Talk by Janine ShepherdA broken body isn't a broken person - TEDx Talk by Janine Shepherd
A broken body isn't a broken person - TEDx Talk by Janine Shepherd
 
Supply Chain Metrics That Matter - A Focus on Pharmaceutical Companies - 27 A...
Supply Chain Metrics That Matter - A Focus on Pharmaceutical Companies - 27 A...Supply Chain Metrics That Matter - A Focus on Pharmaceutical Companies - 27 A...
Supply Chain Metrics That Matter - A Focus on Pharmaceutical Companies - 27 A...
 

Similar a Js infrostructure

Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And Maven
PerconaPerformance
 

Similar a Js infrostructure (20)

Modern web applications infrastructure
Modern web applications infrastructureModern web applications infrastructure
Modern web applications infrastructure
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
 
Pyramid deployment
Pyramid deploymentPyramid deployment
Pyramid deployment
 
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.jsNode Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018
Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018
Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of IndiaTutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
 
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
 
Adventures in infrastructure as code
Adventures in infrastructure as codeAdventures in infrastructure as code
Adventures in infrastructure as code
 
AMS Node Meetup December presentation Phusion Passenger
AMS Node Meetup December presentation Phusion PassengerAMS Node Meetup December presentation Phusion Passenger
AMS Node Meetup December presentation Phusion Passenger
 
nginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottlenginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottle
 
Install elasticsearch, logstash and kibana
Install elasticsearch, logstash and kibana Install elasticsearch, logstash and kibana
Install elasticsearch, logstash and kibana
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And Maven
 
Docker Monitoring Webinar
Docker Monitoring  WebinarDocker Monitoring  Webinar
Docker Monitoring Webinar
 
手把手教你如何串接 Log 到各種網路服務
手把手教你如何串接 Log 到各種網路服務手把手教你如何串接 Log 到各種網路服務
手把手教你如何串接 Log 到各種網路服務
 
Silicon Valley Code Camp 2019 - Reaching the Cloud Native World
Silicon Valley Code Camp 2019 - Reaching the Cloud Native WorldSilicon Valley Code Camp 2019 - Reaching the Cloud Native World
Silicon Valley Code Camp 2019 - Reaching the Cloud Native World
 
Salt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environmentsSalt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environments
 
Ccnp enterprise workbook v1.0 completed till weigth
Ccnp enterprise workbook v1.0   completed till weigthCcnp enterprise workbook v1.0   completed till weigth
Ccnp enterprise workbook v1.0 completed till weigth
 
Capistrano与jenkins(hudson)在java web项目中的实践
Capistrano与jenkins(hudson)在java web项目中的实践Capistrano与jenkins(hudson)在java web项目中的实践
Capistrano与jenkins(hudson)在java web项目中的实践
 

Js infrostructure

  • 1. MODERN WEB APPLICATIONS ! INFRASTRUCTURE PRACTICES, FLOWS AND TOOLS $CUGFQP4'#.UVQTKGU
  • 2. ! ! IGOR ALPERT # IGOR_ALPERT@EPAM.COM HTTP://UA.LINKEDIN.COM/IN/IALPERT EPAM Systems 2
  • 3. Application ! ! GXGNQRGT EPAM Systems 3
  • 4. Application CSS JS HTML ! ! +%CP(62 EPAM Systems 4
  • 5. 5 Application EPAM Systems $ Feature #1 Feature #2 Bug fixing ! 6JG[CEVCUCVGCO
  • 6. Logs 6 Application EPAM Systems $ % ! 5QWTEGEQFG )KICD[VGUQHFGDWI
  • 7. 7 Application EPAM Systems Logs Doc ! $ % %QOOGPVU CPFGZCORNGU
  • 8. 8 Application $ Logs Docs Config ! % KHHDGVYGGPFGXCPFRTQFWEVKQP EPAM Systems
  • 9. Packages 9 Application $ Config ! % L3WGT[CPFHTKGPFU EPAM Systems Logs Docs
  • 10. 10 Application $ Logs Docs Config Tests ! % Packages *CRR[RCVJ EPAM Systems
  • 11. 11 Application $ ! % /CIKEDWKNFU[UVGO EPAM Systems
  • 12. 12 Application 0.5 $ 0.8 1.0 ! % #NRJC$GVC4% EPAM Systems
  • 13. 13 Application 0.5 $ 0.8 1.0 ! Dev Test Prod % GXU3#5WRRQTV%NKGPV EPAM Systems
  • 14. 14 Application 0.5 $ 0.8 1.0 ! Dev Test Prod APP DB SV % ' #RR5GTXGT EPAM Systems
  • 15. ' ' ' ' DB DB DB DB 15 Application $ ! % 6QPUQHUGTXGTU CPFCVC$CUGU EPAM Systems .QCFDCNCPEGT
  • 16. 16 Application $ ! % 7 Errors Metrics Logs 7UGHWNKPHQTOCVKQPNKXGUJGTG EPAM Systems
  • 17. 17 Agenda ! $ DEVELOPMENT WORKFLOW % SOURCE MANAGEMENT BUILD PIPELINE DEPLOY PLATFORMS 7 MONITORING METRICS # CONTINUOUS INTEGRATION EPAM Systems
  • 19. DEVELOPMENT WORKFLOW $ #TEJKVGEV6GEJ.GCFGXGNQRGTU DEV ( $ Managers 5WRRQTVGX1RU2TQDNGOOCPCIGOGPV ) QA % Support 3#.GCF/CPWCN#WVQOCVKQP #EEQWPV/CPCIGT#PCN[VKE EPAM Systems 19
  • 20. DEVELOPMENT WORKFLOW $ 6JG[YCPVVQEQFG 0GYHGCVWTGU6JG[YCPVVQIQNFGPRNCVGVJGKTEQFG 6JG[YCPVVQTGFWEGVGEJPKECNFGRV ( $ DEV #NYC[UJCXGUQOGňVKP[ʼnEJCPIG Managers ) QA % Support 6JG[YCPVUKORNKEKV[ 0QOQTGUWFFGPRNCVHQTO EJCPIGU 6JG[YCPVUVCDKNKV[ VQTGSWKTGOGPVUCPFUVQTKGU #UC7UGT+YCPVŎ -PQYPDWIU6QQOWEJVKOGVQFQHWNNTGITGUUKQP DGVVGTVQWUGRTGXKQWUňUVCDNGʼnXGTUKQP EPAM Systems 20
  • 21. DEVELOPMENT WORKFLOW $ $ DEV QA ( Managers ) % Support #EVYKVJ+PVGITKV[UJCTGFIQCNU EPAM Systems 21
  • 22. DEVELOPMENT WORKFLOW $ ( DESIGN ) TESTING $ DEVELOP BUILD, DEPLOY LAUNCH a BUG FIX ' 2-4 WEEKS ITERATION EPAM Systems 22
  • 23. DEVELOPMENT WORKFLOW #WVQOCVGFVGUVU %QNNCDQTCVKXGFGXGNQROGPV %QFGHGCVWTGUYKVJVGUVKPOKPF #WVQOCVGFDWKNF 9TKVGCUOWEJHCKNKPIVGUVUCURQUUKDNGVQ EQXGTTGSWKTGOGPVU 2NCPCPFGUKIP $ 'CEJUQWTEGEJCPIGVTKIIGTUYJQNG DWKNFRKRGNKPGVQTWP 6JKPMJQY[QWTHGCVWTGYKNNDG KORNGOGPVGFCPFKPVGITCVGFYKVJ QVJGTHGCVWTGU ( * % $ +PVGITCVKQP 4GCNVKOGOQPKVQTKPICPFHGGFDCEM UP TO 1 DAY ITERATION EPAM Systems 23
  • 24. 24 DEVELOPMENT WORKFLOW SERVERS 1. NGINX 2. APACHE HTTPd 3. TOMCAT 4. IIS 5. NODEJS 6. EXPRESS 7. … EPAM Systems STYLES 1. TWITTER BOOTSTRAP 2. ZURB FOUNDATION 3. COMPASS 4. SASS 5. LESS 6. STYLUS 7. CUSTOM SOLUTION FRAMEWORKS 1. ANGULARJS 2. BACKBONE 3. EXTJS 4. SENCHA TOUCH 5. EMBERJS 6. METEOR 7. DERBY 8. CUSTOM SOLUTION TESTING 1. JASMINE 2. MOCHA 3. BUSTER 4. QUNIT 5. KARMA 6. PROTRACTOR 7. NIGHTWATCH 8. INTERN 9. WEBDRIVER.IO 10.CUSTOM SOLUTION OS 1. WINDOWS 2. OSX 3. UBUNTU 4. CENTOS 5. FREEBSD 6. COREOS TOOLS 1. GRUNT 2. GULP 3. NPM 4. BOWER 5. YEOMAN 6. CUSTOM SOLUTION DATABASES 1. MONGODB 2. COUCHDB 3. RIAK 4. REDIS 5. CASSANDRA SERVICES 1. AMAZON 2. NODEJITSU 3. HEROKU 4. MONGOLAB 5. FIREBASE 6. JOYENT 7. PUSHER 8. DOCKER $ 6QPUQHTGCF[VQWUG 1RVKQPUHQT[QWT RTQLGEV SERVER SIDE 1. PHP 2. RUBY 3. PYTHON 4. … !
  • 25. DEVELOPMENT WORKFLOW $ Ability to compile native modules — easier to “make from source” then in Windows ;QWTHTKGPFU VIRTUAL MACHINE NODEJS, RUBY, PYTHON Your toolset will ask for them as a dependency Works better and faster on Unix based systems WINDOWS Building a Module in Windows node-gyp, Python, shell, VS, … 55*0Q)7+ %JGH2WRRGV8 EPAM Systems 25
  • 26. DEPENDENCY MANAGEMENT $ Homebrew Packager for OSX, uses formulas to install software Mac OSX brew install [package] Advanced Packaging Tool Package manager for Debian GNU/Linux distribution and its variants Ubuntu apt-get install [package] Yum The Yellowdog Updater, Modified (yum) is an open-source command-line package management utility for Linux operating CentOS yum install [package] Chocolatey Chocolatey NuGet is a Machine Package Manager, somewhat like apt-get, but built with Windows in mind 42/ Windows choco install [package] '$ EPAM Systems 26
  • 27. DEPENDENCY MANAGEMENT $ OPENSSL PRCE NGINX PKG-CONFIG MAKEDEPEND GIT GIT-FLOW brew install git-flow brew install nginx EPAM Systems 27
  • 28. DEPENDENCY MANAGEMENT $ NVM APP1 Node 0.11x NVM APP2 Node 0.10.31 5VKNNVJGUCOGRTQLGEV EPAM Systems 28
  • 29. DEPENDENCY MANAGEMENT $ NodeJS Node Version Manager - Simple bash script to manage multiple active node.js versions NVM https://github.com/creationix/nvm Ruby RVM is the Ruby enVironment Manager. It manages Ruby application environments and enables switching between them RVM https://github.com/wayneeseguin/rvm Python It creates an environment that has its own installation directories, that doesn’t share libraries with other virtualenv environments virtualenv https://github.com/pypa/virtualenv NodeJS A Node version manager for the windows folks out there. Inspired by n and nodenv Nodist https://github.com/marcelklehr/nodist 9KPFQYU EPAM Systems 29
  • 30. DEPENDENCY MANAGEMENT $ +PVGTHCEGKUVJGUCOG NPM BOWER manager install dependencies: { name: version, name: folder, name: package }, devDependencies: { test-framework-name: version } dependencies: { name: version, name: folder, name: package }, devDependencies: { test-framework-name: version } manager install manager install EPAM Systems 30
  • 31. DEPENDENCY MANAGEMENT $ NPM LODASH GRUNT PACKAGE.JSON ASYNC DEV-DEPS KARMA Packages: Downloads: Corporate mirrors npm init npm install npm install —save QPņVHQTIGVVQ WRFCVG[QWTRCEMCIGU https://docs.npmjs.com/ EPAM Systems 31
  • 32. DEPENDENCY MANAGEMENT $ BOWER BACKBONE LODASH BOWER JQUERY UNDERSCORE BOOTSTRAP Packages: npm install -g bower init bower install http://bower.io/ (QTHTQPVGPF EPAM Systems 32
  • 34. BUILD PIPELINE Source Concatenate Uglify SourceMaps Test Karma Protractor Mocha Coverage Preprocess LESS SASS Compass Watch LiveReload Rebuild Serve Assets Templates CSS HTML processing Images optimization Custom ChangeLog Notifications console.debug 6CUMUVQCWVQOCVG KP[QWTDWKNFRKRGNKPG EPAM Systems 34
  • 35. BUILD PIPELINE ! GRUNT Packages: grunt grunt coffee:app FILE BASED Good for file operations like copy/move/save. Configuration over code. Better for small projects with small amount of files. TONS OF PLUGINS Most popular JS task runner. Almost any possible task is available as plugin. You can perform build-in or custom operations. Sync/ Async 1 2 Gruntfile.js Gruntfile.coffee jshint: { // define the files to lint files: ['gruntfile.js', 'src/**/*.js', 'test/**/*.js'], // configure JSHint options: { // more options here globals: { jQuery: true, console: true, module: true } } } http://gruntjs.com/ http://gruntjs.com/plugins ITWPVEQPVTKDLUJKPV EPAM Systems 35
  • 36. BUILD PIPELINE ! GULP 1 2 gulpfile.js EASY API Only 4 API methods: task, watch, src, dest. Easy to write complex flows. STREAM BASED No temporary files. Code over Configuration. Much more faster then Grunt for file-content processing operations. ZHCUVGT var gulp = require('gulp'); ! gulp.task('default', function() { // place code for your default task here }); Packages: npm install --save-dev gulp gulp grunt coffee http://gulpjs.com http://gulpjs.com/plugins/ EPAM Systems 36
  • 37. BUILD PIPELINE ! YEOMAN KARMA TESTS Pre-packed with test suites SCAFFOLDING Easy scaffolding system to generate application components SERVER Comes with build-in live-reload and grunt task 1 2 3 $ yo angular:controller myController $ yo angular:directive myDirective $ yo angular:filter myFilter $ yo angular:service myService http://gulpjs.com http://gulpjs.com/plugins/ Generators: ~1100 npm install -g yo npm install -g generator-angular yo angular ITWPVUGTXG EPAM Systems 37
  • 38. BUILD PIPELINE SLUSH https://www.npmjs.org/package/slush BROCCOLI https://www.npmjs.org/package/broccoli JAM AUTOMATION https://github.com/caolan/jam http://indigounited.com/automaton/ BRUNCH ANGUS http://brunch.io/ https://github.com/nickjanssen/angus ! EPAM Systems 38
  • 40. SOURCE GIT EASY BRANCHING AND MERGING Cheap branching — just a reference to commit. Lots of possible merging strategies and conflict resolving. History rewrite DISTRIBUTED You can work alone or with a team. You can work with or without central server. Even without network connection. FAST You can clone whole repo/branch or just a few commits. All meta-data is stored in one place ~/.git 1 2 3 git init ! git add git commit ! git push —force ! git rebase -i git merge ! git tag -a %QPHNKEVTGUQNXGF EPAM Systems 40
  • 41. SOURCE GITLAB PRIVATELY HOSTED You can integrate it with your own infrastructure, users base, private services etc TRUSTED BY ENTERPRISE Fully manageable and configurable Same capabilities — collaboration, forking, wiki and JIRA OPEN-SOURCE Hosted on GitHub. You can contribute and write your own features 1 2 3 - *CRR[%NKGPVU EPAM Systems 41
  • 42. SOURCE GITHUB WEB INTERFACE You are able to create branches, tags, pull-requests, edit and commit files directly from browser CODE REVIEW AND COLLABORATION Do code-review with your team, leave comments, track issues and maintain WIKI pages FORK, PULL REQUEST You can fork and contribute to any public repository. Home for open-source projects 1 2 3 Mirror mirror on the wall, who forks best of them all? EPAM Systems 42
  • 43. SOURCE BITBUCKET FREE PRIVATE REPOS Unlike GitHub this service will allow you to create *unlimited* amount of private repositories. ENTERPRISE ORIENTED Natively integrates with Atlasssian software stack. Trusted by Enterprise. SPOONING vs. FORKING Spooning - with Bitbucket is a pair programming process as an opposite to forking 1 2 3 ň$KVDWEMGVURQQPKPI ŃLWUV)QQINGKV EPAM Systems 43
  • 44. SOURCE BRANCHING MODELS Centralized Gitflow Github Feature branch FEATURE BRANCH Commit Commit Commit Commit REBASE SQUASH … REBASE UPSTREAM BRANCH FEATURE FEATURE FEATURE FEATURE EPAM Systems 44
  • 45. SOURCE HOOKS Use Cases SPELLING ERRORS ENFORCE RULES EMAIL / SMS NOTIFICATIONS DEPLOY TRIGGER http://githooks.com/ 9GDJQQMUVQQ All Git hooks are ordinary scripts that Git executes when certain events occur in the repository. This makes them very easy to install and configure Client Server PRE-COMMIT PREPARE-COMMIT-MSG COMMIT-MSG POST-COMMIT POST-CHECKOUT PRE-REBASE PRE-RECEIVE UPDATE POST-RECEIVE EPAM Systems 45
  • 46. SOURCE COMMIT MESSAGES [FIX] Closes: #1234 [BREAKING] Interface of method has been changed… [COMPLETE] Feature (F16:Raptor) is ready for integration [ENV] Some minor refactoring MAKE YOUR CONVENTION ISSUE MANAGEMENT 1 2 3 RELEASE NOTES AND CHANGE LOGS 4 ANNOTATIONS: squash! fixup! ň+ņXGHKZGFVJCVʼn EPAM Systems 46
  • 48. CONTINUOUS INTEGRATION # TECHNICAL DEPT TESTS WILL BE IN THE NEXT RELEASE $WITKXGPGXGNQROGPV CODE ENTROPY: “IF I TOUCH THAT CODE EVERYTHING WILL BREAK” TODO/FIXME STATEMENTS DOCS? MY CODE IS STATE OF ART LET’S JUST COPY/PASTE FOR NOW 1 2 3 4 Fix this code, the only one who can. Is in another company already. http://en.wikipedia.org/wiki/Technical_debt 5 EPAM Systems 48
  • 49. CONTINUOUS INTEGRATION # CODE QUALITY TECH BACKLOG CODE-STYLE: TABS/SPACES, INDENTATION .KUVQHVCUMU RTKQTKV[ STATIC ANALYZE AND COMPLEXITY: BUGS, DUPLICATION, STANDARDS 1 2 3 4 UNIT-TESTS AND COVERAGE DOCS AND COMMENTS AUTOMATE 5 EPAM Systems 49
  • 50. CONTINUOUS INTEGRATION # CODE STYLE Other validations JSCS Presets - COFFEELINT - CSS - HTML Tools - JSHINT + STYLISH - PLATO - CODE PAINTER - EDITORCONFIG - JSCS - ESLINT - AIRBNB - CROCKFORD - GOOGLE - JQUERY - MDCS (THREE.JS) - WIKIMEDIA - YANDEX 1 2 3 4 5 READABILITY GOOD NAMES CLEAR LOGIC POTENTIAL ISSUES GUIDELINES EPAM Systems 50
  • 51. CONTINUOUS INTEGRATION TESTS # 4GF)TGGP4GHCEVQT LONG (hours) FEEDBACK TIME MEDIUM (minutes) FAST (seconds) SMOKE TESTS UNIT-TESTS UI API TDD (BDD) BETTER CODE UNDERSTANDING 1 2 3 MOTIVATION 4 RELEASE FASTER RELIABILITY 5 FILE SYSTEM DATABASE HEADLESS END-TO-END SERVICES 5VWDU/QEMU .QECNQPN[ %CPDGTGOQVG 5CHGTTGHCEVQTKPI (KTUVHCKNGF 2GTHQTOCPEGOGVTKEU EPAM Systems 51
  • 52. CONTINUOUS INTEGRATION FIXTURES # Permission.coffee Role.coffee module.exports.Permission = login: name: 'login' title: 'Login Page' ! home: name: 'home' title: 'Home Page' ! student: name: 'student' title: 'Student Section' ! moderator: name: 'moderator' title: 'Admin Section' module.exports.Role = guest: name: 'Guest' permissions: [ Permissions.login Permissions.home ] ! user: name: 'User' permissions: [ Permissions.home Permissions.student ] ! admin: name: 'Admin' permissions: [ Permissions.home Permissions.student Permissions.moderator ] db.Role Clean Role.coffee 6GUVKPI$TGNCVGFNQIKE EPAM Systems 52
  • 53. CONTINUOUS INTEGRATION CODE COVERAGE # COVERALS.IO CODECLIMATE 97% NOT TESTED AREA OF APP DEAD CODE DETECTION 1 2 3 TESTING QUALITY 4 ACCEPTANCE THRESHOLD 70-90% 5 REPORTS Istanbul JSCoverage Blanket *KUVQT[CPFUVCVUUGTXKEG #9'51/' EPAM Systems 53
  • 54. CONTINUOUS INTEGRATION DOCUMENTATION GENERATION # KEEP THEM UP-TO-DATE METHODS AND CLASSES 1 2 3 PUBLIC API 4 USAGE EXAMPLES 5 (RE) USE YOUR TESTS @example @depricated @package @private @api Output HTML MARKDOWN JSDoc @param @name @class @method @option Tools JSDOC* CROJSDOC APIDOCJS DOX MOX DOCCO CODO ;17$7+.6+6 ;17470+6Ŏ *WOCPTGCFCDNGCPF )KV*WDHTKGPFN[ EPAM Systems 54
  • 55. CONTINUOUS INTEGRATION .dot files # Project System .gitignore .gitattributes .jshintrc .jshintignore .editorconfig .jscs.json .travis.yml ESSENTIAL PART OF YOUR ENVIRONMENT SHAREABLE CONFIGURATION EASY TO MANAGE 1 2 3 4 IDE INTEGRATION 5 NOT A TRASH .bashrc .zshrc .gitconfig .aliases .functions .osx http://dotfiles.github.io/ Invest time learning to configure your machine and automate processes 1P7PKZCNKMGU[UVGOU EPAM Systems 55
  • 56. CONTINUOUS INTEGRATION IDE # Code Completion and Inspection Refactoring, Metrics 1 2 3 Test framework integration 4 Debugger, Frameworks support 5 Source Version control Issue trackers integration Online IDE CODIO CLOUD9 CODEBOX CODENVY 9GD5VQTO EPAM Systems 56
  • 57. CONTINUOUS INTEGRATION # CI SERVERS BUILDS HISTORY AND VISIBILITY LAST GREEN/RED STATUS 1 2 3 PARALLEL BUILDS 4 MULTIPLE ENVIRONMENTS 5 ROLLBACK TOOLS JENKINS TEAMCITY GRUNT CONCRETE STRIDER CI 1+6;1745'.( And badges: http://shields.io/ EPAM Systems 57
  • 58. CONTINUOUS INTEGRATION # HOSTED SERVICES CI AS A SERVICE INTEGRATED WITH GITHUB AND BITBUCKET 1 2 3 BUILD ON SCHEDULE 4 DEPLOY GREEN 5 REPORTS AND STATUS DASHBOARD Options circle.yml .travis.yml Services TRAVIS CI CODESHIP CIRCLE CI BAMBOO MAGNUM CI SEMAPHORE GONDOR RULTOR
  • 61. DEPLOY PLATFORMS SERVER # CUSTOMIZABLE STACK AND ENVIRONMENT DATA: COMPANY POLICY OWN SERVICES TO USE NEED FOR (DEV) OPS g / NGINX APACHE TOMCAT d e f g ÑSSH BASH 7SYSLOG # FILES TMP CACHE $SQL NOSQL KEY:VAL (SERVICES DAEMONS CRON mSENDMAIL W IPTABLES w .QQMUIQQF CHVGTC[GCTQTVYQ 1 2 3 4 5 INFRASTRUCTURE K +CC5#/#10+)+6#.1%'#0 QT4#%-52#%' EPAM Systems 60
  • 62. EPAM Systems % 61 DEPLOY PLATFORMS PaaS # CLI DEPLOYS CONFIGURATION DASHBOARD 1 2 3 BUILDING BLOCKS (DISK SPACE, DB, MONITORING, ADDONS) 4 MONITORING 5 SLA AND NODES MANAGEMENT Services NODEJITSU HEROKU CLOUD FOUNDRY JOYENT ENGINE YARD #NN[QWPGGFVQTWP[QWTCRR 7RFCVGU5GEWTKV[Ŏ
  • 63. DEPLOY PLATFORMS Docker # YOUR OWN PAAS OPEN SOURCE 1 2 3 EASY SCALE 4 MANY READY TO USE STACKS 5 EASY TO MIGRATE TOOLS DEIS FLYNN TSURU OCTOHOST ! 1RGP5QWTEG2CC5 YKVJ$NCEMLCEM #RRNKECVKQP 2NCVHQTO%QPVCKPGT EPAM Systems 62
  • 65. MONITORING EVENTS Logs management # FORMAT IS IMPORTANT AGGREGATION AND ROTATION 1 2 3 SEARCH 4 ALERTS AND NOTIFICATIONS 5 WATCHERS ITGRCEMUQTVQTŎ ŎWUGNQIUVCUJ EPAM Systems 64
  • 66. MONITORING EVENTS Example # 2014/10/02 13:58:32 [error] 925#0: *14 connect() failed (111: Connection refused) while… CVG .GXGN 'XGPV SIZE DATE LOGS 10Mb Sept 10Mb Oct 07 EPAM Systems 65
  • 67. MONITORING EVENTS Logging services # Services PAPERTAIL LOGENTRIES SUMOLOGIC BOUNDARY SENTRY GRAYLOG2 QKV[QWTUGNH APP %ELASTIC SEARCH DB SRV SYS n 8 ! 5QNWVKQPU CVCUQWTEGU EPAM Systems 66
  • 68. MONITORING Errors # CONTEXT IS IMPORTANT GROUPING REPRODUCE FAIL GRACEFULLY HISTORY Services … RAYGUN TRACKJS AIRBRAKE QBAKA MUSCULA JSERRLOG TRACEKIT 1 2 3 4 5 5VCEMVTCEGQT)6(1 GHGEVKPRTQFWEVKQP! 9QTMUQPO[OCEJKPG QKV[QWTUGNH EPAM Systems 67
  • 69. MONITORING METRICS Health Page # SERVICE #1 (UP) Ã SERVICE #1 (10k ops / s) Ã SERVICE #3 (10k users / s) Ã FREE SPACE (~2Gb) Â ;QWDGVVGTFQUQOGVJKPIYKVJKV HARDWARE SERVICES AND API 1 2 3 TRANSPORTS 4 PERFORMANCE 5 UPTIME EPAM Systems 68
  • 71. 70 SUMMARY EPAM Systems DEVELOPMENT WORKFLOW SOURCE MANAGEMENT DEPLOY PLATFORMS MONITORING METRICS Automate Tests Small features BUILD PIPELINE CONTINUOUS INTEGRATION ' ! # 7 +VņUGCU[KVUVCTV
  • 72. 71 SUMMARY EPAM Systems DEVELOPMENT WORKFLOW SOURCE MANAGEMENT DEPLOY PLATFORMS MONITORING METRICS Automate Tests Small features Code style Commits convention 12 factor app BUILD PIPELINE CONTINUOUS INTEGRATION ' ! # 7 +VņUHTGGHQT[QWTVGCO
  • 73. 72 SUMMARY EPAM Systems DEVELOPMENT WORKFLOW SOURCE MANAGEMENT DEPLOY PLATFORMS MONITORING METRICS Automate Tests Small features Code style Commits convention 12 factor app BUILD PIPELINE Build Blocks Keep it fast Run cycles CONTINUOUS INTEGRATION ' ! # 7 QYPNQCFCPFKPVGITCVG
  • 74. 73 SUMMARY EPAM Systems DEVELOPMENT WORKFLOW SOURCE MANAGEMENT DEPLOY PLATFORMS MONITORING METRICS Automate Tests Small features Code style Commits convention 12 factor app Build Blocks Keep it fast Run cycles Fail early Fast feedback Step by Step BUILD PIPELINE CONTINUOUS INTEGRATION ' ! # 7 1PGUOCNNUVGRHQT[QW IKCPVNGCRHQT[QWT2TQLGEV
  • 75. 74 SUMMARY ' ! # 7 EPAM Systems DEVELOPMENT WORKFLOW SOURCE MANAGEMENT DEPLOY PLATFORMS MONITORING METRICS Automate Tests Small features Code style Commits convention 12 factor app Build Blocks Keep it fast Run cycles Fail early Fast feedback Step by Step BUILD PIPELINE CONTINUOUS INTEGRATION DevOps Production alike …as a Service +PVTQFWEGKV[QWTUGNH
  • 76. Logs rotation 75 SUMMARY ' ! # 7 EPAM Systems DEVELOPMENT WORKFLOW SOURCE MANAGEMENT DEPLOY PLATFORMS MONITORING METRICS Automate Tests Small features Code style Commits convention 12 factor app Build Blocks Keep it fast Run cycles Fail early Fast feedback Step by Step BUILD PIPELINE CONTINUOUS INTEGRATION DevOps Production alike …as a Service Metrics Checklist 5GG#EV2TGXGPV
  • 77. Logs rotation 76 SUMMARY ' ! # 7 EPAM Systems DEVELOPMENT WORKFLOW SOURCE MANAGEMENT DEPLOY PLATFORMS MONITORING METRICS Automate Tests Small features Code style Commits convention 12 factor app Build Blocks Keep it fast Run cycles Fail early Fast feedback Step by Step BUILD PIPELINE CONTINUOUS INTEGRATION DevOps Production alike …as a Service Metrics Checklist 6T[KVVQFC[
  • 78. THANKS! QUESTIONS? ? EPAM Systems 77