Nodejs OC Docker and Node

20
WELCOME

description

Talk from the September 10, 2014 Nodejs OC meetup, about using Docker and Nodejs.

Transcript of Nodejs OC Docker and Node

Page 1: Nodejs OC Docker and Node

WELCOME

Page 2: Nodejs OC Docker and Node

J E F F R E Y H O R NW E B D E V E L O P E R

Page 3: Nodejs OC Docker and Node

+

Page 4: Nodejs OC Docker and Node

W H AT A R E W E TA L K I N G A B O U T ?

What is Docker and why should I use it?

Show you an example project.

Overview of the different tools.

Page 5: Nodejs OC Docker and Node

W H AT I S D O C K E R ?

A T O O L T O PA C K A G E A N A P P L I C AT I O N A N D I T S D E P E N D E N C I E S I N T O A V I R T U A L

C O N TA I N E R T H AT C A N R U N O N A N Y L I N U X S E R V E R

Page 6: Nodejs OC Docker and Node

S E R V E RO S

H Y P E R V I S O R

S E R V E RO S

D O C K E R E N G I N E

A P P 1

B I N /L I B S

A P P 2

B I N /L I B S

VMs

CONTAINERS

G U E S T O S

B I N / L I B S

A P P 2

G U E S T O S

B I N / L I B S

A P P 1

Page 7: Nodejs OC Docker and Node

W H Y D O C K E R

• Light weight and portable

• Works on any Linux server (cloud, bare metal)

• Use any language or tool chain

• Encapsulate application code and dependancies

• Configuration is simple

Page 8: Nodejs OC Docker and Node

W H Y D O C K E R AT Z I L L O W

• We use service oriented architecture

• Separation of concerns between Ops and Developers

• Repeatability

• Great for testing

• Low overhead to run new containers to test out new technology

Page 9: Nodejs OC Docker and Node
Page 10: Nodejs OC Docker and Node
Page 11: Nodejs OC Docker and Node

P R O B L E M S W E ’ V E H A D

• It’s new technology and not quite complete

• When to use Docker and when not to use

• Running containers on multiple hosts

• Seeing whats happening inside the container

Page 12: Nodejs OC Docker and Node

E X A M P L E

Page 13: Nodejs OC Docker and Node

D O C K E R F I L E

• Heart of every image

• Images stack on top of each other

• When writing Dockerfiles take advantage of caching

• General stuff at top

• Specific stuff at the bottom

Page 14: Nodejs OC Docker and Node

U B U N T U 1 4 . 0 4

C U R L & G I T

/ A P P

A P P L I C AT I O N C O D E

N E W C O N TA I N E R

Page 15: Nodejs OC Docker and Node

D O C K E R R E G I S T R Y

• A lot like GitHub

• Build and push images to a repo

• You can update and push to repos

• You can pull down images and run on any linux server

• Docker Hub, Quay.io, or host your own

Page 16: Nodejs OC Docker and Node

?

Page 17: Nodejs OC Docker and Node

O R C H E S T R AT I O N

• It’s hard

• They are working on it

• In the mean time lots of frameworks

• Fig, Consul, Centurion, Kubernetes, and lots more

Page 18: Nodejs OC Docker and Node
Page 19: Nodejs OC Docker and Node

F I G

• Map one to one with docker commands

• IMHO it’s way easier to see how your containers are built

• Handles starting and stoping multiple containers

• Only works on a single host

• Owned by docker and will probably be rolled into the main project

Page 20: Nodejs OC Docker and Node

Q U E S T I O N S ?