SlideShare a Scribd company logo
ASP.NET 5 auf RPI und
Docker ausführen
ASP.NET 5 Core
Jürgen Gutsch
• Microsoft MVP (ASP.NET/IIS)
• Blogger auf aspnetzone.de
• Fachautor
• Leiter der .NET User-Groups in Basel und Konstanz/Kreuzlingen
• Software-Entwickler, Berater und Trainer bei der YooApplications AG
in Basel
Agenda
• .NET Core
• ASP.NET 5
• Raspberry PI
• Prepare
• Deploy
• Run
• Docker
• Prepare
• Deploy
• Run
.NET Core
• Cross Plattform Runtime
• Runs on Windows, Linux, Mac
• Open Source
• NuGet Based
• Lightweight
• Agile and Flexible
ASP.NET 5
• Completely rewritten
• Lightweight
• Fast
• Cross Plattform
• NuGet based
ASP.NET 5 on the
Raspberry PI 2
Raspberry PI 2
• 4 Core ARM processor
• 1 GB RAM
• 40 Pins
• 4 USB
• 1 LAN
• 1 HDMI
• 1 Sound out
Installing the PI
• Downloading the latest Raspian image from raspberry.org
• Use Win32 Disk Imager to prepare a SD Card
• Install Raspian on the PI
Preparing the PI
• Add and configure a Network
• Connect to the PI via SSH e. g. via Putty
Update the System
$ sudo apt-get update
$ sudo apt-get upgrade
Install the latest Mono
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
$ echo "deb http://download.mono-project.com/repo/debian wheezy main" |
sudo tee /etc/apt/sources.list.d/mono-xamarin.list
$ sudo apt-get update
$ sudo apt-get install mono-complete
Test the Mono installation
$ mono -V
Getting ASP.NET 5 samples (optional)
$ mkdir ~/sources/aspnet5 & cd ~/sources/aspnet5
$ git clone git://github.com/aspnet/home.git
$ sh ~/sources/aspnet5/dnvminstall.sh
$ source ~/.dnx/dnvm/dnvm.sh
$ dnvm upgrade
Import needed certificates
$ sudo certmgr -ssl -m https://go.microsoft.com
$ sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net
$ sudo certmgr -ssl -m https://nuget.org
$ sudo certmgr -ssl -m https://www.myget.org
$ mozroots --import --sync
Build and install Libuv for Kestrel
$ sudo apt-get install gyp
$ wget http://dist.libuv.org/dist/v1.4.2/libuv-v1.4.2.tar.gz
$ tar -xvf libuv-v1.4.2.tar.gz
$ cd libuv-v1.4.2/
$ ./gyp_uv.py -f make -Duv_library=shared_library
$ make -C out
$ sudo cp out/Debug/lib.target/libuv.so
$ usr/lib/libuv.so. 1.4.2
$ sudo ln -s libuv.so. 1.4.2 /usr/lib/libuv.so.1
Install the latest DNVM
$ curl -sSL
https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh |
DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh
$ dnvm upgrade
Test the DNVM
$ dnvm
Install node.js
$ wget http://node-arm.herokuapp.com/node_latest_armhf.deb
$ sudo dpkg -i node_latest_armhf.deb
Install grunt & bower
$ sudo npm install -g grunt
$ sudo npm install -g bower
Possible IDEs
• Working on the PI
• vi Startup.cs
• Nano Startup.cs
• Working on Windows
• Visual Studio
• Visual Studio Code
Using Git
• Transfer files with Git
• Git is easy to use
• Git is integrated in Raspian
• Git is integrated in Visual Studio 2015
Setup a Git workspace on Windows
$ git init
$ git add –all
$ git commit -m „initial commit“
Push initially:
$ git add origin https://github.org/juergengutsch/...
$ git push -u origin master
Push the latest changes:
$ git push
Setup a Git workspace on the PI
Setup a the IDE on the PI
$ mkdir ~/projects/dnc15 & cd ~/projects/dnc15
Initial clone
$ git clone https://github.org/juergengutsch/...
Get the latest changes
$ git pull
Setup the first ASP.NET 5 App for Kestrel
• Add Dependencies:
• "Microsoft.AspNet.Hosting": "1.0.0-beta7"
• "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta7”
• Add Command:
• "kestrel": "Microsoft.AspNet.Hosting --server crosoft.AspNet.Server.Kestrel --
server.urls http://localhost:5001"
Start the sample web
Prepare the Start
$ cd ~/projects/dnc15/Sensors/src/Sensors
$ dnvm install latest
$ dnu restore
Starting the web server
$ dnx kestrel
About the GPIOs
General purpose input/output
• GPIO numbering vs. physical/pin numbering
• 2 x output 5V
• 2 x output 3.3V
• 8 x ground
• 26 x GPIO
• (2x ID EEPROM)
About the GPIOs
Working with the GPIOs
• Calling the Raspian native API to connect the GPIOs
• Using existing C# libraries to access the pins:
• Raspberry.System
• https://github.com/raspberry-sharp/raspberry-sharp
• Raspberry.IO.GeneralPurpose
• https://github.com/raspberry-sharp/raspberry-sharp-io
• RPI.GPIO
• https://github.com/fatihboy/RPI.GPIO
Good to know: Be carefully
• Read carefully the GPIO specification
• Wrong connected pins can kill the sensor or the PI
• Read carefully the sensor specification
• Be carefully with external power
Raspberry.System
Getting common information about the PI:
Raspberry.IO.GeneralPurpose
• Includes drivers to access the GPIO Pins
• Includes Pin connections
• Includes conversions between pin numberings
• ConnectorPin: Pin using physical pin numbers
• ProcessorPin: Pin using GPIO pin numbering
• Includes methods to work with the pins
Simple blinking LED
Good to know: Cheat with node.js
• node.js is pretty cool on the PI 
• It‘s easy to write
• It runs fast
• many GPIO examples written in Javascript
• node.js is a pretty awesome tool to tryout things, you want to
implement with C#
ASP.NET 5 on
Docker
Docker
• Lightweight Virtualization
• Based on Linux Hosts (Windows is coming soon)
• Use of VirtualBox to run the Linux Host on Windows
• Machine = the Host
• Image = Configuration
• Container = a running image
Docker on Windows
• Installing boot2docker (deprecated) or Docker Toolbox
• Preparing a bash to work with Docker
• Setup the environment variables (HOME and PATH)
• Configure the bash using git-bash
Docker Machines
List all available machines:
$ docker-machine ls
Create a new machine
$ docker-mashine create testmachine
Get the IP address or the config of the machine
$ docker-mashine ip testmachine
$ docker-machine config testmachine
Start a machine
$ docker-machine start testmachine
Docker Images
List all available images
$ docker images
Get an image from the Docker Hub
$ docker pull hello-world
Starts and run an image (pulls the image if needed)
$ docker run hello-world
Prepare ASP.NET for docker
• Create a new ASP.NET Project
• Add the web server Kestrel to the commands:
NuGet Packages:
"Microsoft.AspNet.Hosting": "1.0.0-beta7",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-beta7“
Command:
"kestrel": "Microsoft.AspNet.Hosting --server
Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5001"
Define the Image for ASP.NET
Add a „Dockerfile“ to the project next to the project.json:
FROM microsoft/aspnet:latest
COPY . /app
WORKDIR /app
RUN ["dnu", "restore"]
EXPOSE 5001
ENTRYPOINT ["dnx", "kestrel"]
Build and run the Image
• Move to the project folder using the bash
• Building the image:
$ docker build -t guj/aspnet5 .
• Check whether the image is registerd:
$ Docker images
• Running the image:
$ docker run -i -t -p 5001:5001 guj/aspnet5
Calling the ASP.NET Web
• Call http://<machines ip>:5001/
Passing environment variables
• Pass any argument as environment variable with docker run:
$ docker run VARNAME1=OneValue VARNAME2=AnotherValue
• Running the web in production mode:
$ docker run -i -t -p 5001:5001 guj/aspnet5 ASPNET_ENV=Production
• Running the web in staging mode:
$ docker run -i -t -p 5001:5001 guj/aspnet5 ASPNET_ENV=Staging
• Running the web in development mode:
$ docker run -i -t -p 5001:5001 guj/aspnet5 ASPNET_ENV=Development
Why using Docker?
• Fast and lightweight virtualisation
• Composing infrastructure for microservice applications
• Fast created on the dev machines
• Easily distributed images to other devs
• Fast and easy deployed to production machines
Many Thanks
• Feel free to contact me:
• Twitter.com/sharpcms
• facebook.com/juergen.gutsch
• github.com/juergengutsch
• bitucket.org/juergengutsch
• aspnetzone.de/blogs/juergengutsch

