aws summit auckland - moving ms .net applications one container at a time

31
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Moving Microsoft .NET Applications One Container at a Time Peter ‘Dr Pete’ Stanski, Senior Solutions Architect Manager & Daniel Zoltak, Solutions Architect, Amazon Web Services Technical 301

Upload: amazon-web-services

Post on 12-Apr-2017

227 views

Category:

Technology


0 download

TRANSCRIPT

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Moving Microsoft .NET Applications

One Container at a Time

Peter ‘Dr Pete’ Stanski, Senior Solutions Architect Manager & Daniel Zoltak, Solutions Architect,

Amazon Web Services

Technical 301

Business

101 Technical

201 Technical

301 Technical

401 Technical

Session Depth

Agenda

• A Brief History of Microsoft .NET

• Explore Developer Experience Outside of Windows OS

• Demystify .NET in Docker and Containers

• Level 300: .NET and Docker hands on Demos

• Your AWS Service Adoption Options

Let’s talk about Microsoft .NET

Multi Language VM – Microsoft .NET(Common Language Runtime)

• Launched with Support of 23 Programming Languages

• Languages such as Pascal, Haskel, Cobol, VB.NET, C#, J#/Java, etc

• Designed to Abstract Windows 32 API and COM

• Simplification of Windows Development which was a “Black Art” at the

Time

• Visual Studio .NET IDE Launched as the Primary Developer Experience

.NET and Open Source Efforts

• MSFT Shared Sourced and ECMA standardised .NET• Shared Source Common Language Infrastructure (SSCLI) codenamed Rotor

• Not Licensed to be Used Commercially

• It didn’t go very far Outside of Academia and Research

• Then Mono Came Along…• Took the great ideas of .NET CLR and Rotor and Rebuilt it from Scratch

• Made it Multi-platform (OSX and Linux - and Windows)

• And Mono-touch made it Cross Device (iOS and Android)

• Added Support for Visual Studio / MonoDevelop (and XCode)

• Now (2016) Microsoft has acquired Xamarin

.NET and Open Source Efforts (2)

• Roslyn Released – .NET Compiler Platform Tools • Set of open-source compilers and code analysis APIs for C# and Visual Basic .NET

languages

• Microsoft Decided to go Full Open Source with .NET Runtime• Announced and Released .NET Core CLR

• Cross platform run-time support for .NET applications + ASP.NET Core

• Docker support announced for Windows Developers

• MSFT and 3rd Party Projects at www.dotnetfoundation.org• Aims to take Open Source Community Projects to the Next Level

ASP.NET Core and CoreCLR Cross Platform

• Premiere Developer Experience on Windows (still)

• Predominantly GUI and now more command line centric

• Now Developers can edit in Visual Studio Code, Sublime, emacs with

intellisense and tools extensions on OSX and Linux

• Learn more from http://www.omnisharp.net

• Command Line Experience same across All Platforms (CLI)

• Windows, OSX and Linux Variants

• Enables true Automation, continuous Integration and Delivery (CI/CD)

Visual Studio Code on Mac OSX

Visual Studio CodeA Mini-Visual Studio IDE Development Environment for Cross Platform Development

Your .NET Framework and Runtime Options

• (Classic) .NET Framework – Windows Only and Feature Complete

• .NET Core CLR – New Microsoft Cross Platform Runtime

• Feature Complete now in Stabilisation Phase (RC2)

• Linux and OSX in-progress RC2 builds (Ubuntu, Centos, FreeBSD, OSX, SuSe)

• Available on Git: https://github.com/dotnet/coreclr

• Mono – 3rd Party Cross Platform and Open Source

• Similar APIs to .NET Framework with high level of compatibility

Developer Experience

Porting to .NET Core

• Apiport – .NET Portability Analyser

• Source available on Git: https://github.com/Microsoft/apiport

• Console and Visual Studio Versions: https://dotnet.github.io/porting/

• MSDN: Porting MSBuild to .NET Core: http://bit.ly/1QyFVaX

What’s the Difference Between Runtimes? (And why should I care?)

• .NET Core – No longer large monolithic core Framework libraries requiring whole assembly

redeployments – instead lots of little packages are used

• Using Popular NuGet Package Format Used – extend the application and runtime support libraries

• Some Common (60+) Projects at https://github.com/aspnet

System.Core.File

System.Core.IO

System.Web.Session

System.Web.SignalR

MyApp.Service MyApp.Libs1

