61
The Raspberry Pi Cloud Richard Cziva 13 August, 2014 Morgan Stanley, Glasgow 1

The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

  • Upload
    vodung

  • View
    241

  • Download
    3

Embed Size (px)

Citation preview

Page 1: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

The Raspberry Pi Cloud

Richard Cziva!13 August, 2014Morgan Stanley, Glasgow

1

Page 2: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Agenda

• Introduction

• The Raspberry Pi project

• Cloud Computing and IaaS

• Building a Cloud from Raspberry Pi devices

• Future work, conclusion

2

Page 3: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Agenda

• Introduction

• The Raspberry Pi project

• Cloud Computing and IaaS

• Building a Cloud from Raspberry Pi devices

• Future work, conclusion

3

Page 4: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

About me

• Worked at Morgan Stanley in Budapest

• Enterprise Infrastructure (EI)

• Virtualization Engineering (VirtEng)

• Developed tools for the VMware infrastructure

• Perl, Python

• Worked on the OpenStack proof of concept evaluation

4

Page 5: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

About me

• Started my PhD in Computing Science a year ago at the University of Glasgow

• Currently working as a Research Assistant

• Research interests:

• Cloud Computing

• Network-Aware Virtual Machine Management

• Software Defined Networking in Cloud DCs5

Page 6: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Agenda

• Introduction

• The Raspberry Pi project

• Cloud Computing and IaaS

• Building a Cloud from Raspberry Pi devices

• Future work, conclusion

6

Page 7: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

The Raspberry Pi

• Credit card sized, low cost computer

• Found by the Raspberry Pi Foundation

• Aiming student experiments with low investment

• The computer uses less power than a light bulb

• System on chip, a computer on a single low voltage chip

7

Page 8: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Background

• Research around the device started at 2006

• Computing Lab (CL) at University of Cambridge

• First model was based on Atmel ATmega644 microcontroller with USB and HDMI

8

Page 9: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Features

• Broadcom System on a Chip (SoC)

• x86 not used -> ARM architecture

• Operating systems should be ARM compatible

• Raspbian (Debian clone)

• Fedora Pi

• Arch Linux

• Boots from an SD card (class 10)9

Page 10: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Features

• GPIO to interconnect with other circuit boards (sensors, LEDs, etc)

• Main programming language is Python, C, Perl

• Power supply 700mA at 5V

• can operate from 4xAA batteries

10

Page 11: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Models

• Model A

• 1 USB port and no Ethernet

• Model B

• 256 MB RAM (rev1) / 512 MB RAM (rev2)

• 2 USB ports and 10/100 Ethernet

• Model B+

11

Page 12: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Specifications

• SoC BCM2835

• CPU: ARM 700 MHz (armv6l)

• GPU: Broadcom Videocore IV

• RAM: 256 MB SDRAM

12

Page 13: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Implemented ideas

• Home automation systems

• Security webcam

• MP3 player

• Game server (Minecraft)

• Alarm system

• Brewery controller (beer or wine)

13

Page 14: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Example projects - BrewPi

14

Page 15: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Example projects - Supercomputer

15

Page 16: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Implemented ideas - WiFi Internet Radio

16

Page 17: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Agenda

• Introduction

• The Raspberry Pi project

• Cloud Computing and IaaS

• Building a Cloud from Raspberry Pi devices

• Future work, conclusion

17

Page 18: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Cloud Computing

• IT services, delivered over the Internet

Cloud Clients web browser, mobile app, thin client

SaaS CRM, email, virtual desktop, communication

PaaS execution runtime, database, web server

IaaS Virtual Machines, servers, storage, network

18

Page 19: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Software as a Service (SaaS)

• “On demand software”

• Examples:

• Messaging, collaboration systems

• ERP, CRM and HRM systems

• Priced after number of users

Cloud Clients web browser, mobile app, thin client

SaaS CRM, email, virtual desktop, communication

PaaS execution runtime, database, web server

IaaS Virtual Machines, servers, storage, network

19

Page 20: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Platform as a Service (PaaS)

• A computing platform with a solution stack

• Examples:

• Google App Engine

• Heroku

• Windows Azure Websites

Cloud Clients web browser, mobile app, thin client

SaaS CRM, email, virtual desktop, communication

PaaS execution runtime, database, web server

IaaS Virtual Machines, servers, storage, network

20

Page 21: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Infrastructure as a Service (IaaS)

• Virtual Machines

• Priced after resources (CPU, memory, network, etc) used

• Examples:

• Amazon EC2

• Google Compute Service

• VMware vCloud

Cloud Clients web browser, mobile app, thin client

SaaS CRM, email, virtual desktop, communication

PaaS execution runtime, database, web server

IaaS Virtual Machines, servers, storage, network