More Related Content

What's hot

Netflix Open Source: Building a Distributed and Automated Open Source Program
Netflix Open Source:  Building a Distributed and Automated Open Source ProgramNetflix Open Source:  Building a Distributed and Automated Open Source Program
Netflix Open Source: Building a Distributed and Automated Open Source Program
aspyker
 
Bosh 2-0-reloaded
Bosh 2-0-reloadedBosh 2-0-reloaded
Bosh 2-0-reloaded
Gwenn Etourneau
 
Azure Meetup Stuttgart - Multi-arch Docker images
Azure Meetup Stuttgart - Multi-arch Docker imagesAzure Meetup Stuttgart - Multi-arch Docker images
Azure Meetup Stuttgart - Multi-arch Docker images
Stefan Scherer
 
#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker
Elton Stoneman
 
Cloud Native Okteto Cloud
Cloud Native Okteto Cloud Cloud Native Okteto Cloud
Cloud Native Okteto Cloud
sangam biradar
 
From Zero Docker to Hackathon Winner - Marcos Lilljedahl and Jimena Tapia
From Zero Docker to Hackathon Winner - Marcos Lilljedahl and Jimena TapiaFrom Zero Docker to Hackathon Winner - Marcos Lilljedahl and Jimena Tapia
From Zero Docker to Hackathon Winner - Marcos Lilljedahl and Jimena Tapia
Docker, Inc.
 
