SlideShare a Scribd company logo
1 of 34
Download to read offline
Chetan Desai, Intuit
DevOps Architect, TurboTax
@chetanddesai
Building Your DevOps
for Node.js
2
About Me
3
1. TurboTax’s Services Journey
2. Node.js in the TurboTax Stack
3. Enterprise Principles for Node Services
4. Best Practices for Publishing Node Modules
Topics
Beautiful Sunset
Tropical Paradise
8
30+ million users filed with TurboTax
•  ~5 million used desktop
•  ~25 million used online
Mobile is the biggest growing segment
TurboTax is 25 years old
•  Roots as a Desktop App
9
Monolith
10
Marketing
Account
Tax Engine
Help
11
SERVICES
12
Node.js in the TurboTax Stack
Application Services
Capability Services
Utility Services
User Experience Multi-device user experiences (cares about layout)
Application specific services (data interaction for UX)
Re-usable capabilities across applications (tax engine)
Data platform type services (login & identity)
13
My First Reaction
I come from deploying in containers like JBoss & Tomcat
What do you mean the whole thing dies if there is an exception?!
Run 30 million+ customers through it.
Consult some experts: NodeSource
Our DevOps practices was integral to our success
Enterprise Principles for
Node Services
15
Enterprise Principles for Services
1.  Isolation: Shared build farms
2.  Reproducibility: Build once / deploy multiple times
3.  Reliability: Minimize failure points during deployment
4.  Availability: Keep server running
16
Build & Deploy Flow at Intuit
Build Farm
GitHub
Enterprise
npm
on-site
Artifact
Repository
Intuit Data
Center
17
Isolation: Shared Build Farms
•  Problem: global npm dependencies
npm WARN prefer global <pkgName>@<ver> should be installed with –g
•  No root access or sudo privileges
•  Other node services with different versions
18
Isolation: Shared Build Farms
•  Solution: package.json npm
scripts!
•  Add global dependencies to
devDependencies section
•  Add your CLI calls as npm scripts
•  Execute Scripts
•  npm run <script>
19
The power of the package.json
Other Benefits
1.  Local setup documentation:
- scripts for building, testing, running.
2.  Obtain consistency between developer workstations
- at least compatible
3.  Works in shared build environments!
- dependencies localized
20
Reproducibility:
Build Once / Deploy Multiple
Problem: Transitive Dependencies in package.json
•  semver major.minor.patch
•  ~1.1.1 "Approximately equivalent to version”
•  ^1.1.1 "Compatible with version”
•  1.1.1 "Specific version”
•  Did you install version 2.0.0 or version 2.0.0?
•  Transitive dependencies still had ~ or ^ notation.
21
Solution: npm shrinkwrap –dev
•  Full transitive dependency list and versions installed
Landed somewhere in the middle
•  Don’t check in shrinkwrap.json
•  Generate it once at build time
How to balance developer speed and compliance?
Reproducibility:
Build Once / Deploy Multiple
Developer Speed Reproducibility / Compliance
22
Reliability: Fast and Reliable Deployments
Problem: when deploying, choose between
1. massive node_modules folder compared to the code size
2. dependency on an npm registry to download modules – potential failure point
Solution:
•  Reduce size of node_modules with npm prune –production
•  Zip up the remaining contents with service code
•  Never run npm at deployment time
•  Our build OS (RHEL) is same as runtime OS
23
Availability: Keep Server Running
Problem: Process Management
•  “Let it terminate and restart”
•  Lots of options: pm2, forever, strongloop pm,
cluster
http://strong-pm.io/compare/
•  Build & Deploy
•  Clustering & Management
•  Profiling
•  Metrics
24
Availability: Keep Server Running
Enterprises have heterogeneous set of languages
•  Deploy, monitor, & existing features need to work across the stack
Who can manage processes better than the OS itself?
•  RHEL6 upstart & RHEL7 systemd
Upstart Approach
•  Multiple stateless processes, 1:1 with CPUs
•  Load balanced & SSL termination with nginx
•  If the process terminates, upstart restarts it
–  Configurable respawn window
–  Splunk for log monitoring
25
Recap: Node Services
1.  Isolation: Shared build farms
- localize dependencies through npm scripts
2.  Reproducibility: Build once / deploy multiple times
- shrinkwrap for transitive dependencies
3.  Reliability: Minimize failure points during deployment
- only run npm at build time
- prune out dev dependencies
4.  Availability: Keep server running
- upstart (RHEL6), systemd (RHEL7)
Best Practices for Node
Modules
27
Best Practices for Node Modules
1.  Only publish what’s needed
2.  Reproducibility: Tagging codebase
3.  Traceability: Server side publishing
28
Publish only what’s needed
We’re all familiar with .gitignore - used to exclude:
•  generated files
•  secrets
Use .npmignore to only publish what’s needed. Exclude:
•  Same items in .gitignore
•  Test data and files
Understand .npmignore precedence
There are default items ignored during a publication
.gitignore will be used if .npmignore is missing
.npmignore won’t combine with .gitignore
29
Tagging Codebase
Reproducibility: version bumps and tagging
•  maven-release-plugin for maven pom.xml
•  bumpversion library for python setup.py
Solution: npm version [<newversion> | major | minor | patch …] for your
package.json
Add git repository type for tagging support
Push commits back to origin
30
Server Side Publishing
Server builds for traceability and reproducibility
Local builds have too much risk
•  Forget to check-in a file
•  Out of sync with other changes
Same applies for publishing node modules
How to provide publishing credentials from the server?
31
Server Side Publishing
.npmrc for npm configuration
Developers had to set a dummy value set for NPM_TOKEN
Error: Failed to replace env in config: ${NPM_TOKEN}
Solution: Split them up
•  Project home .npmrc specifies internal registry (line 2)
•  Build user home ~/.npmrc contains credentials (line 1)
32
Recap: Best Practices for Node Modules
1.  Only publish what’s needed
- Use of .npmignore file
2.  Reproducibility: Tagging codebase
- npm versions to tag codebase
- postversion script to push
3.  Traceability: Server side publishing
- Two .npmrc files for registry and credentials
33
The solutions will evolve…
continue the conversation.
Chetan Desai, Intuit
DevOps Architect, TurboTax
@chetanddesai
Thank You!

