application configuration in containers

20
Application configuration in containers Johannes M. Scheuermann Köln, 08.06.2016

Upload: inovex-gmbh

Post on 23-Feb-2017

138 views

Category:

Software


2 download

TRANSCRIPT

Application configuration in containers

Johannes M. Scheuermann

Köln, 08.06.2016

Johannes M. ScheuermannIT Engineering & Operations @ inovex

〉 Software-Defined Datacenters

〉 Container ecosystem

〉 Cloud technologies

〉 High Availability & Scalability

〉 @johscheuer

〉 https://github.com/johscheuer/Brownbags/tree/ma

ster/docker_app_config2

What about you?

Application configuration

4

Configuration

Static Dynamic

Image Mount/Env K/V store

• Inflexible

• Restart required

• Easy to setup

Static configuration

5

• Good for default configuration

• Dev / Prod parity

• Easy distribution

• Needs a rebuilt on change

Image (on build)

6

• Mount from host

• Inject environment variable• Only simple key/values

• Fixed from start time

• echo/sed in configuration files

• Can overwrite default configuration

Start up time

7

• Flexible

• Application must support it

• Complexity• Configuration management

• Key/Value store

Dynamic configuration

8

• Mount config from host

• Configuration management

• Complex configuration

• Independent of Container

Mount

9

• Very flexible

• Environmental variables

• Configuration files• Template files

• Separated setup needed

• Confd / Consul-template / envconsul

Key value store

10

• Kubernetes• Configmap

• Secrets

• Mesos / Marathon• Artifact Store ?

• Swarm ?• Environment variables

Environments

11

• Not all solutions will work

• Mount doesn’t work• Config on all Nodes

• Key Value store• Separated setup

• Additional complexity

Distributed

12

• Many backends

• TOML (Tom's Obvious, Minimal Language)

• Polling/Watch/Onetime

• CMD to run after changes

Confd

13

Confd (high level)

14

Host

etcd cluster

Prod

Test

prod

test

keys/prod/..keys/test/..

Demo

• Similar to confd

• Only Consul

• HCL (HashiCorp Configuration Language)

• Supports plugins

• Rich feature set

Consul template/env

16

• Find the right choice• What fits your application best?

• Combinations possible• See example

• No holy grail

Conclusion

17

18

We are hiring!

www.inovexperts.com

Q&A

Johannes M. Scheuermanninovex GmbH

[email protected]

CC BY-NC-ND inovex.de +JohannesScheuermann

github.com/johscheuer

@johscheuer youtube.com/inovexGmbH