21

Page 22: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Agenda

• Introduction

• The Raspberry Pi project

• Cloud Computing and IaaS

• Building a Cloud from Raspberry Pi devices

• Future work, conclusion

22

Page 23: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

A new type of Software

Engineering

23

Page 24: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Black Box Cloud Computing

24

Page 25: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Microsoft, Dublin. $500 million.25

Page 26: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Facebook, N.C. $606 million.

26

Page 27: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Apple, Maiden, DC. $1 billion.

27

Page 28: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Simulation

• Simulate a Cloud Datacentre

• e.g. NS/3 for networking, CloudSim, Mininet etc

• Fidelity? Convincing?

• Intangible; doesn’t model everything; the details matter

28

Page 29: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

29

Build Something

Page 30: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

30

Page 31: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

What About… A Scale Model?

31

Page 32: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

A Datacentre for £10k?32

Page 33: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Designing Racks

33

Page 34: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

34

Page 35: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

35

Page 36: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

36

Page 37: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

37

Page 38: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

USB Hubs

38

Page 39: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

What about the Software?

39

Page 40: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Software Architecture

���

��� � � �������

�����

��� � � �������

���

��� � � �������

��

� ����

��� � � �������

���

��� � � �������

� �

�� ���

��� � � �������

���

��� � � �������

���

������

��� � � �������

����

������� ���

������

��������������� ������ �� ���������!���"����������������#���$%��&�$'

���$'�

���(��)(���*��+��

40

Page 41: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Virtualisation is Heavy

41

Page 42: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Virtualisation is Heavy

“dom0 uses at least 200MB”

http://docs.vmd.citrix.com/XenServer/4.0.1/installation/apd.html

Pi had 256MB, now 512MB

Page 43: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Containers are Light

• Using Linux Containers (LXC)

• Based on “cgroups” Linux kernel functionality:

• process-space separation

• “chroot on steroids” - separate file systems.

!

• After much kernel recompilation… it worked!

43

Page 44: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Containers are Light

• To get LXC working — recompile kernel and configure Raspbian

• To get Libvirt working — get SELinux working on the Pi, then get all the other dependencies working. Then patch Libvirt

• To get ovirt working…

• “yak shaving”

44

Page 45: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

+ Shipyard

45

Page 46: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Software Stack

Web Database Hadoop Applications

ARM System on Chip

Raspbian Linux

Linux Containers (LXC)

Docker

Container Container Container

Infrastructure

46

Page 47: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Applications

This is not a compute cluster.

47

Page 48: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

The Management Interface

48

Page 49: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Total Cost: £2000

49

Page 50: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

DEMO

50

Page 51: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Teaching and Research Applications

51

Page 52: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Student Projects

• Hardware Design

• Web Management

• Container middleware

• Network instrumentation

• IP-less networking

• Teaching tools

• Genetic Programming in the Cloud52

Page 53: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Side Projects

• Vector Pascal Compiler for the Pi

• Jikes RVM port to the Pi

• Robot Operating System (ROS) in the Cloud

53

Page 54: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Lectures

• Software distribution, version management

• Distributed programming

• Long term goal: Cloud Computing Module

54

Page 55: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Infrastructure Research

• Is the scale model faithful?

• Can lightweight containers replace virtualisation?

• Is it possible to build a robust, responsive and secure ‘peerless cloud’ ?

• Are there alternative networking paradigms that suit cloud computing better?

• Can we use dynamic optimisation algorithms to improve cloud efficiency?

55

Page 56: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

56

Page 57: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Agenda

• Introduction

• The Raspberry Pi project

• Cloud Computing and IaaS

• Building a Cloud from Raspberry Pi devices

• Future work, conclusion

57

Page 58: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Future work

• More students involved

• Load balancer

• Docker integration

• Mobile Cloud management

• ARM Cloud

• and many more…

58

Page 59: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Summary

We have built a Raspberry Pi Cloud!

This is an ongoing project

First: replicate. Then: improve.

59

Page 60: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Acknowledgements

http://raspberrypicloud.wordpress.com/

The University of Glasgow Chancellor’s Fund for Learning and Teaching !Dr David R. White (Investigator) Dr Posco Tso (Co-investigator)Dr Jeremy Singer (Lecturer) Dr Dimitrios Pezaros (Lecturer) Simon Jouet (Electronics, hacker) Robbie Simpson (Summer Intern, original architect) Richard Cziva (Cloud Management, hacker)

60

Page 61: The Raspberry Pi Cloud - Netlab · PDF fileThe Raspberry Pi Cloud Richard Cziva! ... • Worked on the OpenStack proof of concept evaluation 4. ... CloudSim, Mininet etc

Thank you for your attention!Richard Cziva 61