integração contínua com containers docker · integração contínua com containers docker ......
TRANSCRIPT
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
Docker + Jenkins = Amor
empacotamento de aplicações
FPMhttps://github.com/jordansissel/fpm
build.sh
$FPM_OPTS
Docker + Jenkins = Amor
empacotamento de aplicações
Especialmente útil para linguagensque sem facilidades para empacotar
Desacoplamento entre a aplicação e o ambiente
Script de empacotamento no controlede versão
Sem conflito entre dependências
Container precisa de acesso aoworkspace
Nem sempre é a melhor solução
Cuidado com a arquitetura em queocorre o empacotamento
Docker + Jenkins = Amor
teste e análise uniformes
Ideal para ambientes de CI com mutasnecessidades diferentes
Liberdade na escolha da sua pilha de testes
Ambiente de integração contínuaorganizado
Fácil reprodução e manutenção do ambiente de testes
Código de execução dos testes no controle de versão
Container precisa de acesso aoworkspace
CI Server precisa ter permissão pramanipular artefatos
É uma “caixa preta” se os devs nãoconhecerem Docker
Manutenção do Docker host
Docker + Jenkins = Amor
Jenkins slaves com containers
Funciona bem para casos onde não háambiente sob demanda
Mais rápido do que usar VMs
Escala facilmente com muito jobs
Permite usar containers como artefatosde build
Documentação escassa
Cada job necessita de uma imagemcadastrada
Volumes para os caches de dependências
Container precisa de acesso aoworkspace
CI Server/Container precisa terpermissão pra manipular artefatos
integração contínua de cookbooks
Docker + Jenkins = Amor
driver_plugin: dockerdriver_config:
socket: tcp://docke.host:5000dockerfile: test/Dockerfile
http://kitchen.ci/
[email protected] @lonefreak