SlideShare uma empresa Scribd logo
1 de 39
Baixar para ler offline
Dockerizing IoT
Services
Mohd Syukor Abdul
Open Source Community
In this hour …
• Internet of Things
• What is IoT?
• IoT Services?
• Docker
• What is Docker?
• Docker CLI
• Dockerfile
• Raspberry Pi 2
• Board
• Operating System
• Where to buy?
• Docker on Raspberry Pi 2
• Current OS
• Dockerizing …
• Demo
Internet of Things
What is Internet of Things (IoT)?
• The Internet of Things (IoT) is the network of physical objects
or "things" embedded with electronics, software, sensors, and
network connectivity, which enables these objects to collect
and exchange data.
https://en.wikipedia.org/wiki/Internet_of_Things
Billions of Things Connected to
Internet by 2020
• The estimated 26 billion units to be installed within the
Internet of Things by 2020, according to Gartner, Inc., do not
include PCs, tablets and smartphones.
• Cisco and Intel estimate 50 billion connected devices by 2020.
Stacks of IoT
http://blogs.technet.com/b/uktechnet/archive/2014/07/31/what-is-the-internet-of-things-and-where-does-microsoft-sit.aspx
#DockerCon EU 2015
IoT: Youtube Videos …
https://www.youtube.com/watch?v=q4VbJ6Rju8g
https://www.youtube.com/watch?v=i5AuzQXBsG4
Docker
What is Docker?
• Docker is an open platform for building, shipping and running
distributed applications. It gives programmers, development
teams and operations engineers the common toolbox they
need to take advantage of the distributed and networked
nature of modern applications.
http://www.docker.com
Docker Containers
• Docker containers wrap up a piece of
software in a complete filesystem
that contains everything it needs to
run: code, runtime, system tools,
system libraries – anything you can
install on a server. This guarantees
that it will always run the same,
regardless of the environment it is
running in.
Docker Containers = Lightweight
• Containers running on a single machine all share the same
operating system kernel so they start instantly and make more
efficient use of RAM.
• Images are constructed from layered filesystems so they can
share common files, making disk usage and image downloads
much more efficient.
Docker vs Virtual Machine
Virtual Machine Docker
Docker CLI
• docker build # Build an image from a Dockerfile
• docker images # List all images on a Docker host
• docker run # Run an image
• docker ps # List all running and stopped instances
• docker stop # Stop a running instances
• docker rm # Remove an instance
• docker rmi # Remove an image
• docker stats # Show running containers‘ resource usage info
• docker attach # Attach to a running container
• docker logs # Fetch the logs of a container
• docker inspect # Return low-level information on a container or image
Dockerfile
• Dockerfiles = image representations
• Simple syntax for building images
• Automate and script the images creation
Raspberry Pi 2
Board …
• The Raspberry Pi 2 is a
low cost, credit-card
sized computer that
plugs into a computer
monitor or TV, and uses
a standard keyboard
and mouse.
Raspberry Pi 2 (RPi2)
• RPi2 – 2nd generation of Raspberry Pi.
• A 900MHz quad-core ARM Cortex-A7 CPU
• 1GB RAM
• 4 USB ports
• 40 GPIO pins
• Full HDMI port
• Ethernet port
• Combined 3.5mm audio jack and composite video
• Camera interface (CSI)
• Display interface (DSI)
• Micro SD card slot
• VideoCore IV 3D graphics core
Operating Systems for RPi2
• Because it has an ARMv7 processor, it can run the full range of
ARM GNU/Linux distributions, including Snappy Ubuntu Core,
as well as Microsoft Windows 10.
and more to come …
Where to buy? In Malaysia?
OR just ask Uncle
* The presenter is not associate/affliate with any of them!!!
Docker on RPi2
Docker on RPi2
• Is it possible???
Docker on RPi2
• Is it possible???
YES!!!
Option 1: Hypriot
Hypriot
Hypriot had a short
demo session on the
second day of the
DockerCon 2015 in San
Francisco,CA (USA). The
goal of the demo was
to show that Docker is
a really lightweight
“virtualization”
solution that can be
easily run on small IoT
devices.
Option 2: Ubuntu 15.10 Mate for RPi2
https://ubuntu-mate.org/raspberry-pi/
Dockerizing ………… WAIT!!!
• Docker images are the basis of containers.
• Docker images are available from Docker Hub Registry.
• RPi2 = platform armhf.
• Build your own images
• Pull images from Docker Hub Registry.
Challenges … (1)
• Most of Docker images from Docker Hub Registry are
packaged for x86/x64.
• You have to build the required Docker image if no image
available in Docker Hub Registry.
• Docker-based apps packaged for x86/x64 will not work and
will result in an error such:
Challenges … (2)
• Limited number of packages on armhf platform.
• Ubuntu MATE also provide packages management for use with
RPi2 (easy for Ubuntu fans).
• Use apt-get install within RPi2 running Ubuntu MATE 15.10
Challenges … (3)
• Private Registry vs Public Registry
• The Registry is a stateless, highly scalable server side
application that stores and lets you distribute Docker images.
• Private Registry: tightly control where your images are being
stored, fully own your images distribution pipeline, integrate
image storage and distribution tightly into your in-house
development workflow.
• Public Registry: zero maintenance, ready-to-go, free-to-use,
hosted Registry by Docker Hub and plus additional features.
Now … We can start Dockerizing …
• Easy jumpstart:
• 1) Hypriot ( http://blog.hypriot.com/getting-started-with-
docker-on-your-arm-device/ )
• 2) Ubuntu 15.10 MATE for RPi2 ( https://ubuntu-
mate.org/raspberry-pi )
Hypriot Way …
Hypriot (http://blog.hypriot.com/downloads/ )
1) Download latest RPi2 images
2) Flash/burn the image to MicroSD card (min:8GB, class 10)
3) Ready to go
Ubuntu Way …
Ubuntu 15.10 MATE for RPi2 (https://ubuntu-
mate.org/raspberry-pi/ )
1) Download latest RPi2 images
2) Flash/burn the image to MicroSD card (min:8GB, class 10)
3) Ready to go
Docker CLI … again …
• docker build # Build an image from a Dockerfile
• docker images # List all images on a Docker host
• docker run # Run an image
• docker ps # List all running and stopped instances
• docker stop # Stop a running instances
• docker rm # Remove an instance
• docker rmi # Remove an image
• docker stats # Show running containers‘ resource usage info
• docker attach # Attach to a running container
• docker logs # Fetch the logs of a container
• docker inspect # Return low-level information on a container or image
Dockerfile … again …
Dockerfile Reference:
https://docs.docker.com/engine/reference/build
er/
FROM MAINTAINER ADD COPY EXPOSE
ENV EXPOSE LABEL USER CMD
WORKDIR VOLUME STOPSIGNAL RUN
ENTRYPOINT
Docker + IoT = Awesome
docker pull iotms/rpi2-nginx:15.10
docker pull iotms/rpi2-ubuntu:15.10
docker pull hypriot/rpi-mysql
docker run –d –p 8080:80 iotms/rpi2-nginx:15.10
docker run -d -p 8080:80 hypriot/rpi-busybox-httpd
docker ps
docker ps -a
docker images
docker inspect <container_id>
Demo
Thank You