More Related Content

What's hot

client-go: The Good, The Bad and The Ugly
client-go: The Good, The Bad and The Uglyclient-go: The Good, The Bad and The Ugly
client-go: The Good, The Bad and The UglyLili Cosic
 
Ansible, integration testing, and you.
Ansible, integration testing, and you.Ansible, integration testing, and you.
Ansible, integration testing, and you.Bob Killen
 
A Closer Look at Kubernetes Pods and Replica Sets
A Closer Look at Kubernetes Pods and Replica SetsA Closer Look at Kubernetes Pods and Replica Sets
A Closer Look at Kubernetes Pods and Replica SetsJanakiram MSV
 
LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)
LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)
LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)Docker, Inc.
 
Leveraging the Power of containerd Events - Evan Hazlett
Leveraging the Power of containerd Events - Evan HazlettLeveraging the Power of containerd Events - Evan Hazlett
Leveraging the Power of containerd Events - Evan HazlettDocker, Inc.
 
Openstack overview thomas-goirand
Openstack overview thomas-goirandOpenstack overview thomas-goirand
Openstack overview thomas-goirandOpenCity Community
 
Kubernetes and OpenStack at Scale
Kubernetes and OpenStack at ScaleKubernetes and OpenStack at Scale
Kubernetes and OpenStack at ScaleStephen Gordon
 
Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021alinalexandru
 
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...Codemotion
 
LlinuxKit security, Security Scanning and Notary
LlinuxKit security, Security Scanning and NotaryLlinuxKit security, Security Scanning and Notary
LlinuxKit security, Security Scanning and NotaryDocker, Inc.
 
Docker and Go: why did we decide to write Docker in Go?
Docker and Go: why did we decide to write Docker in Go?Docker and Go: why did we decide to write Docker in Go?
Docker and Go: why did we decide to write Docker in Go?Jérôme Petazzoni
 
DockerCon US 2016 - Extending Docker With APIs, Drivers, and Plugins
DockerCon US 2016 - Extending Docker With APIs, Drivers, and PluginsDockerCon US 2016 - Extending Docker With APIs, Drivers, and Plugins
DockerCon US 2016 - Extending Docker With APIs, Drivers, and PluginsArnaud Porterie
 
Kubernetes in Docker
Kubernetes in DockerKubernetes in Docker
Kubernetes in DockerDocker, Inc.
 
Ice breaker with dev ops
Ice breaker with dev opsIce breaker with dev ops
Ice breaker with dev opsMukta Aphale
 
Docker presentation
Docker presentationDocker presentation
Docker presentationWes Eklund
 
Alex Bolboacă: Why You Should Start Using Docker at I T.A.K.E. Unconference ...
Alex Bolboacă: Why You Should Start Using Docker at I T.A.K.E. Unconference ...Alex Bolboacă: Why You Should Start Using Docker at I T.A.K.E. Unconference ...
Alex Bolboacă: Why You Should Start Using Docker at I T.A.K.E. Unconference ...Mozaic Works
 
