SlideShare a Scribd company logo
Container Orchestration for
.NET Developers
Mike Melusky – Philly.NET
About me
• Michael Melusky (@mrjavascript)
• Lives in Harrisburg, PA
• Software Developer for Audacious Inquiry in Baltimore, MD
• College Professor (Penn State / Franklin and Marshall)
• BBQ and Lawn Care
• XBOX One
• Regular speaker at Philly.NET events (Code Camps and Monthlies)
What are we talking about tonight?
• “Dot Net”
• Amazon AWS and Microsoft Azure
• Serverless Computing
• AWS Lambdas and Azure Functions
• Docker
• Kubernetes
• Container Registries (ACR and ECR)
• Containers as a Service with Amazon ECS and Microsoft AKS
Amazon v. Microsoft
• I’m not here to cheerlead for either Microsoft or Azure
• If you are tasked with the decision of migrating from a hosted region
to the cloud
• Please don’t use this talk as sole factor in your decision 
• This decision takes significant research
• Weighing pros and cons
Themes for Tonight
• Serverless Architecture
• Being able to deploy a product without having to worry about
underlying infrastructure
• Portability
• If you ever need to migrate from Amazon to Microsoft or vice versa…
• How difficult will that be?
Dot Net
Dot Net
• I spoke here (at Code Camp) back in November
• Showcased containerization of numerous technologies (Java, Python
et al.)
• Focusing solely on “Dot Net” this evening
• What is Dot Net?
Dot Net
• Software Framework from Microsoft
• You can use it for building any type of app
• Mobile, Web (MVC), Micro-Service
• Two flavors:
• .NET Framework
• .NET Core
• What is the difference between each?
.NET Framework
• Framework from Microsoft
• Runs primarily on Windows systems
• Does not run on Linux
• Latest version is 4.8 (April 2019)
• Does not support C# 8.0
.NET Core
• Framework from Microsoft
• Cross-platform (can run on Windows, Linux and Mac
OSX)
• Current version is 3.1
• C# 8.0 is supported!
.NET
Standard
• .NET Standard is a set of APIs that all .NET platforms must implement
Why .NET Core?
• We are focusing on .NET Core tonight
• Main advantage: cross-platform!
• Let’s look at a .NET Core MVC app
• ** DEMO **
Deploying .NET Core
Applications
Traditional
“Web Deploy”
• Traditionally we can deploy a .NET
Core application to IIS server
• Right click on project and “deploy”
• How else can we deploy?
• Where can we deploy to?
Cloud Providers
Cloud Providers
• Tonight we’re going to look at two cloud providers
• Amazon and Microsoft
• Amazon AWS
• Microsoft Azure
Amazon AWS
• On-demand cloud computing platform
• Servers in 22 geographic regions
• 60+ managed services
• Managed services such as services for
queueing, relational database services,
caching
• Two managed services we are
interested in for tonight:
• AWS Lambdas
• Containerization Services
Microsoft Azure
• Cloud computing platform
• Servers available in 52 geographic
regions
• Multiple managed services very similar
to AWS
• Such as Cosmos DB, Azure Cache, Azure
Search, et al
• Of note for tonight:
• Azure Functions
• Azure Container Services
Functions
Functions
• Relate an input to an output
• Examples:
• X^2 (squaring)
• X^3 + 1
• Trigonometric functions (sin, cos, tan)
How does this relate to Azure and AWS?
• Both cloud providers offers “functions”
• Allows you to run a “quick piece of code” on Microsoft/Amazon’s
hardware
• Azure Functions: runtime cannot exceed 5 minutes
• AWS Lambdas: runtime cannot exceed 15 minutes
• Let’s look at both providers
Example Function
• Let’s look at a sample function
• Calculate area of a circle
Creating Azure Function
• Let’s implement the previous
example with an Azure Function
• Can write the function in a variety
of languages
• Let’s use .NET Core
• Install “Azure Development”
option with Visual Studio
• ** DEMO **
Creating AWS Lambda
• Now let’s do the same with AWS!
• Like Azure, many languages are supported (Java, Python, etc.)
• Like before, let’s use .NET Core
• The Visual Studio project templates come from AWS Toolkit for Visual
Studio: https://aws.amazon.com/visualstudio/
• ** DEMO **
Compare and Contrast
What’s the difference between the two?
• We implemented the same function for different cloud providers
• Both are .NET Core implementations
• Looking at the code can the AWS Lambda run in Azure Functions?
• And vice versa?
Functions in Cloud Providers
• Functions/Lambdas are provider dependent
• Hypothetically consider the case of an AWS customer
• With 100+ Lambdas
• Requirement to migrate the cloud infrastructure to Azure
• How will the lambdas transfer?
• (Spoiler alert: rewrite)
“Functions as a Service” (FaaS)
• Both AWS Lambdas and Azure Functions fall under the “Functions as
a Service” model (FaaS)
• Developers simply write the code and run the application
• Don’t have to worry about the infrastructure management
Acronyms
• IaaS – Infrastructure as a Service
• Caas – Containers as a Service
• PaaS – Platform as a Service
• FaaS – Functions as a Service
Serverless Architecture
• Cloud provider runs the server
• Customer pays for the resources that are consumed
Benefits of Serverless Computing
• As a developer (that’s you), don’t need to worry about the following:
• Security updates
• Anti-virus software
• Operating System Updates
• Hardware Upgrades
• You simply write, deploy and run code!
Serverless Computing
• Since we identified that the servers are managed by the cloud
provider
• What do we know about the underlying infrastructure?
• Mostly abstracted, but we can assume:
• Linux!
• (Azure has Windows in Preview discussion coming soon)
Linux
• Since these host servers run Linux,
the code we write needs to run on
this operating system
• Main reason why we want .NET
Core!
• .NET Core is cross platform
(Windows, Mac OSX, Linux)
• You can’t write AWS Lambdas
using .NET Framework 4.8
TL;DR; version
• As developers, we like Serverless Computing
• If we’re working with .NET Core deployment is a breeze
• Only downside so far?
• Lambdas and platforms are provider dependent
• Is there a solution where we have serverless benefits but also cloud
provider independence?
Before we get to Docker…
Azure Service Fabric
• Platform as a Service (PaaS) from
Microsoft
• Allows you to build and deploy
micro-services with ease
• Runs in containers
• Facilitates solutions for
communication between micro-
services
• Also facilitates container
orchestration
Building a Backend
• Choice for building a backend API for front end apps
• Technically you can run your backend API in AWS Lambda
• Not necessarily purpose of Lambda, meant for quick, serverless code
invocations
• Can use Azure Service Fabric for the backend
• Main downside of Azure Service Fabric?
• You are locked in with Azure
• Is there a portable alternative?
Docker
Docker
• Docker is software which provides
the concept of application
containerization
• Uses OS virtualization under the
hood
Containerization?
• A technique which allows you to deploy distributed applications
without launching a virtual machine for each app!
• Each application (or instance of the application) is isolated from each
other
• All code and resources and configuration needed to run the
application is part of the container
• Containers differ from virtual machines
Virtual Machines vs. Containers
Docker
• Can install the Docker Engine from Docker Hub
• Docker Desktop is available for Mac OSX and Windows
• With Docker for Windows, Windows 10 Professional is required
• Virtualization is needed
Docker Images
Docker Images
• Docker Containers are instances of Docker Images
• So for us to run our applications in the Docker Engine, we will need to
build a Docker Image (coming soon)
• For now let’s look at the Docker Command Line Interface (CLI)
• As well as some common commands
“docker images”
• Will show all “top level” images
• Included in response is the tag, the size, creation date
“docker ps”
• Lists all running containers
• If you want to see all containers (e.g. stopped containers)
• docker ps –a
Running a Docker Image
• docker run
• Allows you to run container using an image
• docker stop
• Allows you to stop a particular container
Building Docker Images
Building the .NET Core Image
• To run the .NET Core application
in Docker we need to build an
image to run on the Docker
engine
• For building images, we are
required to provide a Dockerfile
Dockerfile
• A Dockerfile is a file that lists instructions needed for building a image
• Based off a source image
• You can run OS commands in the Dockerfile as well (move, copy, et
al.)
• You can also expose any port numbers your application uses
Dockerfile ports
• Generally for web applications we expose either 80 or 8080
• We can also expose the secure ports if we want as well (443 and
8443)
• Docker allows you to port forward from a source port
• For instance if you want to expose 5050 as your external port and
route to the internal (exposed) port 80, Docker allows this
• Incredibly useful for cloud providers where AWS/Azure will assign
these ports dynamically at runtime
Dockerfile and .NET Core
• Let’s build our application for Docker
• That is produce an image using a Dockerfile
• And then run the image on the Docker engine
• ** DEMO **
Docker and .NET
Docker and .NET
• With the Docker image we just build, we build for .NET Core
• With this .NET Core image, the image can run on any host operating
system (Windows, Linux, et al.)
• What about .NET Framework (4.X)?
• Yes, you can containerize a .NET Framework application!
• However this image can only run on Docker Engine on Microsoft
Windows hosts
Cloud Providers and
Containers
Containers as a Service (CaaS)
• We saw Functions as a Service earlier tonight
• Do cloud providers have the same ability except being able to run
Docker containers on demand?
• Yes!
Kubernetes
Kubernetes (K8S)
• Open-source container
orchestration software
• Will monitor the health of the
containers
• If a container dies, Kubernetes will
restart the container
Kubernetes
• Used in many applications
• For instance, Red Hat’s OpenShift platform is based on Kubernetes
• The Telcom industry uses it for cable management and routing!
• Both Microsoft and Amazon offer managed services for Kubernetes
clusters
• Amazon offers EKS (Elastic Kubernetes Service)
• Azure offers AKS (Azure Kubernetes Service)
Wait…
• The Meetup.com description for this event
• Listed “No Kubernetes Required!”
• Unfortunately, we will be using some K8 tonight
• At least with Azure
Containers as a Service
(CaaS)
Containers as a Service (CaaS)
• Both Amazon and Microsoft offer the managed service for running
your containers
• Both Microsoft and Amazon offer two different managed services for
each
• One managed service is based on proprietary technology
• The other managed service is based on K8
• Let’s look in the console for each
• ** DEMO **
Containers and Cloud Providers
Provider Managed Service Service Type Notes
Amazon
Elastic Container
Service (ECS)
Proprietary
Elastic Kubernetes
Service (EKS)
Kubernetes
Microsoft
Azure Container
Service (ACS)
Proprietary End of life
1/31/2020
Azure Kubernetes
Service (AKS)
Kubernetes
About Me
• I personally use AWS for both full time job and side projects
• ECS is used actively in each
• When preparing this session, I emailed a Microsoft Developer
• I was able to contact someone on the Azure Product Team
• Azure team member was confused about this presentation, and told
me to learn Kubernetes
• Microsoft is sunsetting (end of month) Azure Container Services (ACS)
and is mandating customers migrate to Azure Kubernetes Services
(AKS)
Amazon and ECS
• What I also found out from this exchange
• Amazon considers ECS a legacy product
• Eventually customers will presumably need to migrate to EKS
• If Microsoft’s decision is any predictor of future events
Plan for Remainder of
Tonight
Plan for Tonight
• Originally was planning to show both ECS and ACS
• Technically I can still demonstrate ACS since it’s available for one
more week
• But there would be more value doing the same demonstration using
AKS
Amazon AWS - ECS
• Proprietary solution from Amazon to
dynamically run and orchestrate
Docker containers
• You can specify how many instances
of the application you want to run
• ECS will automatically scale up and
down the instances based on load
• Make sure your code can run in
parallel and be careful about mutual
exclusion and locking!
Amazon AWS ECS
• For running Docker images in the cloud
• Amazon needs to be able to pull your image from a repository
• You have a few options
• If your image is public, you can simply push to Docker Hub
• However most code is proprietary, and the general public shouldn’t
be allowed to pull the image
Amazon ECR
Amazon ECR
• Elastic Container Registry
• Managed service from Amazon to
store Docker images (as well as
their tags)
• Microsoft offers a similar
managed service
• Azure Container Registry (ACR)
Pushing to container registry
• To push to ECR
• (1) Build the image (using docker build)
• (2) Obtain credentials from Amazon (with docker login command)
• (3) Optionally tag the image (otherwise latest is default tag)
• (4) Push the Image to ECR (or ACR) using docker push
• ** DEMO **
Deployment with ECS
Amazon ECS tasks
• With ECS, each instance of the Docker image is based off an ECS Task
• An ECS task specifies:
• Which Docker image is used
• How much memory each instance
• How much vCPU should be allocated
• Let’s create our ECS task for the .NET Core application
• ** DEMO **
AWS Fargate
Running the task in ECS
• With our ECS task created, now we can create the service in ECS
• When we do this, we need to specify the Docker Engine the task will
run against
• Amazon gives you two options
• Docker Engine on an EC2 instance you provide (virtual machine)
• AWS Fargate (serverless!)
AWS Fargate
• Serverless approach for running Docker
images
• Containers run on Amazon’s underlying
Docker Engine
• Under the hood: LINUX
• With regards to .NET, .NET Core will work
with Fargate since it’s cross platform
• .NET Framework 4.8 WILL NOT WORK with
Fargate since that requires Windows
Docker Engine
• You can use ECS with .NET Framework but a
backing Windows EC2 instance is needed!
AWS Fargate
• Let’s create a service now in ECS for our task
• And run our .NET Core application in AWS Fargate
• ** DEMO **
Let’s Do the Same With
Azure!
Similarities to AWS
• As mentioned earlier, Microsoft is ending Azure Container Services
(ACS)
• We need to spin up a Kubernetes cluster in AKS
• There are some similar steps however
• Let’s push our Docker image to Azure Container Registry (ACR)
• Let’s then deploy our image into AKS (using their serverless runtime
called Azure Container Instances or ACI)
• ** DEMO **
Wrapping Up
Serverless Matrix
Provider Managed Service Type Host OS Notes
Amazon
AWS Lambda FaaS Linux
ECS/EKS Fargate CaaS Linux Fargate support for
EKS added 12/2019
Microsoft
Azure Functions FaaS Linux
AKS with Container
Instances
CaaS Linux and Windows Windows is in
Preview
Next Steps for Me
• Since I use AWS
• Spin up EKS cluster for personal micro-services
• Test and eventually cut over from ECS
• But will bite the bullet and learn Kubernetes
Learning K8 on Azure
• Kubernetes Learning Path 2.0:
• https://azure.microsoft.com/en-us/resources/kubernetes-learning-
path/
Thank you for coming
Thank you for Coming
• Visual Studio Solution (code) is on Github
• https://github.com/mrjavascript/phillynet_jan2020
• Slides on SlideShare
• @mrjavascript

