continuous delivery of maintainable embedded software

41
Continuous Delivery of Maintainable Embedded Software www.praqma.com Maintainable Embedded Software Continuous Delivery of Mike Long

Upload: michael-long

Post on 11-Apr-2017

24 views

Category:

Software


0 download

TRANSCRIPT

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Maintainable Embedded SoftwareContinuous Delivery of

Mike Long

Continuous Delivery of Maintainable Embedded Software www.praqma.com

“Continuous Delivery is the ability to get changes of all types...into production, or into the hands of users, safely and quickly in a sustainable way.”https://continuousdelivery.com

Continuous Delivery of Maintainable Embedded Software www.praqma.com

What is Embedded Software?

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Where are the Continuous Delivery Challenges?

Access to Production-like environments Rare

Support lifespan Up to 20 years

Safety critical Often

Regulated markets Often

Release cost High

Deployment Custom

Audit trail requirements (full traceability) Often

Deployment/Product matrix Complex

Continuous Delivery of Maintainable Embedded Software www.praqma.com

http://code-maturity.praqma.com https://github.com/Praqma/VersionedBinaryArtifacts

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Build the foundationsStep 1

Begin with the standard Continuous Delivery playbook

Continuous Delivery of Maintainable Embedded Software www.praqma.com

http://blog.codinghorror.com/the-f5-key-is-not-a-build-process/

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.

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Development Principles

Component principles:● Integration and testing of the latest should be automatic● All binaries should be fully traceable● Artifacts should be managed● Metadata should be built into the binary

Release principles:● Release is a manual decision● Release binaries can only depend on released components.● Releases must be maintainable

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Build step 1 Know what you built

build.h

// Generated Tue Mar 14 10:45:56 GMT 2017

#ifndef _BUILD_H_#define _BUILD_H_

#define BUILD_NUMBER 177#define BUILD_SHA a1b2080ea2692f536eb95577bca2b9f6d944a018

#define BUILD_JOB "http://jenkins.mycompany.com/job/myjob"

#endif

// Generated Tue Mar 14 10:45:56 GMT 2017

#ifndef _VERSION_H_#define _VERSION_H_

#define PRODUCT_NAME "VBA_demo"#define MAJOR_VERSION 1#define MINOR_VERSION 0#define PATCH_VERSION 3#define PRE_RELEASE_VERSION "-SNAPSHOT"

version.h

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Build step 2 Control how it is built

Put the build tools in a safe place. Artifact management systems are a good place for this.

Libs

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Build step 3 Reproducible Builds

Use the same tools everywhere, in development, CI, and release. Defined as code and version controlled.

mycompany/my-cross-compiler:1.3-release

libs

gcc

linker

#DockerfileFROM busybox:1.26.2-glibcADD tools.tar.gzRUN make all

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Tales from the trenches Leif Ove

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Increase safetyStep 2

Build quality into the product

Continuous Delivery of Maintainable Embedded Software www.praqma.com

“In complex systems, adding more inspection steps and approval processes actually increases the likelihood of future failures.”The DevOps Handbookp. 32

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Build Quality In Test Driven Development

module.clib.a

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Build Quality In Hardware in the loop system testing

This is an investment, requiring unique engineering.

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Build Quality In Static and Dynamic Analysis

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Build Quality In What kind of testing do I need?

This is an investment, requiring unique engineering.

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Increase development efficiencyStep 3

Optimise the flow

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Reuse Managing product variants

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Reuse 1 Build and test avoidance

Reusing components reduces test volume and engineering time

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Component Build

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Component Release

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Component Maintenance

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Component Maintenance release

A Baseline is a container for a configuration of components chosen from the dev repository

17.1-1.tar.gz

DSP APP

Comms ...

Dev

Baseline reside in baseline repositories

17.1-1.tar.gz

DSP App

Comms ...

Testing

17.1-1.tar.gz

Repository per environment

Dev Test Qualification Commercialization

Contains Components

Contains Baselines

Baselines are promoted through environments

Dev Test Qualification Commercialization

Baseline Repository Layout

Dev

Test

17.0-1.zip17.0-2.zip16.4-4.zip17.0-6.zip17.0-8.zip

Qualification

16.4-4.zip17.0-6.zip17.0-8.zip

Commercialization

16.4.zip17.0.zip

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Extra creditStep 4

For the high achievers

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Component Auto-incrementing release builds

Continuous Delivery of Maintainable Embedded Software www.praqma.com

ASIC Quality – Continuous Delivery

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Final thoughts

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Continuous Delivery of Maintainable Embedded Software www.praqma.com

The researchers praised Tesla for the way the vehicle

handled the bogus commands and how the car maker responded to

their findings.

Continuous Delivery of Maintainable Embedded Software www.praqma.com

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.

Continuous Delivery of Maintainable Embedded Software www.praqma.com

Build the foundationsIncrease safety

Increase development efficiency

Summary

Continuous Delivery of Maintainable Embedded Software www.praqma.com

The Continuous Delivery and DevOps Company