MyApp.LibsNMyApp.APISystem.Web

System.Core

MyApp.Everything

Let’s talk about Docker & Containers

☐✔

How is Docker Different from VMs?

Containers have similar resource isolation and allocation benefits as virtual

machines but a different architectural approach allows them to be much more

portable, light-weight and efficient.

About Containers…

• Include the Application and all of its Dependencies

• Share the Kernel with Other Running Containers

• Run as an Isolated Process in user space on the Host Operating

System

• Not Tied to any Specific Infrastructure – Docker Containers run on

Any Computer, on Any Infrastructure such as the AWS Cloud

• Popular in Linux World and Now Available to .NET Developers

(thank MSFT)

Why It Matters to Microsoft Applications?

• For Existing Applications

• Move your existing .NET applications into highly portable self-sufficient

containers

• Extend the life of applications or merely renovate them

• For Green Field Applications

• Develop brand new applications using ASP.NET Core/.NET Core

• Develop via Visual Studio (Windows) or Visual Studio Code (OSX/Linux) or CLI

• Press a button or run a script to deploy it into Docker on AWS

• Bring your applications into a modern and agile (CI/CD) DevOps world

• Move into AWS – Gain Agility, Cost Reduction and Mass-Scale Out

Hands on Demos…

Develop an ASP.NET Core App on Windows

and run in a Linux Container on AWS

☐✔

☐✔

Demo 1: Roll Your Own on EC2

Develop on Windows, Deploy and Run in Linux

Docker Engine

Windows Server on

EC2

+ Visual Studio IDE

Deploy Application

Visual Studio

Deployed

Demo 1: Deployment Overview

EC2 Instance

EC2 Instance

Demo 2: Use AWS ElasticBeanstalk Service

Develop on Windows, Deploy and Run in Linux

Windows Server on

EC2

+ Visual Studio IDE

Deploy Application

AWS Elastic

BeanstalkAmazon Linux

Beanstalk Agent

Demo 2: Deployment Overview

AWS Elastic

Beanstalk

Bucket

EB CLI

dotnet publish

Elastic Load

Balancing

Auto Scaling group

EC2 Instance

Application

microsoft/dotnet

Demo 3: Use Amazon EC2 Container Service (ECS)

Develop on Windows, Deploy and Run in Linux

Windows Server on

EC2

+ Visual Studio IDE

Amazon ECSAmazon Linux

ECS AgentDeploy Application

Demo 3 – Part A: Deployment Overview

EC2 Instance

EC2 Instance

Amazon ECR

docker push

Demo 3 – Part B: Deployment Overview

Amazon ECR

Amazon ECS

aws-cli

Elastic Load

Balancing

Auto Scaling group

EC2 Instance EC2 Instance

Task Definition

Service Definition

ecs-cli

aws-cli

How Does AWS Support .NET & Docker?

Option 1: Roll Your Own

• Run Docker on EC2

• Something you may have already tried to do on your local development PC

Option 2: Use Rapid Deployment Services

• Use the AWS ElasticBeanstalk Service which natively supports both Docker and

Windows IIS

• Great for developers wishing to get started quickly with low interest in the

underlying infrastructure

Option 3: Use Docker as a Service

• Use the AWS EC2 Container Service (ECS) with full native Docker support

• Great for engineers who want full access to the underlying core infrastructure

In Summary:

1. Microsoft is Making Cross Platform Development Easier

2. The .NET Core Runtime has been Open Sourced

3. Existing .NET and Greenfield Applications can run in

Docker

• Under Mono and .NET Core run-time environments

4. AWS Supports your Journey in a Number of Ways here

5. Speak to Your Friendly AWS Solution Architect

☐✔

☐✔

☐✔

AWS Training & Certification

Intro Videos & Labs

Free videos and labs to

help you learn to work

with 30+ AWS services

– in minutes!

Training Classes

In-person and online

courses to build

technical skills –

taught by accredited

AWS instructors

Online Labs

Practice working with

AWS services in live

environment –

Learn how related

services work

together

AWS Certification

Validate technical

skills and expertise –

identify qualified IT

talent or show you

are AWS cloud ready

Learn more: aws.amazon.com/training

Your Training Next Steps:

Visit the AWS Training & Certification pod to discuss your

training plan & AWS Summit training offer

Register & attend AWS instructor led training

Get Certified

AWS Certified? Visit the AWS Summit Certification Lounge to pick up your swag

Learn more: aws.amazon.com/training

Thank You!