More Related Content

What's hot

.NET? MonoDroid Does
.NET? MonoDroid Does.NET? MonoDroid Does
.NET? MonoDroid Does
Kevin McMahon
 
Don Wibier
Don WibierDon Wibier
Don Wibier
CodeFest
 
Microsoft ASP.NET 5 - The new kid on the block
Microsoft ASP.NET 5 - The new kid on the block Microsoft ASP.NET 5 - The new kid on the block
Microsoft ASP.NET 5 - The new kid on the block
Christos Matskas
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
Gary Pedretti
 
Serverless Architecture Patterns - Manoj Ganapathi - Serverless Summit
Serverless Architecture Patterns - Manoj Ganapathi - Serverless SummitServerless Architecture Patterns - Manoj Ganapathi - Serverless Summit
Serverless Architecture Patterns - Manoj Ganapathi - Serverless Summit
CodeOps Technologies LLP
 
Run your Dockerized ASP.NET application on Windows and Linux!
Run your Dockerized ASP.NET application on Windows and Linux!Run your Dockerized ASP.NET application on Windows and Linux!
Run your Dockerized ASP.NET application on Windows and Linux!
Alex Thissen
 
Start with Angular framework
Start with Angular frameworkStart with Angular framework
Start with Angular framework
Knoldus Inc.
 
