SlideShare a Scribd company logo
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 Ugly
Lili 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 Sets
Janakiram 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 Hazlett
Docker, Inc.
 
Openstack overview thomas-goirand
Openstack overview thomas-goirandOpenstack overview thomas-goirand
Openstack overview thomas-goirand
OpenCity Community
 
Kubernetes and OpenStack at Scale
Kubernetes and OpenStack at ScaleKubernetes and OpenStack at Scale
Kubernetes and OpenStack at Scale
Stephen Gordon
 
Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021
alinalexandru
 
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
 
Docker for dev
Docker for devDocker for dev
Docker for dev
Erik Talboom
 
LlinuxKit security, Security Scanning and Notary
LlinuxKit security, Security Scanning and NotaryLlinuxKit security, Security Scanning and Notary
LlinuxKit security, Security Scanning and Notary
Docker, 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 Plugins
Arnaud Porterie
 
Kubernetes in Docker
Kubernetes in DockerKubernetes in Docker
Kubernetes in Docker
Docker, Inc.
 
Quick introduction to Kubernetes
Quick introduction to KubernetesQuick introduction to Kubernetes
Quick introduction to Kubernetes
Eduardo Garcia Moyano
 
Ice breaker with dev ops
Ice breaker with dev opsIce breaker with dev ops
Ice breaker with dev ops
Mukta Aphale
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
Wes 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 kubernetes
Janakiram MSV
 
Kubernetes Webinar Series - Understanding Service Discovery
Kubernetes Webinar Series - Understanding Service DiscoveryKubernetes Webinar Series - Understanding Service Discovery
Kubernetes Webinar Series - Understanding Service Discovery
Janakiram 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 Workshop
Weaveworks
 
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
Suyati 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 Applications
RightScale
 
Getting Started with Node.js
Getting Started with Node.jsGetting Started with Node.js
Getting Started with Node.js
Justin 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 Opsless
Linuxaria.com
 
DevOps - Interview Question.pdf
DevOps - Interview Question.pdfDevOps - Interview Question.pdf
DevOps - Interview Question.pdf
MinhTrnNht7
 
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 NetApp
B1 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 - Hardware
jalle6
 
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 Summit
Miguel Zuniga
 
DevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and ProjectsDevOps for TYPO3 Teams and Projects
DevOps for TYPO3 Teams and Projects
Fedir 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 Europe
AppDynamics
 
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
DevOpsGroup
 
Devops
DevopsDevops
Devops
JyothirmaiG4
 
Local development with ddev and TYPO3
Local development with ddev and TYPO3Local development with ddev and TYPO3
Local development with ddev and TYPO3
Jan 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

Liberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptxLiberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptx
Massimo Artizzu
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
sjcobrien
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
Reetu63
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
The Third Creative Media
 
Benefits of Artificial Intelligence in Healthcare!
Benefits of  Artificial Intelligence in Healthcare!Benefits of  Artificial Intelligence in Healthcare!
Benefits of Artificial Intelligence in Healthcare!
Prestware
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptxOperational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
sandeepmenon62
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
Envertis Software Solutions
 
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
OnePlan Solutions
 

Recently uploaded (20)

Liberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptxLiberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptx
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
 
Benefits of Artificial Intelligence in Healthcare!
Benefits of  Artificial Intelligence in Healthcare!Benefits of  Artificial Intelligence in Healthcare!
Benefits of Artificial Intelligence in Healthcare!
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptxOperational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
 
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
 

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!