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
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
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
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
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
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[