test driven infrastructure avec docker

59
#DevoxxFR Test driven infrastructure avec Docker Séven Le Mesle @slemesle 1

Upload: seven-le-mesle

Post on 21-Jan-2018

807 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Test driven infrastructure avec Docker

#DevoxxFR

Test driven infrastructureavec Docker

Séven Le Mesle @slemesle

1

Page 2: Test driven infrastructure avec Docker

#DevoxxFR

A propos de moi

2

@slemesle

Page 3: Test driven infrastructure avec Docker

#DevoxxFR

A propos de moi

2

@slemesle

Page 4: Test driven infrastructure avec Docker

#DevoxxFR 3#DevoxxFR

@yeswescalehttp://blog.wescale.fr

Page 5: Test driven infrastructure avec Docker

#DevoxxFR

Dropship+ @ Canal+

4

Page 6: Test driven infrastructure avec Docker

#DevoxxFR

Dropship+ @ Canal+

5

Page 7: Test driven infrastructure avec Docker

#DevoxxFR

Dropship+ @ Canal+

5

Dropship+

Page 8: Test driven infrastructure avec Docker

#DevoxxFR

Dropship+ @ Canal+

5

Dropship+

Page 9: Test driven infrastructure avec Docker

#DevoxxFR

Dropship+ @ Canal+

5

Dropship+

Page 10: Test driven infrastructure avec Docker

#DevoxxFR

Dropship+ @ Canal+

5

Dropship+

Page 11: Test driven infrastructure avec Docker

#DevoxxFR

Provisioning basé sur le rôle

6

Page 12: Test driven infrastructure avec Docker

#DevoxxFR

Quelques stats

7

Infrastructure:

~ 200 instances AWS

~ 50 instances VmWare

~ 50 serveurs physiques

Salt:

~ 30 rôles d’infrastructure

~ 300 fichiers source

Page 13: Test driven infrastructure avec Docker

#DevoxxFR

Tests ?

8

Page 14: Test driven infrastructure avec Docker

#DevoxxFR

Tests ?

8

Page 15: Test driven infrastructure avec Docker

#DevoxxFR

Déploiement continu

9

Page 16: Test driven infrastructure avec Docker

#DevoxxFR

Déploiement continu

9

Page 17: Test driven infrastructure avec Docker

#DevoxxFR

Déploiement continu

9

Page 18: Test driven infrastructure avec Docker

#DevoxxFR

En développement

10

Page 19: Test driven infrastructure avec Docker

#DevoxxFR

En développement

10

Page 20: Test driven infrastructure avec Docker

#DevoxxFR

Solution

11

Page 21: Test driven infrastructure avec Docker

#DevoxxFR

Tester la gestion de conf

12

Page 22: Test driven infrastructure avec Docker

#DevoxxFR

Périmètre

13

Page 23: Test driven infrastructure avec Docker

#DevoxxFR

Périmètre

14

Page 24: Test driven infrastructure avec Docker

#DevoxxFR

Inception

15

Page 25: Test driven infrastructure avec Docker

#DevoxxFR

Inception

15

Provisioning

Page 26: Test driven infrastructure avec Docker

#DevoxxFR

Inception

15

Provisioning Assertions

Page 27: Test driven infrastructure avec Docker

#DevoxxFR

Quelle infrastructure ?

16

Page 28: Test driven infrastructure avec Docker

#DevoxxFR

Quelle infrastructure ?

16

Page 29: Test driven infrastructure avec Docker

#DevoxxFR

Tester avec Docker

17

Page 30: Test driven infrastructure avec Docker

#DevoxxFR

Containers

18

FROM centos:7.0.1406

salt-minion

salt-master

Page 31: Test driven infrastructure avec Docker

#DevoxxFR

Framework de test

19

grainsasserts

role

Page 32: Test driven infrastructure avec Docker

#DevoxxFR

Framework de test

19

grainsasserts

role

Page 33: Test driven infrastructure avec Docker

#DevoxxFR

Framework de test

19

salt-minion

salt configsalt grainssalt sources

run

grainsasserts

role

Page 34: Test driven infrastructure avec Docker

#DevoxxFR

exec state.highstate

Framework de test

19

salt-minion

grainsasserts

role

Page 35: Test driven infrastructure avec Docker

#DevoxxFR

exec state.highstateexec state.sls asserts

Framework de test

19

salt-minion

grainsasserts

role

Page 36: Test driven infrastructure avec Docker

#DevoxxFR

Migration Python

20

Page 37: Test driven infrastructure avec Docker

#DevoxxFR

Framework de test

21

grainsasserts

role

Page 38: Test driven infrastructure avec Docker

#DevoxxFR

Framework de test

21

grainsasserts

role

Page 39: Test driven infrastructure avec Docker

#DevoxxFR

exec state.highstateexec state.sls asserts

Framework de test

21

salt-minion

salt configsalt grainssalt sources

grainsasserts

role

Page 40: Test driven infrastructure avec Docker

#DevoxxFR

Framework de test

21

grainsasserts

role

unittest report

Page 41: Test driven infrastructure avec Docker

#DevoxxFR

Trop éloigné de la réalité

22

Page 42: Test driven infrastructure avec Docker

#DevoxxFR

Master / Minion

23

unittest

Page 43: Test driven infrastructure avec Docker

#DevoxxFR

Master / Minion

23

unittest

docker run salt sources

salt-master

Page 44: Test driven infrastructure avec Docker

#DevoxxFR

Master / Minion

23

unittest

docker run salt sources

salt-master

grainsasserts

role

Page 45: Test driven infrastructure avec Docker

#DevoxxFR

Master / Minion

23

unittest

docker run salt sources

salt-master

salt-minion

salt configsalt grains

docker run

grainsasserts

role

Page 46: Test driven infrastructure avec Docker

#DevoxxFR

Master / Minion

23

unittest

docker runsalt sources

salt-master

salt-minion

salt configsalt grains

grainsasserts

role

exec state.highstate

Page 47: Test driven infrastructure avec Docker

#DevoxxFR

Master / Minion

23

unittest

salt sources

salt-master

salt-minion

salt configsalt grains

grainsasserts

role

exec state.highstateexec state.sls asserts

Page 48: Test driven infrastructure avec Docker

#DevoxxFR

Master / Minion

23

unittest

grainsasserts

role

unittest report

Page 49: Test driven infrastructure avec Docker

#DevoxxFR

TDD

24

Page 50: Test driven infrastructure avec Docker

#DevoxxFR

TDD

24

grainsasserts

role XXX

Test

Page 51: Test driven infrastructure avec Docker

#DevoxxFR

TDD

24

grainsasserts

role XXX

Test

Page 52: Test driven infrastructure avec Docker

#DevoxxFR

TDD

24

grainsasserts

role XXX

Test

…states

role XXX

sources

Page 53: Test driven infrastructure avec Docker

#DevoxxFR

Live Demo

25

https://github.com/WeScale/salt-docker-integration

Page 54: Test driven infrastructure avec Docker

#DevoxxFR

Limites

26

Page 55: Test driven infrastructure avec Docker

#DevoxxFR

Limites

26

Page 56: Test driven infrastructure avec Docker

#DevoxxFR

Limites

26

Page 57: Test driven infrastructure avec Docker

#DevoxxFR

Limites

26

Page 58: Test driven infrastructure avec Docker

#DevoxxFR

Limites

26

Page 59: Test driven infrastructure avec Docker

#DevoxxFR

Merci

@slemesle @yeswescale

https://github.com/WeScale/salt-docker-integration

27