Coordinating Micro-Services with Spring Cloud Contract
Coordinating Micro-Services with Spring Cloud ContractCoordinating Micro-Services with Spring Cloud Contract
Coordinating Micro-Services with Spring Cloud Contract
Omri Spector
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBTDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
Valeri Karpov
 
A Whirldwind Tour of ASP.NET 5
A Whirldwind Tour of ASP.NET 5A Whirldwind Tour of ASP.NET 5
A Whirldwind Tour of ASP.NET 5
Steven Smith
 
EF Core (RC2)
EF Core (RC2)EF Core (RC2)
EF Core (RC2)
Ido Flatow
 
Serverless Summit - Quiz
Serverless Summit - QuizServerless Summit - Quiz
Serverless Summit - Quiz
CodeOps Technologies LLP
 
Angular Owin Katana TypeScript
Angular Owin Katana TypeScriptAngular Owin Katana TypeScript
Angular Owin Katana TypeScript
Justin Wendlandt
 
Asynchronous programming in ASP.NET
Asynchronous programming in ASP.NETAsynchronous programming in ASP.NET
Asynchronous programming in ASP.NET
Alex Thissen
 
SPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowSPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flow
Vincent Biret
 
Build a Chatbot in Ten Minutes - Dave Kerr - Serverless Summit
Build a Chatbot in Ten Minutes - Dave Kerr - Serverless SummitBuild a Chatbot in Ten Minutes - Dave Kerr - Serverless Summit
Build a Chatbot in Ten Minutes - Dave Kerr - Serverless Summit
CodeOps Technologies LLP
 
