resin.io push-to-deploy to milljuuunen Raspberry Pi Pi and More 9 Nico Maas
Zur Person Nico Maas IT Systemelektroniker Bachelor of Science mail@nico-maas.de www.nico-maas.de @nmaas87 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 2
Agenda - I. - Problemstellung - Mögliche Lösungen?! - Neue Probleme?! - II. resin.io - Grundlagen - Docker - - Live Demo - III. - Fragen - Quellenangaben 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 3
Problemstellung - Problem - Lösungen?! - Neue Probleme?! 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 4
Problemstellung - Problem - Lösungen?! - Neue Probleme?! 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 5
Problemstellung - Problem - Lösungen?! - Neue Probleme?! 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 6
Mögliche Lösungen?! - Problem - Lösungen?! - Neue Probleme?! ftp reverse ssh cronjob Download von binärem Blob cronjob Download von github 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 7
Neue Probleme?! - Problem - Lösungen?! - Neue Probleme?! Router/Firewall verbietet Zugriff auf Geräte Verbindungsabbrüche Übertragungsfehler Updatescript wird beim "Self-Update" beschädigt oder enthält Fehler App enthält Fehler und legt das Gerät lahm 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 8
08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 9
Docker: VMs vs Container Type 2 Hypervisor Kernel/ namespace Virtualisierung 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 10
Docker: Container / Images / Layers http://stackoverflow.com/questions/24702233/docker-container-and-memory-consumption 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 11
Docker: Architektur [ Docker ] 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 12
Architektur 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 13
08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 14
How To - Grundlagen - Docker - - Live Demo SSH Key eingeben oder von Github importieren 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 15
How To - Grundlagen - Docker - - Live Demo Account auf resino.io erstellen, einloggen, App erstellen 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 16
How To - Grundlagen - Docker - - Live Demo Image für das Gerät herunterladen 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 17
How To - Grundlagen - Docker - - Live Demo Image auf SD Karte schreiben, z.b. mit SDFormatter und Win32DiskImager oder etcher.io 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 18
How To - Grundlagen - Docker - - Live Demo 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 19
How To - Grundlagen - Docker - - Live Demo Beispiel Repo klonen: git clone https://github.com/nmaas87/resin-openwrt-flask-app.git Ins Verzeichnis wechseln: cd resin-openwrt-flask-app Repo der App als master zum Beispiel adden git remote add resin XXX Repo auschecken git push resin master 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 20
How To - Grundlagen - Docker - - Live Demo 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 21
How To - Grundlagen - Docker - - Live Demo 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 22
How To 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 23
How To - Grundlagen - Docker - - Live Demo Unter Actions Enable Public Device URL aktivieren 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 24
How To - Grundlagen - Docker - - Live Demo URL aufrufen: 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 25
How To - Grundlagen - Docker - - Live Demo Browser: 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 26
Fragen? Vielen Dank für Ihre Aufmerksamkeit! 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 27
Quellenangaben Bilder, soweit nicht anders angegeben, von resin.io 08.06.2016 Nico Maas / www.nico-maas.de / mail@nico-maas.de 28