Docker on Windows and Linux - Red Shirt Dev Tour
Docker on Windows and Linux - Red Shirt Dev TourDocker on Windows and Linux - Red Shirt Dev Tour
Docker on Windows and Linux - Red Shirt Dev Tour
Elton Stoneman
 
VMware, SoftLayer, OpenStack, Heat, Cloud Foundry and Docker put together
VMware, SoftLayer, OpenStack, Heat, Cloud Foundry and Docker put togetherVMware, SoftLayer, OpenStack, Heat, Cloud Foundry and Docker put together
VMware, SoftLayer, OpenStack, Heat, Cloud Foundry and Docker put together
Eduardo Patrocinio
 
You Don't Have to Start Over! A Practical Guide for Adopting Docker in the En...
You Don't Have to Start Over! A Practical Guide for Adopting Docker in the En...You Don't Have to Start Over! A Practical Guide for Adopting Docker in the En...
You Don't Have to Start Over! A Practical Guide for Adopting Docker in the En...
Docker, Inc.
 
Docker Devoxx UK - Never mind the bollocks here's the Linux Containers
Docker Devoxx UK - Never mind the bollocks here's the Linux ContainersDocker Devoxx UK - Never mind the bollocks here's the Linux Containers
Docker Devoxx UK - Never mind the bollocks here's the Linux ContainersPatrick Chanezon
 
Containerize All the (Multi-Platform) Things! by Phil Estes
Containerize All the (Multi-Platform) Things! by Phil EstesContainerize All the (Multi-Platform) Things! by Phil Estes
Containerize All the (Multi-Platform) Things! by Phil Estes
Docker, Inc.
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
Tikal Knowledge
 
#SDD2017 - Modernizing .NET Apps with Docker
#SDD2017 - Modernizing .NET Apps with Docker#SDD2017 - Modernizing .NET Apps with Docker
#SDD2017 - Modernizing .NET Apps with Docker
Elton Stoneman
 
