microservices docker @bonn agile
DESCRIPTION
TRANSCRIPT
Microservices with Docker
Timo Derstappen@teemow
What are Microservices?
Example Application
● Small, focussed services● Independent Processes● Language agnostic APIs● Highly decoupled
Definition!?
Right tool for the job
● Not bound to a single Technology● No one-size-fits-all approach
Resilience
● No monolith to fall over● Design to fail● Circuit Breakers to avoid cascading
failures
● Failures are going to happen● Reduce Mean Time to Recover
Distributed Systems
Scaling
Only services that are constrained by performance need scaling.Elastic (on-demand) scaling of smaller services leads to better cost control
Ease of Deployment
Services can be deployed independently and faster.Changing a monolith could have more impact and risk so deployments are slower.
“Organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations.”— Melvin Conway
Composability
● Re-use● Re-compose
Optimising for Replaceability
Small services are rewritten or removed without worrying too much
● Continuous delivery● Infrastructure Automation● Small autonomous teams● Systems at scale● 12 Factor Apps
Enabler
Where does Docker fit in?
● Lightweight● Fast● One process per container● Composability
Where does it match?
● Disposable components● Make your state explicit● Provision at build-time● Configure at run-time
Immutable Infrastructure
● Development● Unit/Integration Tests● Continuous delivery● Production
Docker Workflow
Development
● Vagrant● rbenv● nodeenv● virtualenv
Your current setup?
● Contains Build Tools● Each for every stack
Dev Container
# What about running oneshot containers with the build tool inside.
$ alias npm='docker run --rm -ti -v $(pwd):$(pwd) -w $(pwd) teemow/npm'
$ npm install
Aliases
web:
build: .
ports:
- 8080:8080
volumes:
- .:/app
links:
- redis
redis:
image: dockerfile/redis
Fig
Build Chain
Jenkins - Docker Hub Integration
Production
Install docker on a host and start your container.
Use fig to link your containers.
Simple Container Hosting
● Scheduler● Service Discovery● Monitoring● Logging
Container Environment
but there are lots of options here.
● Mesosphere● Kubernetes● Consul● Project Atomic
We ♥ CoreOS
Docker Cologne - CoreOS Meetup
19:00, 14th OctoberStartplatz
Brandon Philips, CTO of CoreOSLuke Marsden, CTO of Flocker
There is a Meetup in Cologne
Sign up for theGiant Swarm private Beta
Request Invite
http://giantswarm.io/
Thanks for listening!Reach out:Timo Derstappen@teemow@giantswarm