SlideShare a Scribd company logo
1 of 27
Download to read offline
ASIA 2013 (LCA13)
Tyler Baker – March 2013
LAVA Workshop @ LCA13
A LAVA Success Story
ASIA 2013 (LCA13)
www.linaro.org
Introduction
Tyler Baker – Former Android Platform Engineer at Intermec
Started working with Android early 2008
Board bring ups on custom hardware designs
Boot loader porting
Development of BSP and device drivers
1D/2D Imaging solutions
System services and application development
RIL integration and debugging
System administrator for Gerrit, Jenkins, and LAVA
Android system internals course instructor at Marakana
Studied Computer Science and Applied Mathematics at Western Washington University
In my spare time I enjoy designing autonomous aerial drones, snowboarding, and fishing.
Located in Bellingham, WA
ASIA 2013 (LCA13)
www.linaro.org
Perspective
Working for an OEM designing and developing enterprise
products has given me unique perspective
The intent of this presentation is to highlight the success I
have had utilizing LAVA
Takeaway Points
Continuous Integration Philosophy
What are the pain points associated with existing test frameworks
Why LAVA was adopted
How LAVA can be easily extended
How LAVA can be integrated into CI environments
Why everyone here should consider LAVA
ASIA 2013 (LCA13)
www.linaro.org
Continuous Integration Philosophy
Imagine CI as the LIM(x->0) of 1/x
There is a vertical asymptote at x = 0
The function increases without bound
Think of true CI being the asymptote
Select a number close to zero, and I will select one that is closer
ASIA 2013 (LCA13)
www.linaro.org
Continuous Integration Philosophy Continued
Achieving true CI is very difficult and some say impossible
There is always something else that can be automated
CI practices and tools are constantly evolving
New hardware platforms constantly drive CI software changes
Early stages of hardware and software development can be unstable
Boot loader CI?
What is the return on investment?
In my opinion, the best approach to CI is to evolve your strategy as the
technologies changes
ASIA 2013 (LCA13)
www.linaro.org
Pain Points
Seemingly many companies build their own automated test
framework and would like you to purchase it
Intellectual property
Licensing
Closed Source
Paid support
Costly integration efforts
Technical debt incurred to modify the system
Integration with corporate IT infrastructure I.E (LDAP)
Scalability?
Extensibility?
Multi platform?
Reporting?
Dashboards?
KPI?
There is no perfect solution yet
ASIA 2013 (LCA13)
www.linaro.org
Linaro Automated Validation Architecture
I was first introduced to LAVA at ELC 2011
Began to add support for our rugged Android OMAP3 based
handset shortly after
Why LAVA was adopted
Flexible architecture
Compartmentalized
Easy to extend to meet the any need
Automated recovery of bricked devices
Well supported by LAVA team
Tests already integrated
Open Source
LAVA itself is an enabler
Contributing changes upstream reduces technical debt
ASIA 2013 (LCA13)
www.linaro.org
LAVA Extensions
CLI tools are wrapped, exposed as actions to the dispatcher
Very simple to extend the existing software once you
understand entry points
Developers who write services or applications should also be
able to take advantage of LAVA
The issues that needed to be solved
Facilitate downloading, installing and uninstalling applications/system
services
Download and deploy files to the file system
Run commands on the client side over ADB
Run unit or functional tests and get the the results
ASIA 2013 (LCA13)
www.linaro.org
LAVA Extensions Continued
Extended lava-android-test
Download and push files to a specific location on the file system
Install, uninstall, and reinstall applications
Run client side shell commands
insmod, chmod, reboot
Download, install, and run any Gtest or Junit binary with correct parse
Can be referenced in a job file
Was able to successfully test Android OTA updates
ASIA 2013 (LCA13)
www.linaro.org
LAVA and LDAP
To manage existing user accounts an extension was needed
to allow LDAP authentication
Gerrit and Jenkins both support LDAP
LAVA server extension written in a single day
Used the OpenID authentication implementation as reference
Straight forward
LAVA can adapt to almost any need
ASIA 2013 (LCA13)
www.linaro.org
LAVA and Jenkins Integration
Having Jenkins submit a job to LAVA after a build is trivial
It would be nice to have a plug-in, but not necessary
LAVA CLI tools work just fine
The issues
When you submit a job in LAVA it is asynchronous operation
LAVA dashboard holds the test results
The developer must seek out the test results for his/her build
This violates the “rapid feedback loop” CI principle
How will LAVA be instructed to download the correct binaries from Jenkins
in a dynamic fashion when the job file is static?
ASIA 2013 (LCA13)
www.linaro.org
LAVA and Jenkins Integration Continued
Extended lava-tool
Created a function called “testjob-run”
It schedules the job
It blocks like a synchronous operation
It monitors the job progress
When the job completes, the results are fed to STDOUT
There is also a option to write the results out into xUnit format
Now the results can be visualized right from Jenkins!
Not only just graphs, but the same data you might find in a results bundle
This data can be pushed into an existing test results database
ASIA 2013 (LCA13)
www.linaro.org
LAVA and Jenkins Integration Continued
ASIA 2013 (LCA13)
www.linaro.org
LAVA and Jenkins Integration Continued
ASIA 2013 (LCA13)
www.linaro.org
LAVA and Jenkins Integration Continued
How are the job files being dynamically created?
The job files used are “templates”
sed is used to replace “variables” in the LAVA job template
This allows the dynamic creation of Jenkins links in the job template submitted to
LAVA
A bit of a hack, but so far been very robust
When the upstream build finishes, the modified job template(s) are
downloaded to the downstream LAVA test job
These modified job templates are scheduled and results pushed up into
Gerrit
ASIA 2013 (LCA13)
www.linaro.org
LAVA and Gerrit Integration
Jenkins can listen for Gerrit events to trigger builds
Once triggered Jenkins will download the patch set, applied it to the
source tree and build
This will allow a developer build and test their code before ever merging
Since the test results are now being reported to Jenkins
It is possible to use the Gerrit SSH API to “code review” the change set that got built and
tested
A thin bash wrapper parses the STDOUT from the lava-tool extension
The failed results get put into the code review message and -1 is applied to the change set
If all the results pass a +1 is applied to the change set
If the is job status is returned as “incomplete” then 0 is applied to the change set
In every case a link to the LAVA test bundle is included in the message
The feedback from the build and the test(s) will be reported all in one place
This is what CI is all about, giving the developer timely feedback about his/her changes
ASIA 2013 (LCA13)
www.linaro.org
LAVA and Gerrit Integration Continued
ASIA 2013 (LCA13)
www.linaro.org
LAVA and Gerrit Integration Continued
ASIA 2013 (LCA13)
www.linaro.org
CI Architecture Overview
ASIA 2013 (LCA13)
www.linaro.org
LAVA Canary Testing
Build machines can build boot loaders, kernel, modules, and
Android file system in less than two minutes
Change set applied
Dirty build, no CCACHE
18 minutes to build all components from a clean 4.2.1 tree
Quad Xeon processors with 48GB of RAM per processor
Building on a ramdisk
All units can recover from a bad kernel or file system
Once builds are smoked tested on the canary units, they are
pushed out to larger populations as OTA updates
Commit, build, and receipt of test results takes just under 8
minutes
This includes full OS build, downloading the build to LAVA server, flashing
full OS using fastboot, booting, running a quick smoke testing which
includes monkey
ASIA 2013 (LCA13)
www.linaro.org
LAVA Canary Testing
ASIA 2013 (LCA13)
www.linaro.org
CI Build Machines
ASIA 2013 (LCA13)
www.linaro.org
LAVA Multi Platform Support
Built a extension in a matter of days to support the Windows
Mobile platform
Flashing of the OS
Running tests
Reporting results
IOS support is being implemented
ASIA 2013 (LCA13)
www.linaro.org
Conclusion
Planning to upstream all the extensions mentioned in this
presentation for the benefit of the community
LAVA may not do everything you want but can be easily
extended
LAVA is easy to use
LAVA has a great team of developers
LAVA can be tightly integrated into a CI environment
I would personally like to see LAVA emerge as the gold
standard for automated testing frameworks
ASIA 2013 (LCA13)
www.linaro.org
Thank you!
You can reach me at tyler.baker@linaro.org or on IRC as
tyler-baker
LAVA Hands On – Wednesday 4pm - 6pm
• Requirements
• Laptop
At least 4GB Ram
Virtualisation support (i.e. Intel i3-i7)
• Software
VirtualBox 4.1 or later (Linux, Windows and OS X
supportedhttps://www.virtualbox.org/
LAVA VM Image
http://deb.li/lavavm
• Limited space, but some spaces available
• E-mail lca13-lava@linaro.org and turn up
More about Linaro Connect: www.linaro.org/connect/
More about Linaro: www.linaro.org/about/
More about Linaro engineering: www.linaro.org/engineering/
ASIA 2013 (LCA13)

More Related Content

What's hot

What's hot (20)

LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
 
Manila project update openstack-berlin-summit-2018
Manila project update openstack-berlin-summit-2018Manila project update openstack-berlin-summit-2018
Manila project update openstack-berlin-summit-2018
 
Task flow
Task flowTask flow
Task flow
 
Automation tools: making things go... (March 2019)
Automation tools: making things go... (March 2019)Automation tools: making things go... (March 2019)
Automation tools: making things go... (March 2019)
 
Introduction to the Archivematica API (September 2018)
Introduction to the Archivematica API (September 2018)Introduction to the Archivematica API (September 2018)
Introduction to the Archivematica API (September 2018)
 
Automating load testing with CI integration slideshare
Automating load testing with CI integration slideshareAutomating load testing with CI integration slideshare
Automating load testing with CI integration slideshare
 
OPNFV Developer Tools and Release Process
OPNFV Developer Tools and Release ProcessOPNFV Developer Tools and Release Process
OPNFV Developer Tools and Release Process
 
Approaches to Building Media Streaming Applications
Approaches to Building Media Streaming ApplicationsApproaches to Building Media Streaming Applications
Approaches to Building Media Streaming Applications
 
Hadoop Summit 2013 : Continuous Integration on top of hadoop
Hadoop Summit 2013 : Continuous Integration on top of hadoopHadoop Summit 2013 : Continuous Integration on top of hadoop
Hadoop Summit 2013 : Continuous Integration on top of hadoop
 
Archivematica Technical Training Diagnostics Guide (September 2018)
Archivematica Technical Training Diagnostics Guide (September 2018)Archivematica Technical Training Diagnostics Guide (September 2018)
Archivematica Technical Training Diagnostics Guide (September 2018)
 
My Journey with Laravel by Shavkat, Ecompile.io
My Journey with Laravel by Shavkat, Ecompile.ioMy Journey with Laravel by Shavkat, Ecompile.io
My Journey with Laravel by Shavkat, Ecompile.io
 
Practical Experience with Automation Tools by Tim Walsh (Archivematica Camp B...
Practical Experience with Automation Tools by Tim Walsh (Archivematica Camp B...Practical Experience with Automation Tools by Tim Walsh (Archivematica Camp B...
Practical Experience with Automation Tools by Tim Walsh (Archivematica Camp B...
 
Neutron upgrades
Neutron upgradesNeutron upgrades
Neutron upgrades
 
LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2
 
SFO15-102:ODP Project Update
SFO15-102:ODP Project UpdateSFO15-102:ODP Project Update
SFO15-102:ODP Project Update
 
Building OPNFV as a Platform
Building OPNFV as a PlatformBuilding OPNFV as a Platform
Building OPNFV as a Platform
 
Coscup 2013 : Continuous Integration on top of hadoop
Coscup 2013 : Continuous Integration on top of hadoopCoscup 2013 : Continuous Integration on top of hadoop
Coscup 2013 : Continuous Integration on top of hadoop
 
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!OSMC 2021 | Robotmk: You don’t run IT – you deliver services!
OSMC 2021 | Robotmk: You don’t run IT – you deliver services!
 
OSMC 2021 | Monitoring Open Source Hardware
OSMC 2021 | Monitoring Open Source HardwareOSMC 2021 | Monitoring Open Source Hardware
OSMC 2021 | Monitoring Open Source Hardware
 
Learn more about the tremendous value Open Data Plane brings to NFV
Learn more about the tremendous value Open Data Plane brings to NFVLearn more about the tremendous value Open Data Plane brings to NFV
Learn more about the tremendous value Open Data Plane brings to NFV
 

Similar to LCA13: Android Infrastructure Automation Improvements

Surekha_haoop_exp
Surekha_haoop_expSurekha_haoop_exp
Surekha_haoop_exp
surekhakadi
 
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code DeploysOur DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys
Dynatrace
 

Similar to LCA13: Android Infrastructure Automation Improvements (20)

KCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with CrossplaneKCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with Crossplane
 
Azure CICD - Day1.pptx
Azure CICD - Day1.pptxAzure CICD - Day1.pptx
Azure CICD - Day1.pptx
 
Adopt openjdk and how it impacts you in 2020
Adopt openjdk and how it impacts you in 2020Adopt openjdk and how it impacts you in 2020
Adopt openjdk and how it impacts you in 2020
 
Surekha_haoop_exp
Surekha_haoop_expSurekha_haoop_exp
Surekha_haoop_exp
 
Mastinder singh visualcv_resume
Mastinder singh visualcv_resumeMastinder singh visualcv_resume
Mastinder singh visualcv_resume
 
Presentation 1 open source tools in continuous integration environment v1.0
Presentation 1   open source tools in continuous integration environment v1.0Presentation 1   open source tools in continuous integration environment v1.0
Presentation 1 open source tools in continuous integration environment v1.0
 
Advanced deployment scenarios (netcoreconf)
Advanced deployment scenarios (netcoreconf)Advanced deployment scenarios (netcoreconf)
Advanced deployment scenarios (netcoreconf)
 
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CDMACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
MACHINE LEARNING AUTOMATIONS PIPELINE WITH CI/CD
 
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code DeploysOur DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys
Our DevOps Journey: 6 Month Waterfalls to 1 Hour Code Deploys
 
Continuous Delivery - Devoxx Morocco 2016
Continuous Delivery - Devoxx Morocco 2016Continuous Delivery - Devoxx Morocco 2016
Continuous Delivery - Devoxx Morocco 2016
 
Pre-Con Education: Migrating to CA Release Automation 5.5.2 to Exploit New ...
Pre-Con Education: Migrating to CA Release Automation 5.5.2 to Exploit New ...Pre-Con Education: Migrating to CA Release Automation 5.5.2 to Exploit New ...
Pre-Con Education: Migrating to CA Release Automation 5.5.2 to Exploit New ...
 
Nyc mule soft_meetup_13_march_2021
Nyc mule soft_meetup_13_march_2021Nyc mule soft_meetup_13_march_2021
Nyc mule soft_meetup_13_march_2021
 
The Evolution of Application Release Automation
The Evolution of Application Release AutomationThe Evolution of Application Release Automation
The Evolution of Application Release Automation
 
Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
 
Continuous Testing 2016
Continuous Testing 2016Continuous Testing 2016
Continuous Testing 2016
 
Karim Fanadka
Karim FanadkaKarim Fanadka
Karim Fanadka
 
Ansible
AnsibleAnsible
Ansible
 
Simplified DevOps Bliss -with OpenAI API
Simplified DevOps Bliss -with OpenAI APISimplified DevOps Bliss -with OpenAI API
Simplified DevOps Bliss -with OpenAI API
 
Extend Agile and DevOps Practices Across Hybrid IT
Extend Agile and DevOps Practices Across Hybrid ITExtend Agile and DevOps Practices Across Hybrid IT
Extend Agile and DevOps Practices Across Hybrid IT
 
Intro to DevOps 4 undergraduates
Intro to DevOps 4 undergraduates Intro to DevOps 4 undergraduates
Intro to DevOps 4 undergraduates
 

More from Linaro

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Linaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
Linaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
Linaro
 

More from Linaro (20)

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qa
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

LCA13: Android Infrastructure Automation Improvements

  • 1. ASIA 2013 (LCA13) Tyler Baker – March 2013 LAVA Workshop @ LCA13 A LAVA Success Story
  • 2. ASIA 2013 (LCA13) www.linaro.org Introduction Tyler Baker – Former Android Platform Engineer at Intermec Started working with Android early 2008 Board bring ups on custom hardware designs Boot loader porting Development of BSP and device drivers 1D/2D Imaging solutions System services and application development RIL integration and debugging System administrator for Gerrit, Jenkins, and LAVA Android system internals course instructor at Marakana Studied Computer Science and Applied Mathematics at Western Washington University In my spare time I enjoy designing autonomous aerial drones, snowboarding, and fishing. Located in Bellingham, WA
  • 3. ASIA 2013 (LCA13) www.linaro.org Perspective Working for an OEM designing and developing enterprise products has given me unique perspective The intent of this presentation is to highlight the success I have had utilizing LAVA Takeaway Points Continuous Integration Philosophy What are the pain points associated with existing test frameworks Why LAVA was adopted How LAVA can be easily extended How LAVA can be integrated into CI environments Why everyone here should consider LAVA
  • 4. ASIA 2013 (LCA13) www.linaro.org Continuous Integration Philosophy Imagine CI as the LIM(x->0) of 1/x There is a vertical asymptote at x = 0 The function increases without bound Think of true CI being the asymptote Select a number close to zero, and I will select one that is closer
  • 5. ASIA 2013 (LCA13) www.linaro.org Continuous Integration Philosophy Continued Achieving true CI is very difficult and some say impossible There is always something else that can be automated CI practices and tools are constantly evolving New hardware platforms constantly drive CI software changes Early stages of hardware and software development can be unstable Boot loader CI? What is the return on investment? In my opinion, the best approach to CI is to evolve your strategy as the technologies changes
  • 6. ASIA 2013 (LCA13) www.linaro.org Pain Points Seemingly many companies build their own automated test framework and would like you to purchase it Intellectual property Licensing Closed Source Paid support Costly integration efforts Technical debt incurred to modify the system Integration with corporate IT infrastructure I.E (LDAP) Scalability? Extensibility? Multi platform? Reporting? Dashboards? KPI? There is no perfect solution yet
  • 7. ASIA 2013 (LCA13) www.linaro.org Linaro Automated Validation Architecture I was first introduced to LAVA at ELC 2011 Began to add support for our rugged Android OMAP3 based handset shortly after Why LAVA was adopted Flexible architecture Compartmentalized Easy to extend to meet the any need Automated recovery of bricked devices Well supported by LAVA team Tests already integrated Open Source LAVA itself is an enabler Contributing changes upstream reduces technical debt
  • 8. ASIA 2013 (LCA13) www.linaro.org LAVA Extensions CLI tools are wrapped, exposed as actions to the dispatcher Very simple to extend the existing software once you understand entry points Developers who write services or applications should also be able to take advantage of LAVA The issues that needed to be solved Facilitate downloading, installing and uninstalling applications/system services Download and deploy files to the file system Run commands on the client side over ADB Run unit or functional tests and get the the results
  • 9. ASIA 2013 (LCA13) www.linaro.org LAVA Extensions Continued Extended lava-android-test Download and push files to a specific location on the file system Install, uninstall, and reinstall applications Run client side shell commands insmod, chmod, reboot Download, install, and run any Gtest or Junit binary with correct parse Can be referenced in a job file Was able to successfully test Android OTA updates
  • 10. ASIA 2013 (LCA13) www.linaro.org LAVA and LDAP To manage existing user accounts an extension was needed to allow LDAP authentication Gerrit and Jenkins both support LDAP LAVA server extension written in a single day Used the OpenID authentication implementation as reference Straight forward LAVA can adapt to almost any need
  • 11. ASIA 2013 (LCA13) www.linaro.org LAVA and Jenkins Integration Having Jenkins submit a job to LAVA after a build is trivial It would be nice to have a plug-in, but not necessary LAVA CLI tools work just fine The issues When you submit a job in LAVA it is asynchronous operation LAVA dashboard holds the test results The developer must seek out the test results for his/her build This violates the “rapid feedback loop” CI principle How will LAVA be instructed to download the correct binaries from Jenkins in a dynamic fashion when the job file is static?
  • 12. ASIA 2013 (LCA13) www.linaro.org LAVA and Jenkins Integration Continued Extended lava-tool Created a function called “testjob-run” It schedules the job It blocks like a synchronous operation It monitors the job progress When the job completes, the results are fed to STDOUT There is also a option to write the results out into xUnit format Now the results can be visualized right from Jenkins! Not only just graphs, but the same data you might find in a results bundle This data can be pushed into an existing test results database
  • 13. ASIA 2013 (LCA13) www.linaro.org LAVA and Jenkins Integration Continued
  • 14. ASIA 2013 (LCA13) www.linaro.org LAVA and Jenkins Integration Continued
  • 15. ASIA 2013 (LCA13) www.linaro.org LAVA and Jenkins Integration Continued How are the job files being dynamically created? The job files used are “templates” sed is used to replace “variables” in the LAVA job template This allows the dynamic creation of Jenkins links in the job template submitted to LAVA A bit of a hack, but so far been very robust When the upstream build finishes, the modified job template(s) are downloaded to the downstream LAVA test job These modified job templates are scheduled and results pushed up into Gerrit
  • 16. ASIA 2013 (LCA13) www.linaro.org LAVA and Gerrit Integration Jenkins can listen for Gerrit events to trigger builds Once triggered Jenkins will download the patch set, applied it to the source tree and build This will allow a developer build and test their code before ever merging Since the test results are now being reported to Jenkins It is possible to use the Gerrit SSH API to “code review” the change set that got built and tested A thin bash wrapper parses the STDOUT from the lava-tool extension The failed results get put into the code review message and -1 is applied to the change set If all the results pass a +1 is applied to the change set If the is job status is returned as “incomplete” then 0 is applied to the change set In every case a link to the LAVA test bundle is included in the message The feedback from the build and the test(s) will be reported all in one place This is what CI is all about, giving the developer timely feedback about his/her changes
  • 17. ASIA 2013 (LCA13) www.linaro.org LAVA and Gerrit Integration Continued
  • 18. ASIA 2013 (LCA13) www.linaro.org LAVA and Gerrit Integration Continued
  • 19. ASIA 2013 (LCA13) www.linaro.org CI Architecture Overview
  • 20. ASIA 2013 (LCA13) www.linaro.org LAVA Canary Testing Build machines can build boot loaders, kernel, modules, and Android file system in less than two minutes Change set applied Dirty build, no CCACHE 18 minutes to build all components from a clean 4.2.1 tree Quad Xeon processors with 48GB of RAM per processor Building on a ramdisk All units can recover from a bad kernel or file system Once builds are smoked tested on the canary units, they are pushed out to larger populations as OTA updates Commit, build, and receipt of test results takes just under 8 minutes This includes full OS build, downloading the build to LAVA server, flashing full OS using fastboot, booting, running a quick smoke testing which includes monkey
  • 23. ASIA 2013 (LCA13) www.linaro.org LAVA Multi Platform Support Built a extension in a matter of days to support the Windows Mobile platform Flashing of the OS Running tests Reporting results IOS support is being implemented
  • 24. ASIA 2013 (LCA13) www.linaro.org Conclusion Planning to upstream all the extensions mentioned in this presentation for the benefit of the community LAVA may not do everything you want but can be easily extended LAVA is easy to use LAVA has a great team of developers LAVA can be tightly integrated into a CI environment I would personally like to see LAVA emerge as the gold standard for automated testing frameworks
  • 25. ASIA 2013 (LCA13) www.linaro.org Thank you! You can reach me at tyler.baker@linaro.org or on IRC as tyler-baker
  • 26. LAVA Hands On – Wednesday 4pm - 6pm • Requirements • Laptop At least 4GB Ram Virtualisation support (i.e. Intel i3-i7) • Software VirtualBox 4.1 or later (Linux, Windows and OS X supportedhttps://www.virtualbox.org/ LAVA VM Image http://deb.li/lavavm • Limited space, but some spaces available • E-mail lca13-lava@linaro.org and turn up
  • 27. More about Linaro Connect: www.linaro.org/connect/ More about Linaro: www.linaro.org/about/ More about Linaro engineering: www.linaro.org/engineering/ ASIA 2013 (LCA13)