ASP.NET
ASP.NETASP.NET
What's new in ASP.NET vNext
What's new in ASP.NET vNextWhat's new in ASP.NET vNext
What's new in ASP.NET vNext
Gunnar Peipman
 
Meteor Angular
Meteor AngularMeteor Angular
Meteor Angular
Pavel Kurnosov
 
Microservice - All is Small, All is Well?
Microservice - All is Small, All is Well?Microservice - All is Small, All is Well?
Microservice - All is Small, All is Well?
Eberhard Wolff
 

What's hot (20)

.NET? MonoDroid Does
.NET? MonoDroid Does.NET? MonoDroid Does
.NET? MonoDroid Does
 
Don Wibier
Don WibierDon Wibier
Don Wibier
 
Microsoft ASP.NET 5 - The new kid on the block
Microsoft ASP.NET 5 - The new kid on the block Microsoft ASP.NET 5 - The new kid on the block
Microsoft ASP.NET 5 - The new kid on the block
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
 
Serverless Architecture Patterns - Manoj Ganapathi - Serverless Summit
Serverless Architecture Patterns - Manoj Ganapathi - Serverless SummitServerless Architecture Patterns - Manoj Ganapathi - Serverless Summit
Serverless Architecture Patterns - Manoj Ganapathi - Serverless Summit
 
Run your Dockerized ASP.NET application on Windows and Linux!
Run your Dockerized ASP.NET application on Windows and Linux!Run your Dockerized ASP.NET application on Windows and Linux!
Run your Dockerized ASP.NET application on Windows and Linux!
 
Start with Angular framework
Start with Angular frameworkStart with Angular framework
Start with Angular framework
 
Coordinating Micro-Services with Spring Cloud Contract
Coordinating Micro-Services with Spring Cloud ContractCoordinating Micro-Services with Spring Cloud Contract
Coordinating Micro-Services with Spring Cloud Contract
 
TDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDBTDD a REST API With Node.js and MongoDB
TDD a REST API With Node.js and MongoDB
 
A Whirldwind Tour of ASP.NET 5
A Whirldwind Tour of ASP.NET 5A Whirldwind Tour of ASP.NET 5
A Whirldwind Tour of ASP.NET 5
 
EF Core (RC2)
EF Core (RC2)EF Core (RC2)
EF Core (RC2)
 
Serverless Summit - Quiz
Serverless Summit - QuizServerless Summit - Quiz
Serverless Summit - Quiz
 
Angular Owin Katana TypeScript
Angular Owin Katana TypeScriptAngular Owin Katana TypeScript
Angular Owin Katana TypeScript
 
Asynchronous programming in ASP.NET
Asynchronous programming in ASP.NETAsynchronous programming in ASP.NET
Asynchronous programming in ASP.NET
 
SPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowSPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flow
 
Build a Chatbot in Ten Minutes - Dave Kerr - Serverless Summit
Build a Chatbot in Ten Minutes - Dave Kerr - Serverless SummitBuild a Chatbot in Ten Minutes - Dave Kerr - Serverless Summit
Build a Chatbot in Ten Minutes - Dave Kerr - Serverless Summit
 
ASP.NET
ASP.NETASP.NET
ASP.NET
 
What's new in ASP.NET vNext
What's new in ASP.NET vNextWhat's new in ASP.NET vNext
What's new in ASP.NET vNext
 
Meteor Angular
Meteor AngularMeteor Angular
Meteor Angular
 
Microservice - All is Small, All is Well?
Microservice - All is Small, All is Well?Microservice - All is Small, All is Well?
Microservice - All is Small, All is Well?
 

Similar to Container Orchestration for .NET Developers

