SlideShare uma empresa Scribd logo
1 de 74
LIGHTNING 
BRANCHES 
HOW WE SUPERCHARGE DELIVERY OF FEATURES AT 
REDMART
Hi I’m @ringular work at @Redmartcom 
#frontend #devops
Getting Code to 
Production Fast
“No talk all action” 
Not this talk :(
Lesser Meetings 
More Productivity
Real World Development 
Workflow of a Scaling 
Startup
LIGHTNING 
BRANCHES 
HOW WE SUPERCHARGE DELIVERY OF FEATURES AT 
REDMART
What just happened? 
We just deployed a feature in production in a 
matter of minutes
Yes. It was staged..
Yes. It wasn’t really a 
feature..
but I’d say..
Specifically Cool for 
RedMart
Product Market Fit
BEAR WITH ME
COMPANIES SCALE BRO
COMPANIES SCALE BRO
COMPANIES SCALE BRO
COMPANIES SCALE BRO
More Developers working 
on More Features at the 
Same Time which results 
in lots of Merge Hells
More Developers working 
on More Features at the 
Same Time which results 
in lots of Merge Hells
More Developers working 
on More Features at the 
Same Time which results 
in lots of Merge Hells
More Developers working 
on More Features at the 
Same Time which results 
in lots of Merge Hells
More Stakeholders
Huddling behind 
developers doesn’t scale
Bring your laptop over 
every time? Nah
More Meetings 
Less Code :(
E = MC² 
Einstein’s Mass Energy Equation
E = C²/M 
E = Environment that developers love 
C = Code they write per day 
M = Meetings they attend per day
Recap 
Companies Scale 
Empower multiple features ( ↑ E ) 
More Code ( ↑ C ) 
Communicate in a Snap ( ↓ M )
Empower multiple 
features development 
Git flow
BEAR WITH ME
Git Flow - Quick Recap 
Master - Official Release History 
Release - Combined features 
Develop - Integration Branch 
Branching Model 
Hotfix/ - Bugfixes, based off master branch
Git Flow - Quick Recap 
Master - Official Release History 
Release - Combined features 
Develop - Integration Branch 
feature/* - Development of Features based off 
develop branch 
Hotfix/ - Bugfixes, based off master branch
eg. feature/jsconf 
> git flow feature start jsconf
Git Flow - Quick Recap 
Master - Official Release History 
Release - Combined features 
develop - Integration Branch 
feature/* - Development of Features based off 
develop branch 
Hotfix/ - Bugfixes, based off master branch
feature/jsconf -> develop 
> git flow feature finish jsconf
Git Flow - Quick Recap 
Master - Official Release History 
release - Combined features 
develop - Integration Branch 
feature/* - Development of Features based off 
develop branch 
Hotfix/ - Bugfixes, based off master branch
Git Flow - Quick Recap 
master - Official Release History 
release - Combined features 
develop - Integration Branch 
feature/* - Development of Features based off 
develop branch 
Hotfix/ - Bugfixes, based off master branch
Git Flow - Quick Recap 
master - Official Release History 
release - Combined features 
develop - Integration Branch 
feature/* - Development of Features based off 
develop branch 
Hotfix/ - Bugfixes, based off master branch
Code review 
Pull requests 
- feature -> develop 
- develop -> release 
- develop or release -> master
Oath - Thou shalt 
Only commit in feature branch 
Commit & push often 
Merge develop into feature branch everyday 
Only merge feature into develop, never master 
Only merge pull requests into master
Multiple features ☑
Just having branches 
obviously not enough.
Environments
Local
Staging develop or release 
Local
Production master 
Staging develop or release 
Local
Production master 
Staging develop or release 
Development develop or feature/* 
Local
Development *.alpha.redmart.com 
develop to 
alpha.redmart.com 
feature/jsconf to 
jsconf.alpha.redmart.com
Deployment 
1. Code 
2. Push to git 
3. Relax
Travis 
- Picks up branch (hence environment) 
- Runs tests 
- Create artifacts 
- Transfer artifacts to servers (based on 
environment) 
- Start application 
@ksaitor
Developer 
S3 (Artifacts) 
2. Upload 
1. Create Artifacts 
Push 
Build 
Fail 
Pass 
Slack 
SSH 
into 
Server 
`sh start.sh` 
3. Get Server 
4. Transfer Artifacts 
5. Start App
Deploy with Git! 
Don’t mess with the developer workflow
Communication 
- New feature 
- new channel on slack #jsconf 
- builds go to slack 
- feature/jsconf get deployed automatically 
- eg. jsconf.alpha.redmart.com
COMMUNICATE 
WITH CODE
Less Meetings ☑
INVEST IN 
DEVELOP 
LIGHTNING BRANCHES ARE IN INVESTMENT IN DEVELOPMENT 
ENV
How do we actually 
deploy them? 
Development develop or feature/*
Nginx 
# Feature branches 
server { 
listen 80; 
server_name *.alpha.redmart.com; 
# serve develop as default feature 
set $feature "develop"; 
...
# change feature based on host 
if ($host ~* ^([^.]+).alpha.redmart.com$){ 
set $feature $1; 
} 
# All environments are hosted from a subdirectory 
root /path/to/features/$feature; 
}
Transfer & unzip artifacts of 
‘feature/abc’ to 
‘/path/to/features/abc’
It’s that simple? Yes.
It’s that simple? Yes.
Actually there’s more. 
Chef - Ruby based 
But I value my life.
Thank you LAH.
We’re hiring! 
about.redmart.com/careers
Extra
Applications 
- Must be environmentally conscious 
- Must know start themselves (Just makes it 
easier) 
- ci/start.sh
Developer 
S3 (Artifacts) 
2. Upload 
1. Create Artifacts 
Push 
Build 
Fail 
Pass 
Slack SSH 
into 
Server 
Chef Server 
Download 
`sudo chef-client` 
3. Get nodes 
4. SSH into Node & run 
Chef

Mais conteúdo relacionado

Mais procurados

Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET CoreAvanade Nederland
 
Codecoon - A technical Case Study
Codecoon - A technical Case StudyCodecoon - A technical Case Study
Codecoon - A technical Case StudyMichael Lihs
 
Migrating .NET Application to .NET Core
Migrating .NET Application to .NET CoreMigrating .NET Application to .NET Core
Migrating .NET Application to .NET CoreBaris Ceviz
 
#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JSHanoi MagentoMeetup
 
Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for DevelopersAntons Kranga
 
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測謝 宗穎
 
ActionCableを触ってみた
ActionCableを触ってみたActionCableを触ってみた
ActionCableを触ってみたYoichi Toyota
 
Gitlab flow solo
Gitlab flow soloGitlab flow solo
Gitlab flow soloviniciusban
 
An introduction to the Symfony CMF - creating a CMS on top of Symfony
An introduction to the Symfony CMF - creating a CMS on top of Symfony An introduction to the Symfony CMF - creating a CMS on top of Symfony
An introduction to the Symfony CMF - creating a CMS on top of Symfony Roel Sint
 
Introduction to .NET Core & ASP.NET Core MVC
Introduction to .NET Core & ASP.NET Core MVCIntroduction to .NET Core & ASP.NET Core MVC
Introduction to .NET Core & ASP.NET Core MVCSaineshwar bageri
 
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev EnvironmentPhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev EnvironmentRyan J. Salva
 
JCConf 2015 workshop 動手玩 Java 專案建置工具
JCConf 2015 workshop 動手玩 Java 專案建置工具JCConf 2015 workshop 動手玩 Java 專案建置工具
JCConf 2015 workshop 動手玩 Java 專案建置工具謝 宗穎
 
Jenkins to Gitlab - Intelligent Build-Pipelines
Jenkins to Gitlab - Intelligent Build-PipelinesJenkins to Gitlab - Intelligent Build-Pipelines
Jenkins to Gitlab - Intelligent Build-PipelinesChristian Münch
 
Multiple django applications on a single server with nginx
Multiple django applications on a single server with nginxMultiple django applications on a single server with nginx
Multiple django applications on a single server with nginxroskakori
 
Vagrant, Chef and TYPO3 - A Love Affair
Vagrant, Chef and TYPO3 - A Love AffairVagrant, Chef and TYPO3 - A Love Affair
Vagrant, Chef and TYPO3 - A Love AffairMichael Lihs
 
Protractor: The Hacker way (NG-MY 2019)
Protractor: The Hacker way (NG-MY 2019)Protractor: The Hacker way (NG-MY 2019)
Protractor: The Hacker way (NG-MY 2019)Will Huang
 
Test-Driven Infrastructure with Chef
Test-Driven Infrastructure with ChefTest-Driven Infrastructure with Chef
Test-Driven Infrastructure with ChefMichael Lihs
 

Mais procurados (20)

Vagrant to-aws-flow
Vagrant to-aws-flowVagrant to-aws-flow
Vagrant to-aws-flow
 
Introduction to ASP.NET Core
Introduction to ASP.NET CoreIntroduction to ASP.NET Core
Introduction to ASP.NET Core
 
Codecoon - A technical Case Study
Codecoon - A technical Case StudyCodecoon - A technical Case Study
Codecoon - A technical Case Study
 
GlassFish Embedded API
GlassFish Embedded APIGlassFish Embedded API
GlassFish Embedded API
 
Migrating .NET Application to .NET Core
Migrating .NET Application to .NET CoreMigrating .NET Application to .NET Core
Migrating .NET Application to .NET Core
 
Docker
DockerDocker
Docker
 
#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS#2 Hanoi Magento Meetup - Part 2: Knockout JS
#2 Hanoi Magento Meetup - Part 2: Knockout JS
 
Vagrant introduction for Developers
Vagrant introduction for DevelopersVagrant introduction for Developers
Vagrant introduction for Developers
 
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
 
ActionCableを触ってみた
ActionCableを触ってみたActionCableを触ってみた
ActionCableを触ってみた
 
Gitlab flow solo
Gitlab flow soloGitlab flow solo
Gitlab flow solo
 
An introduction to the Symfony CMF - creating a CMS on top of Symfony
An introduction to the Symfony CMF - creating a CMS on top of Symfony An introduction to the Symfony CMF - creating a CMS on top of Symfony
An introduction to the Symfony CMF - creating a CMS on top of Symfony
 
Introduction to .NET Core & ASP.NET Core MVC
Introduction to .NET Core & ASP.NET Core MVCIntroduction to .NET Core & ASP.NET Core MVC
Introduction to .NET Core & ASP.NET Core MVC
 
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev EnvironmentPhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
PhoneGap Day 2016 EU: Creating the Ideal Cordova Dev Environment
 
JCConf 2015 workshop 動手玩 Java 專案建置工具
JCConf 2015 workshop 動手玩 Java 專案建置工具JCConf 2015 workshop 動手玩 Java 專案建置工具
JCConf 2015 workshop 動手玩 Java 專案建置工具
 
Jenkins to Gitlab - Intelligent Build-Pipelines
Jenkins to Gitlab - Intelligent Build-PipelinesJenkins to Gitlab - Intelligent Build-Pipelines
Jenkins to Gitlab - Intelligent Build-Pipelines
 
Multiple django applications on a single server with nginx
Multiple django applications on a single server with nginxMultiple django applications on a single server with nginx
Multiple django applications on a single server with nginx
 
Vagrant, Chef and TYPO3 - A Love Affair
Vagrant, Chef and TYPO3 - A Love AffairVagrant, Chef and TYPO3 - A Love Affair
Vagrant, Chef and TYPO3 - A Love Affair
 
Protractor: The Hacker way (NG-MY 2019)
Protractor: The Hacker way (NG-MY 2019)Protractor: The Hacker way (NG-MY 2019)
Protractor: The Hacker way (NG-MY 2019)
 
Test-Driven Infrastructure with Chef
Test-Driven Infrastructure with ChefTest-Driven Infrastructure with Chef
Test-Driven Infrastructure with Chef
 

Destaque

The Ultimate Guide To F&B e-commerce statistic in SEA and VN.2014
The Ultimate Guide To F&B e-commerce statistic in SEA and VN.2014The Ultimate Guide To F&B e-commerce statistic in SEA and VN.2014
The Ultimate Guide To F&B e-commerce statistic in SEA and VN.2014Johnny Tri Dung
 
Trans&logistics perspective v6
Trans&logistics perspective v6Trans&logistics perspective v6
Trans&logistics perspective v6James Harris
 
Crowdsourcing and collaborative warehousing and logistics werc presentation
Crowdsourcing and collaborative warehousing and logistics werc presentationCrowdsourcing and collaborative warehousing and logistics werc presentation
Crowdsourcing and collaborative warehousing and logistics werc presentationFLEXE, Inc.
 
The collaborative economy in Europe & the future role of logistics
The collaborative economy in Europe & the future role of logisticsThe collaborative economy in Europe & the future role of logistics
The collaborative economy in Europe & the future role of logisticsJonathan Wichmann
 
Tracxn - FoodTech Startup Landscape
Tracxn - FoodTech Startup LandscapeTracxn - FoodTech Startup Landscape
Tracxn - FoodTech Startup LandscapeTracxn
 
Tracxn Startup Research - Online Grocery Landscape, August 2016
Tracxn Startup Research - Online Grocery Landscape, August 2016Tracxn Startup Research - Online Grocery Landscape, August 2016
Tracxn Startup Research - Online Grocery Landscape, August 2016Tracxn
 
Singapore startup ecosystem and entrepreneur toolbox - Jun 2014
Singapore startup ecosystem and entrepreneur toolbox - Jun 2014Singapore startup ecosystem and entrepreneur toolbox - Jun 2014
Singapore startup ecosystem and entrepreneur toolbox - Jun 2014Arnaud Bonzom
 

Destaque (7)

The Ultimate Guide To F&B e-commerce statistic in SEA and VN.2014
The Ultimate Guide To F&B e-commerce statistic in SEA and VN.2014The Ultimate Guide To F&B e-commerce statistic in SEA and VN.2014
The Ultimate Guide To F&B e-commerce statistic in SEA and VN.2014
 
Trans&logistics perspective v6
Trans&logistics perspective v6Trans&logistics perspective v6
Trans&logistics perspective v6
 
Crowdsourcing and collaborative warehousing and logistics werc presentation
Crowdsourcing and collaborative warehousing and logistics werc presentationCrowdsourcing and collaborative warehousing and logistics werc presentation
Crowdsourcing and collaborative warehousing and logistics werc presentation
 
The collaborative economy in Europe & the future role of logistics
The collaborative economy in Europe & the future role of logisticsThe collaborative economy in Europe & the future role of logistics
The collaborative economy in Europe & the future role of logistics
 
Tracxn - FoodTech Startup Landscape
Tracxn - FoodTech Startup LandscapeTracxn - FoodTech Startup Landscape
Tracxn - FoodTech Startup Landscape
 
Tracxn Startup Research - Online Grocery Landscape, August 2016
Tracxn Startup Research - Online Grocery Landscape, August 2016Tracxn Startup Research - Online Grocery Landscape, August 2016
Tracxn Startup Research - Online Grocery Landscape, August 2016
 
Singapore startup ecosystem and entrepreneur toolbox - Jun 2014
Singapore startup ecosystem and entrepreneur toolbox - Jun 2014Singapore startup ecosystem and entrepreneur toolbox - Jun 2014
Singapore startup ecosystem and entrepreneur toolbox - Jun 2014
 

Semelhante a Lightning branches at RedMart (Js conf Asia 2014 Talk)

Deployment Tactics
Deployment TacticsDeployment Tactics
Deployment TacticsIan Barber
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Michael Lihs
 
Collaborative development with git
Collaborative development with gitCollaborative development with git
Collaborative development with gitJoseluis Laso
 
Sbt, idea and eclipse
Sbt, idea and eclipseSbt, idea and eclipse
Sbt, idea and eclipseMike Slinn
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and LingvokotLingvokot
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentationMack Hardy
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budgetDavid Lukac
 
Git and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software DevelopmentGit and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software DevelopmentLemi Orhan Ergin
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
CISOA Conference 2020 Banner 9 Development
CISOA Conference 2020 Banner 9 DevelopmentCISOA Conference 2020 Banner 9 Development
CISOA Conference 2020 Banner 9 DevelopmentBrad Rippe
 
Gitflow - Clouddictive
Gitflow   - ClouddictiveGitflow   - Clouddictive
Gitflow - ClouddictiveClouddictive
 
Version Control ThinkVitamin
Version Control ThinkVitaminVersion Control ThinkVitamin
Version Control ThinkVitaminAlex Hillman
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzEnabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzSteve Hoffman
 
Getting started with spfx
Getting started with spfxGetting started with spfx
Getting started with spfxJenkins NS
 
Fun with Jenkins & Salesforce
Fun with Jenkins & SalesforceFun with Jenkins & Salesforce
Fun with Jenkins & SalesforceAbhinav Gupta
 
Action! Development and Operations for Sticker Shop
Action! Development and  Operations for Sticker ShopAction! Development and  Operations for Sticker Shop
Action! Development and Operations for Sticker ShopLINE Corporation
 

Semelhante a Lightning branches at RedMart (Js conf Asia 2014 Talk) (20)

Deployment Tactics
Deployment TacticsDeployment Tactics
Deployment Tactics
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
 
Collaborative development with git
Collaborative development with gitCollaborative development with git
Collaborative development with git
 
Sbt, idea and eclipse
Sbt, idea and eclipseSbt, idea and eclipse
Sbt, idea and eclipse
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and Lingvokot
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
 
Deploy like a pro!
Deploy like a pro!Deploy like a pro!
Deploy like a pro!
 
Automatisation in development and testing - within budget
Automatisation in development and testing - within budgetAutomatisation in development and testing - within budget
Automatisation in development and testing - within budget
 
Git and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software DevelopmentGit and Git Workflow Models as Catalysts of Software Development
Git and Git Workflow Models as Catalysts of Software Development
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
CISOA Conference 2020 Banner 9 Development
CISOA Conference 2020 Banner 9 DevelopmentCISOA Conference 2020 Banner 9 Development
CISOA Conference 2020 Banner 9 Development
 
Gitflow - Clouddictive
Gitflow   - ClouddictiveGitflow   - Clouddictive
Gitflow - Clouddictive
 
Git
GitGit
Git
 
Version Control ThinkVitamin
Version Control ThinkVitaminVersion Control ThinkVitamin
Version Control ThinkVitamin
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzEnabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
 
Switching to Git
Switching to GitSwitching to Git
Switching to Git
 
Getting started with spfx
Getting started with spfxGetting started with spfx
Getting started with spfx
 
Fun with Jenkins & Salesforce
Fun with Jenkins & SalesforceFun with Jenkins & Salesforce
Fun with Jenkins & Salesforce
 
Action! Development and Operations for Sticker Shop
Action! Development and  Operations for Sticker ShopAction! Development and  Operations for Sticker Shop
Action! Development and Operations for Sticker Shop
 

Último

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
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
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
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
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 

Último (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
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
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
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
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 

Lightning branches at RedMart (Js conf Asia 2014 Talk)

Notas do Editor

  1. Hi Everyone! How’re we all doing? Mic test Where’s my applause crew? Sarmad? Cool HDMI, 720i, PAL (50hz)
  2. Hi! I’m Ritesh That’s me with the white arrow I do Frontend & Devops at RedMart We’re Singapore’s leading online grocer We’re building the next generation Ecommerce platform ERP Warehouse Transport Logistics Even a Robotic Trolley More than just the Website & API & We’re a startup
  3. Today I want to talk about how we develop features at RedMart We have a workflow that gets code to production fast
  4. We do this in a “No talk all action” approach I realise now this is a bad slide to have on a talk OK this is a bad slide, but what I mean is
  5. We encourage lesser meetings & more productivity I want to share how we do that. Hopefully with this talk, you can apply some of our workflow to help your team But if not, then if anything else
  6. You’ll get to hear about a real world development workflow of a scaling startup
  7. Raise of hands, How many of you guys have seen this site? I think it’s pretty cool don’t you think The CSS Animations - Wah damn power Lah I totally dig it.
  8. Let’s see if we can replicate it * GIT FLOW!! * Open up sublime * iTerm * grunt dev * remember to zoom
  9. Cool! So that’s done. I think it looks pretty sweet.
  10. So what just happened? I spent more time figuring out the projector & display stuff We deployed a feature into production in matter of minutes!!
  11. Yes it was Staged..
  12. Yes it wasn’t really a feature.. Just some CSS stuff
  13. But id’ say.. It was still pretty COOL.
  14. Where’s my applause team. Thank you.
  15. But in case you’re not convinced.. Let me tell you a bit of a story About why it’s specifically cool about RedMart
  16. & It’s about Product Market fit. I know you’re thinking.. what’s this douche talking about product market fit at JS Conf But...
  17. Bear with me. Many of us are working at Startups & I’m really fascinated how the business & company dynamics Especially how it impacts developers Because…
  18. Companies Scale Bro If you’re lucky & people start using your product & at RedMart count ourselves fortunate that we are You’re going to go from 10
  19. 100
  20. 1000
  21. 10000 Users/ Orders/ Messages Or whatever your measure of scale is As a result, You’re going to raise money
  22. & More awesome people are going to join your team
  23. To sustain & grow the company You’re going to be developing more features
  24. In fact you’ll be working on lots of features worked on by multiple devs at the same time & that’s a recipe
  25. For a lot of merge hells Dependencies issues Versioning & it’s multiplied with more people We need to tackle that
  26. But not only are there Developer issues We also have a lot more stakeholders This is especially the case for RedMart Due to multiple systems ERP Warehouse Transport Logistics More than just the Website & API And all these systems have stakeholders who we need to communicate to But even our systems are not the same The issue of communicating changes effectively & efficiently still applies to everyone Because.. as the team scales, you realize
  27. Huddling behind developers doesn’t scale How many of us have experienced that. People crowding behind you as you code, to get some update It’s so annoying! Worst still, change this Hex code to that, Not productive!
  28. On the other hand Bringing your laptop over every now & then Also doesn’t scale either We can utilize our time more effectively But then, this is super important We need to figure out an efficient way to get stuff out & comunicated Otherwise..
  29. We spend more time in meetings & less time writing code. Which is really depressing In fact it’s so depressing, we’ve actually come up with a theory.
  30. I’m sure you guys know about Einstein Mass Energy Equation
  31. We have another Theory Don’t have quite a name for it yet. Let’s just call it Thor Theory. I don’t know Environment that developers love, a productive environment Directly proportional to the code they write per day Inversely proportional to the meetings they attend per day Our goal is to optimize that
  32. So just a quick recap Companies scale Usually results in more meetings & More branch mess We need to fight that Empower developers to work on as many features at once So they can write more code & not have to spend too much time communicating So we can reduce meetings
  33. So how do we do that. How do we empower multi feature development The answer starts with Git Flow
  34. Most of you might know what Git flow is, bear with me again
  35. For the rest, here’s a quick recap Git flow is a branching model It’s a convention everybody in the team follows Ensures a sane branching state
  36. For our purposes The fundamental block are feature branches feature branches are where you write all your code It’s based off the develop branch
  37. For eg. What we did just now git flow feature start jsconf creates a branch feature/jsconf based on develop checks out that branch
  38. Develop branch is the integration branch It’s where you merge feature branches go once they’re finished
  39. So just now when we did git flow feature finish jsconf checkout develop merge feature/jsconf into develop delete feature/jsconf branch
  40. Release branches - is when we want to combine a set of features Especially useful when you want to stage completed features to deploy later Worked on feature a, b & c. Done & integrated in develop branch Now we to start feature d & e At that point it’s good to get develop merged into release & then not touch it until it’s deployed
  41. & as you can probably guess at this point master branch is official release history Anything that’s in master branch is production
  42. One last thing is hotfix It’s similar to feature branches, but instead of develop It’s based of master branch instead
  43. So git flow really helps to maintain sanity of branches You’ll also notice that 3 branches are kind of gate keepes develop release master so that makes it a common sense decision in terms of code review Any time a feature goes into develop, release or master we do a code review But Feature branches are cheap. Do whatever you want with them.
  44. So git flow helps But Oaths also helps. We specifically have these: commit in feature branch commit & push often In fact, every logical improvement to the code, should be committed & pushed merge develop into feature everyday merge feature into develop, never master merge only pull requests into master
  45. So as long as we follow git flow & stick to our oauth We’re really able to work on as many features as we like
  46. Just having branches is obviously not enough We still have to bring our laptops everywhere We need to deploy them & to to that, let’s talk about
  47. Environments Of which we have 4 & again we’ll see how git flow is the starting point
  48. The first one is Local. Local is straightforward. The developers laptop
  49. Then we jump to the 3rd one Staging I’ll come back to the 2nd Staging is equivalent to the develop branch or the release branch The reason for both: most of the times we don’t have release branch, If we do, it’s release branch otherwise develop
  50. & Obviously we have production Which runs everything in the master branch You’d think that’s the most important environment, but to us but actually..
  51. To us, the development environment is the most crucial That’s where all our features are deployed at every single push
  52. So when we deploy the develop branch, it goes to alpha.redmart.com When we deploy the feature jsconf, it goes to jsconf.alpha.redmart.com
  53. & the command to deploy The ever so loved ‘git push’ So literally all our developers do is git push Depending on what branch you push, it get’s deployed by CI process automatically
  54. We use Travis, but you could easily use something else. Basically, once you do a push travis picks up the branch & hence the environment & servers It runs the tests It creates the artifacts compresses, minifies, & zips it up Transfers the artifacts to the correct server & starts the application & we use Grunt here compressing minifying zipping transferring the artifacts
  55. That allows us to deploy with git commands Doesn’t mess the developer workflow Communication is also integrated into the developer worflow
  56. Everytime we have a new feature There’s a new channel on slack All the builds in the feature branches & pushed to slack Every commit is automatically deployed Just like in the case with jsconf feature earlier So we no longer have to bring our laptops over to show anything
  57. Every incremental change is communicated & we communicate in the best way we know how Which is code I don’t mean showing the code obviously, but working code that people can interact with.
  58. As a result of that We really do have way less meetings Play more foosball Turns out, everyone hates them. That was new to me I thought only developers did. :(
  59. So back to my Lightning slide cuz i love it so much What really is lightning branches? It’s actually nothing but an considered investment in the development environment Every logical improvement/ commit is important Not just the final deployment to production Lightning branches really inculcate the habit of pushing small incremental changes fast & getting feedback Which is really awesome.
  60. Now if you’ve been sleeping all along These last few slides are the crux of it How do you actually setup lightning branches?
  61. & the answer is really simple. Nginx It’s really good at routing & your SPA is really good at Being light weight & running just about anywhere So all you need to is this nginx server block Set a whitelist server name Set a default feature. We use develop
  62. Change the feature based on the host Set the root a specified location
  63. Then it’s just a simple matter of Transferring your build artifacts into the correct path on the server It just works!
  64. What. really? It’s that simple?
  65. Urmm… Yes.
  66. Ok, I mean actually there’s more. But it’s to do with Chef (which is ruby based) & I value my life. talking about that here.
  67. Blindfold you & drop you, you should know where you are