Slide 1

Slide 1 text

‹#› @tpryan Terry Ryan Developer Advocate VM, Serverless, or Containers ¯\_(ツ)_/¯

Slide 2

Slide 2 text

‹#› @tpryan Who are you?

Slide 3

Slide 3 text

‹#› @tpryan Disclaimer

Slide 4

Slide 4 text

‹#› @tpryan Disclaimer

Slide 5

Slide 5 text

‹#› @tpryan Finances Developers System Admins

Slide 6

Slide 6 text

‹#› @tpryan 01 Introduction What’s the problem?

Slide 7

Slide 7 text

‹#› @tpryan Computing options are confusing.

Slide 8

Slide 8 text

‹#› @tpryan There is money on the table.

Slide 9

Slide 9 text

‹#› @tpryan Where there is money there is FUD.

Slide 10

Slide 10 text

‹#› @tpryan Virtual Machines OS OS Containers Serverless OS

Slide 11

Slide 11 text

‹#› @tpryan 02 Virtual Machines Everyone’s first step OS OS

Slide 12

Slide 12 text

‹#› @tpryan Hypervisor Virtual Machines OS OS OS

Slide 13

Slide 13 text

‹#› @tpryan Virtual Machines - Pros • Eliminate direct hardware costs Finances Developers • No significant changes System Admins • Eliminates toil associated with hardware. • Allows continued use of system configuration and optimization skills.

Slide 14

Slide 14 text

‹#› @tpryan Virtual Machines - Cons • Can lead to billing surprises Finances Developers • Might be environment differences that cause bugs. System Admins • Loss of control • Problems can occur in the space that they used to control but now don’t.

Slide 15

Slide 15 text

‹#› @tpryan Iceberg

Slide 16

Slide 16 text

‹#› @tpryan Radio Show

Slide 17

Slide 17 text

‹#› @tpryan VM Mitigation • Move risk from cloud provider to cloud customer Discounts Unstable VM • Dramatically reduced cost • Resource isn’t guaranteed Custom VMs • Constrain resources to your processing need

Slide 18

Slide 18 text

‹#› @tpryan Demo: 100,000,000 Digits of Pi

Slide 19

Slide 19 text

‹#› @tpryan 03 Serverless That can’t be right

Slide 20

Slide 20 text

‹#› @tpryan • Marketing term (but a very relevant one) Serverless

Slide 21

Slide 21 text

‹#› @tpryan • Pay per use • Code is the deliverable • APIs provide interaction • Hardware is abstracted Serverless

Slide 22

Slide 22 text

‹#› @tpryan Serverless Computing • REST APIs • Microservices • Mobile Backends • Entire web applications Application Event • File writes • Queue messages • API calls Storage • Database • Data Warehouse • File storage

Slide 23

Slide 23 text

‹#› @tpryan Serverless - Pros • Pay only for exact use Finances Developers • Easier to create microservices • Easier to isolate services from other service System Admins • Eliminates most systems toil

Slide 24

Slide 24 text

‹#› @tpryan Serverless - Cons • Bursts can surprise you • Sustained usage will tend to be more expensive then you might expect Finances Developers • Most serverless systems require a proprietary interface • Existing apps require work to migrate • Constraints in what kinds of other operation you can do • Constraints in runtimes. System Admins • Eliminates most systems toil • (Might be threatening if all of it gets replaced.)

Slide 25

Slide 25 text

‹#› @tpryan Demo: 0 to 100,000 strikes

Slide 26

Slide 26 text

‹#› @tpryan 04 Containers Docker, Docker, Docker OS

Slide 27

Slide 27 text

‹#› @tpryan Matrix from Hell Dev 1 Laptop Dev 2 Laptop QA Stage Production OS ? ? ? ? ? Frontend ? ? ? ? ? Services ? ? ? ? ? Database ? ? ? ? ? Logs ? ? ? ? ?

Slide 28

Slide 28 text

‹#› @tpryan Matrix from Hell Dev 1 Laptop Dev 2 Laptop QA Stage Production OS OS X Windows Debian Debian Debian Frontend nginx (homebrew) nginx (download) nginx (apt-get) nginx (apt-get) nginx (apt-get) Services php (homebrew) php (download) php (apt-get) php (apt-get) php (apt-get) Database mysql (download) mysql (download) mysql (apt-get) mysql (apt-get) mysql (apt-get) Logs /usr/local/etc/nginx/logs/ C:\nginx-1.9.5\logs /var/log/nginx/ /var/log/nginx/ /var/log/nginx/

Slide 29

Slide 29 text

‹#› @tpryan It worked fine in dev It worked fine in dev Ops Problem now Ops Problem now

Slide 30

Slide 30 text

‹#› @tpryan Back your shit up Back your shit up Your laptop’s going to prod Your laptop’s going to prod

Slide 31

Slide 31 text

‹#› @tpryan Hypervisor Virtual Machines OS OS OS

Slide 32

Slide 32 text

‹#› @tpryan Container Host Containers OS

Slide 33

Slide 33 text

‹#› @tpryan Dockerfile FROM php:5.6-apache RUN apt-get update && apt-get -y install \ curl \ php5-mysqlnd \ php-pear \ zlib1g-dev RUN docker-php-ext-install mysqli COPY php.ini /usr/local/etc/php/ COPY startup.sh /usr/local/bin/ RUN chmod 755 /usr/local/bin/startup.sh ADD default /var/www/html CMD ["/usr/local/bin/startup.sh"]

