SlideShare a Scribd company logo
Building a Raspberry Pi
Kubernetes Cluster
and Running .NET Core
with OpenFaaS
Alex Ellis @alexellisuk
Scott Hanselman @shanselman
Agenda
Why build an RPi cluster?
What counts as Cloud?
Top community clusters
Practicalities of ARM & .NET Core
Intro to Kubernetes & Serverless
Demos
Why build your own cluster?
● It’s the CLOUD in your HOUSE!
● Be your own boss - you’re root, you
make the rules
● UNIX heritage
● Direct access to hardware
Let’s back up. What does
The Cloud™ look like?
$
See it? Can you
visualize
the cloud now?
Types of Cloud
“Private cloud”
http://www.hostingadvice.com/how-to/iaas-vs-paas-vs-saas/
“Private cloud”
How about
now?
Alex’s first RPi
cluster
Featured in Linux User Developer
Magazine
Had to build Docker from source
Original “Swarm” project from
Docker
29 MARCH 2016
We made a podcast
The community did something
awesome!
Building a Raspberry Pi cluster with Kubernetes, OpenFaaS and .NET
Building a Raspberry Pi cluster with Kubernetes, OpenFaaS and .NET
Building a Raspberry Pi cluster with Kubernetes, OpenFaaS and .NET
People LOVE building their own Cloud
In summary
Who needs an orchestrator anyway?
Building a Raspberry Pi cluster with Kubernetes, OpenFaaS and .NET
Building a Raspberry Pi cluster with Kubernetes, OpenFaaS and .NET
Lightweight “chroot”/sandbox
Densely pack applications
Immutable - same everywhere
Next-gen workflow - Build/ship/run
Docker Hub & store
Docker brings:
container
Docker container
docker run -d -p 80:80
--restart=always
--name=nginx-deployment
nginx:1.7.9
Declarative deployments
Configuration - YAML
Programmable API
Service discovery
High availability (HA)
Elastic capacity
Security & extensibility
Orchestration add:
container Deployment
Kubernetes Deployment
container
Pod
Pod
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
Kubernetes is an orchestrator
Here are the building blocks
Zine by Julia Evans
Zine by Julia Evans
No:
Accelerated gaming
Bitcoin mining
Windows binaries
Skynet
What can I do with my Pi (ARM) cluster?
Yes:
You can run server software
Python MPI (traditional
multi-processing)
A blog or website, i.e. ASP.NET,
Node.js, PHP etc
Building a Raspberry Pi cluster with Kubernetes, OpenFaaS and .NET
Building a Raspberry Pi cluster with Kubernetes, OpenFaaS and .NET
Building a Raspberry Pi cluster with Kubernetes, OpenFaaS and .NET
OpenFaaS - Serverless Functions Made Simple
● Community project
● Developer-first experience
○ UI & CLI
● 9k GitHub stars
● Award winning
● Thriving community
● Easiest way to run your own
FaaS or functions
OpenFaaS Demo
Want to know more?
blog.alexellis.io -
launched 2015
Around 100 blog posts on
Docker, Kubernetes, ARM
and IoT
Coding in Go, community
and DevOps
What about the software?
Pick an OS
● Raspbian (Debian-based)
● Hypriot (Raspbian-based)
● Ubuntu (Debian-based)
Something completely different:
Resin
Configure each node manually
Or automate with Ansible
But avoid duplicating SD cards
Be aware not all Docker images
support ARM
Let’s talk about CPU architecture
.NET Core
Best option for modern microservices in C#, ASP.NET also available
Natively targets: Linux, Windows and Mac
Runtime support for ARM (Raspberry Pi)
Official Docker images are available from Microsoft
...
.NET Core + Kubernetes
Multi-Arch Cross
Compilation
Build in a container
Publish to specific
CPU Arch
Use correct runtime
FROM microsoft/dotnet:2.0-sdk as builder
RUN mkdir -p /root/src/function
WORKDIR /root/src/function
COPY ./function/Function.csproj .
WORKDIR /root/src/
COPY ./root.csproj .
RUN dotnet restore ./root.csproj
COPY . .
RUN dotnet publish -c release -o published -r linux-arm
ADD https://github.com/openfaas/faas/releases/download/0.6.1/fwatchdog-armhf
/usr/bin/fwatchdog
RUN chmod +x /usr/bin/fwatchdog
FROM microsoft/dotnet:2.0.0-runtime-stretch-arm32v7
WORKDIR /root/
COPY --from=builder /root/src/published .
COPY --from=builder /usr/bin/fwatchdog /
ENV fprocess="dotnet ./root.dll"
EXPOSE 8080
CMD ["/fwatchdog"]
RPi Cluster Build Consideration
● Raspberry Pis like 3A+ Reliable Power
○ Anker makes a 6 port USB Charger. One plug powers the
whole cluster!
○ Get a Raspberry Pi multi-layer case enclosure
○ Or build one with LEGO!
● Use flat and short Ethernet Cables. Wired >Wireless
○ Get cables of varied length. Use the minimum
Networking Challenges
● Wired networking is best.
● BlackBox makes a nice 8-port
USB-Powered Hub
○ Any one of the Pis can power the Hub itself!
○ Hub sits on top of the Pi stack with magnets
● Hardest part: For portability, get a router.
○ Ideally the cluster will have either static IPs or
reliable DHCP leases
Building a Raspberry Pi cluster with Kubernetes, OpenFaaS and .NET
BitScope blade
What if we could build Skynet?
In summary
● Build your own RPi cluster
● Learn Kubernetes
● Try .NET Core
● Deploy OpenFaaS
Any questions?
Thank you!
@shanselman @alexellisuk
http://hanselman.com http://alexellis.io

