Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Time Traveling in the Universe of Microservices and Orchestration

Time Traveling in the Universe of Microservices and Orchestration

121dcfb4f05ed316247772545e2cd590?s=128

Ilya Dmitrichenko

October 27, 2017
Tweet

Transcript

  1. @errordeveloper Time Traveling in the Universe of Microservices and Orchestration

  2. outline: 1. my journey in software

  3. outline: 2. where are we today

  4. containers?

  5. 1. packages

  6. 2. resources

  7. university life

  8. None
  9. root #

  10. root # chroot /mnt/gentoo /bin/bash

  11. root # chroot /mnt/gentoo /bin/bash root # source /etc/profile

  12. root # chroot /mnt/gentoo /bin/bash root # source /etc/profile root

    #
  13. root # chroot /mnt/gentoo /bin/bash root # source /etc/profile root

    # export PS1="(chroot) $PS1"
  14. root # chroot /mnt/gentoo /bin/bash root # source /etc/profile root

    # export PS1="(chroot) $PS1" (chroot) root #
  15. root # chroot /mnt/gentoo /bin/bash root # source /etc/profile root

    # export PS1="(chroot) $PS1" (chroot) root # emerge \ --ask \ --update \ --deep \ --newuse \ @world
  16. root # man nice

  17. >

  18. > ./configure \ --prefix=/opt/${PN}-${PV} \ --with-<something>-path=… > make && make

    install
  19. >

  20. > make CC=

  21. > make CC=arm-none-eabi-gcc

  22. > make CC=arm-none-eabi-gcc \ LD=arm-none-eabi-ld

  23. None
  24. > module load gcc/6.1.1 > which gcc /usr/local/gcc/6.1.1/linux-x86_64/bin/gcc > module

    unload gcc > which gcc gcc: Command not found. http://modules.sourceforge.net
  25. http://modules.sourceforge.net

  26. None
  27. None
  28. work life

  29. shared hosting

  30. shared hosting

  31. devops hammer

  32. #!/bin/bash -eu git clone $repo $dir cd $dir puppet apply

    manifest.pp
  33. # add this to your profile [[ -s $HOME/.rvm/scripts/rvm ]]

    \ && source $HOME/.rvm/scripts/rvm # you will get $PATH modified on chdir cd(){ builtin cd $* source after_cd_hooks }
  34. > sudo apt-get install rubygems > sudo gem install bundler

    > cd /opt/$myapp > bundle install
  35. > sudo apt-get install python-pip > sudo pip install --upgrade

    pip > cd /opt/$myapp > pip install -r requirements.txt
  36. > sudo apt-get install nodejs > cd /opt/$myapp > npm

    install
  37. > cap deploy:production

  38. > cap break:production

  39. None
  40. > my_vm="$(vm take)” > vm ssh “${my_vm}”

  41. > my_vm="$(vm take)” > vm ssh “${my_vm}” vm-012345> # do

    work
  42. > my_vm="$(vm take)” > vm ssh “${my_vm}” vm-012345> # do

    work > vm kill "${my_vm}"
  43. docker goes viral

  44. today

  45. Weave Net app overlay network

  46. host2 host1 8083 8083 8081 8082

  47. host2 host1 8081 8082 8083 8083 8081 8082

  48. host2 host1 8081 8082 8083 8083 8081 8082 9083 9081

    9082
  49. host2 host1 8081 8082 8083 8083 8081 8082 9083 9081

    9081 8084 8084
  50. $ORIGIN example.com $TTL 86400 @ IN SOA dns1.example.com. hostmaster.example.com. (

    2001062501 ; serial 21600 ; refresh after 6 hours 3600 ; retry after 1 hour 604800 ; expire after 1 week 86400 ) ; minimum TTL of 1 day IN NS dns1.example.com. IN NS dns2.example.com. IN MX 10 mail.example.com. IN MX 20 mail2.example.com. IN A 10.0.1.5 server1 IN A 10.0.1.5 server2 IN A 10.0.1.7 dns1 IN A 10.0.1.2 dns2 IN A 10.0.1.3 ftp IN CNAME server1 mail IN CNAME server1 mail2 IN CNAME server2 www IN CNAME server2
  51. $ORIGIN example.com $TTL 86400 @ IN SOA dns1.example.com. hostmaster.example.com. (

    2001062501 ; serial 21600 ; refresh after 6 hours 3600 ; retry after 1 hour 604800 ; expire after 1 week 86400 ) ; minimum TTL of 1 day IN NS dns1.example.com. IN NS dns2.example.com. IN MX 10 mail.example.com. IN MX 20 mail2.example.com. IN A 10.0.1.5 server1 IN A 10.0.1.5 server2 IN A 10.0.1.7 dns1 IN A 10.0.1.2 dns2 IN A 10.0.1.3 ftp IN CNAME server1 mail IN CNAME server1 mail2 IN CNAME server2 www IN CNAME server2 642 pages
  52. host2 host1 8080 8080 8080 8080 8080 8080 8080 8080

    8080 8080 8080 Weave Net
  53. host2 host1 8080 8080 8080 8080 8080 8080 8080 8080

    8080 8080 8080 denied! NetworkPolicy
  54. Weave Scope distributed observability

  55. None
  56. None
  57. None
  58. app runtime metadata and APIs

  59. > ps -ef | grep java java -jar /opt/myapp-v2.jar >

    stat -c %y /opt/myapp-v2.jar 2005-06-25 17:52:40.000000000
  60. filter containers by image & sort by count

  61. examine relationship between containers e.g. front-end & load-test

  62. examine memory usage of related microservices and time travel!

  63. here’s what it did last night!

  64. easily check if a container works correctly e.g. load-test is

    still running without errors
  65. GitOps API-driven deployments

  66. every deploy action is checked in git

  67. every deploy action is checked in git e.g. locking a

    service stores an annotation
  68. every deploy action is checked in git e.g. locking a

    service stores an annotation
  69. correlate metrics with deployments

  70. find changes that affected the metrics

  71. live demo: using Weave Cloud with DC/OS & Kubernetes

  72. cloud.weave.works

  73. ilya@weave.works slack.weave.works

  74. meetup.com/pro/Weave