5 cool ways to get started with Cloud Native Development ( with Okteto)
5 cool ways to get started with Cloud Native Development ( with Okteto)5 cool ways to get started with Cloud Native Development ( with Okteto)
5 cool ways to get started with Cloud Native Development ( with Okteto)
sangam biradar
 
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando MayoDocker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker, Inc.
 
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
Docker, Inc.
 
Modernizing Traditional Apps with Docker Enterprise Edition
Modernizing Traditional Apps with Docker Enterprise EditionModernizing Traditional Apps with Docker Enterprise Edition
Modernizing Traditional Apps with Docker Enterprise Edition
Elton Stoneman
 
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
Docker, Inc.
 
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM RolesMasterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Malcolm Duncanson, CISSP
 
CloudExpo 2018: Docker - Power Your Move to the Cloud
CloudExpo 2018: Docker - Power Your Move to the CloudCloudExpo 2018: Docker - Power Your Move to the Cloud
CloudExpo 2018: Docker - Power Your Move to the Cloud
Elton Stoneman
 

What's hot (20)

Netflix Open Source: Building a Distributed and Automated Open Source Program
Netflix Open Source:  Building a Distributed and Automated Open Source ProgramNetflix Open Source:  Building a Distributed and Automated Open Source Program
Netflix Open Source: Building a Distributed and Automated Open Source Program
 
Bosh 2-0-reloaded
Bosh 2-0-reloadedBosh 2-0-reloaded
Bosh 2-0-reloaded
 
Azure Meetup Stuttgart - Multi-arch Docker images
Azure Meetup Stuttgart - Multi-arch Docker imagesAzure Meetup Stuttgart - Multi-arch Docker images
Azure Meetup Stuttgart - Multi-arch Docker images
 
#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker
 
Cloud Native Okteto Cloud
Cloud Native Okteto Cloud Cloud Native Okteto Cloud
Cloud Native Okteto Cloud
 
From Zero Docker to Hackathon Winner - Marcos Lilljedahl and Jimena Tapia
From Zero Docker to Hackathon Winner - Marcos Lilljedahl and Jimena TapiaFrom Zero Docker to Hackathon Winner - Marcos Lilljedahl and Jimena Tapia
From Zero Docker to Hackathon Winner - Marcos Lilljedahl and Jimena Tapia
 
Docker on Windows and Linux - Red Shirt Dev Tour
Docker on Windows and Linux - Red Shirt Dev TourDocker on Windows and Linux - Red Shirt Dev Tour
Docker on Windows and Linux - Red Shirt Dev Tour
 
VMware, SoftLayer, OpenStack, Heat, Cloud Foundry and Docker put together
VMware, SoftLayer, OpenStack, Heat, Cloud Foundry and Docker put togetherVMware, SoftLayer, OpenStack, Heat, Cloud Foundry and Docker put together
VMware, SoftLayer, OpenStack, Heat, Cloud Foundry and Docker put together
 
You Don't Have to Start Over! A Practical Guide for Adopting Docker in the En...
You Don't Have to Start Over! A Practical Guide for Adopting Docker in the En...You Don't Have to Start Over! A Practical Guide for Adopting Docker in the En...
You Don't Have to Start Over! A Practical Guide for Adopting Docker in the En...
 
Docker Devoxx UK - Never mind the bollocks here's the Linux Containers
Docker Devoxx UK - Never mind the bollocks here's the Linux ContainersDocker Devoxx UK - Never mind the bollocks here's the Linux Containers
Docker Devoxx UK - Never mind the bollocks here's the Linux Containers
 
Containerize All the (Multi-Platform) Things! by Phil Estes
Containerize All the (Multi-Platform) Things! by Phil EstesContainerize All the (Multi-Platform) Things! by Phil Estes
Containerize All the (Multi-Platform) Things! by Phil Estes
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
 
#SDD2017 - Modernizing .NET Apps with Docker
#SDD2017 - Modernizing .NET Apps with Docker#SDD2017 - Modernizing .NET Apps with Docker
#SDD2017 - Modernizing .NET Apps with Docker
 
5 cool ways to get started with Cloud Native Development ( with Okteto)
5 cool ways to get started with Cloud Native Development ( with Okteto)5 cool ways to get started with Cloud Native Development ( with Okteto)
5 cool ways to get started with Cloud Native Development ( with Okteto)
 
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando MayoDocker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
 
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
From Arm to Z: Building, Shipping, and Running a Multi-platform Docker Swarm ...
 
Modernizing Traditional Apps with Docker Enterprise Edition
Modernizing Traditional Apps with Docker Enterprise EditionModernizing Traditional Apps with Docker Enterprise Edition
Modernizing Traditional Apps with Docker Enterprise Edition
 
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
From Fortran on the Desktop to Kubernetes in the Cloud: A Windows Migration S...
 
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM RolesMasterless Puppet Using AWS S3 Buckets and IAM Roles
Masterless Puppet Using AWS S3 Buckets and IAM Roles
 
CloudExpo 2018: Docker - Power Your Move to the Cloud
CloudExpo 2018: Docker - Power Your Move to the CloudCloudExpo 2018: Docker - Power Your Move to the Cloud
CloudExpo 2018: Docker - Power Your Move to the Cloud
 

Viewers also liked

ASP.NET 5 on the Raspberry PI 2
ASP.NET 5 on the Raspberry PI 2ASP.NET 5 on the Raspberry PI 2
ASP.NET 5 on the Raspberry PI 2
Jürgen Gutsch
 
Mobile Games mit Windows Azure
Mobile Games mit Windows AzureMobile Games mit Windows Azure
Mobile Games mit Windows Azure
Jürgen Gutsch
 
Html 5 magic
Html 5 magicHtml 5 magic
Html 5 magic
Jürgen Gutsch
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Dr. John Tunnicliffe
 
iks auf der gearconf 2012: Clean Code - Von der Lehre in den Alltag
iks auf der gearconf 2012: Clean Code - Von der Lehre in den Alltagiks auf der gearconf 2012: Clean Code - Von der Lehre in den Alltag
iks auf der gearconf 2012: Clean Code - Von der Lehre in den Alltag
IKS Gesellschaft für Informations- und Kommunikationssysteme mbH
 
Clean Code
Clean CodeClean Code
Clean Code
Hendrik Ebel
 
Continuous integration eine Einführung für Unkundige
Continuous integration   eine Einführung für UnkundigeContinuous integration   eine Einführung für Unkundige
Continuous integration eine Einführung für Unkundige
abuwipp
 
Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...
Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...
Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...
Jürgen Gutsch
 
Clean Code Workshop - Agile Bodensee Konferenz 2013
Clean Code Workshop - Agile Bodensee Konferenz 2013Clean Code Workshop - Agile Bodensee Konferenz 2013
Clean Code Workshop - Agile Bodensee Konferenz 2013
Jürgen Gutsch
 

Viewers also liked (9)

ASP.NET 5 on the Raspberry PI 2
ASP.NET 5 on the Raspberry PI 2ASP.NET 5 on the Raspberry PI 2
ASP.NET 5 on the Raspberry PI 2
 
Mobile Games mit Windows Azure
Mobile Games mit Windows AzureMobile Games mit Windows Azure
Mobile Games mit Windows Azure
 
Html 5 magic
Html 5 magicHtml 5 magic
Html 5 magic
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
 
iks auf der gearconf 2012: Clean Code - Von der Lehre in den Alltag
iks auf der gearconf 2012: Clean Code - Von der Lehre in den Alltagiks auf der gearconf 2012: Clean Code - Von der Lehre in den Alltag
iks auf der gearconf 2012: Clean Code - Von der Lehre in den Alltag
 
Clean Code
Clean CodeClean Code
Clean Code
 
Continuous integration eine Einführung für Unkundige
Continuous integration   eine Einführung für UnkundigeContinuous integration   eine Einführung für Unkundige
Continuous integration eine Einführung für Unkundige
 
Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...
Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...
Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...
 
