n
#0
...
animated console
sponsors
# Asp.net core on LINUX ## it's the future ## let's dive right in!
![Developers Developers Developers](image/ddd.jpg)
## Ballmer, 2001: > "Linux is a cancer"
## Ballmer, 2001: > "Linux is a cancer" ## Ballmer, 2016: > "I may have called Linux a cancer but now I love it" ["I may have called Linux a cancer but now I love it"](http://www.zdnet.com/article/ballmer-i-may-have-called-linux-a-cancer-but-now-i-love-it) ![ballmer](image/ballmer.png)
## What changed?
# Azure ## Desktop Sales ↓ ## Cloud Services ↑
Before Azure: > Windows Server is the best thing for data centers!
After Azure: > Here's Windows Server Core... best thing for data centers!
More Azure: > Here's Windows Server Nano... best thing for data centers!
Today... > We offer Linux!
## join the dots # Microsoft is a Linux company ## Inevitable conclusion
# MS Stuff and Linux - dotnet core - visual studio code - SQL Server 2016 - Service Fabric - PowersHell - Ubuntu on Windows 10 - Linux Azure VMs - Silverlight for Lynx
# Why does it benefit you today? * opens you up to a larger ecosystem * microservices with less friction * scaling without license problems * drastically cheaper hosting
![before and after (secretGeek.net)](image/uptime_before_and_after_large.png)
# The old architecture ![old architecture](image/Old_Architecture.png)
# The new architecture ![new architecture](image/New_Architecture.png)
![pepe](image/red_string_wall.JPG) **WOAH!** Lots of differences! An overwhelming number of changes. But think of all the things we've thrown away. IIS! No more IIS. Phew! No more application pools. No more terminal services. Let's take a closer look If it feels daunting -- if you feel that "I SUCK" feeling -- then that's great! It means you're learning! It's the mental equivalent of the gym saying 'no pain no gain.' And it's amazing how quick you'll get past those initial feelings. You run each of the commands in this tutorial 2 or 3 times on your own -- you'll start to feel veeeery comfortable with it. You can acclimatize to this very quickly. It's all just typing! There's going to be a *lot* of terminology thrown at you during this talk. It's all online at {TODO: some simple url} where it's described in a lot more detail, with links you can follow and everything -- so for now i suggest you just sit back, let it all wash over you, and you can check up on it all later if you're super keen. (image: pepe silvia scene from "it's always sunny in philadelphia")
# The new architecture ![new architecture](image/New_Architecture.png) There's a finite number of boxes there... nginx, Kestrel, systemd, SSH ... we'll go through each of those, carefully, and then you'll be able to put Linux on your resume. Ok there's a few concepts we'll need to cover along the way.

# Demonstration ## See [script for demo](demo/scripts.md) * See [script for demo](demo/scripts.md) Demo as animated gifs... * [create droplet](ScreenToGif_Files/CreateDroplet.gif) * [configure droplet](ScreenToGif_Files/ConfigureDroplet.gif) * [install .net core](ScreenToGif_Files/InstallDotNetCore.gif) * [hello world](ScreenToGif_Files/HelloWorld.gif) * [web app](ScreenToGif_Files/WebApp.gif) Documentation: * Configure droplet: [Initial Server Setup with Ubuntu 16.04 (Digital Ocean)](https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04) * [An Introduction to Securing your Linux VPS (Digital Ocean)](https://www.digitalocean.com/community/tutorials/an-introduction-to-securing-your-linux-vps) * [7 Security Measures to Protect Your Servers (Digital Ocean)](https://www.digitalocean.com/community/tutorials/7-security-measures-to-protect-your-servers) * [Asp.net Core Publish to a Linux Production Environment (Microsoft)](https://docs.microsoft.com/en-us/aspnet/core/publishing/linuxproduction) * [Hanselman: Publishing an ASP.NET Core website to a cheap Linux VM host](http://www.hanselman.com/blog/PublishingAnASPNETCoreWebsiteToACheapLinuxVMHost.aspx) * get a VM at digitalocean, US$5 per month. ...or scaleway 3 euro per month, or linode, or amazon (AWS free tier... 1 year free), or arubacloud.com (1 euro per month) or others... Go there, sign up, and get a machine in the cloud.
# Windows Admin in One Slide ![linux admin in one slide](image/next.gif)
# Linux Admin in One Slide ![linux admin in one slide](image/linuxadmin1.png)
# Linux Admin in One Slide ![linux admin in one slide](image/linuxadmin.png)

How sudo works

simple cat

This is how you achieve a least privilege yet powerful super user on linux: with sudo. It's basically simon says. you type sudo {command}, and then it asks you for your password. So you want a long but easy to type password -- recommend a passphrase!

![how ssh works](image/how_ssh_works.png)

Bash v cmd.exe:

Similarities

windowsbash
cd ..cd ..
cd \cd /
dirls
copycp
delrm
rdrmdir
clsclear
type {file}cat {file}
| (pipe)| (pipe)
stdin, stdout, stderrstdin, stdout, stderr

Bash v cmd.exe:

Differences

- case sensitive!
- file extensions: not relevant.
- "dot" prefix on a file: hides the file
- no drive letters. "mount" a device into a location.
- "~" means your home path. "cd" with no parameters takes you home.
- everything is a file:
 - streams
    - stdin, stdout, stderr,
 - devices... are all files.

Bash v cmd.exe:

Other Common Things

.profile
grep
tail
top
editing config files
managing processes

# Kestrel ## Tech Empower Benchmarks
# Kestrel ## Tech Empower Benchmarks > Thanks to Microsoft’s herculean performance tuning effort, ASP.NET—in the new cross-platform friendly form of ASP.NET Core—is now a top performer in our Plaintext test, making it among the fastest platforms at the fundamentals of web request routing. The degree of improvement is absolutely astonishing, going from 2,120 requests per second on Mono in Round 11 to 1,822,366 requests per second on ASP.NET Core in Round 13. That’s an approximately **85,900%** improvement [TechEmpower Blog - Round 13](https://www.techempower.com/blog/2016/11/16/framework-benchmarks-round-13/)
# Revisit... ![new architecture](image/New_Architecture.png)
a dodgy looking certificate courtesy of CLEVER CERTIFICATES

If you take a photo of this slide and put it in your CV, you can ride the cash cow on the back of the gravy train until the golden goose lays a license to print money all the way to eldorado, etc.

## See Also * [The source code from our demo](demo/scripts.md) ## References * Configure droplet: [Initial Server Setup with Ubuntu 16.04 (Digital Ocean)](https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04) * [An Introduction to Securing your Linux VPS (Digital Ocean)](https://www.digitalocean.com/community/tutorials/an-introduction-to-securing-your-linux-vps) * [7 Security Measures to Protect Your Servers (Digital Ocean)](https://www.digitalocean.com/community/tutorials/7-security-measures-to-protect-your-servers) * [TIL.secretGeek.net Linux section](https://til.secretgeek.net/linux/01_summary.html) in particular: * [SSH article](https://til.secretgeek.net/linux/SSH.html) * [nginx article](https://til.secretgeek.net/linux/nginx.html) (covers hosting multiple sites on one linux box) * [Asp.net Core Publish to a Linux Production Environment (Microsoft)](https://docs.microsoft.com/en-us/aspnet/core/publishing/linuxproduction) * [Hanselman: Publishing an ASP.NET Core website to a cheap Linux VM host](http://www.hanselman.com/blog/PublishingAnASPNETCoreWebsiteToACheapLinuxVMHost.aspx)

Tod and Jakob

Workshop - An Introduction to .NET Core on Linux & Docker

Tod Jakob
feedback
simple cat