AWS Innovate: Moving Microsoft .Net applications one container at a time - Daniel Zoltak

25
Moving Microsoft .NET applications one container at a time Daniel Zoltak, Solutions Architect, Amazon Web Services

Transcript of AWS Innovate: Moving Microsoft .Net applications one container at a time - Daniel Zoltak

Moving Microsoft .NET applications one container at a time• Daniel Zoltak, Solutions Architect, Amazon Web Services

Agenda

• A brief history of .NET

• Explore developer experience outside of Windows OS

• Demystify .NET in Docker and Containers

• .NET & Docker hands on demos

• Your AWS service adoption options

Let’s talk about Microsoft .NET

v

Multi Language VM – .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 & COM• Simplification of Windows development which was a “black art” at

the time

• Visual Studio .NET IDE launched as the primary developer experience

v

.NET & Open Source Efforts

• MSFT Shared Sourced & ECMA standardized .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)

v

.NET & Open Source Efforts (2)

• 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 dotnetfoundation.org• Aims to take open source community projects to the next level

v

ASP.NET Core & 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

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

• Command Line experience same across all platforms• Windows, OSX and Linux variants• Enables true automation, continuous integration + delivery (CI/CD)

v

Visual Studio Code on Mac OSX

Visual Studio CodeA mini-Visual Studio IDE development environment for cross Platform

development

v

Demo Video Insert

• Insert Demo here: Innovate - Moving MSFT Apps in Docker - Demo 1

• Duration 00.05.57

v

Your .NET Framework & Runtime Options

• (Classic) .NET Framework – Windows only and feature complete

• .NET Core CLR – New Microsoft cross platform runtime• Feature Complete now in Stabilization Phase (RC2)• Linux and OSX in-progress RC2 builds• Available on GitHub: https://github.com/dotnet/coreclr

• Mono – 3rd party cross platform and open source• Similar APIs to .NET Framework with high level of compatibility

v

Switching .NET Environments

• DNVM can be used to manage version of the .NET execution environments on your system

v

Developer Experience

v• Apiport – .NET Portability Analyzer• 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

Porting to .NET Core

v

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 & 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

☐✔

v

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.

v

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)

v

Why It Matters to .NET 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 .NET/ASP.NET• 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

v

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 Elastic Beanstalk Service which natively supports both Docker &

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 infrastructur

Live Demo…

Develop an ASP.Net App on Windows

and run in a Linux Container

on AWS

☐✔

☐✔

v

Demo : 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

v

Demo Video Insert

• Insert video here: Innovate - Moving MSFT Apps in Docker - Demo 2 Duration 00.04.49

v

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. Speak to your friendly AWS Solution Architect - if you need help

☐✔

☐✔

☐✔

Online Labs & Training

Gain confidence and hands-on

experience with AWS.

Watch free Instructional Videos and

explore Self-Paced Labs

Instructor Led Classes

Learn how to design, deploy and

operate highly available, cost-effective

and secure applications on AWS in

courses led by qualified AWS instructors

Validate your technical expertise

with AWS and use practice exams

to help you prepare for AWS

Certification

AWS Certification

More info at http://aws.amazon.com/training

Thank You for Attending AWS Innovate

We hope you found it interesting!

Do provide us with your feedback for the session and complete the feedback form.

Let us know your thoughts of today’s event and how we can improve the event

experience for you in the future.