Clean Code Workshop - Agile Bodensee Konferenz 2013
Clean Code Workshop - Agile Bodensee Konferenz 2013Clean Code Workshop - Agile Bodensee Konferenz 2013
Clean Code Workshop - Agile Bodensee Konferenz 2013
 

Similar to ASP.NET 5 auf Raspberry PI & docker

Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chefLeanDog
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
biicode
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
Liang Bo
 
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015
Alex S
 
Deep Dive into the AOSP
Deep Dive into the AOSPDeep Dive into the AOSP
Deep Dive into the AOSP
Dr. Ketan Parmar
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. Ansible
Alberto Molina Coballes
 
Automation in the Small: Code to Cloud
Automation in the Small: Code to CloudAutomation in the Small: Code to Cloud
Automation in the Small: Code to Cloud
Jay Barker
 
Puppet getting started by Dirk Götz
Puppet getting started by Dirk GötzPuppet getting started by Dirk Götz
Puppet getting started by Dirk Götz
NETWAYS
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
Pablo Godel
 
1. react - native: setup
1. react - native: setup1. react - native: setup
1. react - native: setup
Govind Prasad Gupta
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
Steffen Gebert
 
Drone your Ansible
Drone your AnsibleDrone your Ansible
Drone your Ansible
Dennis Rowe
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
Francesco Bruni
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
Robert Lujo
 
Python+gradle
Python+gradlePython+gradle
Python+gradle
Stephen Holsapple
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
Arto Artnik
 
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
Leonid Vasilyev  "Building, deploying and running production code at Dropbox"Leonid Vasilyev  "Building, deploying and running production code at Dropbox"
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
IT Event
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
Miguel Zuniga
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
Henry Schreiner
 

Similar to ASP.NET 5 auf Raspberry PI & docker (20)

Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chef
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015
 
Deep Dive into the AOSP
Deep Dive into the AOSPDeep Dive into the AOSP
Deep Dive into the AOSP
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. Ansible
 
Automation in the Small: Code to Cloud
Automation in the Small: Code to CloudAutomation in the Small: Code to Cloud
Automation in the Small: Code to Cloud
 
Puppet getting started by Dirk Götz
Puppet getting started by Dirk GötzPuppet getting started by Dirk Götz
Puppet getting started by Dirk Götz
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
1. react - native: setup
1. react - native: setup1. react - native: setup
1. react - native: setup
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
 
Drone your Ansible
Drone your AnsibleDrone your Ansible
Drone your Ansible
 
Continuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and JenkinsContinuous Integration/Deployment with Docker and Jenkins
Continuous Integration/Deployment with Docker and Jenkins
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 
Python+gradle
Python+gradlePython+gradle
Python+gradle
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
Leonid Vasilyev  "Building, deploying and running production code at Dropbox"Leonid Vasilyev  "Building, deploying and running production code at Dropbox"
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
 
Mastering composer
Mastering composerMastering composer
Mastering composer
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
 

Recently uploaded

Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
CIOWomenMagazine
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
harveenkaur52
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
cuobya
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
Trish Parr
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
cuobya
 
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
JeyaPerumal1
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 

Recently uploaded (20)

Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
 
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
2.Cellular Networks_The final stage of connectivity is achieved by segmenting...
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 

