meteor - docker: the good, the bad & the awesome

30
Meteor - Docker The Good, the Bad & the Awesome

Upload: fabian-kromer

Post on 20-Feb-2017

414 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Meteor - Docker: The good, the Bad & the Awesome

Meteor - DockerThe Good, the Bad & the Awesome

Page 2: Meteor - Docker: The good, the Bad & the Awesome

...Studied SE at TU Vienna

Worked 2 years in Silicon Valley

About me

Not a Docker Expert!

Page 3: Meteor - Docker: The good, the Bad & the Awesome

What is Docker?

Page 4: Meteor - Docker: The good, the Bad & the Awesome

Build, Ship, RunAn open platform for distributed applications for developers and sysadmins

Page 5: Meteor - Docker: The good, the Bad & the Awesome

Server

Host OS

Hypervisor

Guest OS

Guest OS

Guest OS

Bin/Libs

Bin/Libs

Bin/Libs

App A App A’ App B

Host OS

Server

Bins/Libs Bins/Libs

Container E

ngine

App A

App A

App B

App B

App B

’ VMContainer

Page 6: Meteor - Docker: The good, the Bad & the Awesome
Page 7: Meteor - Docker: The good, the Bad & the Awesome
Page 8: Meteor - Docker: The good, the Bad & the Awesome
Page 9: Meteor - Docker: The good, the Bad & the Awesome

The goodMeteor is ready for Docker!

Page 10: Meteor - Docker: The good, the Bad & the Awesome

There is a Docker image!https://github.com/meteorhacks/meteord

Page 11: Meteor - Docker: The good, the Bad & the Awesome
Page 12: Meteor - Docker: The good, the Bad & the Awesome
Page 13: Meteor - Docker: The good, the Bad & the Awesome
Page 14: Meteor - Docker: The good, the Bad & the Awesome
Page 15: Meteor - Docker: The good, the Bad & the Awesome

Build server App Servers

Dev Environment

Sourcecode

Tarball

Tarball

my current setup

Page 16: Meteor - Docker: The good, the Bad & the Awesome

Git + Meteorfully automated process

post-receive hookmeteor build

scp + ssh

Page 17: Meteor - Docker: The good, the Bad & the Awesome

CoreOSLightweight LinuxShips with Docker

Uses SystemdUpdates automatically

Page 18: Meteor - Docker: The good, the Bad & the Awesome

The “Bad”One Process per Container

Page 19: Meteor - Docker: The good, the Bad & the Awesome

nginxis NOT ready for Docker

.. but it works for basic scenariosit’s better to use haproxy instead

Page 20: Meteor - Docker: The good, the Bad & the Awesome

MongoDBgreat Docker support

but does not support OPLOG out of the box→ you need to write your own Dockerfile to

make this work!

Page 21: Meteor - Docker: The good, the Bad & the Awesome

Networking is a bitchadditional layer

container doesn’t know about host network...

Page 22: Meteor - Docker: The good, the Bad & the Awesome

App Monitoringcan be tricky, but there are options:

Kadira, Logentries, ...

Page 23: Meteor - Docker: The good, the Bad & the Awesome

Service MonitoringI created a Docker image for that:

kromit/systemd_monhttps://github.com/faburem/systemd_mon/tree/Docker-image

(Pull request pending)

Page 24: Meteor - Docker: The good, the Bad & the Awesome
Page 25: Meteor - Docker: The good, the Bad & the Awesome

Continuous Integration

Page 26: Meteor - Docker: The good, the Bad & the Awesome

0 downtime Deployment

Rebuild Docker Image

Run temporary instance of current

Image

Run instance of new image

Stop main instance

Docker Host(CoreOS)

Stop temporary instance

Page 27: Meteor - Docker: The good, the Bad & the Awesome

Scaling is fun*docker run image/name

* configuring nginx not so much

Page 28: Meteor - Docker: The good, the Bad & the Awesome
Page 29: Meteor - Docker: The good, the Bad & the Awesome

Questions?

faburem Fabian Kromer @faburem

Page 30: Meteor - Docker: The good, the Bad & the Awesome

var promise = new Promise(function(resolve, reject) { while (! codingFinished){ // finish coding } if (/* everything turned out fine */) { resolve(/* sourceCode */); } else { reject(Error("Fail")); }});promise.then(function(result) { // make public release on Github}, function(err){console.log(err);});