Slide 34

Slide 34 text

‹#› @tpryan Matrix from Hell Dev 1 Laptop Dev 2 Laptop QA Stage Production OS Frontend Services Database Logs

Slide 35

Slide 35 text

‹#› @tpryan # FRONTEND AND SERVICES FROM nginx-php-fpm COPY nginx.conf /etc/nginx/nginx.conf ADD www /var/www/

Slide 36

Slide 36 text

‹#› @tpryan # BACKEND FROM ubuntu:12.04 ADD ./mysql-setup.sh /tmp/mysql-setup.sh RUN /bin/sh /tmp/mysql-setup.sh EXPOSE 3306 CMD ["/usr/sbin/mysqld"]

Slide 37

Slide 37 text

‹#› @tpryan

Slide 38

Slide 38 text

‹#› @tpryan # FRONTEND AND SERVICES FROM nginx-php-fpm COPY nginx.conf /etc/nginx/nginx.conf ADD www /var/www/ # JUST SERVICES FROM nginx-php-fpm COPY nginx.conf /etc/nginx/nginx.conf ADD www /var/www/

Slide 39

Slide 39 text

‹#› @tpryan # FRONTEND AND SERVICES FROM nginx-php-fpm COPY nginx.conf /etc/nginx/nginx.conf ADD www /var/www/ # FRONTEND FROM nginx COPY nginx.conf /etc/nginx/nginx.conf ADD www /var/www/

Slide 40

Slide 40 text

‹#› @tpryan

Slide 41

Slide 41 text

‹#› @tpryan # BACKEND FROM ubuntu:12.04 ADD ./mysql-setup.sh /tmp/mysql-setup.sh RUN /bin/sh /tmp/mysql-setup.sh EXPOSE 3306 CMD ["/usr/sbin/mysqld"] # BACKEND FROM ubuntu:12.04 ADD ./mysql-setup.sh /tmp/mysql-setup.sh RUN /bin/sh /tmp/mysql-setup.sh EXPOSE 3306 VOLUME ["/etc/mysql", "/var/lib/mysql"] CMD ["/usr/sbin/mysqld"]

Slide 42

Slide 42 text

‹#› @tpryan

Slide 43

Slide 43 text

‹#› @tpryan

Slide 44

Slide 44 text

‹#› @tpryan

Slide 45

Slide 45 text

‹#› @tpryan

Slide 46

Slide 46 text

‹#› @tpryan

Slide 47

Slide 47 text

‹#› @tpryan That’s a lot to manage.

Slide 48

Slide 48 text

‹#› @tpryan 4 3 1

Slide 49

Slide 49 text

‹#› @tpryan

Slide 50

Slide 50 text

‹#› @tpryan

Slide 51

Slide 51 text

‹#› @tpryan

Slide 52

Slide 52 text

‹#› @tpryan

Slide 53

Slide 53 text

‹#› @tpryan Containers - Pros • Allows for better resource usage Finances Developers • Easier to create microservices • Easier to isolate services from other service • Less constraints then serverless System Admins • Separates the code from the system almost entirely • Strongly encourages developer to write easily logged, monitored and dignosed applications

Slide 54

Slide 54 text

‹#› @tpryan Containers - Cons • Still requires a sunk minimum cost Finances Developers • Microservices are great, until they aren’t and then they hurt. • Complexity System Admins • Containers tend to create additional layer of management • Complexity, complexity, complexity

Slide 55

Slide 55 text

‹#› @tpryan Container Mitigation • Bring a container, provider will host • GAE Flex • AWS has a thing • Azure has a thing • Other services Managed Container Hosting Managed Kubernetes • Provider runs Kubernetes for you, takes away a lot of complexity • Kubernetes Engine • AWS’s thing • Azure thing

Slide 56

Slide 56 text

‹#› @tpryan Demo: Launch all the things

Slide 57

Slide 57 text

‹#› @tpryan 05 Conclusions Bring it home

Slide 58

Slide 58 text

‹#› @tpryan Workload • Consistent load • Lift and Shift • Licensed executables • Custom Hardware • GPUs • TPUs Virtual Machines Containers • Middle step • Variable load • Microservices • Diminishing Legacy Apps Serverless • Greenfield • Microservices • Unknown load

Slide 59

Slide 59 text

‹#› @tpryan Staffing • Serverless • Containers Developer Heavy Systems Heavy • VMs • Containers Some other • VMs

Slide 60

Slide 60 text

‹#› @tpryan Personally, I love Serverless, but use Containers

Slide 61

Slide 61 text

‹#› @tpryan Lock in • Every Cloud Provider • VMware • Virtual Box Virtual Machines Container • Every Cloud Provider • Docker • Kubernetes Serverless • Cloud Proprietary • No winners yet

Slide 62

Slide 62 text

‹#› @tpryan Containers, wherever you run them are a safe bet

Slide 63

Slide 63 text

‹#› @tpryan Ultimately I think Serverless will win out.

Slide 64

Slide 64 text

‹#› @tpryan Thank You terrenceryan.com @tpryan This preso: http://bit.ly/tpryan-ab2017 Joind.in: https://joind.in/talk/ 73e71