8. Etcd core features
● Simple: curl'able user facing API
(HTTP+JSON)
● Secure: optional SSL client cert
authentication
● Fast: benchmarked 1000s of writes/s per
instance
● Reliable: properly distributed using Raft
9. Confd
● Lightweight configuration management tool
● Keeps local configuration files up-to-date
using data stored in etcd, [...]
● Reloads applications to pick up new config
file changes
10. Confd vs Nginx
● Confd watches etcd keys for upstream
servers
● Generates nginx config from template
● Reloads nginx
11. Simple Orchestrator
● Fig/Compose as the single host orchestrator
● Some Bash and Python scripting on top of
Fig
● Orchestrator keeps its configuration in Etcd
● Orchestrator cares about it’s local host
● The cluster state is available in Etcd
12. Build the app
● Use Dockerfiles to build your app
as Docker images
● You can automate the build process using
CI infrastructure (eg. Jenkins)
14. Scaling Example
● /settings/hard_quota 100
/settings/min_instances 10
● docker ps | grep -c myapp_
● fig -p myapp -f myapp.yml scale web=10
● Combine all the items together using Bash,
Python, etc
● It’s simple and it works
15. Handling front traffic
● Nginx listens to client requests
● Request is rerouted to an upstream server
● Upstream server is a Docker container on
any host in the cluster
● Multiple Nginx instances could be behind
the load balancer
16. Need more?
● Simple example:
https://github.com/bsydor/docker-ossp
● Hands-on training
at Compendium Education Center:
http://www.compendium.pl/