(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
Amazon Web Services
 
Docker presentation for sharing
Docker presentation   for sharingDocker presentation   for sharing
Docker presentation for sharing
Waruna Viraj Perera
 
Containers and Docker
Containers and DockerContainers and Docker
Containers and Docker
Damian T. Gordon
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
dotCloud
 
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSCloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
AWS Vietnam Community
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
Aditya Konarde
 
Moving microsoft .net applications one container at a time
 Moving microsoft .net applications one container at a time  Moving microsoft .net applications one container at a time
Moving microsoft .net applications one container at a time
Amazon Web Services
 
Containers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellContainers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshell
Eugene Fedorenko
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
damovsky
 
AWS Summit Auckland - Moving MS .NET Applications One Container at a Time
AWS Summit Auckland - Moving MS .NET Applications One Container at a TimeAWS Summit Auckland - Moving MS .NET Applications One Container at a Time
AWS Summit Auckland - Moving MS .NET Applications One Container at a Time
Amazon Web Services
 
Docker
DockerDocker
Docker
Tomy Rhymond
 
OpenStack Summit
OpenStack SummitOpenStack Summit
OpenStack Summit
Docker, Inc.
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
Web à Québec
 
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
Amazon Web Services
 
Serverless brewbox
Serverless   brewboxServerless   brewbox
Serverless brewbox
Lino Telera
 
Docker slides
Docker slidesDocker slides
Docker slides
Jyotsna Raghuraman
 
AWS Innovate: Moving Microsoft .Net applications one container at a time - Da...
AWS Innovate: Moving Microsoft .Net applications one container at a time - Da...AWS Innovate: Moving Microsoft .Net applications one container at a time - Da...
AWS Innovate: Moving Microsoft .Net applications one container at a time - Da...
Amazon Web Services Korea
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realists
Karthik Gaekwad
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Peng Xiao
 
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
damovsky
 

Similar to Container Orchestration for .NET Developers (20)

(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
(DEV302) Hosting ASP.Net 5 Apps in AWS with Docker & AWS CodeDeploy
 
Docker presentation for sharing
Docker presentation   for sharingDocker presentation   for sharing
Docker presentation for sharing
 
Containers and Docker
Containers and DockerContainers and Docker
Containers and Docker
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
 
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSCloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Moving microsoft .net applications one container at a time
 Moving microsoft .net applications one container at a time  Moving microsoft .net applications one container at a time
Moving microsoft .net applications one container at a time
 
Containers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshellContainers, Serverless and Functions in a nutshell
Containers, Serverless and Functions in a nutshell
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the World
 
AWS Summit Auckland - Moving MS .NET Applications One Container at a Time
AWS Summit Auckland - Moving MS .NET Applications One Container at a TimeAWS Summit Auckland - Moving MS .NET Applications One Container at a Time
AWS Summit Auckland - Moving MS .NET Applications One Container at a Time
 
Docker
DockerDocker
Docker
 
OpenStack Summit
OpenStack SummitOpenStack Summit
OpenStack Summit
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
 
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
AWS re:Invent 2016: Development Workflow with Docker and Amazon ECS (CON302)
 
Serverless brewbox
Serverless   brewboxServerless   brewbox
Serverless brewbox
 
Docker slides
Docker slidesDocker slides
Docker slides
 
AWS Innovate: Moving Microsoft .Net applications one container at a time - Da...
AWS Innovate: Moving Microsoft .Net applications one container at a time - Da...AWS Innovate: Moving Microsoft .Net applications one container at a time - Da...
AWS Innovate: Moving Microsoft .Net applications one container at a time - Da...
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realists
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
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
 

More from Mike Melusky

Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
Mike Melusky
 
Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2
Mike Melusky
 
Building xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvmBuilding xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvm
Mike Melusky
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with redux
Mike Melusky
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
Mike Melusky
 
An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React Native
Mike Melusky
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and React
Mike Melusky
 
Into to Docker (Central PA Java User Group - 8/14/2017)
Into to Docker (Central PA Java User Group - 8/14/2017)Into to Docker (Central PA Java User Group - 8/14/2017)
Into to Docker (Central PA Java User Group - 8/14/2017)
Mike Melusky
 
An afternoon with angular 2
An afternoon with angular 2An afternoon with angular 2
An afternoon with angular 2
Mike Melusky
 
An evening with Angular 2
An evening with Angular 2An evening with Angular 2
An evening with Angular 2
Mike Melusky
 
Securing your azure web app with asp.net core data protection
Securing your azure web app with asp.net core data protectionSecuring your azure web app with asp.net core data protection
Securing your azure web app with asp.net core data protection
Mike Melusky
 
Ember.js and .NET Integration
Ember.js and .NET IntegrationEmber.js and .NET Integration
Ember.js and .NET Integration
Mike Melusky
 
Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015
Mike Melusky
 
Emberjs and ASP.NET
Emberjs and ASP.NETEmberjs and ASP.NET
Emberjs and ASP.NET
Mike Melusky
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
Mike Melusky
 
An evening with querydsl
An evening with querydslAn evening with querydsl
An evening with querydsl
Mike Melusky
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
Mike Melusky
 
Fun with windows services
Fun with windows servicesFun with windows services
Fun with windows services
Mike Melusky
 
Philly.NET Code Camp 2014.1
Philly.NET Code Camp 2014.1Philly.NET Code Camp 2014.1
Philly.NET Code Camp 2014.1
Mike Melusky
 

More from Mike Melusky (19)

Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
 
Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2
 
Building xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvmBuilding xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvm
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with redux
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
 
An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React Native
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and React
 
Into to Docker (Central PA Java User Group - 8/14/2017)
Into to Docker (Central PA Java User Group - 8/14/2017)Into to Docker (Central PA Java User Group - 8/14/2017)
Into to Docker (Central PA Java User Group - 8/14/2017)
 
An afternoon with angular 2
An afternoon with angular 2An afternoon with angular 2
An afternoon with angular 2
 
An evening with Angular 2
An evening with Angular 2An evening with Angular 2
An evening with Angular 2
 
Securing your azure web app with asp.net core data protection
Securing your azure web app with asp.net core data protectionSecuring your azure web app with asp.net core data protection
Securing your azure web app with asp.net core data protection
 
Ember.js and .NET Integration
Ember.js and .NET IntegrationEmber.js and .NET Integration
Ember.js and .NET Integration
 
Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015Building Native “apps” with Visual Studio 2015
Building Native “apps” with Visual Studio 2015
 
Emberjs and ASP.NET
Emberjs and ASP.NETEmberjs and ASP.NET
Emberjs and ASP.NET
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
 
An evening with querydsl
An evening with querydslAn evening with querydsl
An evening with querydsl
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressions
 
Fun with windows services
Fun with windows servicesFun with windows services
Fun with windows services
 
Philly.NET Code Camp 2014.1
Philly.NET Code Camp 2014.1Philly.NET Code Camp 2014.1
Philly.NET Code Camp 2014.1
 

Recently uploaded

OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 

Recently uploaded (20)

OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 

Container Orchestration for .NET Developers

  • 1. Container Orchestration for .NET Developers Mike Melusky – Philly.NET
  • 2. About me • Michael Melusky (@mrjavascript) • Lives in Harrisburg, PA • Software Developer for Audacious Inquiry in Baltimore, MD • College Professor (Penn State / Franklin and Marshall) • BBQ and Lawn Care • XBOX One • Regular speaker at Philly.NET events (Code Camps and Monthlies)
  • 3. What are we talking about tonight? • “Dot Net” • Amazon AWS and Microsoft Azure • Serverless Computing • AWS Lambdas and Azure Functions • Docker • Kubernetes • Container Registries (ACR and ECR) • Containers as a Service with Amazon ECS and Microsoft AKS
  • 4. Amazon v. Microsoft • I’m not here to cheerlead for either Microsoft or Azure • If you are tasked with the decision of migrating from a hosted region to the cloud • Please don’t use this talk as sole factor in your decision  • This decision takes significant research • Weighing pros and cons
  • 5. Themes for Tonight • Serverless Architecture • Being able to deploy a product without having to worry about underlying infrastructure • Portability • If you ever need to migrate from Amazon to Microsoft or vice versa… • How difficult will that be?
  • 7. Dot Net • I spoke here (at Code Camp) back in November • Showcased containerization of numerous technologies (Java, Python et al.) • Focusing solely on “Dot Net” this evening • What is Dot Net?
  • 8. Dot Net • Software Framework from Microsoft • You can use it for building any type of app • Mobile, Web (MVC), Micro-Service • Two flavors: • .NET Framework • .NET Core • What is the difference between each?
  • 9. .NET Framework • Framework from Microsoft • Runs primarily on Windows systems • Does not run on Linux • Latest version is 4.8 (April 2019) • Does not support C# 8.0
  • 10. .NET Core • Framework from Microsoft • Cross-platform (can run on Windows, Linux and Mac OSX) • Current version is 3.1 • C# 8.0 is supported!
  • 11. .NET Standard • .NET Standard is a set of APIs that all .NET platforms must implement
  • 12. Why .NET Core? • We are focusing on .NET Core tonight • Main advantage: cross-platform! • Let’s look at a .NET Core MVC app • ** DEMO **
  • 14. Traditional “Web Deploy” • Traditionally we can deploy a .NET Core application to IIS server • Right click on project and “deploy” • How else can we deploy? • Where can we deploy to?
  • 16. Cloud Providers • Tonight we’re going to look at two cloud providers • Amazon and Microsoft • Amazon AWS • Microsoft Azure
  • 17. Amazon AWS • On-demand cloud computing platform • Servers in 22 geographic regions • 60+ managed services • Managed services such as services for queueing, relational database services, caching • Two managed services we are interested in for tonight: • AWS Lambdas • Containerization Services
  • 18. Microsoft Azure • Cloud computing platform • Servers available in 52 geographic regions • Multiple managed services very similar to AWS • Such as Cosmos DB, Azure Cache, Azure Search, et al • Of note for tonight: • Azure Functions • Azure Container Services
  • 20. Functions • Relate an input to an output • Examples: • X^2 (squaring) • X^3 + 1 • Trigonometric functions (sin, cos, tan)
  • 21. How does this relate to Azure and AWS? • Both cloud providers offers “functions” • Allows you to run a “quick piece of code” on Microsoft/Amazon’s hardware • Azure Functions: runtime cannot exceed 5 minutes • AWS Lambdas: runtime cannot exceed 15 minutes • Let’s look at both providers
  • 22. Example Function • Let’s look at a sample function • Calculate area of a circle
  • 23. Creating Azure Function • Let’s implement the previous example with an Azure Function • Can write the function in a variety of languages • Let’s use .NET Core • Install “Azure Development” option with Visual Studio • ** DEMO **
  • 24. Creating AWS Lambda • Now let’s do the same with AWS! • Like Azure, many languages are supported (Java, Python, etc.) • Like before, let’s use .NET Core • The Visual Studio project templates come from AWS Toolkit for Visual Studio: https://aws.amazon.com/visualstudio/ • ** DEMO **
  • 26. What’s the difference between the two? • We implemented the same function for different cloud providers • Both are .NET Core implementations • Looking at the code can the AWS Lambda run in Azure Functions? • And vice versa?
  • 27. Functions in Cloud Providers • Functions/Lambdas are provider dependent • Hypothetically consider the case of an AWS customer • With 100+ Lambdas • Requirement to migrate the cloud infrastructure to Azure • How will the lambdas transfer? • (Spoiler alert: rewrite)
  • 28. “Functions as a Service” (FaaS) • Both AWS Lambdas and Azure Functions fall under the “Functions as a Service” model (FaaS) • Developers simply write the code and run the application • Don’t have to worry about the infrastructure management
  • 29. Acronyms • IaaS – Infrastructure as a Service • Caas – Containers as a Service • PaaS – Platform as a Service • FaaS – Functions as a Service
  • 30. Serverless Architecture • Cloud provider runs the server • Customer pays for the resources that are consumed
  • 31. Benefits of Serverless Computing • As a developer (that’s you), don’t need to worry about the following: • Security updates • Anti-virus software • Operating System Updates • Hardware Upgrades • You simply write, deploy and run code!
  • 32. Serverless Computing • Since we identified that the servers are managed by the cloud provider • What do we know about the underlying infrastructure? • Mostly abstracted, but we can assume: • Linux! • (Azure has Windows in Preview discussion coming soon)
  • 33. Linux • Since these host servers run Linux, the code we write needs to run on this operating system • Main reason why we want .NET Core! • .NET Core is cross platform (Windows, Mac OSX, Linux) • You can’t write AWS Lambdas using .NET Framework 4.8
  • 34. TL;DR; version • As developers, we like Serverless Computing • If we’re working with .NET Core deployment is a breeze • Only downside so far? • Lambdas and platforms are provider dependent • Is there a solution where we have serverless benefits but also cloud provider independence?
  • 35. Before we get to Docker…
  • 36. Azure Service Fabric • Platform as a Service (PaaS) from Microsoft • Allows you to build and deploy micro-services with ease • Runs in containers • Facilitates solutions for communication between micro- services • Also facilitates container orchestration
  • 37. Building a Backend • Choice for building a backend API for front end apps • Technically you can run your backend API in AWS Lambda • Not necessarily purpose of Lambda, meant for quick, serverless code invocations • Can use Azure Service Fabric for the backend • Main downside of Azure Service Fabric? • You are locked in with Azure • Is there a portable alternative?
  • 39. Docker • Docker is software which provides the concept of application containerization • Uses OS virtualization under the hood
  • 40. Containerization? • A technique which allows you to deploy distributed applications without launching a virtual machine for each app! • Each application (or instance of the application) is isolated from each other • All code and resources and configuration needed to run the application is part of the container • Containers differ from virtual machines
  • 41. Virtual Machines vs. Containers
  • 42. Docker • Can install the Docker Engine from Docker Hub • Docker Desktop is available for Mac OSX and Windows • With Docker for Windows, Windows 10 Professional is required • Virtualization is needed
  • 44. Docker Images • Docker Containers are instances of Docker Images • So for us to run our applications in the Docker Engine, we will need to build a Docker Image (coming soon) • For now let’s look at the Docker Command Line Interface (CLI) • As well as some common commands
  • 45. “docker images” • Will show all “top level” images • Included in response is the tag, the size, creation date
  • 46. “docker ps” • Lists all running containers • If you want to see all containers (e.g. stopped containers) • docker ps –a
  • 47. Running a Docker Image • docker run • Allows you to run container using an image • docker stop • Allows you to stop a particular container
  • 49. Building the .NET Core Image • To run the .NET Core application in Docker we need to build an image to run on the Docker engine • For building images, we are required to provide a Dockerfile
  • 50. Dockerfile • A Dockerfile is a file that lists instructions needed for building a image • Based off a source image • You can run OS commands in the Dockerfile as well (move, copy, et al.) • You can also expose any port numbers your application uses
  • 51. Dockerfile ports • Generally for web applications we expose either 80 or 8080 • We can also expose the secure ports if we want as well (443 and 8443) • Docker allows you to port forward from a source port • For instance if you want to expose 5050 as your external port and route to the internal (exposed) port 80, Docker allows this • Incredibly useful for cloud providers where AWS/Azure will assign these ports dynamically at runtime
  • 52. Dockerfile and .NET Core • Let’s build our application for Docker • That is produce an image using a Dockerfile • And then run the image on the Docker engine • ** DEMO **
  • 54. Docker and .NET • With the Docker image we just build, we build for .NET Core • With this .NET Core image, the image can run on any host operating system (Windows, Linux, et al.) • What about .NET Framework (4.X)? • Yes, you can containerize a .NET Framework application! • However this image can only run on Docker Engine on Microsoft Windows hosts
  • 56. Containers as a Service (CaaS) • We saw Functions as a Service earlier tonight • Do cloud providers have the same ability except being able to run Docker containers on demand? • Yes!
  • 58. Kubernetes (K8S) • Open-source container orchestration software • Will monitor the health of the containers • If a container dies, Kubernetes will restart the container
  • 59. Kubernetes • Used in many applications • For instance, Red Hat’s OpenShift platform is based on Kubernetes • The Telcom industry uses it for cable management and routing! • Both Microsoft and Amazon offer managed services for Kubernetes clusters • Amazon offers EKS (Elastic Kubernetes Service) • Azure offers AKS (Azure Kubernetes Service)
  • 60. Wait… • The Meetup.com description for this event • Listed “No Kubernetes Required!” • Unfortunately, we will be using some K8 tonight • At least with Azure
  • 61. Containers as a Service (CaaS)
  • 62. Containers as a Service (CaaS) • Both Amazon and Microsoft offer the managed service for running your containers • Both Microsoft and Amazon offer two different managed services for each • One managed service is based on proprietary technology • The other managed service is based on K8 • Let’s look in the console for each • ** DEMO **
  • 63. Containers and Cloud Providers Provider Managed Service Service Type Notes Amazon Elastic Container Service (ECS) Proprietary Elastic Kubernetes Service (EKS) Kubernetes Microsoft Azure Container Service (ACS) Proprietary End of life 1/31/2020 Azure Kubernetes Service (AKS) Kubernetes
  • 64. About Me • I personally use AWS for both full time job and side projects • ECS is used actively in each • When preparing this session, I emailed a Microsoft Developer • I was able to contact someone on the Azure Product Team • Azure team member was confused about this presentation, and told me to learn Kubernetes • Microsoft is sunsetting (end of month) Azure Container Services (ACS) and is mandating customers migrate to Azure Kubernetes Services (AKS)
  • 65. Amazon and ECS • What I also found out from this exchange • Amazon considers ECS a legacy product • Eventually customers will presumably need to migrate to EKS • If Microsoft’s decision is any predictor of future events
  • 66. Plan for Remainder of Tonight
  • 67. Plan for Tonight • Originally was planning to show both ECS and ACS • Technically I can still demonstrate ACS since it’s available for one more week • But there would be more value doing the same demonstration using AKS
  • 68. Amazon AWS - ECS • Proprietary solution from Amazon to dynamically run and orchestrate Docker containers • You can specify how many instances of the application you want to run • ECS will automatically scale up and down the instances based on load • Make sure your code can run in parallel and be careful about mutual exclusion and locking!
  • 69. Amazon AWS ECS • For running Docker images in the cloud • Amazon needs to be able to pull your image from a repository • You have a few options • If your image is public, you can simply push to Docker Hub • However most code is proprietary, and the general public shouldn’t be allowed to pull the image
  • 71. Amazon ECR • Elastic Container Registry • Managed service from Amazon to store Docker images (as well as their tags) • Microsoft offers a similar managed service • Azure Container Registry (ACR)
  • 72. Pushing to container registry • To push to ECR • (1) Build the image (using docker build) • (2) Obtain credentials from Amazon (with docker login command) • (3) Optionally tag the image (otherwise latest is default tag) • (4) Push the Image to ECR (or ACR) using docker push • ** DEMO **
  • 74. Amazon ECS tasks • With ECS, each instance of the Docker image is based off an ECS Task • An ECS task specifies: • Which Docker image is used • How much memory each instance • How much vCPU should be allocated • Let’s create our ECS task for the .NET Core application • ** DEMO **
  • 76. Running the task in ECS • With our ECS task created, now we can create the service in ECS • When we do this, we need to specify the Docker Engine the task will run against • Amazon gives you two options • Docker Engine on an EC2 instance you provide (virtual machine) • AWS Fargate (serverless!)
  • 77. AWS Fargate • Serverless approach for running Docker images • Containers run on Amazon’s underlying Docker Engine • Under the hood: LINUX • With regards to .NET, .NET Core will work with Fargate since it’s cross platform • .NET Framework 4.8 WILL NOT WORK with Fargate since that requires Windows Docker Engine • You can use ECS with .NET Framework but a backing Windows EC2 instance is needed!
  • 78. AWS Fargate • Let’s create a service now in ECS for our task • And run our .NET Core application in AWS Fargate • ** DEMO **
  • 79. Let’s Do the Same With Azure!
  • 80. Similarities to AWS • As mentioned earlier, Microsoft is ending Azure Container Services (ACS) • We need to spin up a Kubernetes cluster in AKS • There are some similar steps however • Let’s push our Docker image to Azure Container Registry (ACR) • Let’s then deploy our image into AKS (using their serverless runtime called Azure Container Instances or ACI) • ** DEMO **
  • 82. Serverless Matrix Provider Managed Service Type Host OS Notes Amazon AWS Lambda FaaS Linux ECS/EKS Fargate CaaS Linux Fargate support for EKS added 12/2019 Microsoft Azure Functions FaaS Linux AKS with Container Instances CaaS Linux and Windows Windows is in Preview
  • 83. Next Steps for Me • Since I use AWS • Spin up EKS cluster for personal micro-services • Test and eventually cut over from ECS • But will bite the bullet and learn Kubernetes
  • 84. Learning K8 on Azure • Kubernetes Learning Path 2.0: • https://azure.microsoft.com/en-us/resources/kubernetes-learning- path/
  • 85. Thank you for coming
  • 86. Thank you for Coming • Visual Studio Solution (code) is on Github • https://github.com/mrjavascript/phillynet_jan2020 • Slides on SlideShare • @mrjavascript