Reducing Rakuten Ichiba’ s
development lead time
- A Pattern Language -
Mar/10/2015 Takahiro YamakiRakuten Ichiba Development Department, Rakuten Inc.http://www.rakuten.co.jp/
2
Summary!
• Motivation– Faster & Better service delivery
• Strategies1. Automation
2. Quick feedback to coders
1. Build result
2. Static code analysis result
3. Continuous system test (CST) result
4. Security check result
Reducing development lead time
3
Agenda
1. Introduction
1. My area of responsibility
2. Thoughts to take home
3. Our pattern language
2. Show cases
3. Goal plan
4. Summary
4
My area of responsibility in B2B2C
Rakuten Ichiba
Warehouse
(RMS)
ShoppersMerchants
Selling area
(MALL)
(1) Reduce development lead time
(2) Reduce operational cost
5
Thoughts to take home
• I’d like to introduce our results and future
plan. Furthermore I want to show our
pattern language for this theme.
• I am happy if you are interested in some
of our patterns and apply it to your own
situation and problem.
おみやげ
6
Pattern language for staffs
Involve Everyone
Evangelist
『Fearless Change: Patterns for Introducing New Ideas』Mary Lynn Manns, Linda Rising (2014)
Dedicated Champion
Innovator Early Adopter
Study
Group
Just Do It
Plant the Seeds
Personal Touch
Hometown Story
7
Pattern language for development process
Git-nizationStep by Step
Small Successes
Automation
Repository connection
Abolish Excel
External Validation
Just Enough
8
Git-nizationStep by Step
Small Successes
Automation
Repository connection
Abolish Excel
External Validation
Just Enough
Patterns & Keywords
pull-request
CI
Test case management
Branch management
git-flow
Ticket
Code
Build, Deploy
Test
9
Git-nizationStep by Step
Small Successes
Automation
Repository connection
Abolish Excel
External Validation
Just Enough
Today’s show cases
CI
Ticket
Code
Build, Deploy
Test
(2)
(1)
10
Agenda
1. Introduction
2. Show cases1. Repository connection
2. Automation
3. Goal plan
4. Summary
11
Show case(1)
Repository connection
12
Pattern: Repository connection
• Context
– Many lists, memos to relate things.• Have the pull-requests of this issue been finished?
• Which environment have you deployed for this
issue?
• Problem
– Difficult traceability
– Non-productive costs
13
Pattern: Repository connection
• Restrictions
– Some development tools are in service.• BTS(ticket management), SCM(source code
management), Document management
• Solution
– Select a development system which is
close to them.
14
Test case
Test results
Repository connection result
Tickets
Codes
Artifacts
Documents
Code Quality
RMS
Build result
Deploy result
Security reports
Info. Storage
Restrictions
15
Tips for tickets and commit relations
Precondition
1. Using git-flow. Branch name is feature/xxxx
2. Using ticket ID for the feature name
cd .git/hooks
mv prepare-commit-msg.sample prepare-commit-msg
vi prepare-commit-msg
#!/bin/sh
#
mv $1 $1.tmp
echo -n "[`git branch | grep "*" | awk '{print $2}' | sed -e "s/feature\///g" `] " > $1
cat $1.tmp >> $1
Sample code
by T. Sugihara
16
View from a build result
Deploy results
Tickets
Codes
Change log (who? what?)
17
View from a test result
Tickets
Test failure result New ticket
Test results
Ticket
18
MOVIE
Test failure report
New ticket
19
Show case(2)
Automation
20
Pattern: Automation
• Context
– Too many manual tasks
• Problem
– Much operational cost. Sometimes mistakes.
• Restrictions
– Some development tools are in service.
• Solutions
– Select a CI server which is close to them.
– Automation! Automation! Automation!
21
Automation reference (1)
『Continuous Delivery: Reliable Software
Releases through Build, Test, and
Deployment Automation 』
Jez Humble, David Farley
22
Automation reference (2)
『 Automation for the people:
Deployment-automation patterns』
Paul Duvallhttp://www.ibm.com/developerworks/java/library/j-ap01139/
– One-click
– Externalized Configuration
– Headless Execution
– Scripted Deployment
– Remote Deployment
23
Automation infrastructure overview
CI System
24
Demo scenario
Application
Management
serverClusters
#1
#2
#3
#4
Manual test
Continuous
System test*
(3)
(2)
(4)
* Kotaro Ogino and Francois Picalausa
“Continuous System Test”. Test Automation.http://kokotatata.hatenablog.com/entry/2014/03/14/075842
(1)
CI server
25
MOVIE
Automated build & deploy
26
Continuous system test overview
Selenium
Hub
Test case management tool
RMS
Selenium Nodes
Script
results
manage
Manual test
results
CI server
Test
data
27
Agenda
1. Introduction
2. Show cases
3. Goal plan
4. Conclusion
28
STG
QA
DEVBuild
Goal plan ・・・ “Deployment pipeline”
IT
Release
Judge
Acceptance
Test
PROD
Blue-
Green
Deploy
Clone
Build
UT
Code
Analysis
Deploy
Conf Test
Conf Test
Deploy
ST
Conf Test
Code
ReviewMetrics
Release
Judge
Security
Test
ST
Security
Test
29
Summary!
• Motivation– Faster & Better service delivery
• Strategies1. Automation
2. Quick feedback to coders
1. Build result
2. Static code analysis result
3. Continuous system test result
4. Security check result
Reducing development lead time
30
QA
31
Wants You!!!
https://progres02.jposting.net/pgrakuten/job.phtml?job_code=1971&lang=en
https://progres02.jposting.net/pgrakuten/job.phtml?job_code=1972&lang=en