Getting started with kubernetes
Getting started with kubernetesGetting started with kubernetes
Getting started with kubernetesJanakiram MSV
 
Kubernetes Webinar Series - Understanding Service Discovery
Kubernetes Webinar Series - Understanding Service DiscoveryKubernetes Webinar Series - Understanding Service Discovery
Kubernetes Webinar Series - Understanding Service DiscoveryJanakiram MSV
 

What's hot (20)

client-go: The Good, The Bad and The Ugly
client-go: The Good, The Bad and The Uglyclient-go: The Good, The Bad and The Ugly
client-go: The Good, The Bad and The Ugly
 
Ansible, integration testing, and you.
Ansible, integration testing, and you.Ansible, integration testing, and you.
Ansible, integration testing, and you.
 
A Closer Look at Kubernetes Pods and Replica Sets
A Closer Look at Kubernetes Pods and Replica SetsA Closer Look at Kubernetes Pods and Replica Sets
A Closer Look at Kubernetes Pods and Replica Sets
 
LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)
LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)
LinuxKit: the first five months by Justin Cormack & Riyaz Faizullabhoy (Docker)
 
Leveraging the Power of containerd Events - Evan Hazlett
Leveraging the Power of containerd Events - Evan HazlettLeveraging the Power of containerd Events - Evan Hazlett
Leveraging the Power of containerd Events - Evan Hazlett
 
Openstack overview thomas-goirand
Openstack overview thomas-goirandOpenstack overview thomas-goirand
Openstack overview thomas-goirand
 
Kubernetes and OpenStack at Scale
Kubernetes and OpenStack at ScaleKubernetes and OpenStack at Scale
Kubernetes and OpenStack at Scale
 
Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021
 
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
From Docker To Kubernetes: A Developer's Guide To Containers - Mandy White - ...
 
Docker for dev
Docker for devDocker for dev
Docker for dev
 
LlinuxKit security, Security Scanning and Notary
LlinuxKit security, Security Scanning and NotaryLlinuxKit security, Security Scanning and Notary
LlinuxKit security, Security Scanning and Notary
 
Docker and Go: why did we decide to write Docker in Go?
Docker and Go: why did we decide to write Docker in Go?Docker and Go: why did we decide to write Docker in Go?
Docker and Go: why did we decide to write Docker in Go?
 
DockerCon US 2016 - Extending Docker With APIs, Drivers, and Plugins
DockerCon US 2016 - Extending Docker With APIs, Drivers, and PluginsDockerCon US 2016 - Extending Docker With APIs, Drivers, and Plugins
DockerCon US 2016 - Extending Docker With APIs, Drivers, and Plugins
 
Kubernetes in Docker
Kubernetes in DockerKubernetes in Docker
Kubernetes in Docker
 
Quick introduction to Kubernetes
Quick introduction to KubernetesQuick introduction to Kubernetes
Quick introduction to Kubernetes
 
Ice breaker with dev ops
Ice breaker with dev opsIce breaker with dev ops
Ice breaker with dev ops
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
 
Alex Bolboacă: Why You Should Start Using Docker at I T.A.K.E. Unconference ...
Alex Bolboacă: Why You Should Start Using Docker at I T.A.K.E. Unconference ...Alex Bolboacă: Why You Should Start Using Docker at I T.A.K.E. Unconference ...
Alex Bolboacă: Why You Should Start Using Docker at I T.A.K.E. Unconference ...
 
Getting started with kubernetes
Getting started with kubernetesGetting started with kubernetes
Getting started with kubernetes
 
Kubernetes Webinar Series - Understanding Service Discovery
Kubernetes Webinar Series - Understanding Service DiscoveryKubernetes Webinar Series - Understanding Service Discovery
Kubernetes Webinar Series - Understanding Service Discovery
 

Similar to Node Summit 2016: Building your DevOps for Node.js

Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps WorkshopWeaveworks
 
Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5Suyati Technologies
 
Docker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud ApplicationsDocker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud ApplicationsRightScale
 
Getting Started with Node.js
Getting Started with Node.jsGetting Started with Node.js
Getting Started with Node.jsJustin Reock
 
MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...
MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...
MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...MongoDB
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...Evans Ye
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...Evans Ye
 
Idi2018 - Serverless does not mean Opsless
Idi2018 - Serverless does not mean OpslessIdi2018 - Serverless does not mean Opsless
Idi2018 - Serverless does not mean OpslessLinuxaria.com
 