Mais conteúdo relacionado

Mais procurados

Docker on ARM Raspberry Pi
Docker on ARM Raspberry PiDocker on ARM Raspberry Pi
Docker on ARM Raspberry PiEueung Mulyana
 
Running Docker on ARM
Running Docker on ARMRunning Docker on ARM
Running Docker on ARMDieter Reuter
 
Faster and Easier Software Development using Docker Platform
Faster and Easier Software Development using Docker PlatformFaster and Easier Software Development using Docker Platform
Faster and Easier Software Development using Docker Platformmsyukor
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - IndroducAl Gifari
 
LinuxKit and Moby, news from DockerCon 2017 - Austin,TX
LinuxKit and Moby, news from DockerCon 2017 - Austin,TXLinuxKit and Moby, news from DockerCon 2017 - Austin,TX
LinuxKit and Moby, news from DockerCon 2017 - Austin,TXDieter Reuter
 
Building Reusable Development Environments with Docker
Building Reusable Development Environments with DockerBuilding Reusable Development Environments with Docker
Building Reusable Development Environments with DockerRevelation Technologies
 
Usernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root userUsernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root userAkihiro Suda
 
[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...
[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...
[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...Akihiro Suda
 
Hide your development environment and application in a container
Hide your development environment and application in a containerHide your development environment and application in a container
Hide your development environment and application in a containerJohan Janssen
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemVan Phuc
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerWei-Ting Kuo
 
[DockerCon 2020] Hardening Docker daemon with Rootless Mode
[DockerCon 2020] Hardening Docker daemon with Rootless Mode[DockerCon 2020] Hardening Docker daemon with Rootless Mode
[DockerCon 2020] Hardening Docker daemon with Rootless ModeAkihiro Suda
 
Perspectives on Docker
Perspectives on DockerPerspectives on Docker
Perspectives on DockerRightScale
 
Rootless Containers
Rootless ContainersRootless Containers
Rootless ContainersAkihiro Suda
 
Couchbase on Docker - Couchbase Connect 2015
Couchbase on Docker - Couchbase Connect 2015Couchbase on Docker - Couchbase Connect 2015
Couchbase on Docker - Couchbase Connect 2015Patrick Chanezon
 
Upstate DevOps - Containers 101 - March 28, 2019
Upstate DevOps - Containers 101 - March 28, 2019Upstate DevOps - Containers 101 - March 28, 2019
Upstate DevOps - Containers 101 - March 28, 2019Allen Vailliencourt
 
[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless mode[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless modeAkihiro Suda
 
[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep DiveAkihiro Suda
 
Docker on Google App Engine
Docker on Google App EngineDocker on Google App Engine
Docker on Google App EngineDocker, Inc.
 

Mais procurados (20)

Docker on ARM Raspberry Pi
Docker on ARM Raspberry PiDocker on ARM Raspberry Pi
Docker on ARM Raspberry Pi
 
Running Docker on ARM
Running Docker on ARMRunning Docker on ARM
Running Docker on ARM
 
Faster and Easier Software Development using Docker Platform
Faster and Easier Software Development using Docker PlatformFaster and Easier Software Development using Docker Platform
Faster and Easier Software Development using Docker Platform
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - Indroduc
 
LinuxKit and Moby, news from DockerCon 2017 - Austin,TX
LinuxKit and Moby, news from DockerCon 2017 - Austin,TXLinuxKit and Moby, news from DockerCon 2017 - Austin,TX
LinuxKit and Moby, news from DockerCon 2017 - Austin,TX
 
Building Reusable Development Environments with Docker
Building Reusable Development Environments with DockerBuilding Reusable Development Environments with Docker
Building Reusable Development Environments with Docker
 
Usernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root userUsernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root user
 
[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...
[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...
[Paris Container Day 2021] nerdctl: yet another Docker & Docker Compose imple...
 
Hide your development environment and application in a container
Hide your development environment and application in a containerHide your development environment and application in a container
Hide your development environment and application in a container
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
[DockerCon 2020] Hardening Docker daemon with Rootless Mode
[DockerCon 2020] Hardening Docker daemon with Rootless Mode[DockerCon 2020] Hardening Docker daemon with Rootless Mode
[DockerCon 2020] Hardening Docker daemon with Rootless Mode
 
Perspectives on Docker
Perspectives on DockerPerspectives on Docker
Perspectives on Docker
 
Rootless Containers
Rootless ContainersRootless Containers
Rootless Containers
 
Couchbase on Docker - Couchbase Connect 2015
Couchbase on Docker - Couchbase Connect 2015Couchbase on Docker - Couchbase Connect 2015
Couchbase on Docker - Couchbase Connect 2015
 
Upstate DevOps - Containers 101 - March 28, 2019
Upstate DevOps - Containers 101 - March 28, 2019Upstate DevOps - Containers 101 - March 28, 2019
Upstate DevOps - Containers 101 - March 28, 2019
 
[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless mode[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless mode
 
[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive
 
Docker linuxday 2015
Docker linuxday 2015Docker linuxday 2015
Docker linuxday 2015
 
Docker on Google App Engine
Docker on Google App EngineDocker on Google App Engine
Docker on Google App Engine
 

Semelhante a Dockerizing IoT Services

Dockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec KraloveDockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec Kralovedamovsky
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the Worlddamovsky
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Ambassador Labs
 
Docker, how to use it. organize a meeting with IBM products...
Docker, how to use it. organize a meeting with IBM products...Docker, how to use it. organize a meeting with IBM products...
Docker, how to use it. organize a meeting with IBM products...Andrea Fontana
 
.docker : How to deploy Digital Experience in a container, drinking a cup of ...
.docker : How to deploy Digital Experience in a container, drinking a cup of ....docker : How to deploy Digital Experience in a container, drinking a cup of ...
.docker : How to deploy Digital Experience in a container, drinking a cup of ...ICON UK EVENTS Limited
 
docker : how to deploy Digital Experience in a container drinking a cup of co...
docker : how to deploy Digital Experience in a container drinking a cup of co...docker : how to deploy Digital Experience in a container drinking a cup of co...
docker : how to deploy Digital Experience in a container drinking a cup of co...Matteo Bisi
 
.docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c....docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c...Andrea Fontana
 
Cohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraCohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraDaniel Palstra
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...Ambassador Labs
 
DockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General SessionDockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General SessionDocker, Inc.
 
Comparing Next-Generation Container Image Building Tools
 Comparing Next-Generation Container Image Building Tools Comparing Next-Generation Container Image Building Tools
Comparing Next-Generation Container Image Building ToolsAkihiro Suda
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An IntroductionPOSSCON
 
IoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSesIoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSesMender.io
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'acorehard_by
 
QA Club Kiev #20. Making life easier with Docker
QA Club Kiev #20. Making life easier with DockerQA Club Kiev #20. Making life easier with Docker
QA Club Kiev #20. Making life easier with DockerQA Club Kiev
 
Boston Ruby Group - Devops Pipeline
Boston Ruby Group - Devops Pipeline Boston Ruby Group - Devops Pipeline
Boston Ruby Group - Devops Pipeline Michael Durrant
 

Semelhante a Dockerizing IoT Services (20)

Dockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec KraloveDockerize the World - presentation from Hradec Kralove
Dockerize the World - presentation from Hradec Kralove
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
 
Docker 2014
Docker 2014Docker 2014
Docker 2014
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
 
Docker, how to use it. organize a meeting with IBM products...
Docker, how to use it. organize a meeting with IBM products...Docker, how to use it. organize a meeting with IBM products...
Docker, how to use it. organize a meeting with IBM products...
 
.docker : How to deploy Digital Experience in a container, drinking a cup of ...
.docker : How to deploy Digital Experience in a container, drinking a cup of ....docker : How to deploy Digital Experience in a container, drinking a cup of ...
.docker : How to deploy Digital Experience in a container, drinking a cup of ...
 
docker : how to deploy Digital Experience in a container drinking a cup of co...
docker : how to deploy Digital Experience in a container drinking a cup of co...docker : how to deploy Digital Experience in a container drinking a cup of co...
docker : how to deploy Digital Experience in a container drinking a cup of co...
 
.docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c....docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c...
 
Rexdockercon2017
Rexdockercon2017Rexdockercon2017
Rexdockercon2017
 
Cohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel PalstraCohesion Techsessie Docker - Daniel Palstra
Cohesion Techsessie Docker - Daniel Palstra
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
 
DockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General SessionDockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General Session
 
Docker in real life
Docker in real lifeDocker in real life
Docker in real life
 
Comparing Next-Generation Container Image Building Tools
 Comparing Next-Generation Container Image Building Tools Comparing Next-Generation Container Image Building Tools
Comparing Next-Generation Container Image Building Tools
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
 
IoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSesIoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSes
 
Docker Started
Docker StartedDocker Started
Docker Started
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
 
QA Club Kiev #20. Making life easier with Docker
QA Club Kiev #20. Making life easier with DockerQA Club Kiev #20. Making life easier with Docker
QA Club Kiev #20. Making life easier with Docker
 
Boston Ruby Group - Devops Pipeline
Boston Ruby Group - Devops Pipeline Boston Ruby Group - Devops Pipeline
Boston Ruby Group - Devops Pipeline
 

Último

美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作ss846v0c
 
Kwin - Trang Tải App Game Kwin68 Club Chính Thức
Kwin - Trang Tải App Game Kwin68 Club Chính ThứcKwin - Trang Tải App Game Kwin68 Club Chính Thức
Kwin - Trang Tải App Game Kwin68 Club Chính ThứcKwin68 Club
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uk England Northern ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uk England Northern ...NO1 Certified Black Magic Specialist Expert Amil baba in Uk England Northern ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uk England Northern ...Amil Baba Dawood bangali
 
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjekAIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjekpavan402055
 
澳洲Deakin学位证,迪肯大学毕业证书1:1制作
澳洲Deakin学位证,迪肯大学毕业证书1:1制作澳洲Deakin学位证,迪肯大学毕业证书1:1制作
澳洲Deakin学位证,迪肯大学毕业证书1:1制作rpb5qxou
 
Dubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
Dubai Call Girls O525547819 Spring Break Fast Call Girls DubaiDubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
Dubai Call Girls O525547819 Spring Break Fast Call Girls Dubaikojalkojal131
 
Uae-NO1 Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addres...
Uae-NO1 Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addres...Uae-NO1 Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addres...
Uae-NO1 Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addres...Amil baba
 
RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作f3774p8b
 
Computer Organization and Architecture 10th - William Stallings, Ch01.pdf
Computer Organization and Architecture 10th - William Stallings, Ch01.pdfComputer Organization and Architecture 10th - William Stallings, Ch01.pdf
Computer Organization and Architecture 10th - William Stallings, Ch01.pdfShahdAbdElsamea2
 

Último (9)

美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
美国IUB学位证,印第安纳大学伯明顿分校毕业证书1:1制作
 
Kwin - Trang Tải App Game Kwin68 Club Chính Thức
Kwin - Trang Tải App Game Kwin68 Club Chính ThứcKwin - Trang Tải App Game Kwin68 Club Chính Thức
Kwin - Trang Tải App Game Kwin68 Club Chính Thức
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uk England Northern ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uk England Northern ...NO1 Certified Black Magic Specialist Expert Amil baba in Uk England Northern ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uk England Northern ...
 
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjekAIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
 
澳洲Deakin学位证,迪肯大学毕业证书1:1制作
澳洲Deakin学位证,迪肯大学毕业证书1:1制作澳洲Deakin学位证,迪肯大学毕业证书1:1制作
澳洲Deakin学位证,迪肯大学毕业证书1:1制作
 
Dubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
Dubai Call Girls O525547819 Spring Break Fast Call Girls DubaiDubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
Dubai Call Girls O525547819 Spring Break Fast Call Girls Dubai
 
Uae-NO1 Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addres...
Uae-NO1 Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addres...Uae-NO1 Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addres...
Uae-NO1 Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Addres...
 
RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作RBS学位证,鹿特丹商学院毕业证书1:1制作
RBS学位证,鹿特丹商学院毕业证书1:1制作
 
Computer Organization and Architecture 10th - William Stallings, Ch01.pdf
Computer Organization and Architecture 10th - William Stallings, Ch01.pdfComputer Organization and Architecture 10th - William Stallings, Ch01.pdf
Computer Organization and Architecture 10th - William Stallings, Ch01.pdf
 

Dockerizing IoT Services

  • 1. Dockerizing IoT Services Mohd Syukor Abdul Open Source Community
  • 2. In this hour … • Internet of Things • What is IoT? • IoT Services? • Docker • What is Docker? • Docker CLI • Dockerfile • Raspberry Pi 2 • Board • Operating System • Where to buy? • Docker on Raspberry Pi 2 • Current OS • Dockerizing … • Demo
  • 4. What is Internet of Things (IoT)? • The Internet of Things (IoT) is the network of physical objects or "things" embedded with electronics, software, sensors, and network connectivity, which enables these objects to collect and exchange data. https://en.wikipedia.org/wiki/Internet_of_Things
  • 5. Billions of Things Connected to Internet by 2020 • The estimated 26 billion units to be installed within the Internet of Things by 2020, according to Gartner, Inc., do not include PCs, tablets and smartphones. • Cisco and Intel estimate 50 billion connected devices by 2020.
  • 8.
  • 9. IoT: Youtube Videos … https://www.youtube.com/watch?v=q4VbJ6Rju8g https://www.youtube.com/watch?v=i5AuzQXBsG4
  • 11. What is Docker? • Docker is an open platform for building, shipping and running distributed applications. It gives programmers, development teams and operations engineers the common toolbox they need to take advantage of the distributed and networked nature of modern applications. http://www.docker.com
  • 12. Docker Containers • Docker containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server. This guarantees that it will always run the same, regardless of the environment it is running in.
  • 13. Docker Containers = Lightweight • Containers running on a single machine all share the same operating system kernel so they start instantly and make more efficient use of RAM. • Images are constructed from layered filesystems so they can share common files, making disk usage and image downloads much more efficient.
  • 14. Docker vs Virtual Machine Virtual Machine Docker
  • 15. Docker CLI • docker build # Build an image from a Dockerfile • docker images # List all images on a Docker host • docker run # Run an image • docker ps # List all running and stopped instances • docker stop # Stop a running instances • docker rm # Remove an instance • docker rmi # Remove an image • docker stats # Show running containers‘ resource usage info • docker attach # Attach to a running container • docker logs # Fetch the logs of a container • docker inspect # Return low-level information on a container or image
  • 16. Dockerfile • Dockerfiles = image representations • Simple syntax for building images • Automate and script the images creation
  • 18. Board … • The Raspberry Pi 2 is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse.
  • 19. Raspberry Pi 2 (RPi2) • RPi2 – 2nd generation of Raspberry Pi. • A 900MHz quad-core ARM Cortex-A7 CPU • 1GB RAM • 4 USB ports • 40 GPIO pins • Full HDMI port • Ethernet port • Combined 3.5mm audio jack and composite video • Camera interface (CSI) • Display interface (DSI) • Micro SD card slot • VideoCore IV 3D graphics core
  • 20. Operating Systems for RPi2 • Because it has an ARMv7 processor, it can run the full range of ARM GNU/Linux distributions, including Snappy Ubuntu Core, as well as Microsoft Windows 10. and more to come …
  • 21. Where to buy? In Malaysia? OR just ask Uncle * The presenter is not associate/affliate with any of them!!!
  • 23. Docker on RPi2 • Is it possible???
  • 24. Docker on RPi2 • Is it possible??? YES!!!
  • 26. Hypriot Hypriot had a short demo session on the second day of the DockerCon 2015 in San Francisco,CA (USA). The goal of the demo was to show that Docker is a really lightweight “virtualization” solution that can be easily run on small IoT devices.
  • 27. Option 2: Ubuntu 15.10 Mate for RPi2 https://ubuntu-mate.org/raspberry-pi/
  • 28. Dockerizing ………… WAIT!!! • Docker images are the basis of containers. • Docker images are available from Docker Hub Registry. • RPi2 = platform armhf. • Build your own images • Pull images from Docker Hub Registry.
  • 29. Challenges … (1) • Most of Docker images from Docker Hub Registry are packaged for x86/x64. • You have to build the required Docker image if no image available in Docker Hub Registry. • Docker-based apps packaged for x86/x64 will not work and will result in an error such:
  • 30. Challenges … (2) • Limited number of packages on armhf platform. • Ubuntu MATE also provide packages management for use with RPi2 (easy for Ubuntu fans). • Use apt-get install within RPi2 running Ubuntu MATE 15.10
  • 31. Challenges … (3) • Private Registry vs Public Registry • The Registry is a stateless, highly scalable server side application that stores and lets you distribute Docker images. • Private Registry: tightly control where your images are being stored, fully own your images distribution pipeline, integrate image storage and distribution tightly into your in-house development workflow. • Public Registry: zero maintenance, ready-to-go, free-to-use, hosted Registry by Docker Hub and plus additional features.
  • 32. Now … We can start Dockerizing … • Easy jumpstart: • 1) Hypriot ( http://blog.hypriot.com/getting-started-with- docker-on-your-arm-device/ ) • 2) Ubuntu 15.10 MATE for RPi2 ( https://ubuntu- mate.org/raspberry-pi )
  • 33. Hypriot Way … Hypriot (http://blog.hypriot.com/downloads/ ) 1) Download latest RPi2 images 2) Flash/burn the image to MicroSD card (min:8GB, class 10) 3) Ready to go
  • 34. Ubuntu Way … Ubuntu 15.10 MATE for RPi2 (https://ubuntu- mate.org/raspberry-pi/ ) 1) Download latest RPi2 images 2) Flash/burn the image to MicroSD card (min:8GB, class 10) 3) Ready to go
  • 35. Docker CLI … again … • docker build # Build an image from a Dockerfile • docker images # List all images on a Docker host • docker run # Run an image • docker ps # List all running and stopped instances • docker stop # Stop a running instances • docker rm # Remove an instance • docker rmi # Remove an image • docker stats # Show running containers‘ resource usage info • docker attach # Attach to a running container • docker logs # Fetch the logs of a container • docker inspect # Return low-level information on a container or image
  • 36. Dockerfile … again … Dockerfile Reference: https://docs.docker.com/engine/reference/build er/ FROM MAINTAINER ADD COPY EXPOSE ENV EXPOSE LABEL USER CMD WORKDIR VOLUME STOPSIGNAL RUN ENTRYPOINT
  • 37. Docker + IoT = Awesome docker pull iotms/rpi2-nginx:15.10 docker pull iotms/rpi2-ubuntu:15.10 docker pull hypriot/rpi-mysql docker run –d –p 8080:80 iotms/rpi2-nginx:15.10 docker run -d -p 8080:80 hypriot/rpi-busybox-httpd docker ps docker ps -a docker images docker inspect <container_id>
  • 38. Demo