Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Continuous delivery of embedded systems embedded meetup


Published on

Continuous Delivery is all the rage, but many of the practices are not applied in the embedded world because the literature seems to focus on the web development community. That is a great shame, because there is a great deal we can apply on our embedded software development projects. This talk will show you how to apply some of the key techniques, such as embedded versioning and software traceability, embedded continuous delivery pipelines, acceptance testing with hardware, automatic deployment to hardware, continuous deployment. Beyond that, the talk will show some real-life examples of companies who are at the leading edge of this adoption.

Talk given at the Oslo Embedded Software meetup group.

Published in: Software
  • Be the first to comment

Continuous delivery of embedded systems embedded meetup

  1. 1. @meekrosoft Continuous Delivery of Embedded Systems Mike Long @meekrosoft
  2. 2. @meekrosoft But first... plus...Community Tuesday
  3. 3. Who is Mike Long? ● Doer: Embedded software, CoDe & DevOps ● Trainer: git, jenkins, docker, TDD ● Speaker: coming to a conference near you! ● Manager: Co-owner Praqma, CEO Praqma Norway
  4. 4. @meekrosoft Agenda: - What is Continuous Delivery? - What are the challenges in Embedded? - What techniques can we take advantage of? - How can we test embedded software? - Who has done this already?
  5. 5. @meekrosoft
  6. 6. @meekrosoft Professional software development 1. Take a copy of the codebase for existing product 2. Carefully document its current algorithms 3. Add changes surrounded by ifdefs 4. Test for months 5. Commit the code as a new project that will “hopefully” get merged to the in the future 6. Compile on my laptop 7. Ship!
  7. 7. @meekrosoft What is Continuous Delivery?
  8. 8. @meekrosoft Agile Manifesto ● Four doctrines, twelve Principles # 1 # 7
  9. 9. @meekrosoft Continuous Integration
  10. 10. @meekrosoft The ideal Embedded process 1. Fetch the latest source (which is up to date with release) 2. Branch, implement feature, test 3. Push 4. CI 5. CD 6. Canary deployment 7. Real-time production feedback
  11. 11. @meekrosoft Release trains
  12. 12. @meekrosoft Release trains
  13. 13. @meekrosoft Challenges
  14. 14. @meekrosoft Solo work
  15. 15. @meekrosoft Fire and forget codebases?
  16. 16. @meekrosoft
  17. 17. @meekrosoft Production-like environment???
  18. 18. @meekrosoft
  19. 19. @meekrosoft Versioning
  20. 20. @meekrosoft The red thread of traceability We want to know: what it is compatible with, what it depends on, where it was built, what its test results were, its source version, and the task that spawned the change
  21. 21. @meekrosoft
  22. 22. @meekrosoft Examples myapplication-1.0.0-alpha+001.sha.5114f85 Artifact Name
  23. 23. @meekrosoft Examples myapplication-1.0.0-alpha+001.sha.5114f85 Major.minor.patch
  24. 24. @meekrosoft Examples myapplication-1.0.0-alpha+001.sha.5114f85 Prerelease version
  25. 25. @meekrosoft Examples myapplication-1.0.0-alpha+001.sha.5114f85 Build number
  26. 26. @meekrosoft Examples myapplication-1.0.0-alpha+001.sha.5114f85 git short SHA
  27. 27. @meekrosoft Examples myapplication-1.0.0-SNAPSHOT+001.sha. 5114f85 SNAPSHOT
  28. 28. @meekrosoft
  29. 29. @meekrosoft
  30. 30. @meekrosoft Build
  31. 31. @meekrosoft If your "build process" is the F5 key, you have a problem…..Get your build process out of the IDE and into a build script.
  32. 32. @meekrosoft What’s missing? Traceability: Can I find out exactly the environment for this build? Reproducibility: Can I build something from last year with the same results?
  33. 33. @meekrosoft
  34. 34. @meekrosoft
  35. 35. @meekrosoft
  36. 36. @meekrosoft A Traceability ecosystem
  37. 37. @meekrosoft Configuration as code Linux slaveLinux slaveLinux slaveLinux slaves Dockerfile Vagrant file Windows slaves Puppet file Windows slavesWindows slaves Jenkins Jobs JobDSL
  38. 38. @meekrosoft Build in a box Jenkins Master Artifactory Docker container Linux slaveLinux slaveLinux slaveLinux slaveLinux slaveLinux slave Windows slave Vagrant VM Windows slaveWindows slaveWindows slaveWindows slave Puppet Master
  39. 39. @meekrosoft Testing
  40. 40. @meekrosoft Airbus engineers employed the latest and greatest formal methods, and provided model checking and formal proofs of all of their avionics code. Meanwhile, according to the story, Boeing performed extensive design review and testing, and made all their software engineers fly on the first test flights. The general upshot of the story was that most of us (it seemed) felt more comfortable flying on Boeing aircraft. (It would be interesting to see if that would still be the majority opinion in the software engineering community.) Eugene H. Spafford, Professor & Executive Director, Purdue University
  41. 41. @meekrosoft
  42. 42. @meekrosoft System Tests ✓
  43. 43. @meekrosoft System Tests - Control power - Program devices - Control Actuators - Sense results ✓
  44. 44. @meekrosoft System Tests Component Tests ✓ ✓
  45. 45. @meekrosoft System Tests Component Tests ✓ ✓ ✓
  46. 46. @meekrosoft
  47. 47. @meekrosoft Test everywhere Test on your host for: ● Feedback speed, debugging But also test on target because: ● Compilers/hardware are different ● Endiness/overflow/underflow behave differently ● Ship them if you can!
  48. 48. @meekrosoft
  49. 49. ASIC Quality – Continuous Delivery
  50. 50. @meekrosoft Pro Tips
  51. 51. @meekrosoft // #ifdef MY_PROD_V1 Avoid using the preprocessor for variants ● It makes builds slow ● Lowers cohesion ● Also hinders understandability
  52. 52. @meekrosoft Only build your binaries once Efficiency - time to feedback Safety - ship what you test
  53. 53. @meekrosoft Amplify feedback loops TDD Red Refactor Green Learn Measure Build Produ ct Data Ideas Continuous Integration Continuous Delivery BDD Automated Deployment Customer Feedback
  54. 54. @meekrosoft Dev Env is competitive advantage Attrition vs. Late follower vs. Unhappy customers vs. Recruitment First to market Raving fandom
  55. 55. @meekrosoft Summary
  56. 56. @meekrosoft
  57. 57. @meekrosoft
  58. 58. @meekrosoft The researchers praised Tesla for the way the vehicle handled the bogus commands and how the car maker responded to their findings.
  59. 59. @meekrosoft In late July, Fiat Chrysler issued a recall for more than 1.4 million vehicles after hackers Charlie Miller and Chris Valasek showed how to use bugs in the onboard software of the Jeep Cherokee to shut it down remotely.
  60. 60. @meekrosoft Agenda: - What is Continuous Delivery? ✓ - What are the challenges in Embedded? ✓ - What techniques can we take advantage of? ✓ - How can we test embedded software? ✓ - Who has done this already? ✓
  61. 61. @meekrosoft Questions? @meekrosoft