kick ass dev env s
play

KICK ASS DEV ENV'S Slides by Karl Roberts Twitter @MrK4rl - PowerPoint PPT Presentation

KICK ASS DEV ENV'S Slides by Karl Roberts Twitter @MrK4rl MOTIVATION ANNOYING WHAT TO DO? Allocate a Sprint for Setup. Write Setup Instructions. OK BUT... You join a team A week later still not setup! Setup instructions Suck! IT WORKS ON


  1. KICK ASS DEV ENV'S Slides by Karl Roberts Twitter @MrK4rl

  2. MOTIVATION

  3. ANNOYING

  4. WHAT TO DO? Allocate a Sprint for Setup. Write Setup Instructions.

  5. OK BUT... You join a team A week later still not setup! Setup instructions Suck!

  6. IT WORKS ON MY MACHINE!

  7. (U && U-PC) || (U || U-PC) ==> S#1T!

  8. MISSING STUFF Project Build Process always get more complex doco doesn't get updated

  9. BOX IT UP

  10. ENGINEERING IT is not Engineering

  11. ENGINEERING So�ware != Engineering

  12. ENGINEERING So�ware !== Engineering

  13. ENGINEERING So�ware <> Engineering

  14. ENGINEERING No professional body Don't need an IT qualification to work

  15. YOW! 2015 Glen Vanderburg - The Future of So�ware Engineering website: http://vanderburg.org/ twitter: @glv talk: https://www.youtube.com/watch?v=Tg9D7UE4TyI

  16. ENGINEERING What is Engineering? Design? Math? Science?

  17. ENGINEERING IS to reliably and repeatedly build according to a desired tolerance, given certain contraints.

  18. BUT WHAT ABOUT SOFTWARE ENGINEERING?

  19. SOFTWARE ENGINEERING <==> CIVIL ENGINEERING

  20. CIVIL ENGINEERING $ Building >> $ Design

  21. SOFTWARE ENGINEERING <==> CIVIL ENGINEERING

  22. SOFTWARE ENGINEERING <!==> CIVIL ENGINEERING

  23. It is important to mitigate risk in the expensive parts Civil -> Build through planning and calculation So�ware -> Design through rapid iterative prototyping

  24. So�ware engineering has an inverted cost model, compared to civil engineering

  25. In so�ware engineering the build is the cheapest part of the process, in fact it should be as close to free as possible

  26. Therefore rapid iterations and incremental improvements is the correct way to engineer so�ware

  27. IDEAL ACTIVITY COST

  28. SO WHAT? if dev is not the the most expensive part ... if (!dev != (free & immediate)) ... then you have broken So�ware Engineering! because instantaneous free prototyping is now not possible your dev-loops get too big and you get too expensive

  29. PROTOTYPING

  30. PROTOTYPING

  31. PROTOTYPING

  32. PROTOTYPING

  33. BUT WHAT ABOUT... "within tolerance"

  34. QUALITY ASSURANCE

  35. Docker Vs Vagrant

  36. WTF is Vagrant? the command line utility for managing the lifecycle of virtual machines. - HasiCorp

  37. WTF is Vagrant? provides easy to configure, reproducible, and portable work environments.

  38. WTF is Vagrant? To achieve its magic, Vagrant stands on the shoulders of giants. Machines are provisioned on top of VirtualBox, VMware, AWS, or any other provider.

  39. WTF is Vagrant? industry-standard provisioning tools such as shell scripts, Chef, or Puppet, can be used to automatically install and configure so�ware on the machine.

  40. WTF is Docker? allows you to package an application with all of its dependencies into a standardized unit for so�ware development.

  41. WTF is Docker? containers wrap up a piece of so�ware in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries

  42. WTF is Docker? Containers running on a single machine all share the same operating system kernel so they start instantly and make more efficient use of RAM. Images are constructed from layered filesystems so they can share common files

  43. Meh? Vagrant boxes, Docker containers? Docker images, providers, provishioners?

  44. vagrant v docker - stackoverflow

  45. aside But why Docker? easy for Ops just provision a VM in the cloud ensure it has docker installed and thats it. streamlined production env no need to worry about libs and maintainance or different build scripts

  46. easy for dev? java packaging was enough wasn't it? have you done a python ruby microservice deploy? more work saves me doing prod debug a�er deploy

  47. WHAT DO I WANT? git checkout < uri > vagrant up ... dev ... isolation ability to use my editors and IDE's ability to ssh into the box if necessary multiple boxes db and webserver and app server

  48. SWEET SPOT vagrant to launch and control Docker containers one ring to rule them all can run multiple boxes on different VM's and providers docker containers are lightweight doesn't bog down my dev box.

  49. recommended:- Mario Loriedo's blog - setting up a dev environment using docker and vagrant Create Dockerfiles to defind the containers Create Vagrant files to orchestrate

  50. GOTCHAS MacOS and Windows need to install docker machine boot2docker, now docker toolbox actually runs a thin linux VM to run docker in

  51. Ubuntu aufs is deprecated doco says install linux-image-extra, but that adds loads of drivers solution modify /etc/default/docker to use DOCKER_OPTS="­s overlay ­­dns 8.8.8.8 ­­dns 8.8.4.4"

  52. Beware the caches both Docker and vagrant cache provisioning.. so Make changes at the end of the Docker file! or else it downloads everything all over again! RUN runs during container build, due to caching only runs once, not repeated the context is streamed to the daemon so use use a dockerignore file to shrink remove stuff that is not necessary for Vagrant destroy wont always destroy

  53. image creation from scratch do you trust images on the Dockerhub? do you trust signed images? Best practice is don't do apt-get update upgrade build an image

  54. ENTRYPOINT and CMD can only have one of each or both both define the command that is run when the container starts CMD can be overridden on the command line so is like a default run together it is like the commanline is concat of ENTRYPOINT ++ CMD obvious when CMD treated like the args to ENTRYPOINT If you want your container to keep running it must run a command that keeps running eg top

  55. REFERENCES Mario Loriedo's blog - http://blog.zenika.com/2014/10/07/setting-up-a-development-environment-using-docker-and-vagrant/ Vagrant docs - https://www.vagrantup.com/docs/ docker whatis explanation - https://www.docker.com/what-docker docker documentation - https://docs.docker.com/ docker cheat sheet - https://github.com/wsargent/docker-cheat-sheet docker images and contianers docker remove untagged images fig http://www.fig.sh/ Data Opensource SFrames - https://dato.com/products/create/open_source.html Dato Graphlab Create - https://dato.com/products/create/ Karl's Demo1 Karl's Demo2

  56. THANK YOU by Karl Roberts @MrK4rl / Talk at docs.aws.avocadoconsulting.com.au/techsync/2016/05/yowwest2016/

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend