Meetup Docker@Nuxeo - Build a Cloud Platform with Docker

  • 539 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
539
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
46
Comments
0
Likes
7

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. / Content Management Platform For Business Applications Build a cloud platform with Docker 2/13/2013 Damien METZLER
  • 2. Build a cloud platform with Docker • Nuxeo : a small introduction • Running Nuxeo(s) in Docker • Managing a cloud Platform 2
  • 3. Nuxeo : small Intro 3
  • 4. Nuxeo : small intro • Open Source ECM platform • In java • Designed for extension • Nuxeo Studio 4
  • 5. Nuxeo : small intro 5
  • 6. Nuxeo Studio 6
  • 7. Nuxeo.io • Our approach to PaaS • Provide one-click Nuxeo deployment to our users • Integrates all of our services (Studio, Market place, custom add-ons) • Allow easy and fast deployment 7
  • 8. Running Nuxeo(s) in Docker 8
  • 9. Running Nuxeo in Docker • Nuxeo is Java based : runs in Tomcat • Needs a DB : PostgreSQL • With some utils • poppler-utils (pdf2html) • OpenOffice (yes it’s an « util ») • ImageMagick (image conversion) 9
  • 10. Running Nuxeo in Docker nt/2014/01/dockerm/blog/developme ttp://www.nuxeo.co h rs-nuxeo-part-1/ containe 10
  • 11. Running Nuxeo in Docker nt/2014/01/dockerm/blog/developme ttp://www.nuxeo.co h rs-nuxeo-part-1/ containe OpenOffice 10
  • 12. Running Nuxeo in Docker nt/2014/01/dockerm/blog/developme ttp://www.nuxeo.co h rs-nuxeo-part-1/ containe Nuxeo OpenOffice 10
  • 13. Running Nuxeo in Docker nt/2014/01/dockerm/blog/developme ttp://www.nuxeo.co h rs-nuxeo-part-1/ containe Nuxeo OpenOffice ImageMagick 10
  • 14. Running Nuxeo in Docker nt/2014/01/dockerm/blog/developme ttp://www.nuxeo.co h rs-nuxeo-part-1/ containe Nuxeo OpenOffice ImageMagick PG 10
  • 15. Running Nuxeo in Docker nt/2014/01/dockerm/blog/developme ttp://www.nuxeo.co h rs-nuxeo-part-1/ containe Nuxeo OpenOffice ImageMagick PG popplers 10
  • 16. Running Nuxeo in Docker nt/2014/01/dockerm/blog/developme ttp://www.nuxeo.co h rs-nuxeo-part-1/ containe Nuxeo OpenOffice ImageMagick PG popplers 10
  • 17. Running Nuxeo in Docker nt/2014/01/dockerm/blog/developme ttp://www.nuxeo.co h rs-nuxeo-part-1/ containe 11
  • 18. Running Nuxeo in Docker Nuxeo OpenOffice ImageMagick PG popplers 12
  • 19. Running Nuxeo in Docker Nuxeo OpenOffice ImageMagick PG popplers 12
  • 20. Running Nuxeo in Docker OpenOffice Nuxeo ImageMagick PG popplers 12
  • 21. Running Nuxeo in Docker OpenOffice ImageMagick Nuxeo PG popplers 12
  • 22. Running Nuxeo in Docker OpenOffice ImageMagick Nuxeo PG popplers 12
  • 23. Running Nuxeo in Docker OpenOffice ImageMagick Nuxeo PG popplers 12
  • 24. Running Nuxeo in Docker OpenOffice Nuxeo ImageMagick PG popplers 12
  • 25. Running Nuxeo in Docker OpenOffice Nuxeo ImageMagick PG popplers 12
  • 26. Running Nuxeo in Docker Services OpenOffice Nuxeo ImageMagick popplers PG 13
  • 27. Running Nuxeo in Docker Services OpenOffice Nuxeo Nuxeo ImageMagick popplers PG 13
  • 28. Running Nuxeo in Docker Services OpenOffice Nuxeo Nuxeo Nuxeo ImageMagick popplers PG 13
  • 29. Running Nuxeo in Docker Services OpenOffice Nuxeo Nuxeo Nuxeo Nuxeo ImageMagick popplers PG 13
  • 30. Problems… Services Host1 Nuxeo Nuxeo Nuxeo Nuxeo OpenOffice ImageMagick popplers PG 14
  • 31. Problems… Services OpenOffice ImageMagick Host1 Nuxeo Nuxeo Nuxeo Nuxeo popplers PG 14
  • 32. Problems… Services OpenOffice ImageMagick Host1 Nuxeo Nuxeo Nuxeo Nuxeo Host2 Nuxeo Nuxeo Nuxeo Nuxeo popplers PG 14
  • 33. Problems… Services Host3 Nuxeo Nuxeo Nuxeo Nuxeo Host1 Nuxeo Nuxeo Nuxeo Nuxeo Host2 Nuxeo Nuxeo Nuxeo Nuxeo OpenOffice ImageMagick popplers PG 14
  • 34. Problems… Services Host4 Nuxeo Nuxeo Nuxeo Nuxeo Host1 Nuxeo Nuxeo Nuxeo Nuxeo Host3 Nuxeo Nuxeo Nuxeo Nuxeo Host2 Nuxeo Nuxeo Nuxeo Nuxeo OpenOffice ImageMagick popplers PG 14
  • 35. Problems… Reverse Proxy Host4 Nuxeo Nuxeo Nuxeo Nuxeo Host1 Nuxeo Nuxeo Nuxeo Nuxeo Host3 Nuxeo Nuxeo Nuxeo Nuxeo Host2 Nuxeo Nuxeo Nuxeo Nuxeo Services OpenOffice ImageMagick popplers PG 14
  • 36. Problems… Reverse Proxy Host4 Nuxeo Nuxeo Nuxeo Nuxeo Host1 Nuxeo Nuxeo Nuxeo Nuxeo Host3 Nuxeo Nuxeo Nuxeo Nuxeo Host2 Nuxeo Nuxeo Nuxeo Nuxeo Services OpenOffice ImageMagick popplers PG 14
  • 37. Problems… Reverse Proxy Host4 Nuxeo Nuxeo Nuxeo Nuxeo Host1 Nuxeo Nuxeo Nuxeo Nuxeo Host3 Nuxeo Nuxeo Nuxeo Nuxeo Host2 Nuxeo Nuxeo Nuxeo Nuxeo Services OpenOffice ImageMagick popplers PG 14
  • 38. Problems… Reverse Proxy Host4 Nuxeo Nuxeo Nuxeo Nuxeo Host1 Nuxeo Nuxeo Nuxeo Nuxeo Host3 Nuxeo Nuxeo Nuxeo Nuxeo Host2 Nuxeo Nuxeo Nuxeo Nuxeo Services OpenOffice ImageMagick popplers PG 14
  • 39. Problems… Reverse Proxy Host4 Nuxeo Nuxeo Nuxeo Nuxeo Host1 Nuxeo Nuxeo Nuxeo Nuxeo Host3 Nuxeo Nuxeo Nuxeo Nuxeo Host2 Nuxeo Nuxeo Nuxeo Nuxeo Services OpenOffice ImageMagick popplers PG 14
  • 40. Problems… Reverse Proxy Host4 Nuxeo Nuxeo Nuxeo Nuxeo Host1 Nuxeo Nuxeo Nuxeo Nuxeo Host3 Nuxeo Nuxeo Nuxeo Nuxeo Host2 Nuxeo Nuxeo Nuxeo Nuxeo Services OpenOffice ImageMagick popplers PG 14
  • 41. Problems… Reverse Proxy Host4 Nuxeo Nuxeo Nuxeo Nuxeo Host1 Nuxeo Nuxeo Nuxeo Nuxeo Host3 Nuxeo Nuxeo Nuxeo Nuxeo Host2 Nuxeo Nuxeo Nuxeo Nuxeo Services OpenOffice ImageMagick popplers PG 14
  • 42. Problems… Reverse Proxy Host4 Nuxeo Nuxeo Nuxeo Nuxeo Host1 Nuxeo Nuxeo Nuxeo Nuxeo Host3 Nuxeo Nuxeo Nuxeo Nuxeo Host2 Nuxeo Nuxeo Nuxeo Nuxeo Services OpenOffice ImageMagick popplers PG 14
  • 43. Running Nuxeo in Docker • Running a lot of docker container may be harmful ! • We need some tooling to manage that 15
  • 44. Managing a cloud Platform 16
  • 45. Managing a cloud platform • We need to • Be aware of cluster’s state • Be able to launch services • Resilient 17
  • 46. Managing a cloud platform • Based on The Grid (aka Flynn Layer0 http://flynn.io) • Backed by CoreOS (http://www.coreos.com), small linux distro which provides • etcd (distributed registry) • systemd (replacement for init.d) • of course docker 18
  • 47. Managing a cloud platform • etcd provides a way to share cluster state /discover/services 19
  • 48. Managing a cloud platform • etcd provides a way to share cluster state nxio-core-01 /discover/services/host nxio-core-01 => 192.168.1.20:1113 etcd 20
  • 49. Managing a cloud platform • etcd provides a way to share cluster state nxio-core-01 /discover/services/host nxio-core-01 => 192.168.1.20:1113 nxio-core-02 => 192.168.1.21:1113 etcd nxio-core-02 etcd 21
  • 50. Managing a cloud platform • etcd provides a way to share cluster state nxio-core-01 etcd nxio-core-02 /discover/services/host nxio-core-01 => 192.168.1.20:1113 nxio-core-02 => 192.168.1.21:1113 /nxio/nxio-01 db-host: …. s3bucket: … domain: mydomain.nuxeo.io mp-packages: [dm, dam…] ! etcd 22
  • 51. Managing a cloud platform • etcd provides a way to share cluster state nxio-core-01 nxio01 etcd nxio-core-02 nxio01 etcd /discover/services/host nxio-core-01 => 192.168.1.20:1113 nxio-core-02 => 192.168.1.21:1113 /discover/services/nxio-01 node1 => 192.168.1.20:5678 node2 => 192.168.1.21:4523 /nxio/nxio-01 db-host: …. s3bucket: … domain: mydomain.nuxeo.io mp-packages: [dm, dam…] /domains/ mydomain.nuxeo.io => nxio-01 ! 23
  • 52. Managing a cloud platform • Reverse proxy uses etcd to resolve requests path Soft etcd based reverse proxy nxio-core-01 nxio01 nxio-core-02 nxio01 etcd /discover/services/host nxio-core-01 => 192.168.1.20:1113 nxio-core-02 => 192.168.1.21:1113 /discover/services/nxio-01 node1 => 192.168.1.20:5678 node2 => 192.168.1.21:4523 ! …. ! /domains/ mydomain.nuxeo.io => nxio-01 ! etcd 24
  • 53. Managing a cloud platform • Reverse proxy uses etcd to resolve requests path mydomain.nuxeo.com Soft etcd based reverse proxy nxio-core-01 nxio01 nxio-core-02 nxio01 etcd /discover/services/host nxio-core-01 => 192.168.1.20:1113 nxio-core-02 => 192.168.1.21:1113 /discover/services/nxio-01 node1 => 192.168.1.20:5678 node2 => 192.168.1.21:4523 ! …. ! /domains/ mydomain.nuxeo.io => nxio-01 ! etcd 24
  • 54. Managing a cloud platform • Reverse proxy uses etcd to resolve requests path mydomain.nuxeo.com Soft etcd based reverse proxy nxio-core-01 nxio01 nxio-core-02 nxio01 etcd /discover/services/host nxio-core-01 => 192.168.1.20:1113 nxio-core-02 => 192.168.1.21:1113 /discover/services/nxio-01 node1 => 192.168.1.20:5678 node2 => 192.168.1.21:4523 ! …. ! /domains/ mydomain.nuxeo.io => nxio-01 ! etcd 24
  • 55. Managing a cloud platform • Reverse proxy uses etcd to resolve requests path mydomain.nuxeo.com Soft etcd based reverse proxy nxio-core-01 nxio01 nxio-core-02 nxio01 etcd /discover/services/host nxio-core-01 => 192.168.1.20:1113 nxio-core-02 => 192.168.1.21:1113 /discover/services/nxio-01 node1 => 192.168.1.20:5678 node2 => 192.168.1.21:4523 ! …. ! /domains/ mydomain.nuxeo.io => nxio-01 ! etcd 24
  • 56. Managing a cloud platform • Reverse proxy uses etcd to resolve requests path mydomain.nuxeo.com Soft etcd based reverse proxy nxio-core-01 nxio01 nxio-core-02 nxio01 etcd /discover/services/host nxio-core-01 => 192.168.1.20:1113 nxio-core-02 => 192.168.1.21:1113 /discover/services/nxio-01 node1 => 192.168.1.20:5678 node2 => 192.168.1.21:4523 ! …. ! /domains/ mydomain.nuxeo.io => nxio-01 ! etcd 24
  • 57. Managing a cloud platform • Why use a « soft » reverse proxy • No service « restart » = full dynamic • Allow to intercept calls for metrics • • Useful for passivation Allow to deal with interruptions of service • Ask the user to wait • Ask the cluster to start a new instance 25
  • 58. Actual State • Labs using Vagrant on bare metal • Still have to know how to start nuxeo container ;-) • via a systemd service • like a job via flynn-host • POC on AWS for end of february 26
  • 59. Conclusion • Docker allows us to start/stop new instances very fast • It allows to design an infrastructure that is not tied to IaaS provider (but can be run onto) • Very young ecosystem/tools like etcd, discoverd, flynn stack etc… 27
  • 60. Thank you ! Damien METZLER : @damienmetzler dmetzler@nuxeo.com If you want to join, let’s talk ! 28