integração contínua com containers docker ?· integração contínua com containers docker ......

Download Integração Contínua com containers Docker ?· Integração Contínua com containers Docker ... Liberdade…

Post on 09-Nov-2018

212 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • Integrao Contnua com containers Docker

    Fabricio Leotti

    fabricio.leotti@gmail.com

    @lonefreak

  • Agenda

    StacksContinuous Integration

    DockerDockerize Continuous Integration

    Docker + Jenkins

  • Devtools

  • Stacks

  • Stacks

  • Stacks

  • Stacks

  • Stacks

  • Stacks

  • Stacks

  • Stacks

  • Stacks

  • Stacks

  • Continuous Integration is a software development practice

    where members of a team integrate their work

    frequently, usually eachperson integrates at leastdaily - leading to multiple integrations per day. Each

    integration is verified by an automated build (including

    test) to detect integration errors as quickly as possible.

    -- Martin Fowler

    Continuous Integration

  • Maintain a code repository

    Automate the build

    Make the build self-testing

    Everyone commits to the baseline every day

    Every commit (to baseline) should be built

    Test in a clone of the production environment

    Make it easy to get the latest deliverables

    Everyone can see the results of the latest build

    Keep the build fast

    Automate deployment

    Continuous Integration

  • Maintain a code repository

    Automate the build

    Make the build self-testing

    Everyone commits to the baseline every day

    Every commit (to baseline) should be built

    Test in a clone of the production environment

    Make it easy to get the latest deliverables

    Everyone can see the results of the latest build

    Keep the build fast

    Automate deployment

    Continuous Integration

  • Maintain a code repository

    Automate the build

    Make the build self-testing

    Everyone commits to the baseline every day

    Every commit (to baseline) should be built

    Test in a clone of the production environment

    Make it easy to get the latest deliverables

    Everyone can see the results of the latest build

    Keep the build fast

    Automate deployment

    Continuous Integration

  • Maintain a code repository

    Automate the build

    Make the build self-testing

    Everyone commits to the baseline every day

    Every commit (to baseline) should be built

    Test in a clone of the production environment

    Make it easy to get the latest deliverables

    Everyone can see the results of the latest build

    Keep the build fast

    Automate deployment

    Continuous Integration

  • Maintain a code repository

    Automate the build

    Make the build self-testing

    Everyone commits to the baseline every day

    Every commit (to baseline) should be built

    Test in a clone of the production environment

    Make it easy to get the latest deliverables

    Everyone can see the results of the latest build

    Keep the build fast

    Automate deployment

    Continuous Integration

  • Maintain a code repository

    Automate the build

    Make the build self-testing

    Everyone commits to the baseline every day

    Every commit (to baseline) should be built

    Test in a clone of the production environment

    Make it easy to get the latest deliverables

    Everyone can see the results of the latest build

    Keep the build fast

    Automate deployment

    Continuous Integration

  • Maintain a code repository

    Automate the build

    Make the build self-testing

    Everyone commits to the baseline every day

    Every commit (to baseline) should be built

    Test in a clone of the production environment

    Make it easy to get the latest deliverables

    Everyone can see the results of the latest build

    Keep the build fast

    Automate deployment

    Continuous Integration

  • Continuous Integration

  • Continuous Integration

  • Continuous Integration

  • Continuous Integration

  • Continuous Integration

  • Continuous Integration

  • Continuous Integration

  • Continuous Integration

  • Docker

  • Docker

  • Docker

  • PRODUCTION

    READY??

    Docker

  • Docker

  • Docker

  • Docker

  • Dockerize Continuous Integration

  • Dockerize Continuous Integration

  • Dockerize Continuous Integration

  • Dockerize Continuous Integration

  • Dockerize Continuous Integration

  • Dockerize Continuous Integration

  • Dockerize Continuous Integration

  • Dockerize Continuous Integration

  • Dockerize Continuous Integration

  • Docker + Jenkins = Amor

    empacotamento de aplicaes

    FPMhttps://github.com/jordansissel/fpm

    build.sh

    $FPM_OPTS

  • Docker + Jenkins = Amor

    empacotamento de aplicaes

    Especialmente til para linguagensque sem facilidades para empacotar

    Desacoplamento entre a aplicao e o ambiente

    Script de empacotamento no controlede verso

    Sem conflito entre dependncias

    Container precisa de acesso aoworkspace

    Nem sempre a melhor soluo

    Cuidado com a arquitetura em queocorre o empacotamento

  • Docker + Jenkins = Amor

    teste e anlise uniformes

  • Docker + Jenkins = Amor

    teste e anlise uniformes

    Ideal para ambientes de CI com mutasnecessidades diferentes

    Liberdade na escolha da sua pilha de testes

    Ambiente de integrao contnuaorganizado

    Fcil reproduo e manuteno do ambiente de testes

    Cdigo de execuo dos testes no controle de verso

    Container precisa de acesso aoworkspace

    CI Server precisa ter permisso pramanipular artefatos

    uma caixa preta se os devs noconhecerem Docker

    Manuteno do Docker host

  • Docker + Jenkins = Amor

    Jenkins slaves com containers

  • Docker + Jenkins = Amor

    Jenkins slaves com containers

    Funciona bem para casos onde no hambiente sob demanda

    Mais rpido do que usar VMs

    Escala facilmente com muito jobs

    Permite usar containers como artefatosde build

    Documentao escassa

    Cada job necessita de uma imagemcadastrada

    Volumes para os caches de dependncias

    Container precisa de acesso aoworkspace

    CI Server/Container precisa terpermisso pra manipular artefatos

  • Docker + Jenkins = Amor

    testes de integrao

  • integrao contnua de cookbooks

    Docker + Jenkins = Amor

    driver_plugin: dockerdriver_config:

    socket: tcp://docke.host:5000dockerfile: test/Dockerfile

    http://kitchen.ci/

  • fabricio.leotti@gmail.com @lonefreak