technologies for iot for... · technologies for iot docker & go. about me linux admin,...

38
Technologies for IoT Docker & Go

Upload: others

Post on 27-Sep-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Technologies for IoTDocker & Go

Page 2: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

About me

● Linux admin, programmer

● Working at hybris (now an SAP company)

Adam Wałach

Page 3: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Computers are getting faster!

Page 4: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Preface

Page 5: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)
Page 6: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

The Internet of Things (IoT)

is the network of physical objects - devices, vehicles, buildings and other items which are embedded with electronics, software, sensors, and network connectivity, which enables these objects to collect and exchange data

Page 7: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)
Page 8: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Raspberry Pi Zero - ~5$

“It is about as big a change as the original Raspberry Pi was" Eben Upton - Raspberry Pi founder

Page 10: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)
Page 11: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

My company can sell you all the zeros you need, but you’ll have to arrange them yourself.

Page 12: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Inflection point! - Microcomputers change the game

Development methods are stuck in the previous era of serial cables and SD Cards. In the future, workflows based on software tools like Git and Docker are likely to prevail [Intel].

Page 13: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Agenda

● Problems to solve

● Go and Docker introduction

● IOT Platforms

● Live coding session

● Hardware platforms

Page 14: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Common tasks to solve● create physical device - done!

● read data from sensors

● control external devices

● data transmision (to the cloud or p2p)

● updates of software

Page 15: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Go?

● Go is a pragmatic evolution of C to get some of the advantages of the new languages without losing in speed and leanness

● Go does not innovate C in the way that C++ did, but in a Pythonish way.

Page 16: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Go!● Go compiles very quickly

● Go supports concurrency at the language level

● Go has garbage collection

● Strings and maps are built into the language

● Go compiles to machine code

● Binaries are statically linked

● Go is very strongly typed

for { mtx.SlideMessage("Hello, IoT world! ", max7219.FontCP437, true, 50*time.Millisecond) time.Sleep(1 * time.Second)}

Page 17: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Docker? - if you were sitting under the rock for the last 2 years

Page 18: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Docker?- Containers are a lightweight approach to virtualization that developers can

apply to rapidly develop, test, deploy, and update IoT applications at scale.

- If you run containers directly on your device, you can avoid having to constantly flash your device or overwrite the entire firmware. Instead you can build new images, pull them and run them within the host OS on the device, and rapidly prototype and experiment with bleeding-edge libraries and firmware to get the most out of your IoT device.

[IBM https://www.ibm.com/developerworks/library/iot-docker-containers/]

Page 19: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Docker!- It gives:

- updates- on thousands of devices

- very fast!

- With Docker 1.10.0 it is finally possible to build Docker for ARM from the offical Docker repository

Page 20: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

IOT platforms/frameworks

Frameworks:

● Gobot - gobot.io - go, obviously

Platforms:

● Resin.io - go, js, java and docker, language agnostic● Amazon IOT ● Fogger - fogger.io - go and docker, language agnostic, fast prototyping

Page 21: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Gobot

● Drivers and adapters for controlling a wide variety of drones, toys, and physical computing platforms like Arduino and Raspberry Pi

● "Robots" - a software abstraction that makes it easy to build interesting high-level functionality for supported devices

gbot := gobot.NewGobot()

r := raspi.NewRaspiAdaptor("raspi")

led := gpio.NewLedDriver(r, "led", "7")

work := func() {

gobot.Every(1*time.Second, func() {

led.Toggle()

})

Page 22: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Resin.io

● Push your project and resin.io will compile its code and dependencies for your device's architecture and send the result to your device(s). No more cross-compilation toolchains to set up!

● Add your first device in less than 10 minutes, start coding instantly, add more devices as you grow your project. Keep delivering updates even after deployment in the wild.

Page 23: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Amazon IOT

- Device gateway

- Rules engine

- Device shadows

Page 24: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)
Page 25: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Fogger

Fog computing - is a distributed computing infrastructure in which some application services are handled at the edge of the network in a smart device, and some, in a remote data centre in the cloud. The goal is to improve efficiency and reduce the amount of data that needs to be transported to the cloud for data processing, analysis and storage. This is often done for efficiency, but it may also be carried out for security and compliance reasons.

Page 26: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Demo - Raspberry Pi 2 - remote programming

Page 27: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Demo - Ark1120

Page 28: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Demo

Page 29: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Common tasks to solve - rertospection● create physical device - done!

● read data from sensors - go

● control external devices - go

● data transmision (to the cloud or p2p) mqtt, websockets - Amazon. P2P?

● updates of software - resin.io, Fogger (using Docker)

Page 30: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Other hardware platforms

- Beaglebone Black

- Intel Edison

- Raspberry Pi Compute Module

Page 31: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

BeagleBone Black

● 4GB 8-bit eMMC on-board flash storage

● ethernet supported internally by the processor AM3358

Page 32: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Intel Edison

● x86● Wi-Fi, Bluetooth 4● Yocto Linux :(

Page 34: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Summary

Page 35: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

If you wan’t to start

● Buy some shiny stuff: http://botland.com.pl/

● Build go: https://github.com/adamwalach/raspberrypi-go-build

● Build docker: https://github.com/adamwalach/raspberrypi-docker-build

Page 37: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Q & A

Page 38: Technologies for IoT for... · Technologies for IoT Docker & Go. About me Linux admin, programmer Working at hybris (now an SAP company) ... Preface. The Internet of Things (IoT)

Thank you!