More Related Content

What's hot (20)

PDF
OpenFaaS JeffConf 2017 - Milan
Alex Ellis
 
PDF
Zero to #Serverless in 60 seconds, anywhere
Alex Ellis
 
PDF
FaaS-and-Furious
Moby Project
 
PDF
Immutable Infrastructure: Rise of the Machine Images
C4Media
 
PPTX
Ultimate DevOps: OpenShift Dedicated With CloudBees Jenkins Platform (Andy Pe...
Red Hat Developers
 
PDF
Splunk user group - automating Splunk with Ansible
Mark Phillips
 
PDF
TechXLR8 - XLR8 your cloud with Docker and Serverless FaaS
Alex Ellis
 
PDF
Running tests for every commit: Gerrit, Jenkins, Docker, AWS
Alexander Akbashev
 
PDF
Building Python Web Apps with Docker
Mark Adams
 
PDF
Ultimate DevOps - Jenkins Enterprise & Red Hat OpenShift
Andy Pemberton
 
PDF
Serverless in production (O'Reilly Software Architecture)
Yan Cui
 
PDF
How to contribute to cloud native computing foundation (CNCF)
Krishna-Kumar
 
PDF
Continuous Integration on Steroids
Alexander Akbashev
 
PDF
Ceylon From Here to Infinity: The Big Picture and What's Coming
Virtual JBoss User Group
 
PDF
Run your Java apps on Cloud Foundry
Andy Piper
 
PPTX
OpenWhisk
Juan Pablo Genovese
 
PDF
Cloud native applications
reallavalamp
 
PDF
5 cool ways to get started with Cloud Native Development ( with Okteto)
sangam biradar
 
PDF
DevOpsDays Houston 2019 - Shaun Ladewig, Robert Stone - From OverTheWallOps t...
DevOpsDays Houston
 
PDF
Bosh 2-0-reloaded
Gwenn Etourneau
 
OpenFaaS JeffConf 2017 - Milan
Alex Ellis
 
Zero to #Serverless in 60 seconds, anywhere
Alex Ellis
 
FaaS-and-Furious
Moby Project
 
Immutable Infrastructure: Rise of the Machine Images
C4Media
 
Ultimate DevOps: OpenShift Dedicated With CloudBees Jenkins Platform (Andy Pe...
Red Hat Developers
 
Splunk user group - automating Splunk with Ansible
Mark Phillips
 
TechXLR8 - XLR8 your cloud with Docker and Serverless FaaS
Alex Ellis
 
Running tests for every commit: Gerrit, Jenkins, Docker, AWS
Alexander Akbashev
 
Building Python Web Apps with Docker
Mark Adams
 
Ultimate DevOps - Jenkins Enterprise & Red Hat OpenShift
Andy Pemberton
 
Serverless in production (O'Reilly Software Architecture)
Yan Cui
 
How to contribute to cloud native computing foundation (CNCF)
Krishna-Kumar
 
Continuous Integration on Steroids
Alexander Akbashev
 
Ceylon From Here to Infinity: The Big Picture and What's Coming
Virtual JBoss User Group
 
Run your Java apps on Cloud Foundry
Andy Piper
 
Cloud native applications
reallavalamp
 
5 cool ways to get started with Cloud Native Development ( with Okteto)
sangam biradar
 
DevOpsDays Houston 2019 - Shaun Ladewig, Robert Stone - From OverTheWallOps t...
DevOpsDays Houston
 
Bosh 2-0-reloaded
Gwenn Etourneau
 

Similar to Building a Raspberry Pi cluster with Kubernetes, OpenFaaS and .NET (20)

PDF
Shipping Applications to Production in Containers with Docker
Jérôme Petazzoni
 
PPTX
Docker, cornerstone of an hybrid cloud?
Adrien Blind
 
PDF
Containers, Docker, and Microservices: the Terrific Trio
Jérôme Petazzoni
 
PDF
Scalable Spark deployment using Kubernetes
datamantra
 
PPTX
On Docker and its use for LHC at CERN
Sebastien Goasguen
 
PPTX
Weave User Group Talk - DockerCon 2017 Recap
Patrick Chanezon
 
PPTX
Building a raspberry pi cluster
Yoseph Buitrago
 
PDF
Evaluation of High Availability Performance of Kubernetes and Docker Swarm on...
Ontico
 
PPTX
Docker and kubernetes
Dongwon Kim
 
PDF
High Availability Performance of Kubernetes and Docker Swarm on a Raspberry P...
Mathias Renner
 
PDF
Docker Introduction + what is new in 0.9
Jérôme Petazzoni
 
PDF
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
Jérôme Petazzoni
 
PPTX
Kubernetes 101
Vishwas N
 
PDF
Why do we even have Kubernetes?
Sean Walberg
 
PPTX
Docker Container As A Service - JAX 2016
Patrick Chanezon
 
PPTX
Docker, cornerstone of cloud hybridation ? [Cloud Expo Europe 2016]
Adrien Blind
 
PDF
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
PPTX
Docker-N-Beyond
santosh007
 
PPTX
Docker Platform and Ecosystem
Patrick Chanezon
 
Shipping Applications to Production in Containers with Docker
Jérôme Petazzoni
 
Docker, cornerstone of an hybrid cloud?
Adrien Blind
 
Containers, Docker, and Microservices: the Terrific Trio
Jérôme Petazzoni
 
Scalable Spark deployment using Kubernetes
datamantra
 
On Docker and its use for LHC at CERN
Sebastien Goasguen
 
Weave User Group Talk - DockerCon 2017 Recap
Patrick Chanezon
 
Building a raspberry pi cluster
Yoseph Buitrago
 
Evaluation of High Availability Performance of Kubernetes and Docker Swarm on...
Ontico
 
Docker and kubernetes
Dongwon Kim
 
High Availability Performance of Kubernetes and Docker Swarm on a Raspberry P...
Mathias Renner
 
Docker Introduction + what is new in 0.9
Jérôme Petazzoni
 
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
Jérôme Petazzoni
 
Kubernetes 101
Vishwas N
 
Why do we even have Kubernetes?
Sean Walberg
 
Docker Container As A Service - JAX 2016
Patrick Chanezon
 
Docker, cornerstone of cloud hybridation ? [Cloud Expo Europe 2016]
Adrien Blind
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
Docker-N-Beyond
santosh007
 
Docker Platform and Ecosystem
Patrick Chanezon
 
Ad

More from Alex Ellis (7)

PDF
The Need For A Cloud Native Tunnel
Alex Ellis
 
PDF
Still waiting for IPv6? Try the inlets-operator
Alex Ellis
 
PDF
IoT + Docker - securing the datacenter, Peterborough
Alex Ellis
 
PDF
IoT: Docker and Raspberry Pi for CamJam
Alex Ellis
 
PDF
IoT in the DataCenter @ Container Camp, London
Alex Ellis
 
PDF
Docker Overview
Alex Ellis
 
PDF
Docker & IoT: protecting the Datacenter
Alex Ellis
 
The Need For A Cloud Native Tunnel
Alex Ellis
 
Still waiting for IPv6? Try the inlets-operator
Alex Ellis
 
IoT + Docker - securing the datacenter, Peterborough
Alex Ellis
 
IoT: Docker and Raspberry Pi for CamJam
Alex Ellis
 
IoT in the DataCenter @ Container Camp, London
Alex Ellis
 
Docker Overview
Alex Ellis
 
Docker & IoT: protecting the Datacenter
Alex Ellis
 
Ad

Recently uploaded (20)

PPTX
PM200.pptxghjgfhjghjghjghjghjghjghjghjghjghj
breadpaan921
 
PPTX
Orchestrating things in Angular application
Peter Abraham
 
PPTX
英国假毕业证诺森比亚大学成绩单GPA修改UNN学生卡网上可查学历成绩单
Taqyea
 
PPTX
internet básico presentacion es una red global
70965857
 
PPT
introduction to networking with basics coverage
RamananMuthukrishnan
 
PPTX
Presentation3gsgsgsgsdfgadgsfgfgsfgagsfgsfgzfdgsdgs.pptx
SUB03
 
PPTX
Research Design - Report on seminar in thesis writing. PPTX
arvielobos1
 
PPT
Agilent Optoelectronic Solutions for Mobile Application
andreashenniger2
 
PPTX
PE introd.pptxfrgfgfdgfdgfgrtretrt44t444
nepmithibai2024
 
PPTX
一比一原版(LaTech毕业证)路易斯安那理工大学毕业证如何办理
Taqyea
 
PDF
DevOps Design for different deployment options
henrymails
 
PPTX
L1A Season 1 ENGLISH made by A hegy fixed
toszolder91
 
PPTX
unit 2_2 copy right fdrgfdgfai and sm.pptx
nepmithibai2024
 
PPTX
Lec15_Mutability Immutability-converted.pptx
khanjahanzaib1
 
PDF
𝐁𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓
hokimamad0
 
PDF
The-Hidden-Dangers-of-Skipping-Penetration-Testing.pdf.pdf
naksh4thra
 
PDF
Build Fast, Scale Faster: Milvus vs. Zilliz Cloud for Production-Ready AI
Zilliz
 
PPT
Computer Securityyyyyyyy - Chapter 1.ppt
SolomonSB
 
PPTX
sajflsajfljsdfljslfjslfsdfas;fdsfksadfjlsdflkjslgfs;lfjlsajfl;sajfasfd.pptx
theknightme
 
PPTX
INTEGRATION OF ICT IN LEARNING AND INCORPORATIING TECHNOLOGY
kvshardwork1235
 
PM200.pptxghjgfhjghjghjghjghjghjghjghjghjghj
breadpaan921
 
Orchestrating things in Angular application
Peter Abraham
 
英国假毕业证诺森比亚大学成绩单GPA修改UNN学生卡网上可查学历成绩单
Taqyea
 
internet básico presentacion es una red global
70965857
 
introduction to networking with basics coverage
RamananMuthukrishnan
 
Presentation3gsgsgsgsdfgadgsfgfgsfgagsfgsfgzfdgsdgs.pptx
SUB03
 
Research Design - Report on seminar in thesis writing. PPTX
arvielobos1
 
Agilent Optoelectronic Solutions for Mobile Application
andreashenniger2
 
PE introd.pptxfrgfgfdgfdgfgrtretrt44t444
nepmithibai2024
 
一比一原版(LaTech毕业证)路易斯安那理工大学毕业证如何办理
Taqyea
 
DevOps Design for different deployment options
henrymails
 
L1A Season 1 ENGLISH made by A hegy fixed
toszolder91
 
unit 2_2 copy right fdrgfdgfai and sm.pptx
nepmithibai2024
 
Lec15_Mutability Immutability-converted.pptx
khanjahanzaib1
 
𝐁𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓
hokimamad0
 
The-Hidden-Dangers-of-Skipping-Penetration-Testing.pdf.pdf
naksh4thra
 
Build Fast, Scale Faster: Milvus vs. Zilliz Cloud for Production-Ready AI
Zilliz
 
Computer Securityyyyyyyy - Chapter 1.ppt
SolomonSB
 
sajflsajfljsdfljslfjslfsdfas;fdsfksadfjlsdflkjslgfs;lfjlsajfl;sajfasfd.pptx
theknightme
 
INTEGRATION OF ICT IN LEARNING AND INCORPORATIING TECHNOLOGY
kvshardwork1235
 

Building a Raspberry Pi cluster with Kubernetes, OpenFaaS and .NET