Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Lattice yapc-slideshare

1,132 views

Published on

YAPC 2015 Lattice containerized workload
Docker Buildpack Cloudfoundry

Published in: Technology
  • Be the first to comment

Lattice yapc-slideshare

  1. 1. Lattice 08/22/2015 Etourneau Gwenn @The_shinji62 Run containerized workload
  2. 2. About me Etourneau Gwenn Sr Solution Architect Bef.: Platform Architect https://github.com/shinji62 https://twitter.com/the_shinji62
  3. 3. Pivotal • Spring Framework • RabbitMQ • CloudFoundry • Pivotal Tracker
  4. 4. Agenda • Born from Cloufoundry • Why Lattice ? • Easy, clustered, Scheduling, Self Healing, LB, Logs • Usage • X-Ray • Demo • Q&A
  5. 5. Born from Cloudfoundry • Truly OpenSource Platform as a Service • Aim to be de-facto enteprise PaaS • Huge community • Authentification, Service, High Availability … • Support Buildpack and Docker as well
  6. 6. cf push Application deployed Deploying to Cloudfoundry
  7. 7. CF Architecture (80% ..)
  8. 8. Lattice Architecture DIEGO
  9. 9. Cloudfoundry
  10. 10. Lattice
  11. 11. Why Lattice Cloudfoundry is “hard” to install Focused for local development Easy to use and install Be able to run Docker and Buildpack and your own workload Suitable for micro-service architecture http://lattice.cf
  12. 12. Why not Lattice Production workload, use Cloudfoundry Persistent data Strong security policies
  13. 13. Other solutions • DIY do it yourself • Docker • Kubernetes / Docker
  14. 14. Easy vagrant up Local deployment
  15. 15. Clustered terraform apply Terraform Public / Private cloud
  16. 16. Diego Distribution across the cluster Auction system Scheduling
  17. 17. Long Running Process Task A Task is guaranteed to be run at most once LRP may have multiple instances. iego is a state machine maintaining the desiredLRP vs actualLRP ep the correct number of instances running in the face of network
  18. 18. Task One off task Cron Database migration ‘rake db::migrate’
  19. 19. Long Running Process Website Worker Database / Key-Value store
  20. 20. Based on : • Memory • Disk Space • Number of Running container • Number of the same running application instance… Lowest score win the bids Scheduling
  21. 21. Auctioneer Rep Exec Rep Exec Rep Exec Auction system Rep Exec Scheduling 0 5 2 4 Cell
  22. 22. Auctioneer Rep Exec Rep Exec Rep Exec Auction system Rep Exec Scheduling 2 3 4 5
  23. 23. Scheduling Auctioneer Rep Exec Rep Exec Rep Exec Auction system Rep Exec 4 3 3 4
  24. 24. Auctioneer Rep Exec Rep Exec Rep Exec Auction system Rep Exec Scheduling
  25. 25. Self Healing State machine ! Desired state VS Actual state
  26. 26. Rep Exec Rep Exec Rep Exec Rep Exec Desired state 6 Actual state 6 0 Self Healing
  27. 27. Rep Exec Rep Exec Rep Exec Rep Exec Desired state 6 Actual state 3 -3 Self Healing
  28. 28. Rep Exec Rep Exec Rep Exec Rep Exec Desired state 6 Actual state 6 0 Self Healing
  29. 29. Rep Exec Load Balancing Rep Exec Router 10.10.2.1:2343 10.10.2.1:7643 10.10.2.2:7433 10.10.2.2:4324 http://myapp.mydomain.com
  30. 30. Rep Exec Log Stream & Aggregation Rep Exec Rep Exec Rep Execdoppler Log Aggregation
  31. 31. Usage* * basic one
  32. 32. Deploy docker image ltc create yourappname myrepos/mydockerimage Scale your app ltc scale yourappname 15 • memory, instance, disk limit
  33. 33. Buildpack ltc create-droplet my-droplet-name phpbuildpack 1- Create droplet (Task) 2- Launch droplet(LRP) ltc launch-droplet my-app-name my-droplet-name
  34. 34. Own workload ltc submit-lrp lrp.json 1- Submit LRP (LRP) { memory: 128mb, rootfs: “docker:///cloudfoundry/lucid64”, setup: <download-application> action: “<run-startcommand>” } https://github.com/cloudfoundry-incubator/receptor/doc/lrps.md
  35. 35. Routing (Http) ltc update-route my-app-name 8080:my-api Update route (LRP) my-app-name.mydomain.com By default my-api.mydomain.com
  36. 36. Logs ltc logs my-app-name
  37. 37. X-Ray http://x- ray.cf
  38. 38. X-Ray Visualize application instance distribution Start / Stop and crash event By memory or container OpenSource
  39. 39. X-Ray
  40. 40. Thank You !!
  41. 41. References
  42. 42. Lattice homepage http://lattice.cf/ References Github https://github.com/cloudfoundry-incubator/lattice Others https://github.com/cloudfoundry-incubator/diego-design-notes https://www.cloudfoundry.org/

×