DevOps - Interview Question.pdf
DevOps - Interview Question.pdfDevOps - Interview Question.pdf
DevOps - Interview Question.pdfMinhTrnNht7
 
Ninja, Choose Your Weapon!
Ninja, Choose Your Weapon!Ninja, Choose Your Weapon!
Ninja, Choose Your Weapon!Anton Weiss
 
DevOps environment with OpenStack and NetApp
DevOps environment with OpenStack and NetAppDevOps environment with OpenStack and NetApp
DevOps environment with OpenStack and NetAppB1 Systems GmbH
 
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Ambassador Labs
 
Scientific Computing - Hardware
Scientific Computing - HardwareScientific Computing - Hardware
Scientific Computing - Hardwarejalle6
 
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Richard Bullington-McGuire
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack SummitMiguel Zuniga
 
DevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and ProjectsDevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and ProjectsFedir RYKHTIK
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAppDynamics
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGroup
 
Local development with ddev and TYPO3
Local development with ddev and TYPO3Local development with ddev and TYPO3
Local development with ddev and TYPO3Jan Helke
 

Similar to Node Summit 2016: Building your DevOps for Node.js (20)

Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps Workshop
 
Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5Get acquainted with the new ASP.Net 5
Get acquainted with the new ASP.Net 5
 
Docker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud ApplicationsDocker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud Applications
 
Getting Started with Node.js
Getting Started with Node.jsGetting Started with Node.js
Getting Started with Node.js
 
MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...
MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...
MongoDB World 2019: Using the MongoDB Enterprise Kubernetes Operator to Scale...
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...
 
Idi2018 - Serverless does not mean Opsless
Idi2018 - Serverless does not mean OpslessIdi2018 - Serverless does not mean Opsless
Idi2018 - Serverless does not mean Opsless
 
DevOps - Interview Question.pdf
DevOps - Interview Question.pdfDevOps - Interview Question.pdf
DevOps - Interview Question.pdf
 
Ninja, Choose Your Weapon!
Ninja, Choose Your Weapon!Ninja, Choose Your Weapon!
Ninja, Choose Your Weapon!
 
DevOps environment with OpenStack and NetApp
DevOps environment with OpenStack and NetAppDevOps environment with OpenStack and NetApp
DevOps environment with OpenStack and NetApp
 
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
 
Scientific Computing - Hardware
Scientific Computing - HardwareScientific Computing - Hardware
Scientific Computing - Hardware
 
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
DevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and ProjectsDevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and Projects
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
 
Devops
DevopsDevops
Devops
 
Local development with ddev and TYPO3
Local development with ddev and TYPO3Local development with ddev and TYPO3
Local development with ddev and TYPO3
 

Recently uploaded

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
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
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
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
 
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
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
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
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
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
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
(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
 
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
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
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
 
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
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 

Recently uploaded (20)

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
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...
 
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...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
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
 
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)
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
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
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
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
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.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...
 
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
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
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
 
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...
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 

