Date post: | 10-May-2015 |
Category: |
Technology |
Upload: | wisely-chen |
View: | 1,623 times |
Download: | 0 times |
Continuous Integration on top of hadoop
Wisely Chen & Neal Lee
Tuesday, June 11, 13
Agenda
• Who I am
• Problem
• Solution
• Demo
• Q&A
Tuesday, June 11, 13
Who I am
• Wisely Chen ( [email protected] )
• Release manager of Yahoo![Taiwan] shopping and data team
• Love to promote open source tech at Taiwan
• Ruby and Rails : Coscup 2006, Ubisunrise 2007, OSDC 2007
• Puppet : PHPConf 2012 , RubyConf 2012
• Release Practice : Webconf 2013, Coscup 2012
Tuesday, June 11, 13
Who I am
• Neal Lee (@neal_lee)
• Data Engineer at Yahoo![Taiwan]
• Aiming to build up an easy use of self-service BI platform connecting to Hadoop.
Tuesday, June 11, 13
Story 1
Tuesday, June 11, 13
Another Story
Tuesday, June 11, 13
Yet Another Story
Tuesday, June 11, 13
Solution
Tuesday, June 11, 13
One click
• Manual commit code to SCM
• And DONE
• Auto unit testing
• Auto push beta for performance testing
• Auto push to production grid
• Auto trigger code
Tuesday, June 11, 13
This feeling is 爽!
Tuesday, June 11, 13
Continuous Integration
Tuesday, June 11, 13
Continuous Integration
• A software engineering practice • Maintain code repos
• Automate the build
• Make the build self-testing
• Everyone commit to the baseline everyday
• Every commit should be a build
• Test in a clone of production environment
• Make it easy to get the latest deliverables
• Everyone can see the result of latest build
• Automate deployment
Tuesday, June 11, 13
We focus on• A software engineering practice
• Maintain code repos
• Automate the build
• Make the build self-testing
• Everyone commit to the baseline everyday
• Every commit should be a build
• Test in a clone of production environment
• Make it easy to get the latest deliverables
• Everyone can see the result of latest build
• Automate deployment
Tuesday, June 11, 13
CI flow
4. CI slave exec localUnitTest
7. CI slave exec
Performanc
11. CI exec pig
People
DEV Alpha Beta Grid Prod Grid
2. notify CI
5. deploy 8. deploy
CI Master
1. CommitCode
SCM
3. Call 6. Call
10. Call
9. git tag
12. notify user
Tuesday, June 11, 13
CI flow
4. CI slave exec localUnitTest
CI slave exec
PerformancCI exec pig
People
DEV Alpha Beta Grid Prod Grid
2. notify CI
CI Master
1. CommitCode
SCM
3. Call
5. Notify user
Tuesday, June 11, 13
CI flow
4. CI slave exec localUnitTest
7. CI slave exec
PerformancCI exec pig
People
DEV Alpha Beta Grid Prod Grid
2. notify CI
5. deploy
CIMaster
1. CommitCode
SCM
3. Call 6. Call
8.Notify user
Tuesday, June 11, 13
CI flow
4. CI slave exec localUnitTest
7. CI slave exec
PerformancCI exec pig
People
DEV Alpha Beta Grid Prod Grid
2. notify CI
5. deploy 8. deploy
CI Master
1. CommitCode
SCM
3. Call 6. Call
9. Notify user
Tuesday, June 11, 13
Unit Test
4. CI slave exec localUnitTest
7. CI slave exec
Performanc
11. CI exec pig
People
DEV Alpha Beta Grid Prod Grid
2. notify CI
5. deploy 8. deploy
CI Master
1. CommitCode
SCM
3. Call 6. Call
10. Call
9. git tag
12. notify user
Tuesday, June 11, 13
PigUnit
• A simple xUnit framework
• No cluster set up is required in local mode
• Unit testing, regression testing, and rapid prototyping on the fly
Tuesday, June 11, 13
Using PigUnit
• Coding
• Write PigUnit test case
• Run local PigUnit test
• Push to grid
• Run Pig on grid
• Get right result !
Tuesday, June 11, 13
Unit test is live doc
• Unit test is runnable live doc
• Pass test case and meet previous requirement
Tuesday, June 11, 13
Performance Test
4. CI slave exec localUnitTest
7. CI slave exec
Performanc
11. CI exec pig
People
DEV Alpha Beta Grid Prod Grid
2. notify CI
5. deploy 8. deploy
CI Master
1. CommitCode
SCM
3. Call 6. Call
10. Call
9. git tag
12. notify user
Tuesday, June 11, 13
Vaidya
• Rule based performance diagnosis of M/R jobs
• Extensible framework
• You can add your own rules
• Write complex rules using existing rules
Tuesday, June 11, 13
CI toolset
CI slave exec localUnitTest
CI slave exec
PerformancCI exec pig
People
DEV Alpha Beta Grid Prod Grid
notify CI
deploy deploy
CI
CommitCode
SCM
Call
Vaidya
BASH
Tuesday, June 11, 13
CI is flexible
• MapReduce can use MapUnit
• Hive can use hive_test
• Pig can use PigUnit
Tuesday, June 11, 13
Github trigger CI
Tuesday, June 11, 13
CI testing build pipeline
Tuesday, June 11, 13
Testing Trend
Tuesday, June 11, 13
DEMO
Tuesday, June 11, 13
Conclusion
• Auto testing will save your life
• CI will boost your productivity
• This process can feed in any platform
Tuesday, June 11, 13
謝謝大家
Tuesday, June 11, 13