SlideShare una empresa de Scribd logo
1 de 86
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

Más contenido relacionado

La actualidad más candente

.NET? MonoDroid Does
.NET? MonoDroid Does.NET? MonoDroid Does
.NET? MonoDroid DoesKevin McMahon
 
Don Wibier
Don WibierDon Wibier
Don WibierCodeFest
 
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#arpGary 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 SummitCodeOps 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 frameworkKnoldus 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 ContractOmri 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 MongoDBValeri 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 5Steven Smith
 
Angular Owin Katana TypeScript
Angular Owin Katana TypeScriptAngular Owin Katana TypeScript
Angular Owin Katana TypeScriptJustin Wendlandt
 
Asynchronous programming in ASP.NET
Asynchronous programming in ASP.NETAsynchronous programming in ASP.NET
Asynchronous programming in ASP.NETAlex 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 flowVincent 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 SummitCodeOps Technologies LLP
 
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 vNextGunnar Peipman
 
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
 

La actualidad más candente (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 a 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 CodeDeployAmazon Web Services
 
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 2013dotCloud
 
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 AWSAWS Vietnam Community
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerAditya 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 nutshellEugene Fedorenko
 
Dockerize the World
Dockerize the WorldDockerize the World
Dockerize the Worlddamovsky
 
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 TimeAmazon Web Services
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerWeb à 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 brewboxLino Telera
 
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 realistsKarthik Gaekwad
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng 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 Kralovedamovsky
 

Similar a 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
 

Más de 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 DapperMike 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 2Mike 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 mvvmMike Melusky
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with reduxMike Melusky
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms BootcampMike Melusky
 
An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React NativeMike Melusky
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and ReactMike 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 2Mike Melusky
 
An evening with Angular 2
An evening with Angular 2An evening with Angular 2
An evening with Angular 2Mike 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 protectionMike Melusky
 
Ember.js and .NET Integration
Ember.js and .NET IntegrationEmber.js and .NET Integration
Ember.js and .NET IntegrationMike 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 2015Mike Melusky
 
Emberjs and ASP.NET
Emberjs and ASP.NETEmberjs and ASP.NET
Emberjs and ASP.NETMike Melusky
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressionsMike Melusky
 
An evening with querydsl
An evening with querydslAn evening with querydsl
An evening with querydslMike Melusky
 
Fun with lambda expressions
Fun with lambda expressionsFun with lambda expressions
Fun with lambda expressionsMike Melusky
 
Fun with windows services
Fun with windows servicesFun with windows services
Fun with windows servicesMike Melusky
 
Philly.NET Code Camp 2014.1
Philly.NET Code Camp 2014.1Philly.NET Code Camp 2014.1
Philly.NET Code Camp 2014.1Mike Melusky
 

Más de 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
 

Último

tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile EnvironmentVictorSzoltysek
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 

Último (20)

tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 

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