ASP.NET 5 auf Raspberry PI & docker

  • 1. ASP.NET 5 auf RPI und Docker ausführen ASP.NET 5 Core
  • 2. Jürgen Gutsch • Microsoft MVP (ASP.NET/IIS) • Blogger auf aspnetzone.de • Fachautor • Leiter der .NET User-Groups in Basel und Konstanz/Kreuzlingen • Software-Entwickler, Berater und Trainer bei der YooApplications AG in Basel
  • 3. Agenda • .NET Core • ASP.NET 5 • Raspberry PI • Prepare • Deploy • Run • Docker • Prepare • Deploy • Run
  • 4. .NET Core • Cross Plattform Runtime • Runs on Windows, Linux, Mac • Open Source • NuGet Based • Lightweight • Agile and Flexible
  • 5. ASP.NET 5 • Completely rewritten • Lightweight • Fast • Cross Plattform • NuGet based
  • 6. ASP.NET 5 on the Raspberry PI 2
  • 7. Raspberry PI 2 • 4 Core ARM processor • 1 GB RAM • 40 Pins • 4 USB • 1 LAN • 1 HDMI • 1 Sound out
  • 8. Installing the PI • Downloading the latest Raspian image from raspberry.org • Use Win32 Disk Imager to prepare a SD Card • Install Raspian on the PI
  • 9. Preparing the PI • Add and configure a Network • Connect to the PI via SSH e. g. via Putty
  • 10. Update the System $ sudo apt-get update $ sudo apt-get upgrade
  • 11. Install the latest Mono $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF $ echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list $ sudo apt-get update $ sudo apt-get install mono-complete
  • 12. Test the Mono installation $ mono -V
  • 13. Getting ASP.NET 5 samples (optional) $ mkdir ~/sources/aspnet5 & cd ~/sources/aspnet5 $ git clone git://github.com/aspnet/home.git $ sh ~/sources/aspnet5/dnvminstall.sh $ source ~/.dnx/dnvm/dnvm.sh $ dnvm upgrade
  • 14. Import needed certificates $ sudo certmgr -ssl -m https://go.microsoft.com $ sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net $ sudo certmgr -ssl -m https://nuget.org $ sudo certmgr -ssl -m https://www.myget.org $ mozroots --import --sync
  • 15. Build and install Libuv for Kestrel $ sudo apt-get install gyp $ wget http://dist.libuv.org/dist/v1.4.2/libuv-v1.4.2.tar.gz $ tar -xvf libuv-v1.4.2.tar.gz $ cd libuv-v1.4.2/ $ ./gyp_uv.py -f make -Duv_library=shared_library $ make -C out $ sudo cp out/Debug/lib.target/libuv.so $ usr/lib/libuv.so. 1.4.2 $ sudo ln -s libuv.so. 1.4.2 /usr/lib/libuv.so.1
  • 16. Install the latest DNVM $ curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh $ dnvm upgrade Test the DNVM $ dnvm
  • 17. Install node.js $ wget http://node-arm.herokuapp.com/node_latest_armhf.deb $ sudo dpkg -i node_latest_armhf.deb
  • 18. Install grunt & bower $ sudo npm install -g grunt $ sudo npm install -g bower
  • 19. Possible IDEs • Working on the PI • vi Startup.cs • Nano Startup.cs • Working on Windows • Visual Studio • Visual Studio Code
  • 20. Using Git • Transfer files with Git • Git is easy to use • Git is integrated in Raspian • Git is integrated in Visual Studio 2015
  • 21. Setup a Git workspace on Windows $ git init $ git add –all $ git commit -m „initial commit“ Push initially: $ git add origin https://github.org/juergengutsch/... $ git push -u origin master Push the latest changes: $ git push
  • 22. Setup a Git workspace on the PI Setup a the IDE on the PI $ mkdir ~/projects/dnc15 & cd ~/projects/dnc15 Initial clone $ git clone https://github.org/juergengutsch/... Get the latest changes $ git pull
  • 23. Setup the first ASP.NET 5 App for Kestrel • Add Dependencies: • "Microsoft.AspNet.Hosting": "1.0.0-beta7" • "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta7” • Add Command: • "kestrel": "Microsoft.AspNet.Hosting --server crosoft.AspNet.Server.Kestrel -- server.urls http://localhost:5001"
  • 24. Start the sample web Prepare the Start $ cd ~/projects/dnc15/Sensors/src/Sensors $ dnvm install latest $ dnu restore Starting the web server $ dnx kestrel
  • 25. About the GPIOs General purpose input/output • GPIO numbering vs. physical/pin numbering • 2 x output 5V • 2 x output 3.3V • 8 x ground • 26 x GPIO • (2x ID EEPROM)
  • 27. Working with the GPIOs • Calling the Raspian native API to connect the GPIOs • Using existing C# libraries to access the pins: • Raspberry.System • https://github.com/raspberry-sharp/raspberry-sharp • Raspberry.IO.GeneralPurpose • https://github.com/raspberry-sharp/raspberry-sharp-io • RPI.GPIO • https://github.com/fatihboy/RPI.GPIO
  • 28. Good to know: Be carefully • Read carefully the GPIO specification • Wrong connected pins can kill the sensor or the PI • Read carefully the sensor specification • Be carefully with external power
  • 30. Raspberry.IO.GeneralPurpose • Includes drivers to access the GPIO Pins • Includes Pin connections • Includes conversions between pin numberings • ConnectorPin: Pin using physical pin numbers • ProcessorPin: Pin using GPIO pin numbering • Includes methods to work with the pins
  • 32. Good to know: Cheat with node.js • node.js is pretty cool on the PI  • It‘s easy to write • It runs fast • many GPIO examples written in Javascript • node.js is a pretty awesome tool to tryout things, you want to implement with C#
  • 34. Docker • Lightweight Virtualization • Based on Linux Hosts (Windows is coming soon) • Use of VirtualBox to run the Linux Host on Windows • Machine = the Host • Image = Configuration • Container = a running image
  • 35. Docker on Windows • Installing boot2docker (deprecated) or Docker Toolbox • Preparing a bash to work with Docker • Setup the environment variables (HOME and PATH) • Configure the bash using git-bash
  • 36. Docker Machines List all available machines: $ docker-machine ls Create a new machine $ docker-mashine create testmachine Get the IP address or the config of the machine $ docker-mashine ip testmachine $ docker-machine config testmachine Start a machine $ docker-machine start testmachine
  • 37. Docker Images List all available images $ docker images Get an image from the Docker Hub $ docker pull hello-world Starts and run an image (pulls the image if needed) $ docker run hello-world
  • 38. Prepare ASP.NET for docker • Create a new ASP.NET Project • Add the web server Kestrel to the commands: NuGet Packages: "Microsoft.AspNet.Hosting": "1.0.0-beta7", "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta7“ Command: "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5001"
  • 39. Define the Image for ASP.NET Add a „Dockerfile“ to the project next to the project.json: FROM microsoft/aspnet:latest COPY . /app WORKDIR /app RUN ["dnu", "restore"] EXPOSE 5001 ENTRYPOINT ["dnx", "kestrel"]
  • 40. Build and run the Image • Move to the project folder using the bash • Building the image: $ docker build -t guj/aspnet5 . • Check whether the image is registerd: $ Docker images • Running the image: $ docker run -i -t -p 5001:5001 guj/aspnet5
  • 41. Calling the ASP.NET Web • Call http://<machines ip>:5001/
  • 42. Passing environment variables • Pass any argument as environment variable with docker run: $ docker run VARNAME1=OneValue VARNAME2=AnotherValue • Running the web in production mode: $ docker run -i -t -p 5001:5001 guj/aspnet5 ASPNET_ENV=Production • Running the web in staging mode: $ docker run -i -t -p 5001:5001 guj/aspnet5 ASPNET_ENV=Staging • Running the web in development mode: $ docker run -i -t -p 5001:5001 guj/aspnet5 ASPNET_ENV=Development
  • 43. Why using Docker? • Fast and lightweight virtualisation • Composing infrastructure for microservice applications • Fast created on the dev machines • Easily distributed images to other devs • Fast and easy deployed to production machines
  • 44. Many Thanks • Feel free to contact me: • Twitter.com/sharpcms • facebook.com/juergen.gutsch • github.com/juergengutsch • bitucket.org/juergengutsch • aspnetzone.de/blogs/juergengutsch

Editor's Notes

  1. apt-get mono ist zu alt aktuelles mono läuft nicht auf RPIB+ Speicherproblem MONO 4.0
  2. apt-get ist zu alt
  3. Demo?