Node Summit 2016: Building your DevOps for Node.js

  • 1. Chetan Desai, Intuit DevOps Architect, TurboTax @chetanddesai Building Your DevOps for Node.js
  • 3. 3 1. TurboTax’s Services Journey 2. Node.js in the TurboTax Stack 3. Enterprise Principles for Node Services 4. Best Practices for Publishing Node Modules Topics
  • 4.
  • 5.
  • 6.
  • 8. 8 30+ million users filed with TurboTax •  ~5 million used desktop •  ~25 million used online Mobile is the biggest growing segment TurboTax is 25 years old •  Roots as a Desktop App
  • 12. 12 Node.js in the TurboTax Stack Application Services Capability Services Utility Services User Experience Multi-device user experiences (cares about layout) Application specific services (data interaction for UX) Re-usable capabilities across applications (tax engine) Data platform type services (login & identity)
  • 13. 13 My First Reaction I come from deploying in containers like JBoss & Tomcat What do you mean the whole thing dies if there is an exception?! Run 30 million+ customers through it. Consult some experts: NodeSource Our DevOps practices was integral to our success
  • 15. 15 Enterprise Principles for Services 1.  Isolation: Shared build farms 2.  Reproducibility: Build once / deploy multiple times 3.  Reliability: Minimize failure points during deployment 4.  Availability: Keep server running
  • 16. 16 Build & Deploy Flow at Intuit Build Farm GitHub Enterprise npm on-site Artifact Repository Intuit Data Center
  • 17. 17 Isolation: Shared Build Farms •  Problem: global npm dependencies npm WARN prefer global <pkgName>@<ver> should be installed with –g •  No root access or sudo privileges •  Other node services with different versions
  • 18. 18 Isolation: Shared Build Farms •  Solution: package.json npm scripts! •  Add global dependencies to devDependencies section •  Add your CLI calls as npm scripts •  Execute Scripts •  npm run <script>
  • 19. 19 The power of the package.json Other Benefits 1.  Local setup documentation: - scripts for building, testing, running. 2.  Obtain consistency between developer workstations - at least compatible 3.  Works in shared build environments! - dependencies localized
  • 20. 20 Reproducibility: Build Once / Deploy Multiple Problem: Transitive Dependencies in package.json •  semver major.minor.patch •  ~1.1.1 "Approximately equivalent to version” •  ^1.1.1 "Compatible with version” •  1.1.1 "Specific version” •  Did you install version 2.0.0 or version 2.0.0? •  Transitive dependencies still had ~ or ^ notation.
  • 21. 21 Solution: npm shrinkwrap –dev •  Full transitive dependency list and versions installed Landed somewhere in the middle •  Don’t check in shrinkwrap.json •  Generate it once at build time How to balance developer speed and compliance? Reproducibility: Build Once / Deploy Multiple Developer Speed Reproducibility / Compliance
  • 22. 22 Reliability: Fast and Reliable Deployments Problem: when deploying, choose between 1. massive node_modules folder compared to the code size 2. dependency on an npm registry to download modules – potential failure point Solution: •  Reduce size of node_modules with npm prune –production •  Zip up the remaining contents with service code •  Never run npm at deployment time •  Our build OS (RHEL) is same as runtime OS
  • 23. 23 Availability: Keep Server Running Problem: Process Management •  “Let it terminate and restart” •  Lots of options: pm2, forever, strongloop pm, cluster http://strong-pm.io/compare/ •  Build & Deploy •  Clustering & Management •  Profiling •  Metrics
  • 24. 24 Availability: Keep Server Running Enterprises have heterogeneous set of languages •  Deploy, monitor, & existing features need to work across the stack Who can manage processes better than the OS itself? •  RHEL6 upstart & RHEL7 systemd Upstart Approach •  Multiple stateless processes, 1:1 with CPUs •  Load balanced & SSL termination with nginx •  If the process terminates, upstart restarts it –  Configurable respawn window –  Splunk for log monitoring
  • 25. 25 Recap: Node Services 1.  Isolation: Shared build farms - localize dependencies through npm scripts 2.  Reproducibility: Build once / deploy multiple times - shrinkwrap for transitive dependencies 3.  Reliability: Minimize failure points during deployment - only run npm at build time - prune out dev dependencies 4.  Availability: Keep server running - upstart (RHEL6), systemd (RHEL7)
  • 26. Best Practices for Node Modules
  • 27. 27 Best Practices for Node Modules 1.  Only publish what’s needed 2.  Reproducibility: Tagging codebase 3.  Traceability: Server side publishing
  • 28. 28 Publish only what’s needed We’re all familiar with .gitignore - used to exclude: •  generated files •  secrets Use .npmignore to only publish what’s needed. Exclude: •  Same items in .gitignore •  Test data and files Understand .npmignore precedence There are default items ignored during a publication .gitignore will be used if .npmignore is missing .npmignore won’t combine with .gitignore
  • 29. 29 Tagging Codebase Reproducibility: version bumps and tagging •  maven-release-plugin for maven pom.xml •  bumpversion library for python setup.py Solution: npm version [<newversion> | major | minor | patch …] for your package.json Add git repository type for tagging support Push commits back to origin
  • 30. 30 Server Side Publishing Server builds for traceability and reproducibility Local builds have too much risk •  Forget to check-in a file •  Out of sync with other changes Same applies for publishing node modules How to provide publishing credentials from the server?
  • 31. 31 Server Side Publishing .npmrc for npm configuration Developers had to set a dummy value set for NPM_TOKEN Error: Failed to replace env in config: ${NPM_TOKEN} Solution: Split them up •  Project home .npmrc specifies internal registry (line 2) •  Build user home ~/.npmrc contains credentials (line 1)
  • 32. 32 Recap: Best Practices for Node Modules 1.  Only publish what’s needed - Use of .npmignore file 2.  Reproducibility: Tagging codebase - npm versions to tag codebase - postversion script to push 3.  Traceability: Server side publishing - Two .npmrc files for registry and credentials
  • 33. 33 The solutions will evolve… continue the conversation.
  • 34. Chetan Desai, Intuit DevOps Architect, TurboTax @chetanddesai Thank You!